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
Independent Column Mapping. Keys are the real names in the table and the values their names in the application
public function columnMap() { return array( 'cd_upload' => 'cd_upload', 'nome_original' => 'nome_original', 'nome_servidor' => 'nome_servidor', 'criacao' => 'criacao', 'cd_unidade' => 'cd_unidade' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'code' ,\n 'the_name' => 'theName' ,\n 'the_type' => 'theType' ,\n 'the_year' => 'theYear'\n );\n }", "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'ID',\n 'item_id' => 'Item_ID',\n 'des' => 'Des',\n 'depts_id' => 'Depts_ID',\n 'application_id' => 'Application_ID',\n 'module_id' => 'Module_ID',\n );\n\n\n }", "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'classification_name' => 'classification_name'\n );\n }", "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'users_id' => 'users_id',\n 'secret_key' => 'secret_key',\n 'hmac' => 'hmac',\n 'created' => 'created'\n );\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'user_id' => 'user_id',\n 'create_time' => 'create_time',\n 'money' => 'money',\n 'bank_name' => 'bank_name',\n 'account_bank' => 'account_bank',\n 'account_name' => 'account_name',\n 'remark' => 'remark',\n 'status' => 'status'\n ];\n }", "public function columnMap()\n {\n return array(\n 'name' => 'name', \n 'description' => 'description', \n );\n }", "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'username' => 'username',\n 'hash' => 'hash',\n 'email' => 'email',\n 'created' => 'created'\n );\n }", "public function columnMap(){\n\t\treturn array(\n\t\t\t'id'=> 'id',\n\t\t\t'name'=> 'name',\n\t\t\t'content'=> 'content' \n\t\t);\n\t}", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'pole_id' => 'pole_id',\n 'worker_id' => 'worker_id',\n 'notice' => 'notice'\n ];\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'id_user' => 'id_user',\n 'ip' => 'ip',\n 'user_agent' => 'user_agent'\n ];\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'nickname' => 'nickname',\n 'realname' => 'realname',\n 'username' => 'username',\n 'openid' => 'openid',\n 'phone' => 'phone',\n 'passwd' => 'passwd',\n 'avatar' => 'avatar',\n 'sex' => 'sex',\n 'province' => 'province',\n 'city' => 'city',\n 'area' => 'area',\n 'address' => 'address',\n 'cardsn' => 'cardsn',\n 'recommend' => 'recommend',\n 'level' => 'level',\n 'groupid' => 'groupid',\n 'vip' => 'vip',\n 'add_at' => 'add_at',\n 'active' => 'active',\n 'integral' => 'integral',\n 'money' => 'money',\n 'update_at' => 'update_at'\n ];\n }", "public function columnMap()\n {\n return array(\n 'id' => 'id', \n 'name' => 'name', \n 'class_name' => 'class_name', \n 'description' => 'description', \n 'logo' => 'logo',\n 'delsign' => 'delsign'\n );\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'notice_id' => 'notice_id',\n 'worker_id' => 'worker_id'\n ];\n }", "public function columnMap()\n {\n // the values their names in the application\n return array(\n 'id' => 'id',\n 'enabled' => 'enabled',\n 'suspended' => 'suspended',\n 'gender' => 'gender',\n 'info' => 'info',\n 'password' => 'password',\n 'roles' => 'roles',\n 'first_name' => 'firstName',\n 'last_name' => 'lastName',\n 'email' => 'email',\n 'created_at' => 'created_at',\n 'expires_at' => 'expires_at',\n );\n }", "public function columnMap()\n {\n return array(\n 'sess_id' => 'sess_id',\n 'created' => 'created',\n 'changed' => 'changed',\n 'ip' => 'ip',\n 'vars' => 'vars'\n );\n }", "public function columnMap()\n {\n return [\n 'id_comentario' => 'id_comentario',\n 'comentario' => 'comentario',\n 'fecha_comentario' => 'fecha_comentario',\n 'id_reporte' => 'id_reporte',\n 'id_usuario' => 'id_usuario'\n ];\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'level' => 'level',\n 'name' => 'name',\n 'sort' => 'sort',\n 'type' => 'type',\n 'value' => 'value',\n 'token' => 'token',\n 'pid' => 'pid'\n ];\n }", "public function columnMaps();", "public function columnMap()\n {\n return [\n 'id_categoria' => 'id_categoria',\n 'titulo' => 'titulo',\n 'descripcion' => 'descripcion'\n ];\n }", "public function columnMap()\n {\n return [\n 'id_rol' => 'id_rol',\n 'rol' => 'rol'\n ];\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'name' => 'name',\n 'type' => 'type',\n 'expression' => 'expression',\n 'description' => 'description',\n 'start_time' => 'start_time',\n 'end_time' => 'end_time',\n 'is_close' => 'is_close',\n 'group' => 'group',\n 'prom_img' => 'prom_img',\n 'goods_ids' => 'goods_ids'\n ];\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'user_id' => 'user_id',\n 'session_id' => 'session_id',\n 'goods_id' => 'goods_id',\n 'goods_sn' => 'goods_sn',\n 'goods_name' => 'goods_name',\n 'market_price' => 'market_price',\n 'goods_price' => 'goods_price',\n 'member_goods_price' => 'member_goods_price',\n 'goods_num' => 'goods_num',\n 'spec_key' => 'spec_key',\n 'spec_key_name' => 'spec_key_name',\n 'bar_code' => 'bar_code',\n 'selected' => 'selected',\n 'add_time' => 'add_time',\n 'prom_type' => 'prom_type',\n 'prom_id' => 'prom_id',\n 'sku' => 'sku'\n ];\n }", "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'title' => 'title',\n 'source_id' => 'source_id',\n 'abstract' => 'abstract',\n 'Personal_Author' => 'Personal_Author',\n 'Corporate_Author' => 'Corporate_Author',\n 'parent_literature' => 'parent_literature',\n 'conference_title' => 'conference_title',\n 'conference_date' => 'conference_date',\n 'conference_place' => 'conference_place',\n 'host_unit' => 'host_unit',\n 'keywords' => 'keywords',\n 'publishDate' => 'publishDate',\n 'file_id' => 'file_id'\n );\n }", "public function columnMap()\n {\n return array(\n 'idconfig' => 'idconfig',\n 'ip' => 'ip',\n 'usuario' => 'usuario',\n 'senha' => 'senha',\n 'dominio' => 'dominio',\n 'criado' => 'criado',\n 'modificado' => 'modificado',\n 'classe_usuario' => 'classe_usuario'\n );\n }", "public function columnMap()\n {\n return array(\n 'bank_id' => 'bank_id',\n 'title' => 'title',\n 'name' => 'name',\n 'shorten' => 'shorten',\n 'logo' => 'logo',\n 'home' => 'home',\n 'epay' => 'epay',\n 'bankcode' => 'bankcode',\n 'status' => 'status'\n );\n }", "public function columnMap()\n {\n return array(\n 'idmov' => 'idmov',\n 'cd_unidade' => 'cd_unidade',\n 'usuario_responsavel' => 'usuario_responsavel',\n 'requerente' => 'requerente',\n 'cd_ordem_servico_reparo' => 'cd_ordem_servico_reparo',\n 'tipo' => 'tipo',\n 'obs' => 'obs',\n 'criado' => 'criado',\n 'centro_armazenagem_entrada' => 'centro_armazenagem_entrada',\n 'centro_armazenagem_saida' => 'centro_armazenagem_saida'\n );\n }", "public function columnMap()\n {\n return [\n 'imageid' => 'imageid',\n 'galleryid' => 'galleryid',\n 'visible' => 'visible'\n ];\n }", "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'item_type'\t=> 'itemtype',\n 'name' => 'name',\n 'description' => 'description',\n 'cash'\t=> 'cashCost',\n 'diamond' => 'diamondCost',\n );\n }", "public function columnMap()\n {\n return array(\n 'id' => 'sfafba_id',\n\t\t\t'partner_id' => 'sfafba_partner_id',\n\t\t\t'name' => 'sfafba_name',\n\t\t\t'size' => 'sfafba_size',\n\t\t\t'lang' => 'sfafba_lang',\n\t\t\t'html_code' => 'sfafba_html_code',\n\t\t\t'keywords' => 'sfafba_keywords',\n\t\t\t'is_active' => 'sfafba_is_active',\n\t\t\t'created_at' => 'sfafba_created_at',\n\t\t\t'updated_at' => 'sfafba_updated_at'\n );\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'producer_id' => 'producer_id',\n 'description_id' => 'description_id',\n 'product_detail_id' => 'product_detail_id',\n 'quantity' => 'quantity',\n 'import_price' => 'import_price',\n 'sale_price' => 'sale_price',\n 'discount' => 'discount',\n 'view' => 'view',\n 'hot' => 'hot',\n 'created_at' => 'created_at'\n ];\n }", "function mappingColumns()\n {\n $mapped_columns = array(\n \"id\" => 0,\n \"url\" => 2,\n \"iframe\" => false,\n \"preview\" => false,\n \"thumbs\" => 1,\n \"title\" => 3,\n \"tags\" => 5,\n \"categories\" => 4,\n \"pornstars\" => 6,\n \"duration\" => 7,\n \"views\" => false,\n \"likes\" => false,\n \"unlikes\" => false,\n );\n\n return $mapped_columns;\n }", "public function columnMap()\n {\n return array(\n 'idprodutoArea' => 'idprodutoArea',\n 'cd_tabela' => 'cd_tabela',\n 'precoBase' => 'precoBase',\n 'produto_cd_produto' => 'produto_cd_produto',\n 'referencia' => 'referencia',\n 'area_cd_area' => 'area_cd_area',\n 'unidade_negocio_cd_unidade' => 'unidade_negocio_cd_unidade',\n 'markup_minimo' => 'markup_minimo',\n 'pedido_minimo' => 'pedido_minimo',\n 'aplicar_desconto_cliente' => 'aplicar_desconto_cliente',\n 'observacao' => 'observacao',\n 'old_id' => 'old_id'\n );\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'purchase_invoices_id' => 'purchase_invoices_id',\n 'product_id' => 'product_id',\n 'quantity' => 'quantity',\n 'price' => 'price',\n 'total' => 'total',\n 'created_at' => 'created_at'\n ];\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'ragionesociale' => 'ragionesociale',\n 'indirizzo' => 'indirizzo',\n 'cap' => 'cap',\n 'citta' => 'citta',\n 'provincia' => 'provincia',\n 'telefono' => 'telefono',\n 'emailaziendale' => 'emailaziendale',\n 'piva' => 'piva',\n 'codfisc' => 'codfisc',\n 'pec' => 'pec',\n 'codicesdi' => 'codicesdi',\n 'referentenome' => 'referentenome',\n 'referentetelefono' => 'referentetelefono',\n 'referenteemail' => 'referenteemail',\n 'prodottiesposti' => 'prodottiesposti',\n 'fasciadiprezzo' => 'fasciadiprezzo',\n 'numerocoespositore' => 'numerocoespositore',\n 'nomecoespositore' => 'nomecoespositore',\n 'catalogonome' => 'catalogonome',\n 'catalogoindirizzo' => 'catalogoindirizzo',\n 'catalogocap' => 'catalogocap',\n 'catalogocitta' => 'catalogocitta',\n 'catalogoprovincia' => 'catalogoprovincia',\n 'catalogotelefono' => 'catalogotelefono',\n 'catalogoemail' => 'catalogoemail',\n 'catalogositoweb' => 'catalogositoweb',\n 'catalogofacebook' => 'catalogofacebook',\n 'catalogoinstagram' => 'catalogoinstagram',\n 'catalogotwitter' => 'catalogotwitter',\n 'catalogodescrizione' => 'catalogodescrizione'\n ];\n }", "public function columnMap()\n {\n return array(\n 'mandatary_id' => 'mandatary_id',\n 'phone' => 'phone',\n 'real_name' => 'real_name',\n 'id_card' => 'id_card',\n 'id_card_image' => 'id_card_image',\n 'business_id' => 'business_id',\n 'status' => 'status',\n 'user_id' => 'user_id',\n 'update_time' => 'update_time'\n );\n }", "public function columnMap()\n {\n return array(\n 'bonus_id' => 'bonus_id',\n 'bonus_type_id' => 'bonus_type_id',\n 'bonus_sn' => 'bonus_sn',\n 'user_id' => 'user_id',\n 'used_time' => 'used_time',\n 'order_id' => 'order_id',\n 'emailed' => 'emailed'\n );\n }", "public function columnMap()\n {\n return array(\n 'rec_id' => 'rec_id',\n 'user_id' => 'user_id',\n 'email' => 'email',\n 'link_man' => 'link_man',\n 'tel' => 'tel',\n 'goods_id' => 'goods_id',\n 'goods_desc' => 'goods_desc',\n 'goods_number' => 'goods_number',\n 'booking_time' => 'booking_time',\n 'is_dispose' => 'is_dispose',\n 'dispose_user' => 'dispose_user',\n 'dispose_time' => 'dispose_time',\n 'dispose_note' => 'dispose_note'\n );\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'jobId' => 'jobId',\n 'workerPid' => 'workerPid',\n 'queueId' => 'queueId',\n 'userId' => 'userId',\n 'messageId' => 'messageId',\n 'categoryId' => 'categoryId',\n 'groupId' => 'groupId',\n 'emailId' => 'emailId',\n 'createAt' => 'createAt',\n 'modifyAt' => 'modifyAt',\n 'attempts' => 'attempts',\n 'errors' => 'errors',\n 'lock' => 'lock',\n 'status' => 'status'\n ];\n }", "public function columnMap()\n {\n return array(\n 'cd_historico' => 'cd_historico',\n 'cd_template' => 'cd_template',\n 'cd_unidade' => 'cd_unidade',\n 'email' => 'email',\n 'status' => 'status',\n 'codigoMandrill' => 'codigoMandrill',\n 'motivoRejeicao' => 'motivoRejeicao',\n 'lido' => 'lido',\n 'clique' => 'clique',\n 'enviado' => 'enviado',\n 'modificado' => 'modificado'\n );\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'area_name' => 'area_name',\n 'area_short_name' => 'area_short_name',\n 'area_parent_id' => 'area_parent_id',\n 'area_sort' => 'area_sort',\n 'area_deep' => 'area_deep',\n 'area_region' => 'area_region'\n ];\n }", "public function columnMap()\n {\n return array(\n 'diaMesAno' => 'diaMesAno'\n );\n }", "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'parent_id' => 'parentId',\n 'name' => 'name',\n 'order' => 'order',\n 'store_id' => 'storeId',\n 'user_id' => 'userId',\n 'url' => 'url',\n 'depth' => 'depth',\n 'created_at' => 'createdAt',\n 'updated_at' => 'updatedAt',\n 'deleted_at' => 'deletedAt',\n 'is_deleted' => 'isDeleted'\n ];\n }", "public function columnMap()\n {\n return array(\n 'cd_item' => 'cd_item',\n 'Cd_produto' => 'Cd_produto',\n 'cd_etapa' => 'cd_etapa',\n 'descricao' => 'descricao',\n 'qtdAtendida' => 'qtdAtendida',\n 'qtdEstimada' => 'qtdEstimada'\n );\n }", "function map_columns($columns)\n {\n $columns[$this->taxonomies_id] = __($this->taxonomies_name, $this->tax_domain);\n return $columns;\n }", "public function columnMap()\n {\n return array(\n 'cd_desconto' => 'cd_desconto',\n 'cd_caixa' => 'cd_caixa',\n 'cd_produto' => 'cd_produto',\n 'cd_unidade_negocio' => 'cd_unidade_negocio',\n 'cd_usuario_criacao' => 'cd_usuario_criacao',\n 'data_criacao' => 'data_criacao',\n 'percentual' => 'percentual',\n 'status' => 'status',\n 'tipo_desconto' => 'tipo_desconto'\n );\n }", "public function columnMap()\n {\n return array(\n 'cd_item' => 'cd_item',\n 'cd_nfservico' => 'cd_nfservico',\n 'num_item' => 'num_item',\n 'descricao' => 'descricao',\n 'qtde' => 'qtde',\n 'valor' => 'valor',\n 'desconto' => 'desconto',\n 'ind_mov' => 'ind_mov',\n 'cfop' => 'cfop',\n 'tipo_item' => 'tipo_item',\n 'unidadeMedida' => 'unidadeMedida',\n 'ncm' => 'ncm',\n 'cod_genero' => 'cod_genero',\n 'cod_servico' => 'cod_servico',\n 'cst_pis' => 'cst_pis',\n 'baseCalculoPis' => 'baseCalculoPis',\n 'aliquotaPis' => 'aliquotaPis',\n 'qtdeBaseCalculoPis' => 'qtdeBaseCalculoPis',\n 'aliquotaReaisPis' => 'aliquotaReaisPis',\n 'valorPis' => 'valorPis',\n 'cst_cofins' => 'cst_cofins',\n 'baseCalculoCofins' => 'baseCalculoCofins',\n 'aliquotaCofins' => 'aliquotaCofins',\n 'qtdeBaseCalculoCofins' => 'qtdeBaseCalculoCofins',\n 'aliquotaReaisCofins' => 'aliquotaReaisCofins',\n 'valorCofins' => 'valorCofins'\n );\n }", "abstract public function tableColumns();", "protected function initializeColumnMapping() {\n\t\t// add always available cols for filemetadata\n\t\tforeach ($this->metaColMapping as $damColName => $metaColName) {\n\t\t\t$this->columnMapping[$damColName] = $metaColName;\n\t\t}\n\n\t\t// add additional cols if ext:for filemetadata is installed\n\t\tif (ExtensionManagementUtility::isLoaded('filemetadata')) {\n\t\t\tforeach ($this->additionalMetaColMapping as $damColName => $metaColName) {\n\t\t\t\t$this->columnMapping[$damColName] = $metaColName;\n\t\t\t}\n\t\t}\n\t}", "private static function _getColumns()\n\t{\n\t\tstatic $arrColumns;\n\t\tif (!isset($arrColumns))\n\t\t{\n\t\t\t$arrTableDefine = DataAccess::getDataAccess()->FetchTableDefine(self::$_strStaticTableName);\n\t\t\t\n\t\t\tforeach ($arrTableDefine['Column'] as $strName=>$arrColumn)\n\t\t\t{\n\t\t\t\t$arrColumns[self::tidyName($strName)] = $strName;\n\t\t\t}\n\t\t\t$arrColumns[self::tidyName($arrTableDefine['Id'])] = $arrTableDefine['Id'];\n\t\t}\n\t\t\n\t\treturn $arrColumns;\n\t}", "abstract public static function get_column_key(): string;", "public function getColumns() {\n $columns = array();\n foreach($this->mapping as $key => $value) {\n array_push($columns, $value);\n }\n return $columns;\n }", "protected function loadColumnInfo($tableName)\n {\n $this->columns[$tableName] = array();\n $this->keys[$tableName] = array();\n\n $columnQuery = \"\n SELECT DISTINCT\n COLUMN_NAME, ORDINAL_POSITION\n FROM INFORMATION_SCHEMA.COLUMNS\n WHERE\n TABLE_NAME = ? AND\n TABLE_SCHEMA = ?\n ORDER BY ORDINAL_POSITION\n \";\n\n\n $columnQuery = \"\n select\n rf.RDB\\$FIELD_NAME as COLUMN_NAME,\n rf.RDB\\$FIELD_POSITION as ORDINAL_POSITION\n from RDB\\$RELATION_FIELDS as rf\n where\n upper(RDB\\$RELATION_NAME) = upper(?)\n order by\n ORDINAL_POSITION\n\n \";\n\n\n $columnStatement = $this->pdo->prepare($columnQuery);\n $columnStatement->execute(array($tableName));\n\n while ($columName = $columnStatement->fetchColumn(0)) {\n $this->columns[$tableName][] = $columName;\n }\n\n $keyQuery = \"\n SELECT\n KCU.COLUMN_NAME,\n KCU.ORDINAL_POSITION\n FROM\n INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU\n LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS as TC\n ON TC.TABLE_NAME = KCU.TABLE_NAME\n WHERE\n TC.CONSTRAINT_TYPE = 'PRIMARY KEY' AND\n TC.TABLE_NAME = ? AND\n TC.TABLE_SCHEMA = ?\n ORDER BY\n KCU.ORDINAL_POSITION ASC\n \";\n\n $keyQuery = \"\n select\n idseg.rdb\\$field_name as COLUMN_NAME,\n idseg.rdb\\$field_position as ORDINAL_POSITION,\n rc.rdb\\$relation_name as tablename,\n rc.rdb\\$constraint_name as pk_name\n from\n RDB\\$RELATION_CONSTRAINTS AS rc\n left join\n rdb\\$index_segments as idseg on\n (rc.rdb\\$index_name = idseg.rdb\\$index_name)\n where\n rc.RDB\\$CONSTRAINT_TYPE = 'PRIMARY KEY'\n and upper(rc.RDB\\$RELATION_NAME) = upper(?)\n order by\n rc.rdb\\$constraint_name, idseg.rdb\\$field_position\n \";\n\n $keyStatement = $this->pdo->prepare($keyQuery);\n $keyStatement->execute(array($tableName));\n\n while ($columName = $keyStatement->fetchColumn(0)) {\n $this->keys[$tableName][] = $columName;\n }\n }", "function add_columns_to_mapping_screen($columns)\n {\n\n $columns[__($this->taxonomies_name, $this->tax_domain)] = $this->taxonomies_id;\n\n // Always add English mappings.\n $columns[$this->taxonomies_name] = $this->taxonomies_id;\n\n return $columns;\n }", "protected function _configureColumns()\n {\n if (empty($this->columns)) {\n $this->guessColumns();\n }\n $this->_sourceColumns = $this->columns;;\n\n $columnsByKey = [];\n foreach ($this->columns as $column) {\n $columnKey = $this->_getColumnKey($column);\n for ($j = 0; true; $j++) {\n $suffix = ($j) ? '_' . $j : '';\n $columnKey .= $suffix;\n if (!array_key_exists($columnKey, $columnsByKey)) {\n break;\n }\n }\n $columnsByKey[$columnKey] = $column;\n }\n\n $this->columns = $columnsByKey;\n }", "public function columns($table_name);", "public function toMap($strColumnKeyName, $strColumnValueName) {\r\n\t\t$tblTMP = $this->PDOStatement->fetchAll(PDO::FETCH_ASSOC);\r\n\t\tif(!sizeof($tblTMP)) return array();\r\n\t\t$tblOutput=array();\r\n\t\tforeach($tblTMP as $tblRow) {\r\n\t\t\t$tblOutput[$tblRow[$strColumnKeyName]]=$tblRow[$strColumnValueName];\r\n\t\t}\r\n\t\treturn $tblOutput;\r\n\t}", "abstract public function getColNames();", "abstract protected function columns();", "function map($column){\n //\n //Get the entity name\n $entity=$column->get_parent();\n $ename=$entity->name;\n //\n //Get the cname\n $cname=$column->name;\n //\n //Get the referenced table name \n $ref=$column->ref_table_name;\n //\n //Return a string version of the on clause\n return\"\\t{$ename}.{$cname}={$ref}.{$ref}\\t\";\n }", "function lookup_columns()\n {\n // Avoid doing multiple SHOW COLUMNS if we can help it\n $key = C_Photocrati_Transient_Manager::create_key('col_in_' . $this->get_table_name(), 'columns');\n $this->_table_columns = C_Photocrati_Transient_Manager::fetch($key, FALSE);\n if (!$this->_table_columns) {\n $this->object->update_columns_cache();\n }\n return $this->_table_columns;\n }", "public function getColumnDetails( $tablename, $columnname );", "public function get_columns() {\n\n\t\treturn array(\n\t\t\t'id' \t\t => '%d',\n\t\t\t'name' \t\t => '%s',\n\t\t\t'date_created' \t=> '%s',\n\t\t\t'date_modified' => '%s',\n\t\t\t'status'\t\t=> '%s',\n\t\t\t'ical_hash'\t\t=> '%s'\n\t\t);\n\n\t}", "function getValue($table_name, $key_column_name, $key_value, $column_name)\n {\n\n }", "public function getColumnMaps(ModelInterface $model, DiInterface $dependencyInjector);", "public function tableColumns($table,$column);", "private function pk_column(){\n\t\tif( in_array(static::$table_name, Model_Kiwi::$composite_key_tables) ){\n\t\t\treturn \"composite_key\";\n\t\t}\n\t\t//if the primary key of the table has been defined in config - return that else use convention\n\t\tif( in_array( static::$table_name, array_keys(Model_Kiwi::$kiwi_pk_hash))){\n\t\t\treturn Model_Kiwi::$kiwi_pk_hash[ static::$table_name ];\n\t\t}\n\t\treturn Model_Kiwi::singularize(static::$table_name) . '_id';\n\t}", "abstract protected function getCompositeColumnsNames();", "public function getColumnConfig();", "function columns($table) {\r\n \tstatic $tables;\r\n\r\n \tif (!isset($tables[$table])) {\r\n\t \t$columns = $this->column_definitions($table);\r\n\r\n\t \tforeach($columns as $column) {\r\n\t \t\t$result[$column['Field']] = new MysqlColumn(\r\n\t \t\t\t$column['Field'],\r\n\t \t\t\t$column['Default'],\r\n\t \t\t\t$column['Type'],\r\n\t \t\t\t$column['Null'] == 'YES'\r\n\t \t\t);\r\n\r\n\t \t}\r\n\r\n \t\t$tables[$table] = $result;\r\n\r\n \t}\r\n\r\n \treturn $tables[$table];\r\n }", "public function getColumnName();", "abstract public static function columnData();", "private function createNewColumnsInBaseTable()\n {\n\n Schema::table($this->baseTable, function (Blueprint $table) {\n\n //If no associative columns, the use same column name as merge column.\n if(empty($this->associativeColumns))\n {\n $columns = Schema::getColumnListing($this->mergeTable);\n\n foreach($columns as $key){\n if(!Schema::hasColumn($table->getTable(),$key)) {\n $table->text($key)->nullable();\n }\n }\n //Otherwise create only the table columns in baseTable which appears in array.\n }else{\n foreach ($this->associativeColumns as $baseColumn => $mergeColumn)\n {\n if(!Schema::hasColumn($table->getTable(),$baseColumn)) {\n $table->text($baseColumn)->nullable();\n }\n }\n }\n\n });\n }", "public function get($key) {\n if (!array_key_exists($key, $this->mapping))\n return null;\n\n return $this->mapping[$key]['column_name'];\n }", "public function getPageIdColumnName() {}", "public abstract function get_columns($table);", "function _get_fields_map_simple() {\n\t\t$cache_name = \"fields_map_simple\";\n\t\t// Get from local cache\n\t\tif ($this->CACHE_IN_MEMORY && isset($this->$cache_name)) {\n\t\t\treturn $this->$cache_name;\n\t\t}\n\t\t// Create array of fields in tables\n\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t$db_cols = cache_get($cache_name);\n\t\t}\n\t\tif (empty($db_cols)) {\n\t\t\t$Q = db()->query(\"SHOW COLUMNS FROM \".db('user').\"\");\n\t\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t\tif ($A[\"Field\"] == \"id\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\t$db_cols[$A[\"Field\"]] = $A[\"Field\"];\n\t\t\t}\n\t\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t\tcache_set($cache_name, $db_cols);\n\t\t\t}\n\t\t}\n\t\t// Put to local cache\n\t\tif ($this->CACHE_IN_MEMORY && !isset($this->$cache_name)) {\n\t\t\t$this->$cache_name\t= $db_cols;\n\t\t}\n\n\t\treturn $db_cols;\n\t}", "public function getTableMappings()\n {\n $tableMapping = array();\n $tableMapping['KEYWORD'] = 'tx_mksearch_keywords';\n\n return $tableMapping;\n }", "abstract public function loadColumns();", "function getAllColumns($table){\n\t\t$types=sqlite_fetch_column_types($table,$this->id,SQLITE_ASSOC);\n\t\t$columns=array();\n\t\tforeach($types as $column=>$type){\n\t\t\t$columns[$column]=array(\n\t\t\t\t\"name\"=>$column,\n\t\t\t\t\"key\"=>&$row['Key'],\n\t\t\t\t\"type\"=>&$types[$column],\n\t\t\t\t\"default\"=>&$row['Default'],\n\t\t\t\t\"comment\"=>&$row['Comment']\n\t\t\t\t);\n\t\t}\n\t\treturn $columns;\n\t}", "protected function generateColumns()\n\t{\n\t\tforeach ($this->dataSource->getColumns() as $name) {\n\t\t\t$this->addColumn($name);\n\t\t}\n\t}", "abstract public static function get_column_name(): string;", "private function initColumnArrays()\n {\n foreach ($this->columns as $key => $column) {\n $dql = $this->accessor->getValue($column, 'dql');\n $data = $this->accessor->getValue($column, 'data');\n\n $currentPart = $this->entityShortName;\n $currentAlias = $currentPart;\n $metadata = $this->metadata;\n\n if (true === $this->accessor->getValue($column, 'customDql')) {\n $columnAlias = str_replace('.', '_', $data);\n\n // Select\n $selectDql = preg_replace('/\\{([\\w]+)\\}/', '$1', $dql);\n $this->addSelectColumn(null, $selectDql.' '.$columnAlias);\n // Order on alias column name\n $this->addOrderColumn($column, null, $columnAlias);\n // Fix subqueries alias duplication\n $searchDql = preg_replace('/\\{([\\w]+)\\}/', '$1_search', $dql);\n $this->addSearchColumn($column, null, $searchDql);\n } elseif (true === $this->accessor->getValue($column, 'selectColumn')) {\n $parts = explode('.', $dql);\n\n while (count($parts) > 1) {\n $previousPart = $currentPart;\n $previousAlias = $currentAlias;\n\n $currentPart = array_shift($parts);\n $currentAlias = ($previousPart === $this->entityShortName ? '' : $previousPart.'_').$currentPart;\n\n if (!array_key_exists($previousAlias.'.'.$currentPart, $this->joins)) {\n $this->addJoin($previousAlias.'.'.$currentPart, $currentAlias, $this->accessor->getValue($column, 'joinType'));\n }\n\n $metadata = $this->setIdentifierFromAssociation($currentAlias, $currentPart, $metadata);\n }\n\n $this->addSelectColumn($currentAlias, $this->getIdentifier($metadata));\n $this->addSelectColumn($currentAlias, $parts[0]);\n $this->addSearchOrderColumn($column, $currentAlias, $parts[0]);\n } else {\n // Add Order-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'orderColumn') && true === $this->accessor->getValue($column, 'orderable')) {\n $orderColumn = $this->accessor->getValue($column, 'orderColumn');\n $orderParts = explode('.', $orderColumn);\n if (count($orderParts) < 2) {\n $orderColumn = $this->entityShortName.'.'.$orderColumn;\n }\n $this->orderColumns[] = $orderColumn;\n } else {\n $this->orderColumns[] = null;\n }\n\n // Add Search-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'searchColumn') && true === $this->accessor->getValue($column, 'searchable')) {\n $searchColumn = $this->accessor->getValue($column, 'searchColumn');\n $searchParts = explode('.', $searchColumn);\n if (count($searchParts) < 2) {\n $searchColumn = $this->entityShortName.'.'.$searchColumn;\n }\n $this->searchColumns[] = $searchColumn;\n } else {\n $this->searchColumns[] = null;\n }\n }\n }\n\n return $this;\n }", "public function toMap(string $columnKeyName, string $columnValueName): array\n {\n $output=array();\n while ($row = $this->pdoStatement->fetch(\\PDO::FETCH_ASSOC)) {\n $output[$row[$columnKeyName]]=$row[$columnValueName];\n }\n return $output;\n }", "protected function computeAndValidateColumnMapping(): array\n {\n $columnMapping = [];\n\n /* Fetch primary column data */\n $this->computeAndStoreDataIfNotExists('primaryColumnData');\n\n $columnMapping[] = [\n Data::CONFIG_COLUMN_NAME => $this->_primaryColumnData[Data::CONFIG_COLUMN_NAME],\n Data::CONFIG_COLUMN_TYPE => Columns::COLUMN_PRIMARY,\n ];\n\n /* Fetch pivot column data */\n $this->computeAndStoreDataIfNotExists('pivotColumnsData');\n\n foreach ($this->_pivotColumnsData as $pivot) {\n $columnMapping[] = [\n Data::CONFIG_COLUMN_NAME => $pivot[Data::CONFIG_COLUMN_NAME],\n Data::CONFIG_COLUMN_TYPE => Columns::COLUMN_PIVOT,\n ];\n }\n\n /* Fetch timestamp column data */\n $this->computeAndStoreDataIfNotExists('timestampData');\n\n $columnMapping[] = [\n Data::CONFIG_COLUMN_NAME => $this->_timestampData[Data::CONFIG_COLUMN_NAME],\n Data::CONFIG_COLUMN_TYPE => Columns::COLUMN_TIMESTAMP,\n ];\n\n return $columnMapping;\n }", "protected function get_column_info()\n {\n }", "protected function get_column_info()\n {\n }", "public function getFieldMapping($field_name);", "private function getFieldsOnTable()\n{\n\n $returnArray=array(); \n foreach ($this->tableStructure as $ind => $fieldArray) { \n $returnArray[$fieldArray['columnName']]=$fieldArray['columnName'];\n }\n \n return $returnArray; \n}", "function metaCourse()\n{\n return array(\n // Every column in the mapped table\n array(\n 'Id', 'Name', 'CourseId'\n ),\n\n // Every column part of the primary key\n array(\n 'Id'\n ),\n\n // Every column and their data types\n array(\n 'Id' => \"Auto_Increment\",\n 'Name' => \"Varchar\",\n 'CourseId' => \"Varchar\"\n ),\n\n // The columns that have numeric data types\n array(\n 'Id'\n )\n\n\n );\n}", "public function registerColumnTypes();", "private function createNewColumnsInBaseTable()\n {\n\n Schema::table($this->baseTable, function (Blueprint $table) {\n\n //If no associative columns, the use same column name as merge column.\n if (empty($this->columns)) {\n $columns = Schema::getColumnListing($this->mergeTable);\n\n foreach ($columns as $key) {\n if (!Schema::hasColumn($table->getTable(), $key)) {\n $table->text($key)->nullable();\n }\n }\n //Otherwise create only the table columns in baseTable which appears in array.\n } else {\n foreach ($this->columns as $baseColumn => $mergeColumn) {\n if (!Schema::hasColumn($table->getTable(), $baseColumn)) {\n $table->text($baseColumn)->nullable();\n }\n }\n }\n\n });\n }", "protected function provideTableClassNameMap(): void\n {\n $list = $this->tempMerge('tca.meta.classNameMap', 'tca.classNameMap');\n if (is_array($list)) {\n NamingUtil::$tcaTableClassNameMap = array_merge(NamingUtil::$tcaTableClassNameMap, $list);\n }\n }", "public function getAccessibleColumn(){\n return [\n 'name'=>'Name',\n 'price'=>'Price',\n 'updated_price_at'=>'Updated Price At',\n 'copy_number'=>'Quantity',\n // 'view'=>'View',\n 'categoryName'=>'Category',\n\n 'columnCount' => '',\n // 'brands' => 'Brands',\n\n // 'imageCount'=>'Images',\n // 'commentCount'=>'Comment',\n // 'upVoteCount'=> 'Up Vote',\n // 'downVoteCount'=> 'Down Vote'\n // 'category_id'=>'Category',\n ];\n }", "public function columnCode(){\n $columnNames = [];\n $names = [];\n $codes = [];\n $columns = DB::table('helpers')->pluck('helper');\n foreach ($columns as $key=>$column){\n $columnNames[$key] = unserialize($column);\n }\n for($i=0;$i<count($columnNames);$i++){\n for($j=0;$j<count($columnNames[$i]);$j++){\n\n array_push($names,$columnNames[$i][$j]);\n }\n\n }\n array_push($names,'hd_image');\n array_push($names,'ld_image');\n array_push($names,'datasheet');\n array_push($names,'footprint');\n array_push($names,'manufacturer_part_number');\n array_push($names,'quantity_available');\n array_push($names,'unit_price');\n array_push($names,'manufacturer');\n array_push($names,'description');\n array_push($names,'packaging');\n array_push($names,'series');\n array_push($names,'part_status');\n array_push($names,'minimum_quantity');\n array_push($names,'original');\n\n $names = array_unique($names);\n $names = array_values($names);\n\n\n for($t=0;$t<count($names);$t++){\n $codes[str_random(4)] = $names[$t];\n }\n\n\n\n DB::table('column_names')->update(['column_name'=>serialize($codes)]);\n\n\n }", "public function get_columns() {\n\t\treturn array(\n\t\t\t'id' => '%d',\n\t\t\t'user_id' => '%d',\n\t\t\t'username' => '%s',\n\t\t\t'name' => '%s',\n\t\t\t'email' => '%s',\n\t\t\t'product_count' => '%d',\n\t\t\t'sales_count'\t => '%d',\n\t\t\t'sales_value'\t => '%f',\n\t\t\t'status'\t\t => '%s',\n\t\t\t'notes' => '%s',\n\t\t\t'date_created' => '%s',\n\t\t);\n\t}", "function set_content_columns($table_name) {\n\t\t\t$this->content_columns = $this->content_columns_all = self::$db->table_info($table_name);\n\t\t\t$table_name_i18n = $table_name.$this->i18n_table_suffix;\n\n\t\t\tif($this->is_i18n && self::$db->table_exists($table_name_i18n)) {\n\t\t\t\t$reserved_columns = $this->i18n_reserved_columns;\n\t\t\t\t$this->content_columns_i18n = $i18n_columns = self::$db->table_info($table_name_i18n);\n\t\t\t\t$this->content_columns_all = array_merge($this->content_columns, $i18n_columns);\n\n\t\t\t\tforeach($i18n_columns as $key => $col) {\n\t\t\t\t\tif(in_array($col['name'], $reserved_columns)) {\n\t\t\t\t\t\tunset($i18n_columns[$key]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->i18n_column_names[] = $col['name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->i18n_table = $table_name_i18n;\n\t\t\t} else {\n\t\t\t\t$this->is_i18n = false;\n\t\t\t}\n\t\t}", "public function classAndPropertyNameToJoinTableNameMappings()\n {\n return [\n [64, \\Neos\\Party\\Domain\\Model\\Person::class, 'propertyName', 'neos_party_domain_model_person_propertyname_join'],\n [64, 'SomePackage\\Domain\\Model\\Blob', 'propertyName', 'somepackage_domain_model_blob_propertyname_join'],\n [64, Security\\Policy\\Role::class, 'propertyName', 'neos_flow_security_policy_role_propertyname_join'],\n [64, Security\\Account::class, 'propertyName', 'neos_flow_security_account_propertyname_join'],\n [64, 'Neos\\Flow\\Security\\Authorization\\Resource\\SecurityPublishingConfiguration', 'propertyName', 'neos_flow_security_authorization_resourc_07c54_propertyname_join'],\n [30, 'Neos\\Flow\\Security\\Authorization\\Resource\\SecurityPublishingConfiguration', 'propertyName', 'neos_f_07c54_propertyname_join'],\n [30, 'Neos\\Flow\\Security\\Authorization\\Resource\\SecurityPublishingConfiguration', 'somePrettyLongPropertyNameWhichMustBeShortened', 'neos_flow_security_autho_6afa5']\n ];\n }", "protected function initColumns()\n\t{\n\t\tif($this->columns===array())\n\t\t{\n\t\t\tif($this->dataProvider instanceof NActiveDataProvider)\n\t\t\t\t$this->columns=$this->dataProvider->model->attributeNames();\n\t\t\telse if($this->dataProvider instanceof IDataProvider)\n\t\t\t{\n\t\t\t\t// use the keys of the first row of data as the default columns\n\t\t\t\t$data=$this->dataProvider->getData();\n\t\t\t\tif(isset($data[0]) && is_array($data[0]))\n\t\t\t\t\t$this->columns=array_keys($data[0]);\n\t\t\t}\n\t\t}\n\t\t$id=$this->getId();\n\t\tforeach($this->columns as $i=>$column)\n\t\t{\n\t\t\tif ($column['name'] && (!isset($column['export']) || @$column['export']!=false)) {\n\t\t\t\tif(is_string($column))\n\t\t\t\t\t$column=$this->createDataColumn($column);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!isset($column['class']))\n\t\t\t\t\t\t$column['class']='NDataColumn';\n\t\t\t\t\t$column=Yii::createComponent($column, $this);\n\t\t\t\t}\n\t\t\t\tif(!$column->visible)\n\t\t\t\t{\n\t\t\t\t\tunset($this->columns[$i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($column->id===null)\n\t\t\t\t\t$column->id=$id.'_c'.$i;\n\t\t\t\t$this->columns[$i]=$column;\n\t\t\t} else {\n\t\t\t\tunset($this->columns[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->columns as $column)\n\t\t\t\t$column->init();\n\t}", "public function getTableColumns()\n\t{\n\t}", "protected static function keyToAttributeMapping()\n {\n return array();\n }" ]
[ "0.78786296", "0.7716914", "0.7581518", "0.7580315", "0.75181746", "0.7496103", "0.7490029", "0.74615186", "0.7422307", "0.73996055", "0.73713225", "0.73607874", "0.7356903", "0.7355668", "0.73356444", "0.7335067", "0.7334235", "0.7314454", "0.7294334", "0.7247176", "0.7244646", "0.72407204", "0.71833473", "0.7179319", "0.7168337", "0.71132064", "0.7096133", "0.70932543", "0.7089714", "0.7085332", "0.7068283", "0.7065112", "0.70404965", "0.7033432", "0.7030144", "0.69754004", "0.69278675", "0.69157225", "0.6912273", "0.6876479", "0.68704677", "0.6804702", "0.67752725", "0.6704222", "0.67039037", "0.6380113", "0.6357464", "0.6316404", "0.62223774", "0.61180395", "0.6110963", "0.6025306", "0.59933233", "0.59869725", "0.59830326", "0.597232", "0.5940303", "0.58938205", "0.58933604", "0.58495605", "0.5847072", "0.5820844", "0.580068", "0.57274914", "0.5727224", "0.57113385", "0.5696975", "0.56956595", "0.56819224", "0.5660418", "0.56376976", "0.5635951", "0.56346226", "0.56199765", "0.5612342", "0.56121373", "0.56002563", "0.55756736", "0.5571676", "0.5563885", "0.55575156", "0.5553294", "0.55491674", "0.5533364", "0.55286306", "0.55285835", "0.5524958", "0.5524392", "0.55122876", "0.5510936", "0.55021435", "0.54934883", "0.54912627", "0.5489296", "0.5483797", "0.5470993", "0.54638845", "0.546365", "0.5457412", "0.54531866" ]
0.71719337
24
Hent en jobb fra databasen
public function __construct(Int $cron_id) { $query = new Query( "SELECT * FROM `" . Converter::TABLE . "` WHERE `id` = '#id' ", [ 'id' => $cron_id ], 'videoconverter' ); $data = $query->getArray(); if (!$data) { throw new Exception( 'Fant ikke CRON ID ' . $cron_id ); } $this->id = (int) $data['id']; $this->eier = new Eier( (int) $data['blog_id'], (int) $data['pl_id'], (int) $data['season'] ); $this->film = new Film( $data['type'], $data['b_id'], $data ); $this->fil = new Fil( $data['file_path'], $data['file_name'] ); $this->status = $data['status_progress']; $this->data = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function markImportDatabaseDone() {}", "public function run()\n {\n DB::table('jobs')->insert([\n 'worker_id'=>1,\n 'client_id'=>2,\n 'status_id'=>3,\n 'name'=>'order1',\n 'description'=>\"description tutututututu\",\n 'price'=>1000000,\n ]);\n DB::table('jobs')->insert([\n 'worker_id'=>2,\n 'client_id'=>3,\n 'status_id'=>3,\n 'name'=>'order2',\n 'description'=>\"description tutututututu\",\n 'price'=>1000000,\n ]);\n }", "public function run()\n {\n DB::table('job')->insert([\n \t[\n\t 'title' => 'job 1',\n\t 'minimumWorkExperience' => 5,\n\t 'state' => 'state',\n\t 'countryID' => 1,\n\t 'responsibilities' => 'eating',\n\t 'workLocation' => 'Subang',\n\t 'jobLevelID' => 1,\n\t 'status' => 1,\n\t\t 'created_at' => new DateTime,\n\t\t 'updated_at' => new DateTime\n \t],\n \t\n ]);\n }", "public function finish_database_export() {\n }", "public function run()\n {\n DB::table('harga_obats')->truncate();\n $data =[\n ['id'=>1, 'id_obat'=>'konimexsanbe', 'harga'=>10000, 'tgl_awal'=>new DateTime, 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id'=>2, 'id_obat'=>'IBUPKIMITABLOBAT', 'harga'=>5000, 'tgl_awal'=>new DateTime, 'created_at' => new DateTime, 'updated_at' => new DateTime]\n ];\n DB::table('harga_obats')->insert($data);\n }", "function commit() ;", "public function run()\n {\n DB::table('all_deskjobs')->insert([\n 'deskjob' => \"Algemeen\",\n ]);\n }", "protected function envelheceErros() {\n\t\t\t$sSQL = \"INSERT INTO aged_rdtb_accounting SELECT * FROM rdtb_accounting WHERE login < date_trunc('day',now() - interval '2 days') AND session_id like 'E:%'\";\n\t\t\t$this->bd->consulta($sSQL,false);\n\t\t\t$sSQL = \"DELETE FROM rdtb_accounting WHERE login < date_trunc('day',now() - interval '2 days') AND session_id like 'E:%'\";\n\t\t\t$this->bd->consulta($sSQL);\n\n\t\t\t$this->vacuum(\"rdtb_accounting\");\n\t\t}", "function dead_db()\n {\n }", "public function run()\n {\n try{\n $this->command->info('Provincias table seed!');\n $path = 'app/developer_docs/provincias.sql';\n DB::unprepared(file_get_contents($path));\n }catch(QueryException $e){\n if ($e->getCode()==23505){\n $this->command->error('Provincias NO fueron plantados (ya existían)!');\n return 0;\n }\n }\n $this->command->info('Provincias table seeded!');\n }", "public function committed();", "public function run()\n {\n \t\n DB::table('bodegas')->insert([\n 'nombre_bodega' => \"Volcanes\",\n ]);\n\n DB::table('bodegas')->insert([\n 'nombre_bodega' => \"Santa Lucia\",\n ]);\n\n DB::table('bodegas')->insert([\n 'nombre_bodega' => \"Monumento\",\n ]);\n }", "public function run()\n {\n DB::table('jobs')->insert([\n [\n 'job_id' => 1,\n 'job_name' => 'ASN/Honorer',\n ],\n [\n 'job_id' => 2,\n 'job_name' => 'Swasta/Karyawan',\n ],\n [\n 'job_id' => 3,\n 'job_name' => 'Wirausaha/Wiraswasta',\n ],\n ]);\n }", "public function run()\n {\n DB::table('job_service')->insert([\n 'jobId' => 1,\n 'serviceId' => 1,\n 'isActive' => 1,\n 'isComplete' => 1,\n 'isVoid' => 0,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n \n DB::table('job_service')->insert([\n 'jobId' => 2,\n 'serviceId' => 1,\n 'isActive' => 1,\n 'isComplete' => 1,\n 'isVoid' => 0,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "public function run()\n {\n \\DB::statement(\" INSERT INTO indec.poblacion_departamentos(id_provincia, id_departamento, habitantes, habitantes_sumar)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge2 host=192.6.0.66 user=postgres password=110678',\n\t\t 'SELECT id_provincia, id_departamento, habitantes, coalesce(habitantes_sumar,0)\n\t\t\tFROM\n\t\t\t\tindec.poblacion_departamentos;')\n\t\t AS migracion(id_provincia char(2),\n\t\t\t\t id_departamento char(3),\n\t\t\t\t habitantes integer,\n\t\t\t\t habitantes_sumar integer\n\t\t\t\t)\n\t); \");\n }", "public function run()\n {\n /*\n $maaltijdsoort = new Maaltijdsoort();\n $maaltijdsoort->soort = \"geen maaltijd\";\n $maaltijdsoort->prijs = 0;\n $maaltijdsoort->beschikbaar = \"all\";\n $maaltijdsoort->save();\n */\n \n $maaltijdsoort = new Maaltijdsoort();\n $maaltijdsoort->soort = \"lunch\";\n $maaltijdsoort->prijs = 20;\n $maaltijdsoort->beschikbaar = \"all\";\n $maaltijdsoort->save();\n \n $maaltijdsoort = new Maaltijdsoort();\n $maaltijdsoort->soort = \"diner\";\n $maaltijdsoort->prijs = 30;\n $maaltijdsoort->beschikbaar = \"weekend\";\n $maaltijdsoort->save();\n \n $maaltijdsoort = new Maaltijdsoort();\n $maaltijdsoort->soort = \"combo\";\n $maaltijdsoort->prijs = 50;\n $maaltijdsoort->beschikbaar = \"weekend\";\n $maaltijdsoort->save();\n }", "public function finish_database_export() {\n $this->importer->finish_database_import();\n }", "public function run()\n {\n\n\n \\DB::table('luong_co_ban')->delete();\n\n \\DB::table('luong_co_ban')->insert(array(\n 0 =>\n array(\n 'Tien_Luong' => 40000,\n 'Mo_Ta' => '40000 each shift',\n 'created_at' => '2020-05-17 00:00:00',\n 'updated_at' => '2020-05-18 09:02:28',\n 'deleted_at' => NULL,\n ),\n 1 =>\n array(\n 'Tien_Luong' => 50000,\n 'Mo_Ta' => '50000 each shift',\n 'created_at' => '2020-05-18 08:47:01',\n 'updated_at' => '2020-05-18 09:02:14',\n 'deleted_at' => NULL,\n ),\n ));\n }", "public function complete(){\n\n $flag = 0;\n \n $query = \"SET foreign_key_checks = 0\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n \n $query1 = \"DELETE FROM \" . $this->table_name . \"\n WHERE id_ordine=?\";\n $stmt1 = $this->conn->prepare($query1);\n $this->id_ordine=htmlspecialchars($this->id_ordine);\n $stmt1->bindParam(1, $this->id_ordine);\n $stmt1->execute();\n if($stmt1){\n $query2 = \"UPDATE articolo set id_ordine = NULL \n WHERE id_ordine=?\";\n\n $stmt2 = $this->conn->prepare($query2);\n $this->id_ordine=htmlspecialchars($this->id_ordine);\n $stmt2->bindParam(1, $this->id_ordine);\n $stmt2->execute();\n\n if($stmt2){\n\n $query3 = \"SET foreign_key_checks = 1\";\n $stmt3 = $this->conn->prepare($query3);\n $stmt3->execute();\n if($stmt3)\n return true;\n }\n }\n else\n return false;\n }", "public function save()\n {\n if ($this->tid)\n {\n $query = sprintf('UPDATE %sTASK SET TASK_STAT=\"%s\", TASK_NOTE=\"%s\" WHERE TASK_ID=%d',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->taskstate, $GLOBALS['DB']),\n mysql_real_escape_string($this->note, $GLOBALS['DB']),\n $this->tid);\n // print_r($query); \n mysql_query($query, $GLOBALS['DB']);\n \n }\n }", "public function run()\r\n {\r\n $bank_data_file = 'database/excel/ginkositen.xlsx';\r\n $import = new BankDataImport();\r\n Excel::import($import, $bank_data_file);\r\n $this->command->info('Bank table seeded!');\r\n }", "public function completeTask(){\n $query = \"UPDATE \" . $this->table_name . \" \n SET \n stato = 3\n WHERE id_ordine = :id_ordine\";\n \n $stmt = $this->conn->prepare($query);\n\n $this->id_ordine=htmlspecialchars(strip_tags($this->id_ordine));\n\n $stmt->bindParam(\":id_ordine\", $this->id_ordine);\n\n if($stmt->execute()){\n return true;\n }\n \n return false;\n }", "protected function isImportDatabaseDone() {}", "public function run () : void\n\t{\n\t\t# Usando constructor de consultas\n\t\t$this->db->table( \"t_autores\" )->insertBatch(\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t\"nombre\"\t\t=> \"Claudia Lars\",\n\t\t\t\t\t\"nacionalidad\"\t=> \"Salvadoreña\",\n\t\t\t\t\t\"genero\"\t\t=> \"F\",\n\t\t\t\t\t\"creado\"\t\t=> date( \"Y-m-d H:i:s\" )\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t\"nombre\"\t\t=> \"Salvador Salazar Arrué\",\n\t\t\t\t\t\"nacionalidad\"\t=> \"Salvadoreña\",\n\t\t\t\t\t\"genero\"\t\t=> \"M\",\n\t\t\t\t\t\"creado\"\t\t=> date( \"Y-m-d H:i:s\" )\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t}", "public function commit() {}", "public function commitUpdate();", "function setCompleted() {\n global $connection, $user;\n\n $this->movePosition(1);\n\n $sql = 'update TR_BATCH set completed_date = now() where tr_batch_id = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"i\", $this->batch_id);\n $statement->execute();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n }", "public function run()\n {\n DB::table('type_benda')->insert([\n 'kat_benda' => 'elektronik',\n ]);\n\n DB::table('jeniskelamins')->insert([\n 'jenis_kelamin'=> 'laki-laki'\n ]);\n \n DB::table('position_managers')->insert([\n 'position_manag' => 'pemilik'\n ]);\n\n }", "public function run()\n {\n DB::table('ormawas')->insert([\n 'nama_ormawa' => 'UKM PROGRESS',\n 'tgl_lahir_ormawa' => '2012-10-19',\n 'deskripsi_ormawa' => 'PROGRESS MOVEON'\n ]);\n }", "function BackupTabla($Tabla){\n \n if($Tabla==\"preventa\" or $Tabla==\"precotizacion\"){\n print(\"OK;0\");\n exit();\n }\n $obCon = new Backups($_SESSION['idUser']);\n\n $DatosServer=$obCon->DevuelveValores(\"servidores\", \"ID\", 2);\n $FechaSinc=date(\"Y-m-d H:i:s\");\n $CondicionUpdate=\"WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated LIMIT 5000\";\n $sql=$obCon->ArmeSqlReplace($Tabla, DB, $CondicionUpdate,$DatosServer[\"DataBase\"],$FechaSinc, \"\");\n //print($sql);\n if($sql==''){\n print(\"OK;0\");\n exit();\n }\n $Mensaje=\"\";\n $Mensaje=$obCon->QueryExterno($sql, $DatosServer[\"IP\"], $DatosServer[\"Usuario\"], $DatosServer[\"Password\"], $DatosServer[\"DataBase\"], \"\");\n if($Mensaje<>\"\" and $Mensaje<>1){\n $Mensaje=\"Error: al insertar datos en la tabla $Tabla: \".$Mensaje;\n $obCon->RegistraAlerta(\"\", \"\", \"Backups\", $Mensaje, \"\");\n }\n $sqlUp=\"UPDATE $Tabla SET Sync='$FechaSinc', Updated='$FechaSinc' $CondicionUpdate\";\n $Mensaje=$obCon->Query($sqlUp);\n if($Mensaje<>\"\" and $Mensaje<>1){\n $Mensaje=\"Error: al insertar datos en la tabla $Tabla: \".$Mensaje;\n $obCon->RegistraAlerta(\"\", \"\", \"Backups\", $Mensaje, \"\");\n }\n $sql=\"SELECT COUNT(*) as TotalRegistros FROM $Tabla WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated\";\n $ConsultaConteo=$obCon->Query($sql);\n $Registros=$obCon->FetchAssoc($ConsultaConteo);\n $TotalRegistros=$Registros[\"TotalRegistros\"];\n print(\"OK;$TotalRegistros\");\n }", "public function run()\n {\n DB::table('gab_status_documento')->insert([\n 'nom_status' => 'Enviado',\n 'ind_status' => 'A',\n ]);\n DB::table('gab_status_documento')->insert([\n 'nom_status' => 'Recebido',\n 'ind_status' => 'A',\n ]);\n DB::table('gab_status_documento')->insert([\n 'nom_status' => 'Aguardando resposta',\n 'ind_status' => 'A',\n ]);\n DB::table('gab_status_documento')->insert([\n 'nom_status' => 'Respondido',\n 'ind_status' => 'A',\n ]);\n }", "public function run()\n\t\t{\n\t\t\t$data=[\n\t\t\t\t[\n\t\t\t\t\t'nama' => \"Ta'rif Awwal\"\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'nama' => \"Ta'rif Tsani\"\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'nama' => \"Takwin Awwal\"\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'nama' => \"Takwin Tsani\"\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'nama' => \"Tanfidziyah\"\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'nama' => \"Itqon\"\n\t\t\t\t],\n\t\t\t];\n\n\t\t\tDB::table('jenjang_tarbiyah')->truncate();\n\t\t\tDB::table('jenjang_tarbiyah')->insert($data);\n\t\t}", "public function run()\n {\n DB::table('jenis_barang')->insert([\n 'jenis_barang' => 'Logistik',\n ]);\n\n DB::table('jenis_barang')->insert([\n 'jenis_barang' => 'Peralatan',\n ]);\n }", "public function run()\n {\n \tDB::beginTransaction();\n\n Excel::import(new PageImport, storage_path('imports/pages.xls'));\n Excel::import(new PageItemImport, storage_path('imports/page_items.xls'));\n\n DB::commit();\n }", "public function run()\n {\n \n\n \\DB::table('bodegas')->delete();\n \n \\DB::table('bodegas')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'nombre' => 'puebla',\n 'ciudad' => 'Puebla de los Angeles',\n 'estado' => 'Puebla',\n 'pais' => 'México',\n 'activa' => 1,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'nombre' => 'huauchinango',\n 'ciudad' => 'Puebla de los Angeles',\n 'estado' => 'Puebla',\n 'pais' => 'México',\n 'activa' => 1,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 3,\n 'nombre' => 'puebla_2',\n 'ciudad' => 'Puebla de los Angeles',\n 'estado' => 'Puebla',\n 'pais' => 'México',\n 'activa' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 4,\n 'nombre' => 'Tulancingo_1',\n 'ciudad' => 'Tulancingo',\n 'estado' => 'Hidalgo',\n 'pais' => 'México',\n 'activa' => 1,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n ));\n \n \n }", "public function run()\n { \n \n Empresa::truncate(); // Evita duplicar datos\n \n $empresa = new Empresa();\n $empresa->nombre = \"Hidrandina\";\n $empresa->descripcion = \"Descripcion 1\";\n $empresa->ruc = intval(20132023542);\n $empresa->user_id = 1;\n $empresa->save();\n\n $empresa = new Empresa();\n $empresa->nombre = \"Enel Distribucion\";\n $empresa->descripcion = \"Descripcion 2\";\n $empresa->ruc = intval(20269985902);\n $empresa->user_id = 1;\n $empresa->save();\n\n Tarifa::truncate(); // Evita duplicar datos\n\n $tarifa = new Tarifa();\n $tarifa->codigo = \"Tarifa 1\";\n $tarifa->tipo = \"Comercial\";\n $tarifa->save();\n\n $tarifa = new Tarifa();\n $tarifa->codigo = \"Tarifa 2\";\n $tarifa->tipo = \"Domestico\";\n $tarifa->save();\n\n Distrito::truncate(); // Evita duplicar datos\n\n $distrito = new Distrito();\n $distrito->nombre = \"San Blas\"; \n $distrito->save();\n\n $distrito = new Distrito();\n $distrito->nombre = \"Santa Luzmila\"; \n $distrito->save();\n\n Region::truncate(); // Evita duplicar datos\n\n $distrito = new Region();\n $distrito->nombre = \"San Martin\"; \n $distrito->save();\n\n $distrito = new Region();\n $distrito->nombre = \"Moyobamba\"; \n $distrito->save();\n\n Ficha::truncate(); // Evita duplicar datos\n \n $ficha = new Ficha();\n $ficha->localidad = \"Shucllapampa\";\n $ficha->D1FE = \"Potencia 65W, S\";\n $ficha->D2FE = \"Corriente 10A, S\";\n $ficha->D3FE = \"Capacidad 92Ah, S\";\n $ficha->D4FE = \"Potencia 85W, S\";\n $ficha->D1FF = \"Tension 16.7, N\";\n $ficha->D2FF = \"Tension 12.8, S\"; $ficha->D3FF = \"Tension 12.8, S\";\n $ficha->D4FF = \"Tension 11.8, N\";\n $ficha->Comentarios = \"Sin observaciones\"; \n $ficha->Resultado = \"Si Cumple\"; \n $ficha->tarifa_id = 1;\n $ficha->empresa_id = 1; \n $ficha->region_id = 1;\n // $ficha->distrito_id = 1;\n $ficha->save();\n\n $ficha->distritos()->attach([1]); //Relacionar la ficha a un distrito\n\n $ficha = new Ficha();\n $ficha->localidad = \"Contumasa\";\n $ficha->D1FE = \"Potencia 45W, S\";\n $ficha->D2FE = \"Corriente 8A, S\";\n $ficha->D3FE = \"Capacidad 72Ah, S\";\n $ficha->D4FE = \"Potencia 95W, S\";\n $ficha->D1FF = \"Tension 19.7, N\";\n $ficha->D2FF = \"Tension 11.8, S\"; $ficha->D3FF = \"Tension 10.8, S\";\n $ficha->D4FF = \"Tension 12.8, N\";\n $ficha->Comentarios = \"Se obtuvieron las siguientes observaciones: No cuenta con pararayos y 01 transformador averiado\";\n $ficha->Resultado = \"No Cumple\";\n $ficha->tarifa_id = 2;\n $ficha->empresa_id = 2; \n $ficha->region_id = 2;\n // $ficha->distrito_id = 2;\n $ficha->save();\n\n $ficha->distritos()->attach([2]); //Relacionar la ficha a un distrito\n\n }", "public function run()\n {\n //creando varias instancias de la tabla cola\n // $cola= new cola;\n //$cola->id_cola=\"1\";\n //$cola->vehiculo_id=\"120\";\n // $cola->parqueo_id=\"1\";\n //$cola->save();\n\n\n }", "public function run()\n {\n DB::table('jobs')->insert([\n 'name' => 'ディレクター',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n DB::table('jobs')->insert([\n 'name' => 'デザイナー',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n DB::table('jobs')->insert([\n 'name' => 'フロントエンジニア',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n DB::table('jobs')->insert([\n 'name' => 'バックエンドエンジニア',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n DB::table('jobs')->insert([\n 'name' => 'インフラエンジニア',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n DB::table('jobs')->insert([\n 'name' => '営業',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n DB::table('jobs')->insert([\n 'name' => '事務',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n DB::table('jobs')->insert([\n 'name' => '役員',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n }", "public function add_data_to_tombstone(){\n }", "public function run()\n {\n $file = fopen(\"./public/migrasi/blok.csv\",\"r\");\n\n\t while(! feof($file)){\n\t \t$csv_line = fgetcsv($file);\n\t \tif ( $csv_line != \"\" ) {\n\t \t\tif ( $csv_line[1] != NULL ){\n\t \t\t\t$cluster = Modules\\Project\\Entities\\ProjectKawasan::where(\"cluster_id\",$csv_line[1])->get();\n\t \t\t\tif ( count($cluster) > 0 ){\n\t \t\t\t\t$cluster_id = $cluster->first()->id;\n\t \t\t\t}else{\n\t \t\t\t\t$cluster_id = NULL;\n\t \t\t\t}\n\t \t\t}else{\n\t \t\t\t$cluster_id = NULL;\n\t \t\t}\n\n \t\t\t\t$newblok = new Modules\\Project\\Entities\\Blok;\n \t\t\t\t$newblok->project_id = $csv_line[0];\n\t\t\t\t$newblok->project_kawasan_id = $cluster_id;\n\t\t\t\t$newblok->name = $csv_line[2];\n\t\t\t\t$newblok->luas = 0;\n\t\t\t\t$newblok->kode = $csv_line[3];\n\t\t\t\t$newblok->description = \"Migration from Erem based export at 18 Oct 2018\";\n\t\t\t\t$newblok->created_at = date(\"Y-m-d H:i:s\");\n\t\t\t\t$newblok->block_id = $csv_line[4];\n\t\t\t\t$newblok->save();\n\t \t\t\t\t\t \t\t\n\t \t\t}\t \t\t\t\n\t \t}\n\n fclose($file);\n }", "public function run()\n {\n DB::statement('set foreign_key_checks = 0;');\n DB::table('evento')->truncate();\n DB::statement('set foreign_key_checks = 1;');\n\n $evento= new evento();\n $evento->titulo=\"End game\";\n $evento->fecha_inicio=\"2019-4-26\";\n $evento->fecha_final=\"2019-4-28\";\n $evento->color=\"green\";\n $evento->save();\n }", "public function run()\n {\n DB::table('sigecig_serie_recibo')->insert([\n 'serie_recibo'=>'A',\n 'detalle'=>'Serie que sirve para registrar los pagos de colegiatura y varios'\n ]);\n DB::table('sigecig_serie_recibo')->insert([\n 'serie_recibo'=>'B',\n 'detalle'=>'Serie que sirve para registrar los pagos de timbres'\n ]);\n }", "public function pingJob(): void\n {\n $this->storage->pingJob($this->storedJob);\n }", "public function run()\n {\n\n ini_set('memory_limit', '4G');\n set_time_limit(0);\n\n\n $bbddArr = [];\n //Lo primero será coger las bbdds\n $bbddTmp = DB::connection('segmentation')->table('bbdd_lists')->get();\n foreach ($bbddTmp as $key => $bbddItem) {\n $bbddArr[$bbddItem->val] = $bbddItem->id;\n }\n $db = DB::connection('segmentation')->getPdo();\n $q = \"SELECT id,bbdd_subscribed as val FROM bbdd_subscribers\";\n $query = $db->prepare($q);\n $query->execute();\n $arrIns = [];\n $cont = 0;\n while ($item = $query->fetch()) {\n\t\t\t// process data\n //dd($item);\n $val = explode(',', $item['val']);\n foreach ($val as $userBbdd) {\n $arrIns [] = ['id'=>$item['id'],'id_val'=>$bbddArr[strtoupper($userBbdd)]];\n }\n $cont ++;\n if ($cont>2000) {\n $cont = 0;\n DB::connection('segmentation')->table('bbdd_users')->insertIgnore($arrIns);\n unset($arrIns);\n $arrIns = [];\n\n }\n }\n if (!empty($arrIns))\n DB::connection('segmentation')->table('bbdd_users')->insertIgnore($arrIns);\n \n\n }", "public function commit();", "public function commit();", "public function commit();", "public function commit();", "public function commit();", "public function run()\n {\n DB::table('objectifs')->insert([\n 'objet' => 'depeche',\n 'date'=>'2019-02-03',\n 'note'=>'cour vite',\n 'statut'=>1,\n 'contact_id'=>1\n\n ]);\n\n DB::table('objectifs')->insert([\n 'objet' => 'depecherrrr',\n 'date'=>'2019-02-03',\n 'note'=>'cour vite chaud',\n 'statut'=>0,\n 'contact_id'=>1\n \n ]);\n }", "public function run()\n {\n DB::table('tbluspl')->insert([\n 'tblplancdgo' => 3,\n 'tblusrocdgo' => 2,\n 'tblusplflag' => 'A',\n 'tblusplfech' => '2021-09-07'\n ]);\n }", "public function run()\n {\n // se desahilitan los chequeos de llaves foraneas para poder truncar la tabla\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n BudgetConfig::query()->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n DB::table('budget_configs')->insert([\n 'name'=>'Material y equipo',\n 'description' => 'Solo se permite agregar productos',\n 'custom_text' => 'Material y equipo',\n 'type' => '1',\n 'active' => '1',\n 'color' => 'grey',\n 'icon' => 'fas fa-align-justify',\n 'order' => '1',\n 'created_by' => '1',\n 'updated_by' => '1'\n ]);\n DB::table('budget_configs')->insert([\n 'name'=>'Mano de obra',\n 'description' => 'Solo se permite agregar servicios',\n 'custom_text' => 'Mano de obra',\n 'type' => '1',\n 'active' => '1',\n 'color' => 'grey',\n 'icon' => 'fas fa-align-justify',\n 'order' => '2',\n 'created_by' => '1',\n 'updated_by' => '1'\n ]);\n }", "function EndStartRun()\n {\n if ($this->transaction_in_progress) \n {\n $this->db->CompleteTrans();\n $this->transaction_in_progress =false;\n }\n }", "public function run(){\n $explorers = $this->job_service->getUnfinishedJobs();\n\n // Recorro todos los trabajadores\n foreach ($explorers as $explorer){\n // Compruebo el trabajo pendiente del explorador\n $job = $this->job_service->checkJob($explorer->get('id_job'));\n\n // Si el trabajo ya ha terminado\n if ($job->getStatus()==jobService::STATUS_FINISHED){\n // Le quito el trabajo pendiente al explorador\n $explorer->set('id_job',null);\n $explorer->save();\n\n $job->jobDone();\n }\n }\n }", "public function run()\n {\n DB::table(\"bibliotheques\")->insert([\n \"nom\" => \"bibliotheque 1\",\n \"description\" => \"description 1\",\n \"created_at\" => now()\n ]);\n DB::table(\"bibliotheques\")->insert([\n \"nom\" => \"bibliotheque 2\",\n \"description\" => \"description 2\",\n \"created_at\" => now()\n ]);\n DB::table(\"bibliotheques\")->insert([\n \"nom\" => \"bibliotheque 3\",\n \"description\" => \"description 3\",\n \"created_at\" => now()\n ]);\n }", "public function migrateJobsDatabase()\n {\n $this->migrationsRepository = $this->app->make('migration.repository');\n $this->migrationsRepository->createRepository();\n\n $migrator = new StructuredMigrator(\n $this->migrationsRepository,\n $this->app->make('db'),\n new JobsMigrationBatch()\n );\n\n $migrator->run();\n }", "public function run()\n {\n DB::table('jobs')->insert([\n [\n 'employer_id' => '1',\n 'status' => 'open',\n 'category_id' => '1',\n 'job_title' => 'demo title',\n 'description' => 'this is description',\n 'salary_type' => 'per month',\n 'occupation' => 'laravel developer',\n 'education' => 'BSAC',\n 'experience' => '3 Year',\n ],\n [\n 'employer_id' => '1',\n 'status' => 'open',\n 'category_id' => '2',\n 'job_title' => 'demo title 2',\n 'description' => 'this is description',\n 'salary_type' => 'per month',\n 'occupation' => 'php developer',\n 'education' => 'SE',\n 'experience' => '2 Year',\n ],\n ]);\n }", "public function run()\n {\n \n /* #################################################*/\n /* Table: est_estado_ticket */\n /* ################################################*/\n\n $estadoTicket=new Est_estado_ticket();\n\n $estadoTicket->est_nombre=\"Nuevo\";\n $estadoTicket->est_descripcion=\"Estado asignado por el administrador.\";\n $estadoTicket->est_orden=1;\n $estadoTicket->est_estado=1;\n $estadoTicket->est_usu_creacion=1;\n $estadoTicket->est_usu_modificacion=1;\n $estadoTicket->save();\n\n $estadoTicket=new Est_estado_ticket();\n $estadoTicket->est_nombre=\"En Proceso\";\n $estadoTicket->est_descripcion=\"Estado cuando pasa a En Proceso\";\n $estadoTicket->est_orden=2;\n $estadoTicket->est_estado=1;\n $estadoTicket->est_usu_creacion=1;\n $estadoTicket->est_usu_modificacion=1;\n $estadoTicket->save();\n\n $estadoTicket=new Est_estado_ticket();\n $estadoTicket->est_nombre=\"En Espera\";\n $estadoTicket->est_descripcion=\"Estado el proceso esta en lista de espera\";\n $estadoTicket->est_orden=3;\n $estadoTicket->est_estado=1;\n $estadoTicket->est_usu_creacion=1;\n $estadoTicket->est_usu_modificacion=1;\n $estadoTicket->save();\n \n $estadoTicket=new Est_estado_ticket();\n $estadoTicket->est_nombre=\"Resuelto\";\n $estadoTicket->est_descripcion=\"Estado el proceso esta en lista de espera\";\n $estadoTicket->est_orden=4;\n $estadoTicket->est_estado=1;\n $estadoTicket->est_usu_creacion=1;\n $estadoTicket->est_usu_modificacion=1;\n $estadoTicket->save();\n\n\n /* #################################################*/\n /* Table: nip_nivel_prioridads */\n /* ################################################*/\n $prioridadTicket=new Nip_nivel_prioridad();\n $prioridadTicket->nip_nombre='Bajo';\n $prioridadTicket->nip_descripcion='Nivel prioridad Bajo';\n $prioridadTicket->nip_estado=1;\n $prioridadTicket->nip_usu_creacion=1;\n $prioridadTicket->nip_usu_modificacion=1;\n $prioridadTicket->save();\n\n $prioridadTicket=new Nip_nivel_prioridad();\n $prioridadTicket->nip_nombre='Normal';\n $prioridadTicket->nip_descripcion='Nivel prioridad normal';\n $prioridadTicket->nip_estado=1;\n $prioridadTicket->nip_usu_creacion=1;\n $prioridadTicket->nip_usu_modificacion=1;\n $prioridadTicket->save();\n\n $prioridadTicket=new Nip_nivel_prioridad();\n $prioridadTicket->nip_nombre='Alto';\n $prioridadTicket->nip_descripcion='nivel prioridad Alto';\n $prioridadTicket->nip_estado=1;\n $prioridadTicket->nip_usu_creacion=1;\n $prioridadTicket->nip_usu_modificacion=1;\n $prioridadTicket->save();\n\n $prioridadTicket=new Nip_nivel_prioridad();\n $prioridadTicket->nip_nombre='Urgente';\n $prioridadTicket->nip_descripcion='nivel Prioridad Urgente';\n $prioridadTicket->nip_estado=1;\n $prioridadTicket->nip_usu_creacion=1;\n $prioridadTicket->nip_usu_modificacion=1;\n $prioridadTicket->save();\n\n\n /* #################################################*/\n /* Table: rol_rols */\n /* ################################################*/\n $rolUsuario=new Rol_rol();\n $rolUsuario->rol_nombre='Administrador';\n $rolUsuario->rol_descripcion='Usuario con rol de administrador del sistema. Tiene acceso total al sistema';\n $rolUsuario->rol_estado=1;\n $rolUsuario->rol_usu_creacion=1;\n $rolUsuario->rol_usu_modificacion=1;\n $rolUsuario->save();\n\n $rolUsuario=new Rol_rol();\n $rolUsuario->rol_nombre='Usuario Final';\n $rolUsuario->rol_descripcion='Usuario que tiene acceso restringido al sistema. Solamente puede registrar tickets y consultarlos.';\n $rolUsuario->rol_estado=1;\n $rolUsuario->rol_usu_creacion=1;\n $rolUsuario->rol_usu_modificacion=1;\n $rolUsuario->save();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('config_boletos')->delete();\n\n\t ConfigBoletos::create(array(\n\t 'nombre' => 'General',\n\n\t ));\n\n\t ConfigBoletos::create(array(\n\t 'nombre' => 'Vip',\n\t \n\t ));\n\n\t ConfigBoletos::create(array(\n\t 'nombre' => 'Premium',\n\t \n\t ));\n\n\t ConfigBoletos::create(array(\n\t 'nombre' => 'Gold',\n\t \n\t ));\n\n\t ConfigBoletos::create(array(\n\t 'nombre' => 'Platinum',\n\t \n\t ));\n\n\t ConfigBoletos::create(array(\n\t 'nombre' => 'Cortesía',\n\t \n\t ));\n\n\t DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n }", "public function run()\n {\n //\n DB::table('status_dokumen')->delete();\n\n \t$status_dokumen = [\n \t\tarray(\n \t\t\t'id' => 1,\n \t\t\t'nama_status' => 'Verified',\n \t\t\t'created_by' => '1',\n \t\t),\n \t\tarray(\n \t\t\t'id' => 2,\n \t\t\t'nama_status' => 'Unverified',\n \t\t\t'created_by' => '1',\n \t\t)];\n\n \tDB::table('status_dokumen')->insert($status_dokumen);\n }", "public function run()\n {\n \n $list = [];\n $dvt = [\" Kilogram (kg)\", \"chai\", \"dĩa\", \"gram (g)\", \"hộp\", \"thùng\", \"Tô\",\"phần\",\"Lon\",\"Ly\"];\n sort($dvt);\n for ($i=1; $i <= count($dvt); $i++) {\n array_push($list, [\n 'dvt_id' => $i,\n 'dvt_ten' => $dvt[$i-1],\n ]);\n }\n DB::table('mst_don_vi_tinh')->insert($list);\n }", "public function run()\n {\n //\n DB::table('hocphans')->insert([\n ['id_lop' => 1,\n 'sotiet' => 60,\n 'sotinchi' => 3,\n 'tenhocphan' => 'ĐTHS',\n ],\n ]);\n }", "public function handle()\n {\n\t\t\n\t\t//qiwi\n\t\t$pdo = \\DB::connection(\"obmenneg\")->getPdo();\n\t\t$sql=\"select id_ad, contact_id, amount, amount_btc, round(amount/amount_btc::numeric,2) as course, \n\t\tcase when id_ad='609849' then round(amount/amount_btc::numeric,2)*1.02 else round(amount/amount_btc::numeric,2)*0.99 end as course_fact,\n\t\tcase when id_ad='609849' then round(amount/amount_btc::numeric,2)*1.02*amount_btc else round(amount/amount_btc::numeric,2)*0.99*amount_btc end\n\t\tas amount_fact,created_at from local_robots where id_ad in ('617372', '609849') and status='9' order by created_at asc\";\n\t\t$stats=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"insert into local_balancing (id_ad, contact_id, amount, amount_btc, course, course_fact, amount_fact, remainder, created)\n\t\t\tselect ?,?,?,?,?,?,?,?,? WHERE NOT EXISTS (SELECT 1 FROM local_balancing WHERE contact_id=?)\";\n\t\t$sthInsert=$pdo->prepare($sql);\n\t\tforeach ($stats as $stat){\n\t\t\t$sthInsert->execute([$stat['id_ad'], $stat['contact_id'], $stat['amount'], $stat['amount_btc'], $stat['course'], $stat['course_fact'], \n\t\t\t$stat['amount_fact'], $stat['amount_btc'], $stat['created_at'], $stat['contact_id']]);\n\t\t}\n\t\t$sql=\"select * from local_balancing where id_ad='609849' and status='0' order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdate=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?, return_course=?, profit=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdated=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=? \n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdatedd=$pdo->prepare($sql);\n\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '617372')->where('status', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='617372' and status='0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t$details=$sell['details'];\n\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - продаж без закупок;\";\n\t\t\t\t\t$sthUpdate->execute(['3',$remainder_sell,$details,$sell['contact_id']]);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['0',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['0',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql=\"select * from local_balancing where id_ad='617372' and status in ('0','3') order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '609849')->where('remainder', '>', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='609849' and remainder>'0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\tif ($sell){\n\t\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t\t$details=$sell['details'];\n\t\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - покупок без продаж;\";\n\t\t\t\t\t\t$sthUpdate->execute(['1','0',$details,$sell['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\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$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['3',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\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$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//яндекс\n\t\t$pdo = \\DB::connection(\"obmenneg\")->getPdo();\n\t\t$sql=\"select id_ad, contact_id, amount, amount_btc, round(amount/amount_btc::numeric,2) as course, \n\t\tcase when id_ad='609928' then round(amount/amount_btc::numeric,2)*1.015 else round(amount/amount_btc::numeric,2)*0.99 end as course_fact,\n\t\tcase when id_ad='609928' then round(amount/amount_btc::numeric,2)*1.015*amount_btc else round(amount/amount_btc::numeric,2)*0.99*amount_btc end\n\t\tas amount_fact,created_at from local_robots where id_ad in ('609305', '609928') and status='9' order by created_at asc\";\n\t\t$stats=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"insert into local_balancing (id_ad, contact_id, amount, amount_btc, course, course_fact, amount_fact, remainder, created)\n\t\t\tselect ?,?,?,?,?,?,?,?,? WHERE NOT EXISTS (SELECT 1 FROM local_balancing WHERE contact_id=?)\";\n\t\t$sthInsert=$pdo->prepare($sql);\n\t\tforeach ($stats as $stat){\n\t\t\t$sthInsert->execute([$stat['id_ad'], $stat['contact_id'], $stat['amount'], $stat['amount_btc'], $stat['course'], $stat['course_fact'], \n\t\t\t$stat['amount_fact'], $stat['amount_btc'], $stat['created_at'], $stat['contact_id']]);\n\t\t}\n\t\t$sql=\"select * from local_balancing where id_ad='609928' and status='0' order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdate=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?, return_course=?, profit=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdated=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=? \n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdatedd=$pdo->prepare($sql);\n\t\t\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '609305')->where('status', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='609305' and status='0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t$details=$sell['details'];\n\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - продаж без закупок;\";\n\t\t\t\t\t$sthUpdate->execute(['3',$remainder_sell,$details,$sell['contact_id']]);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['0',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['0',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql=\"select * from local_balancing where id_ad='609305' and status in ('0','3') order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '609928')->where('remainder', '>', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='609928' and remainder>'0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\tif ($sell){\n\t\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t\t$details=$sell['details'];\n\t\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - покупок без продаж;\";\n\t\t\t\t\t\t$sthUpdate->execute(['1','0',$details,$sell['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\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$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['3',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\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$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing where id_ad='609849' and status='0' group by id_ad\";\n\t\t$qiwi_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing where id_ad='609849' and status='0' order by created asc\";\n\t\t$qiwis=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$qiwi_actual=0;\n\t\tforeach ($qiwis as $qiwi){\n\t\t\t$procent=$qiwi['remainder'] / $qiwi_sum['amount_btc'];\n\t\t\t$sum=$procent*$qiwi['course_fact'];\n\t\t\t$qiwi_actual+=$sum;\n\t\t}\n\t\t$qiwi_actual=round($qiwi_actual*1.01);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '617372')->update(['actual_price'=>$qiwi_actual]);\n\t\t\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing_v2 where id_ad='617372' and status in ('0', '3') group by id_ad\";\n\t\t$qiwi_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing_v2 where id_ad='617372' and status in ('0','3') order by created asc\";\n\t\t$qiwis=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$qiwi_actual=0;\n\t\tforeach ($qiwis as $qiwi){\n\t\t\t$procent=$qiwi['remainder'] / $qiwi_sum['amount_btc'];\n\t\t\t$sum=$procent*$qiwi['course_fact'];\n\t\t\t$qiwi_actual+=$sum;\n\t\t}\n\t\t$qiwi_actual=round($qiwi_actual*0.98);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '609849')->update(['actual_price'=>$qiwi_actual]);\n\t\t\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing where id_ad='609928' and status='0' group by id_ad\";\n\t\t$yandex_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing where id_ad='609928' and status='0' order by created asc\";\n\t\t$yandexs=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$yandex_actual=0;\n\t\tforeach ($yandexs as $yandex){\n\t\t\t$procent=$yandex['remainder'] / $yandex_sum['amount_btc'];\n\t\t\t$sum=$procent*$yandex['course_fact'];\n\t\t\t$yandex_actual+=$sum;\n\t\t}\n\t\t$yandex_actual=round($yandex_actual*1.01);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '609305')->update(['actual_price'=>$yandex_actual]);\n\t\t\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing where id_ad='609305' and status='0' group by id_ad\";\n\t\t$yandex_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing where id_ad='609305' and status='0' order by created asc\";\n\t\t$yandexs=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$yandex_actual=0;\n\t\tforeach ($yandexs as $yandex){\n\t\t\t$procent=$yandex['remainder'] / $yandex_sum['amount_btc'];\n\t\t\t$sum=$procent*$yandex['course_fact'];\n\t\t\t$yandex_actual+=$sum;\n\t\t}\n\t\t$yandex_actual=round($yandex_actual*0.985);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '609928')->update(['actual_price'=>$yandex_actual]);\n\t}", "function provjeri_oglase(){\n\t\tglobal $db;\n\t\t$oglasi = $db->query(\"SELECT * FROM jf_oglasi WHERE status=1\");\n\t\twhile($podatak = $oglasi->fetch_assoc()){\n\t\t\tif (date(\"d-m-Y\", strtotime($podatak['konkurs_end'])) < date(\"d-m-Y\")){\n\t\t\t\t$db->query(\"UPDATE jf_oglasi SET status=0 WHERE id={$podatak['id']}\");\n\t\t\t}\n\t\t}\n\t}", "protected function runDatabaseCheck() {\n\t\t$this->showProgressMessage('Going to run database check.');\n\n\t\t$dbOperations = t3lib_div::makeInstance('tx_mnogosearch_dboperations');\n\t\t/* @var $dbOperations tx_mnogosearch_dboperations */\n\t\t$dbOperations->setIndexer($this->indexer);\n\t\t$dbOperations->checkAndCreate();\n\t}", "public function run()\n {\n //\n $data = [\n \t[\n \t\t'trong_so' => '15%',\n \t\t'hoidong_trongso' => 5\n \t],\n ];\n DB::table('trongso')->insert($data);\n }", "public function run()\n {\n DB::table('listprintbarangs')->insert([\n \t'id' => 'id',\n \t'jenis'=>'jenis',\n \t'namajenis'=>'namajenis',\n \t'ukuran'=>'ukuran',\n \t'beratasli'=>'beratasli',\n \t'beratpembulatan'=>'beratpembulatan',\n \t'hargagram'=>'hargagram',\n \t'totalharga'=>'totalharga',\n \t'supplier'=>'supplier',\n \t'kadar'=>'kadar',\n ]);\n }", "function commit();", "public function run()\n {\n $pembeli= new Pembeli;\n $pembeli->judul='naruti';\n $pembeli->jumlah_buku=50;\n $pembeli->penerbit='fauzan';\n $pembeli->harga=1000;\n $pembeli->nama_pembeli='pulu puklu';\n $pembeli->save();\n \n \n\n //\n }", "public function run()\n {\n $name_jobs = [\n ['name_job' => 'ADMINISTRADOR DE REDES Y SERVIDORES'],\n ['name_job' => 'ANALISTA DE MESA DE AYUDA'],\n ['name_job' => 'ANALISTA DE RECURSOS HUMANOS'],\n ['name_job' => 'ANALISTA DE SOPORTE DE PRIMER NIVEL'],\n ['name_job' => 'COORDINADOR DE SERVICIOS INFORMATICOS'],\n ['name_job' => 'ESPECIALISTA DE SOPORTE DE TERCER NIVEL'],\n ['name_job' => 'GERENTE DE PRE VENTA'],\n ['name_job' => 'GESTOR DE CENTRO DE SERVICIOS'],\n ['name_job' => 'INGENIERO POST VENTA'],\n ['name_job' => 'JEFE DE CENTRO DE SERVICIO'],\n ['name_job' => 'JEFE DE PROYECTO'],\n ['name_job' => 'PRACTICANTE TI'],\n ['name_job' => 'PROGRAMADOR'],\n ['name_job' => 'SOPORTE TECNICO DE SEGUNDO NIVEL'],\n ['name_job' => 'SUPERVISOR DE SOPORTE TECNICO DE PRIMER NIVEL'],\n ['name_job' => 'SUPERVISOR DE SOPORTE TECNICO DE SEGUNDO NIVEL'],\n ['name_job' => 'TECNICO SENIOR']\n ];\n\n DB::table('users_jobs')->insert($name_jobs);\n }", "function evt__enviar(){\n if($this->dep('datos')->tabla('mesa')->esta_cargada()){\n $m = $this->dep('datos')->tabla('mesa')->get();\n // print_r($m);\n $m['estado'] = 2;//Cambia el estado de la mesa a Enviado\n $this->dep('datos')->tabla('mesa')->set($m);\n // print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n // $this->dep('datos')->tabla('mesa')->resetear();\n \n $m = $this->dep('datos')->tabla('mesa')->get_listado($m['id_mesa']);\n if($m[0]['estado'] == 2){//Obtengo de la BD y verifico que hizo cambios en la BD\n //Se enviaron correctamente los datos\n toba::notificacion()->agregar(utf8_decode(\"Los datos fueron enviados con éxito\"),\"info\");\n }\n else{\n //Se generó algún error al guardar en la BD\n toba::notificacion()->agregar(utf8_decode(\"Error al enviar la información, verifique su conexión a internet\"),\"info\");\n }\n }\n \n }", "public function onRun()\n {\n\n $sql = new \\mysqli($this->host, $this->username, $this->pass, $this->database, $this->port);\n\n $this->sql->setElo($sql, $this->winner, $this->queue, $this->winnerElo);\n $this->sql->setElo($sql, $this->loser, $this->queue, $this->loserElo);\n }", "public function run()\n {\n \\DB::statement(\" INSERT INTO solicitudes.estados(id, descripcion, css)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge3 host=192.6.0.118 user=postgres password=LatinoSandwich007',\n\t\t 'SELECT id, descripcion, css\n\t\t\t FROM solicitudes.estados')\n\t\t AS migracion( id integer,\n\t\t\t\t\t\t descripcion character varying(50),\n\t\t\t\t\t\t css character varying(20) )\t\t\t\n\t); \");\n }", "public function run()\n {\n DB::table('holidaydtl')->delete();\n\n DB::table('holidaydtl')->insert(array(\n array(\n 'holidayid' => '11CCDAED8CD511E5B5364CE38F22FD8F',\n 'branchid' => 'F8056E535D0B11E5ADBC00FF59FBB323',\n 'id'=> '07C695F88CD611E5B5364CE38F22FD8F'\n ))\n );\n\n $this->command->info('Holidaydtl table seeded!');\n }", "function wpc_braches_database_updates(){\n // @ branch_manager\n wpc_branches_add_manager();\n // @ branch_client @ branch_agent @ branch_employee @ branch_driver\n wpc_branches_add_assigment();\n}", "public function run()\n {\n //\n Eloquent::unguard();\n $this->command->info('Sembrando entidades...');\n $path = 'app/developer_docs/entidad.sql';\n try{\n DB::unprepared(file_get_contents($path));\n }catch(Exception $e){\n if ($e->getCode()==23505){\n $this->command->error('Entidades NO fueron plantadas!');\n return 0;\n }\n }\n $this->command->info('Entidades plantadas!');\n }", "public function run()\n {\n DB::table('status')->insert([//adiciona os seguinte valores a tabela status\n ['status' => 'disponivel'],\n ['status' => 'indisponivel'],\n ['status' => 'reservada'],\n ['status' => 'atrasada']\n ]);\n }", "function change_summer($betriebsart){\n\t\tconnectsql();\n\t\t// --- Write Data to DB ---\n\t\t$sql_query = \"UPDATE poolsettings SET `summer1`=$betriebsart\";\n\t\tmysql_query($sql_query) or syslog(LOG_WARNING,\"** kein Schreiben durch $job in DB! **\". mysql_error());\n\t\t//Close Connection to MySQL\n\t\tmysql_close();\n}", "public function run()\n {\n \n DB::table('estadoauditorias')->insert(['descricao' => \"Em Andamento\"]);\n\n DB::table('estadoauditorias')->insert(['descricao' => \"Suspenso\"]);\n\n DB::table('estadoauditorias')->insert(['descricao' => \"Cancelado\"]);\n\n DB::table('estadoauditorias')->insert(['descricao' => \"Concluido\"]);\n }", "public function run()\n {\n DB::table('bns')->insert([\n 'no_buku' => '3677395',\n 'user_id' => '2',\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now()\n ]);\n }", "public function run()\n {\n DB::table('slb_departaments')->delete();\n\n // Añadimos una entrada a esta tabla\n Departament::create(array(\n 'id_departament' => '1',\n 'nom_departament' => 'Direcció',\n 'descripcio_departament' => 'Usuaris del departament de direcció.'\n ));\n Departament::create(array(\n 'id_departament' => '2',\n 'nom_departament' => 'Producció',\n 'descripcio_departament' => 'Usuaris del departament de producció.'\n ));\n Departament::create(array(\n 'id_departament' => '3',\n 'nom_departament' => 'Tècnic',\n 'descripcio_departament' => 'Usuaris del departament tècnic.'\n ));\n Departament::create(array(\n 'id_departament' => '4',\n 'nom_departament' => 'Administració',\n 'descripcio_departament' => 'Usuaris del departament d\\'administració.'\n ));\n Departament::create(array(\n 'id_departament' => '5',\n 'nom_departament' => 'Sistemes',\n 'descripcio_departament' => 'Usuaris del departament de Sistems & IT.'\n ));\n }", "public function run()\n {\n DB::connection('aditiyamart_kepegawaian')\n ->table('tb_jabatan')\n ->insert([\n ['jabatan' => 'Owner'],\n ['jabatan' => 'Manager'],\n ['jabatan' => 'Asisten Manager'],\n ['jabatan' => 'Kasir'],\n ['jabatan' => 'Pramuniaga'],\n ]);\n }", "function TheEnd() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\t\ttry {\r\n\t\t\tif($conn){\r\n\t\t\t\t$deleteUser = $conn->prepare(\"DELETE from panier where proceed=1 AND etat=1 AND recu=1\");\r\n\t\t\t\t$deleteUser->execute();\r\n\t\t\t}\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\r\n\t\t$this->connection->closeConnection();\r\n\t}", "public function run()\n {\n DB::table('job_description')->insert([\n 'title'=> 'Android Developer',\n 'ex_from' => '0',\n 'ex_to'=>'3',\n 'opening'=>'5',\n 'ctc'=>'3'\n\n ]);\n DB::table('job_description')->insert([\n 'title'=> 'PHP Developer',\n 'ex_from' => '0',\n 'ex_to'=>'3',\n 'opening'=>'5',\n 'ctc'=>'3'\n\n ]);\n DB::table('job_description')->insert([\n 'title'=> 'Python Developer',\n 'ex_from' => '0',\n 'ex_to'=>'3',\n 'opening'=>'5',\n 'ctc'=>'3'\n\n ]);\n\n \n }", "protected function will_change_to_db(){\n\t\t$pdo = DB::connection( $this->get_database_name() )->getPdo();\n\t\t$pdo->beginTransaction();\n\t\t//DB::beginTransaction();\n\t\t$status = false;\n\t\ttry {\n\t\t\t//! for saving\n\t\t\tforeach( $this->get_obj_save_db() as $obj){\n\t\t\t\tif($obj == null) {\n\t\t\t\t\tthrow new Exception(\"There are non object\");\n\t\t\t\t}\n\t\t\t\t$obj->save();\n\t\t\t}\n\t\t\tforeach( $this->get_obj_dele_db() as $obj){\n\t\t\t\tif($obj == null) {\n\t\t\t\t\tthrow new Exception(\"There are non object\");\n\t\t\t\t}\n\t\t\t\t$obj->delete();\n\t\t\t}\t\t \n\t\t //DB::commit();\n\t\t\t$pdo->commit();\n\t\t\t$status = true;\n\t\t // all good\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\t$this->set_pdo_exception($e);\n\t\t\t$this->set_error_message($e->getMessage()) ;\n\t\t //DB::rollback();\n\t\t\t$pdo->rollback();\n\t\t}\n\t\treturn $status;\n\t}", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('jenis_kesatuan')->truncate();\n \\App\\Models\\JenisKesatuan::insert([\n ['jenis' => 'MABES' ],\n ['jenis' => 'SATKER MABES' ],\n ['jenis' => 'FUNGSI MABES' ],\n ['jenis' => 'POLDA' ],\n ['jenis' => 'SATKER POLDA' ],\n ['jenis' => 'SUBSATKER POLDA' ],\n ['jenis' => 'POLRES' ],\n ['jenis' => 'SATKER_POLRES' ],\n ['jenis' => 'POLSEK' ],\n ]);\n }", "public function run()\n {\n DB::unprepared ('set identity_insert tb_pais on ');\n DB::table('tb_pais')->delete();\n //Get all of the countries\n $array = array([\n 'pais_id' => 1,\n 'codigo' => 'EC',\n 'nombre' => 'Ecuador',\n 'bandera' => 'EC.png',\n \"moneda\"=>\"US Dolar\",\n \"moneda_simbolo\"=>\"$\",\n \"moneda_codigo\"=>\"USD\",\n \"moneda_decimales\"=>\"2\"\n ]);\n DB::table('tb_pais')->insert($array);\n DB::unprepared ('set identity_insert tb_pais off ');\n }", "public function run()\n {\n try {\n \\Illuminate\\Support\\Facades\\DB::beginTransaction();\n $user = new \\App\\Models\\User;\n $user->email = '[email protected]';\n $user->role = 1;\n $user->password = bcrypt('adminmaarif');\n if (!$user->save()){\n throw new Exception('Failed to add user');\n }\n $company = new \\App\\Models\\Company;\n $company->user_id = $user->id;\n $company->name = 'Maarif Comp';\n $company->slug = 'maarif-comp';\n if (!$company->save()){\n throw new Exception('Failed to add Company');\n }\n\n $admin = new \\App\\Models\\Admin;\n $admin->user_id = $user->id;\n $admin->name = 'Admin Maarif';\n $admin->phone = '0812';\n if (!$admin->save()){\n throw new Exception('Failed to add admin');\n }\n\n \\Illuminate\\Support\\Facades\\DB::commit();\n echo 'Succeed';\n echo `\n`;\n echo ' ';\n return;\n }catch (Exception $e){\n \\Illuminate\\Support\\Facades\\DB::rollBack();\n echo $e->getMessage();\n echo `\n `;\n echo ' ';\n return;\n }\n }", "public function run()\n {\n //insert data vào bảng Bill\n $data = [\n [\n 'user_id' => 3,\n 'bill_total_price' => 5000000,\n 'bill_daytime_book' => '2019-06-27 15:30:00',\n 'bill_daytime_shiping' => '2019-06-30 20:00:00',\n 'bill_payment' => 2\n ]\n ];\n DB::table('sgwd_bills')->insert($data);\n }", "public function run()\n {\n $pembeli = new Pembeli();\n $pembeli->judul_buku = 'ATTACK ON TITAN';\n $pembeli->tipe_buku = 'Novel';\n $pembeli->jumlah_buku = 1;\n $pembeli->harga_buku = '45000';\n $pembeli->tanggal_pembelian = '19-05-2020';\n $pembeli->save();\n }", "public function run()\n {\n $status = [\n ['descricao' => 'INICIADA'],\n ['descricao' => 'PROCESSO'], \n ['descricao' => 'FINALIZADA']\n ];\n\n DB::table('status_indicacao')->insert($status);\n }", "public function run()\n\t{\n\t\t\\DB::table('absensi')->delete();\n \n\t\t\\DB::table('absensi')->insert(array ( \n\t\t\t\n\t\t\t// array (\n\t\t\t// \t'id' => 1,\n\t\t\t// \t'check_by_id' => '43',\n\t\t\t// \t'siswa_id' => '1',\n\t\t\t// \t'kelas_id' => '1',\n\t\t\t// \t'status' => \"I\",\n\t\t\t// \t'description' => 'ijin',\n\t\t\t// \t'date' => '2016-07-04',\t\t\t\t\n\t\t\t// \t'created_at' => '2017-01-07 12:00:00',\n\t\t\t// \t'updated_at' => '2017-01-07 12:01:00',\n\t\t\t// \t'deleted_at' => NULL,\n\t\t\t// ),\n\n\t\t\t// array (\n\t\t\t// \t'id' => 1,\n\t\t\t// \t'check_by_id' => '43',\n\t\t\t// \t'siswa_id' => '1',\n\t\t\t// \t'kelas_id' => '1',\n\t\t\t// \t'status' => \"I\",\n\t\t\t// \t'description' => 'ijin',\n\t\t\t// \t'date' => '2017-05-31',\t\t\t\t\n\t\t\t// \t'created_at' => '2017-01-07 12:00:00',\n\t\t\t// \t'updated_at' => '2017-01-07 12:01:00',\n\t\t\t// \t'deleted_at' => NULL,\n\t\t\t// ),\n\t\t\n\t\t));\n\t}", "public function run()\n {\n $embarcador1 = new Embarcador();\n $embarcador1->nombre='ALL CARRIER';\n $embarcador1->users_id=1;\n $embarcador1->save();\n }", "public function run()\n {\n \n\n \\DB::table('fs_betrieb')->delete();\n\n $betriebe = [\n [\n 'id' => 1,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.90566497',\n 'lon' => '6.96666287',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 1',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 2,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.92075125',\n 'lon' => '6.94928598',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 2',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 3,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.92380675',\n 'lon' => '6.94924662',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 3',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 4,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.9111209',\n 'lon' => '6.9370584',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 4',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 5,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.90912779',\n 'lon' => '6.96825644',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 5',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 6,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.89821969',\n 'lon' => '6.93651966',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 6',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 7,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.90819089',\n 'lon' => '6.96229577',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 7',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 8,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.90525052',\n 'lon' => '6.9450263',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 8',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 9,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.92402396',\n 'lon' => '6.92862057',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 9',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ],\n\n [\n 'id' => 10,\n 'betrieb_status_id' => 5,\n 'bezirk_id' => 4,\n 'added' => '2013-10-19',\n 'plz' => '50969',\n 'stadt' => 'Köln',\n 'lat' => '50.90286551',\n 'lon' => '6.96427447',\n 'kette_id' => 3,\n 'betrieb_kategorie_id' => 1,\n 'name' => 'Supermarkt Nummer 10',\n 'str' => 'Hauptstraße 5',\n 'hsnr' => '5',\n 'status_date' => '2017-03-15',\n 'status' => 0,\n 'ansprechpartner' => '',\n 'telefon' => '03032513665',\n 'fax' => '',\n 'email' => '[email protected]',\n 'begin' => '2012-04-03',\n 'besonderheiten' => 'Wir holen um 13 Uhr ab. Wenn nicht anders vereinbart, ist der Treffpunkt vor dem Laden. Drinnen fragen wir an der Backtheke nach Backwaren von vor zwei Tagen und an der Käsetheke oder bei den verantwortlichen Mitarbeiter*innen nach Molkereiprodukten / anderen Kühlwaren. Das Obst und Gemüse steht hinten auf dem Parkplatz in einem Einkaufswagen oder in Kisten. \n\n*** WICHTIG: Pfand von Milchprodukten muss von uns an der Kasse bezahlt werden!!! \n\n*** Es muss immer mindestens eine erfahrene Person von den Foodsavern aus dem Team bei den Abholungen dabei sein.\n\n*** Bei Austragungen MUSS selbst nach Ersatz gesucht werden, z.B. durch Anrufe, SMS, persönliche Nachrichten o.ä. - wenn das nicht passiert, melde ich kurzfristige Absagen als Verstoß.',\n 'public_info' => 'Bitte bewerbt euch nur, wenn ihr mindestens alle zwei Wochen um die Mittagszeit Abholungen machen könnt.',\n 'public_time' => 2,\n 'ueberzeugungsarbeit' => 2,\n 'presse' => 1,\n 'sticker' => 1,\n 'abholmenge' => 5,\n 'team_status' => 1,\n 'prefetchtime' => 2419200,\n 'team_conversation_id' => NULL,\n 'springer_conversation_id' => NULL,\n 'deleted_at' => NULL,\n ]\n ];\n\n \\DB::table('fs_betrieb')->insert($betriebe);\n\n /*\n * Link store admin as admin to stores add one user as team member also\n */\n $betrieb_admin_fs_id = 3;\n $betrie_team_member_id = 2;\n\n $betrieb_team = [];\n\n foreach ($betriebe as $b)\n {\n $betrieb_team[] = [\n 'foodsaver_id' => $betrieb_admin_fs_id,\n 'betrieb_id' => $b['id'],\n 'verantwortlich' => 1,\n 'active' => 1,\n 'stat_last_update' => '2017-01-01 00:00:00',\n 'stat_fetchcount' => 10,\n 'stat_first_fetch' => '2017-01-01',\n 'stat_last_fetch' => '2017-01-01 00:00:00',\n 'stat_add_date' => '2017-01-01',\n ];\n\n $betrieb_team[] = [\n 'foodsaver_id' => $betrie_team_member_id,\n 'betrieb_id' => $b['id'],\n 'verantwortlich' => 0,\n 'active' => 1,\n 'stat_last_update' => '2017-01-01 00:00:00',\n 'stat_fetchcount' => 10,\n 'stat_first_fetch' => '2017-01-01',\n 'stat_last_fetch' => '2017-01-01 00:00:00',\n 'stat_add_date' => '2017-01-01',\n ];\n }\n\n \\DB::table('fs_betrieb_team')->insert($betrieb_team);\n \n \n }", "public function submitBod($bedrag){\n if($bedrag >= $this->minimumVerhoging && $bedrag <= 9999.99) {\n $conn = getConn();\n $sql = \"INSERT INTO Bod(Voorwerpnummer,Bodbedrag,Gebruikersnaam,Boddatum)\n VALUES(?,?,?,?);\n UPDATE Voorwerp\n SET Verkoopprijs = ?\n WHERE Voorwerpnummer = ?\n \";\n $params = array($this->voorwerpnummer, $bedrag, $this->nieuweBieder, date('Y/m/d G:i:s a', time()), $bedrag, $this->voorwerpnummer);\n $stmt = sqlsrv_prepare($conn, $sql, $params);\n if (!$stmt) {\n die(print_r(sqlsrv_errors(), true));\n }\n sqlsrv_execute($stmt);\n $this->stuurmailNaarVorigeBieder();\n }\n }", "public function change()\n {\n $_sql = \"-- phpMyAdmin SQL Dump\n-- version 4.8.3\n-- https://www.phpmyadmin.net/\n--\n-- 主机: 127.0.0.1:3306\n-- 生成日期: 2018-12-20 20:55:01\n-- 服务器版本: 5.7.23\n-- PHP 版本: 7.2.10\nDROP DATABASE IF EXISTS `publicwelfare`;\nCREATE DATABASE IF NOT EXISTS publicwelfare DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\nUSE publicwelfare;\n\n\nSET SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO';\nSET AUTOCOMMIT = 0;\nSTART TRANSACTION;\nSET time_zone = '+00:00';\n\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40101 SET NAMES utf8mb4 */;\n\n--\n-- 数据库: `publicwelfare`\n--\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `activity`\n--\n\nDROP TABLE IF EXISTS `activity`;\nCREATE TABLE IF NOT EXISTS `activity` (\n `A_Number1` int(10) NOT NULL,\n `A_Theme` text NOT NULL,\n `A_Namet` text NOT NULL,\n `A_Purpose` text NOT NULL,\n `A_Meaning` text NOT NULL,\n `A_Object` text NOT NULL,\n `A_Time` date NOT NULL,\n `A_Place` text NOT NULL,\n `A_Organizer` text NOT NULL,\n `A_Prepare` text NOT NULL,\n `A_Pay` text NOT NULL,\n `A_Budget` text NOT NULL,\n `S_Number` int(10) NOT NULL,\n `C_Commont` int(10) NOT NULL\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `activity`\n--\n\nINSERT INTO `activity` (`A_Number1`, `A_Theme`, `A_Namet`, `A_Purpose`, `A_Meaning`, `A_Object`, `A_Time`, `A_Place`, `A_Organizer`, `A_Prepare`, `A_Pay`, `A_Budget`, `S_Number`, `C_Commont`) VALUES\n(1, '扬志愿精神树和谐之风展绿城之翼构卫生城市', '保护碧水蓝天,创建环保益阳', '通过组织青年志愿者的活动来改善当地周边环境 通过青年志愿者宣传提高和增强广大群众的环保意识、环保知识', '唤起社会公民环保意识,用实际行动保护我们共有的家园', '成功报名义工', '2018-12-05', '广州越秀公园', '艺术与设计学院', '着手准备展板、横幅等宣传媒介以及当天现场活动所需材料', '活动期间请各位义工要注意安全,看见乱扔垃圾的市民且误与之争吵,要好言相劝', '展板:30*10=300元  横幅:70*1=70元  饮用水:35*3=105元  医疗用品:55元', 1, -1);\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `admin`\n--\n\nDROP TABLE IF EXISTS `admin`;\nCREATE TABLE IF NOT EXISTS `admin` (\n `A_Number` int(8) NOT NULL,\n `A_Password` text NOT NULL,\n `A_Name` text NOT NULL,\n `A_Sex` int(1) NOT NULL,\n `A_BornDate` date NOT NULL,\n `A_Marriage` tinyint(1) NOT NULL,\n `A_PoliticsVisage` text NOT NULL,\n `A_SchoolAge` text NOT NULL,\n `A_Address` text NOT NULL,\n `A_Telephone` int(15) NOT NULL,\n `A_Email` text NOT NULL,\n PRIMARY KEY (`A_Number`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `admin`\n--\n\nINSERT INTO `admin` (`A_Number`, `A_Password`, `A_Name`, `A_Sex`, `A_BornDate`, `A_Marriage`, `A_PoliticsVisage`, `A_SchoolAge`, `A_Address`, `A_Telephone`, `A_Email`) VALUES\n(1, 'xy061208ab', '欧阳成功', 1, '1986-10-01', 1, '党员', '本科', '北京胡同50号', 62537485, '[email protected]');\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `message`\n--\n\nDROP TABLE IF EXISTS `message`;\nCREATE TABLE IF NOT EXISTS `message` (\n `M_Number` int(8) NOT NULL,\n `M_Approval` int(1) NOT NULL,\n `M_Content` text NOT NULL,\n `M_ReleaseDate` date NOT NULL,\n `V_Number` int(8) NOT NULL,\n PRIMARY KEY (`M_Number`),\n KEY `volunteer` (`V_Number`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `message`\n--\n\nINSERT INTO `message` (`M_Number`, `M_Approval`, `M_Content`, `M_ReleaseDate`, `V_Number`) VALUES\n(1, 1, '参加活动很开心', '2018-04-22', 1);\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `organizer`\n--\n\nDROP TABLE IF EXISTS `organizer`;\nCREATE TABLE IF NOT EXISTS `organizer` (\n `O_Number` int(10) NOT NULL,\n `O_Name` text NOT NULL,\n `O_Head` text NOT NULL,\n `O_Address` text NOT NULL,\n `O_Telephone` int(15) NOT NULL,\n `O_Email` text NOT NULL,\n PRIMARY KEY (`O_Number`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `organizer`\n--\n\nINSERT INTO `organizer` (`O_Number`, `O_Name`, `O_Head`, `O_Address`, `O_Telephone`, `O_Email`) VALUES\n(1, '艺术与设计学院', '欧阳长征', '广东工业大学', 12345678, '[email protected]');\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `recipient`\n--\n\nDROP TABLE IF EXISTS `recipient`;\nCREATE TABLE IF NOT EXISTS `recipient` (\n `R_Number` int(8) NOT NULL,\n `R_Name` text NOT NULL,\n `R_Sex` int(2) NOT NULL,\n `R_BornDate` date NOT NULL,\n `R_Address` text NOT NULL,\n `R_Telephone` int(15) NOT NULL,\n `R_Email` text NOT NULL,\n `R_Code` text NOT NULL,\n `R_Situation` text NOT NULL,\n `S_Number` int(10) NOT NULL,\n PRIMARY KEY (`R_Number`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `recipient`\n--\n\nINSERT INTO `recipient` (`R_Number`, `R_Name`, `R_Sex`, `R_BornDate`, `R_Address`, `R_Telephone`, `R_Email`, `R_Code`, `R_Situation`, `S_Number`) VALUES\n(1, '欧阳长征', 1, '1986-10-01', '北京胡同50号', 62537485, '[email protected]', '100000', '贫困', 1);\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `sponsor`\n--\n\nDROP TABLE IF EXISTS `sponsor`;\nCREATE TABLE IF NOT EXISTS `sponsor` (\n `S_Number` int(8) NOT NULL,\n `S_Units` text NOT NULL,\n `S_Password` text NOT NULL,\n `S_Name` text NOT NULL,\n `S_Address` text NOT NULL,\n `S_Telephone` int(15) NOT NULL,\n `S_Email` text NOT NULL,\n `S_Code` int(15) NOT NULL,\n `A_Number` int(10) NOT NULL,\n `R_Number` int(10) NOT NULL,\n PRIMARY KEY (`S_Number`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `sponsor`\n--\n\nINSERT INTO `sponsor` (`S_Number`, `S_Units`, `S_Password`, `S_Name`, `S_Address`, `S_Telephone`, `S_Email`, `S_Code`, `A_Number`, `R_Number`) VALUES\n(1, '北京邮政局', 'xy061208ab', '欧阳长征', '北京胡同50号', 62537485, '[email protected]', 100000, 1, 1);\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `training`\n--\n\nDROP TABLE IF EXISTS `training`;\nCREATE TABLE IF NOT EXISTS `training` (\n `T_Number` int(8) NOT NULL,\n `T_Object` text NOT NULL,\n `T_Volunteers` text NOT NULL,\n `T_Organization` text NOT NULL,\n `T_Purpose` text NOT NULL,\n `T_Content` text NOT NULL,\n `T_Size` int(8) NOT NULL,\n `T_Way` text NOT NULL,\n PRIMARY KEY (`T_Number`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `training`\n--\n\nINSERT INTO `training` (`T_Number`, `T_Object`, `T_Volunteers`, `T_Organization`, `T_Purpose`, `T_Content`, `T_Size`, `T_Way`) VALUES\n(1, '灾区群众', '黄花岗社区志愿者', '黄花岗社区志愿者组织', '使志愿者具备志愿服务必需的知识技能,具备较强的服务意识、服务精神和服务能力', '志愿服务理念培训、志愿服务礼仪培训、应急救援、志愿者自护、医疗常识培训', 20, '在线授课、实地观摩、个案研究');\n\n-- --------------------------------------------------------\n\n--\n-- 表的结构 `volunteer`\n--\n\nDROP TABLE IF EXISTS `volunteer`;\nCREATE TABLE IF NOT EXISTS `volunteer` (\n `V_Number` int(8) NOT NULL COMMENT '义工编号',\n `V_Password` text NOT NULL COMMENT '登陆密码',\n `V_Name` text NOT NULL COMMENT '姓名',\n `V_Sex` int(1) NOT NULL COMMENT '性别',\n `V_BornDate` date NOT NULL COMMENT '出生日期',\n `V_Address` text NOT NULL COMMENT '住址',\n `V_Telephone` int(20) NOT NULL COMMENT '联系电话',\n `V_Email` text NOT NULL COMMENT '电子邮箱',\n `V_Code` text NOT NULL COMMENT '邮政编码',\n `V_Level` int(4) NOT NULL COMMENT '等级',\n `A_Number` int(4) NOT NULL COMMENT '参与活动',\n `V_Attendance` float NOT NULL DEFAULT '0',\n `V_Pass` float NOT NULL DEFAULT '0',\n PRIMARY KEY (`V_Number`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n--\n-- 转存表中的数据 `volunteer`\n--\n\nINSERT INTO `volunteer` (`V_Number`, `V_Password`, `V_Name`, `V_Sex`, `V_BornDate`, `V_Address`, `V_Telephone`, `V_Email`, `V_Code`, `V_Level`, `A_Number`, `V_Attendance`, `V_Pass`) VALUES\n(1, 'xy061208ab', '欧阳长征', 1, '1986-10-01', '北京胡同50号', 62537485, '[email protected]', '100000', 1, 1, 0, 0);\n\";\n $_arr = explode(';', $_sql);\n $_mysqli = new mysqli('127.0.0.1:3306','root','');\n if (mysqli_connect_errno()) {\n exit('连接数据库出错');\n }\n //执行sql语句\n foreach ($_arr as $_value) {\n $_mysqli->query($_value.';');\n }\n $_mysqli->close();\n $_mysqli = null;\n }", "public function run()\n {\n DB::table('jadwal')->insert([\n 'id' => 1, 'user_id' => 1, 'jadwal' => 'Taman ini sudah buka mulai pagi sampai sore hari setiap hari kecuali hari Jumat. Pengunjung bisa datang dan berekreasi di taman wisata ini pada jam-jam tersebut. Hari Sabtu - Kamis, Jam 07.00 - 16.00'\n ]);\n }", "public function run()\n {\n DB::table('jabatans')->insert([\n 'id_jabatan' => '1',\n \t'jabatan' => 'Software Tester',\n \t'gaji_pokok' => '3500000',\n 'jam_masuk' => '09:00:00',\n 'jam_keluar' => '18:00:00',\n \t'created_at'\t=> Carbon::now(),\n \t'updated_at'\t=> Carbon::now(),\n ]);\n\n DB::table('jabatans')->insert([\n 'id_jabatan' => '2',\n 'jabatan' => 'Game Tester',\n 'gaji_pokok' => '6000000',\n 'jam_masuk' => '09:00:00',\n 'jam_keluar' => '18:00:00',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('jabatans')->insert([\n 'id_jabatan' => '3',\n 'jabatan' => 'Back-End',\n 'gaji_pokok' => '4500000',\n 'jam_masuk' => '09:00:00',\n 'jam_keluar' => '18:00:00',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n\n DB::table('jabatans')->insert([\n 'id_jabatan' => '4',\n 'jabatan' => 'Front-End',\n 'gaji_pokok' => '4500000',\n 'jam_masuk' => '09:00:00',\n 'jam_keluar' => '18:00:00',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n \n }", "public function run()\n {\n DB::table('s_empresa')->insert(array(\n\t\t 'id' => 1,\n\t\t 'id_tema' => 1,\n\t\t 'nit' => '1',\n\t\t 'nombre_cabecera' => 'Stids Jeal',\n\t\t 'nombre' => 'Stids',\n 'frase' => 'Desarrollando tus sueños',\n\t\t 'imagen_logo' => 'predeterminado.png',\n\t\t 'estado' => 1,\n\t\t));\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 }", "public function run()\n {\n Parcours::truncate();\n\n Parcours::create(['nomParcours'=>\"Informatique\",'sigleParcours'=>\"INFO\",'idDiplome'=>1]);\n Parcours::create(['nomParcours'=>\"Calcul Scientifque\",'sigleParcours'=>\"CS\",'idDiplome'=>2]);\n }" ]
[ "0.6144874", "0.5986398", "0.5966359", "0.59496534", "0.59410703", "0.5828556", "0.58122295", "0.58017105", "0.5769671", "0.5727056", "0.5694499", "0.5665426", "0.5664027", "0.5662933", "0.56496733", "0.5648198", "0.5645631", "0.56454194", "0.56226707", "0.5612884", "0.56034154", "0.5600347", "0.55905426", "0.5587965", "0.5586003", "0.55779856", "0.5577075", "0.5570207", "0.5568035", "0.5555972", "0.5554975", "0.5553968", "0.55508775", "0.5544114", "0.55436", "0.5532203", "0.55256516", "0.55245465", "0.55170023", "0.5516279", "0.55112886", "0.5509001", "0.55024236", "0.5501142", "0.54971176", "0.54971176", "0.54971176", "0.54971176", "0.54971176", "0.5495984", "0.54946697", "0.5493612", "0.54918045", "0.5486243", "0.54851633", "0.547988", "0.5479415", "0.5471888", "0.54695946", "0.54574436", "0.54565394", "0.5450497", "0.5448681", "0.5447482", "0.54417074", "0.5441282", "0.5439796", "0.5439393", "0.5437227", "0.5434409", "0.5434181", "0.5431532", "0.54300535", "0.541629", "0.5415575", "0.5412416", "0.5411906", "0.5410983", "0.54102486", "0.54064775", "0.54042995", "0.5400588", "0.5400007", "0.5399904", "0.53991866", "0.5398955", "0.53943944", "0.5393841", "0.5391678", "0.5391529", "0.5391114", "0.5388039", "0.53868186", "0.5383141", "0.53827065", "0.53761387", "0.53738815", "0.5370316", "0.5364489", "0.5363987", "0.53622293" ]
0.0
-1
Oppdater jobbens overordnede status
public function saveStatus(String $status): void { if (!in_array($status, static::STATUS)) { throw new Exception( 'Kan ikke sette jobb-status til ' . $status . ' da den ikke er støttet' ); } $this->update('status_progress', $status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateStatus(array $jobs);", "public function update_status();", "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 }", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "function status ($id = null) {\n\n $this->disableCache();\n\n $j = $this->Job->read(array (\n 'Job.id',\n 'Job.title',\n 'Job.status',\n 'Job.created',\n ), $id);\n\n $skey = 'jobstatus' . $j['Job']['id'] . 'since';\n if ($this->Session->check ($skey)) {\n $since = $this->Session->read ($skey);\n }\n else {\n $since = time ();\n }\n $this->Session->write ($skey, time());\n\n $this->set ('job', $j);\n $status = $this->Job->bgpGetStatus ();\n $this->set ('status', $status);//$since)); ignoring this for now as status update page currently too simple for it\n $async = $this->RequestHandler->isAjax ();\n $this->set ('async', $async);\n \n \n if ($j['Job']['status'] >= 2) // if job is complete, with or without error\n $this->redirect(array('action' => 'report', $id));\n elseif ($j['Job']['status'] == 0 && !$async) // job is pending\n $this->Job->tryProcessNext();\n elseif ($j['Job']['status'] == 1) // job is running\n $this->Job->bgpBOYD(); // check if *this job* has crashed\n \n if (!!$async) {\n $sd = md5(serialize($status['statusFile']));\n if ($this->Session->read ('Job.statustxt.lastStatusData') !== $sd) {\n // data have changed\n $this->Session->write ('Job.statustxt.lastStatusData',$sd);\n $this->Session->write ('Job.statustxt.lastStatusTime',time());\n }\n header ('ax-new-epoch: ' . time());\n header ('ax-latest-epoch: ' . $this->Session->read ('Job.statustxt.lastStatusTime'));\n }\n }", "public function getJobStatus()\n {\n }", "public function actionUpdateStatus() {\n $model = UserJobEditorFlag::model()->findByPk(Yii::app()->request->getPost('instanceId'));\n if (!$model instanceof UserJobEditorFlag) return false;\n $saved = $model->updateStatus(Yii::app()->request->getPost('status'));\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => $saved ? 'ok' : 'error')));\n }", "public function changejobstatusAction(){\n\t \ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\tif($request->isPost()){\n\t\t\t\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$job_id = $posts['job_id'];\n\t\t\t\t$status = $posts['status'];\n\t\t\t\t\n\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\n\t\t\t\techo $jobPacketTable->changeJobStatus($job_id, $status);\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateStatusFinish()\n {\n $this->resetStatuses();\n }", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function updateStatusOnNewDay() {\n // Update advs\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update advgroups\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update campaign\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update project\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n }", "public function execute()\n {\n if (!$this->getName() || $this->getName() == $this->getPreviousName()) {\n Log::debug('Status skipped');\n return;\n }\n $this->save();\n\n $modelStrat = $this->getModelStrategy();\n if (!$modelStrat instanceof StatusStrategyInterface) {\n Log::warning(get_class($modelStrat) . ' does not implement StatusStrategyInterface');\n return;\n }\n\n // Trigger mail event depending on the model\n if ($modelStrat->triggerStatusChange($this)) {\n if (!$this->getEvent()) {\n $this->setEvent($this->makeEventName());\n $this->save();\n }\n // Trigger Event\n $e = new StatusEvent($this);\n if ($this->getConfig()->getEventDispatcher()) {\n // Fire event to setup status mail messages\n $this->getConfig()->getEventDispatcher()->dispatch(StatusEvents::STATUS_CHANGE, $e);\n // Trigger status events for system wide processing. EG: 'status.placement.not approved', status.placementrequest.pending'\n $this->getConfig()->getEventDispatcher()->dispatch($this->getEvent(), $e);\n // Fire the event to send those messages\n $this->getConfig()->getEventDispatcher()->dispatch(StatusEvents::STATUS_SEND_MESSAGES, $e);\n }\n }\n }", "function PKG_changeClientJobsStatus($packageIDList,$status)\n{\n\tCHECK_FW(CC_jobstatus, $status);\n\tPKG_executeOnClientJobs(\"UPDATE `clientjobs` SET `status` = '$status' WHERE \",$packageIDList);\n}", "private function updateSpoolStatus ()\n {\n\n $oAppMessage = (new AppMessage())->retrieveByPK ($this->spool_id);\n if ( is_array ($this->fileData['attachments']) )\n {\n $attachment = implode (\",\", $this->fileData['attachments']);\n $oAppMessage->setappMsgAttach ($attachment);\n }\n $oAppMessage->setappMsgstatus ($this->status);\n $oAppMessage->setappMsgsenddate (date ('Y-m-d H:i:s'));\n $oAppMessage->save ();\n }", "public function UpdateStatusFromBookings()\n\t{\tif ($this->id)\n\t\t{\t$this->UpdateStatus(count($this->GetBookings()) >= $this->details['tqty'] ? 'sold_out' : 'in_stock');\n\t\t}\n\t}", "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 }", "function updateAppliedJobStatus($linkVal, $cID, $jID, $classId)\n\t{\n\t\t$last_updated = time();\n\t\tif($classId == 'status'){\n\t\t\t$fieldName = \"status\";\n\t\t}\n\t\tif($classId == 'actions'){\n\t\t\t$fieldName = \"actions\";\n\t\t}\n\t\t$sql=\"UPDATE `appplied_jobs` SET $fieldName='\".$linkVal.\"', `updated_at`='\".$last_updated.\"'\n\t\t WHERE `job_id`='\".$jID.\"' AND `candidate_id`='\".$cID.\"'\";\n\t\t$result = $this->db->prepare($sql);\t\t\t\n\t\tif($result->execute())\n\t\t{\n\t\t\treturn \"Sucess\";\n\t\t}\n\t \n\t\telse\n\t\treturn \"<span style='color:red;font-size: 16px; font-weight=800;font-style: oblique;font-weight: 600;'> Already Inserted In Data Base</span>\";\t\n\t}", "protected function _updateStatus()\n {\n $this->_writeStatusFile(\n array(\n 'time' => time(),\n 'done' => ($this->_currentItemCount == $this->_totalFeedItems),\n 'count' => $this->_currentItemCount,\n 'total' => $this->_totalFeedItems,\n 'message' => \"Importing content. Item \" . $this->_currentItemCount\n . \" of \" . $this->_totalFeedItems . \".\"\n )\n );\n }", "protected function afterSave(){\n /*\n * Link Complete,if you wanna the status can be changed anyway,\n * no matter it was complete or not,then coment's out this line: if ($this->progressstatus == 4) {\n */\n if ($this->progressstatus == 4) {\n $cptmodel = CampaignTask::model()->findByAttributes(array('campaign_id'=>$this->campaign_id));\n if ($cptmodel) {\n $cptmodel->setIsNewRecord(false);\n $cptmodel->setScenario('update');\n $pcount = Task::model()->countByAttributes(array('campaign_id'=>$this->campaign_id, 'progressstatus'=>4));\n $cptmodel->published_count = $pcount;\n if ($cptmodel->total_count > 0) {\n $cptmodel->percentage_done = round($cptmodel->published_count / $cptmodel->total_count, 3);\n }\n $cptmodel->save();\n }\n }\n\n return parent::afterSave();\n }", "public function updateJobsExpired()\n\t{\n\t\t$today_date = Carbon::now()->format('Y-m-d');\n\n\t\t//This will do the query\n\t\t$query = Job::where([\n\t\t\t'status' => 1\n\t\t])->whereDate('closed_date', '<', $today_date)->update([\n\t\t\t'status' => 0\n\t\t]);\n\n\t}", "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 static function syncActiveJobs()\n {\n $hosts = Host::getAll();\n\n foreach ($hosts as $Host) {\n\n // Get pending jobs for host\n $pendingJobs = static::getAllByWhere([\n 'Status' => 'pending',\n 'HostID' => $Host->ID\n ]);\n\n if (!$pendingJobs) {\n continue;\n }\n\n // Get active jobs from host\n $activeJobs = $Host->executeRequest('/jobs', 'GET')['jobs'];\n\n // Search active jobs for pending jobs to find updates\n foreach ($pendingJobs as $PendingJob) {\n\n // Update any lost jobs\n if (empty($activeJobs[$PendingJob->Site->Handle])) {\n $PendingJob->Status = 'failed';\n $PendingJob->Result = 'lost on server';\n if ($PendingJob->Site) {\n $PendingJob->Site->Updating = false;\n }\n $PendingJob->save();\n continue;\n }\n\n $activeJob = $activeJobs[$PendingJob->Site->Handle][$PendingJob->UID];\n\n if ($activeJob && $activeJob['status'] !== 'pending') {\n\n // Update job\n $PendingJob->Status = $activeJob['status'];\n if (!empty($activeJob['started'])) {\n $PendingJob->Started = $activeJob['started'] / 1000;\n }\n if (!empty($activeJob['completed'])) {\n $PendingJob->Completed = $activeJob['completed'] / 1000;\n }\n\n if (!empty($activeJob['command']['result'])) {\n if (strlen(json_encode($activeJob['command']['result'])) > 60000) {\n $PendingJob->Result = 'Output too long';\n } else {\n $PendingJob->Result = $activeJob['command']['result'];\n }\n } elseif (!empty($activeJob['message'])) {\n $PendingJob->Result = $activeJob['message'];\n }\n $PendingJob->save();\n\n // Update site on vfs update\n if ($PendingJob->Action == 'vfs-update') {\n\n // Get updated site record\n $Site = Site::getByID($PendingJob->SiteID);\n\n // Skip vfs-update actions on failed job\n if ($PendingJob->Status == 'failed') {\n $Site->Updating = false;\n $Site->save();\n continue;\n }\n\n // Update pending job's site\n $initialUpdate = !boolval($Site->ParentCursor);\n $Site->ParentCursor = $activeJob['command']['result']['parentCursor'];\n $Site->LocalCursor = $activeJob['command']['result']['localCursor'];\n $Site->Updating = false;\n $Site->save();\n\n // Conditionally update child site\n if (!empty($activeJob['command']['updateChild']) && $activeJob['command']['updateChild'] === true) {\n $childSites = Site::getAllByField('ParentSiteID', $Site->ID);\n foreach ($childSites as $ChildSite) {\n $ChildSite->requestFileSystemUpdate();\n }\n }\n\n // Fire initial vfs update event\n if ($initialUpdate) {\n \\Emergence\\EventBus::fireEvent(\n 'afterInitialVFSUpdate',\n $Site->getRootClass(),\n [\n 'Record' => $Site,\n 'Job' => $PendingJob\n ]\n );\n }\n }\n }\n }\n }\n }", "public function updateStatusStart()\n {\n $this->resetStatuses();\n $this->pubDirectory->touch($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n }", "public function updated(Job $job)\n {\n //\n }", "protected function getRemainingUpdatesStatus() {}", "public function respon(){\n //update 'status'\n }", "public function processJOb() {\n \t\t//update staus for cron job to processed when done or error if erored out \n \t}", "private function load_status() {\n // New ID\n if (!isset($this->id) || $this->id === 0)\n return;\n $col = $this->get_col_pfx();\n $table = $this->table;\n $sql = \"SELECT * FROM $table WHERE ${col}id = :id\";\n $db_result = $this->db->query($sql, array(\":id\" => $this->id));\n if (!$db_result || !isset($db_result[0]))\n throw new \\RuntimeException(\"No ID found $this->id\");\n $db_result = $db_result[0];\n $this->status = $db_result[$col . \"status\"];\n $this->time_created = $db_result[$col . \"time_created\"];\n $this->time_started = $db_result[$col . \"time_started\"];\n $this->time_completed = $db_result[$col . \"time_completed\"];\n }", "function updateStatus(&$status, &$statusflag)\n {\n Requirements::customCSS('.col-ScheduledStatusDataColumn i {\n width: 16px;\n height: 16px;\n display: block;\n float: left;\n margin-right: 6px;\n }', 'ScheduledStatusDataColumn_Icons');\n if ( $this->owner->getEmbargoIsSet() ) {\n if ( $this->owner->getScheduledStatus() ) {\n // Under Embargo\n $status .= '<i class=\"font-icon-eye btn--icon-md text-danger\" title=\"Embargo active\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n } else {\n // Embargo expired\n $status .= '<i class=\"font-icon-eye btn--icon-md text-info\" title=\"Embargo expired\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n }\n }\n if ( $this->owner->getExpiryIsSet() ) {\n if ( $this->owner->getEmbargoIsSet() ) {\n $status .= '<br />'; // add a break if both set\n }\n if ( $this->owner->getExpiredStatus() ) {\n // Expired/unpublished\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-danger\" title=\"Expired/unpublished\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n } else {\n // Scheduled to expire\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-warning\" title=\"Scheduled to expire\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n }\n }\n }", "public function massStatusAction()\n {\n $handovertwoIds = $this->getRequest()->getParam('handovertwo');\n if (!is_array($handovertwoIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_handover')->__('Please select minutes of handovers v2.')\n );\n } else {\n try {\n foreach ($handovertwoIds as $handovertwoId) {\n $handovertwo = Mage::getSingleton('bs_handover/handovertwo')->load($handovertwoId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d minutes of handovers v2 were successfully updated.', count($handovertwoIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_handover')->__('There was an error updating minutes of handovers v2.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "function frl_perform_update(){\n\n\t$task_for_out = frl_get_tasks();\n\t$log_for_out = frl_get_log();\n\t$log_queue = frl_get_log_queue();\n\n\t$step = count($log_for_out);\n\tif($step > $log_queue){\n\t\tfrl_perform_reset();\n\t\treturn;\n\t}\n\n\t//add action into log\n\t$new_line = $log_queue[$step]; \n\tarray_unshift($log_for_out, $new_line);\n\n\t$file = dirname(__FILE__).'/data/log-out.csv'; \n $csv_handler = fopen($file,'w');\n foreach ($log_for_out as $l) {\n \tfputcsv($csv_handler, $l, \",\");\n }\n fclose($csv_handler);\n\n //change status of task\n if($new_line[2] == 'Запрос уточнения'){\n \t//change status to Ждет уточнения\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Ждет уточнения');\n }\n\n if($new_line[2] == 'Отклик на задачу'){\n \t//change status to Подтверждено\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Подтверждено');\n }\n\n $file = dirname(__FILE__).'/data/tasks-out.csv';\n $csv_handler = fopen($file,'w');\n foreach ($task_for_out as $t) {\n \tfputcsv($csv_handler, $t, \",\");\n }\n fclose($csv_handler);\n\n}", "public function testCannotUpdateJobPosterStatus(): void\n {\n $job = factory(JobPoster::class)->state('draft')->create();\n $jobUpdate = $this->generateFrontendJob($job->manager_id, false);\n $jobUpdate['job_poster_status_id'] = $job->job_poster_status_id + 1;\n $response = $this->followingRedirects()\n ->actingAs($job->manager->user)\n ->json('put', \"$this->baseUrl/jobs/$job->id\", $jobUpdate);\n $response->assertOk();\n $newJob = $job->fresh();\n $this->assertEquals($job->job_poster_status_id, $newJob->job_poster_status_id);\n }", "function update_cron_job_status($jobId, $status, $userId)\n\t{\n\t\tlog_message('debug', '_setting/update_cron_job_status');\n\t\tlog_message('debug', '_setting/update_cron_job_status:: [1] jobId='.$jobId.' status='.$status.' userId='.$userId);\n\n\t\t$response = server_curl(CRON_SERVER_URL, array('__action'=>'run', 'query'=>'update_cron_job_status', 'variables'=>array(\n\t\t\t\t'job_id'=>$jobId,\n\t\t\t\t'is_done'=>($status == 'active'? 'N': 'Y'),\n\t\t\t\t'user_id'=>$userId\n\t\t\t) ));\n\t\tlog_message('debug', '_setting/cron_jobs:: [2] response='.json_encode($response));\n\n\t\treturn array('success'=>((!empty($response['result']) && $response['result'] == 'SUCCESS')? 'TRUE': 'FALSE'));\n\t}", "public function getJobStatus()\n {\n return $this->jobStatus;\n }", "protected function _saveStatus()\n {\n try {\n\n /**\n * update task statuses with completion days\n */\n foreach( $this->_status as $key => $val ) {\n\n if ( in_array( $key, $this->_tasks ) ) {\n $task = Mage::getModel('jirafe_analytics/install')\n ->getCollection()\n ->addFieldToFilter( 'task', $key )\n ->getFirstItem();\n\n $task->setCompletedDt( $val );\n $task->save();\n }\n }\n\n /**\n * refresh status values in cache\n *\n */\n $this->_saveStatusToCache();\n\n return true;\n\n } catch (Exception $e) {\n Mage::helper('jirafe_analytics')->log('ERROR', 'Jirafe_Analytics_Model_Installer::_saveStatus()', $e->getMessage(), $e);\n return false;\n }\n }", "public function projectTaskStatusUpdate(){\r\n\t\t//fetch activity feed list\r\n\t\t$post = $this->input->post(null, true);\r\n\t\t$parent_id = $post['pid'];\r\n\t\t$task_id = $post['tid'];\r\n\t\t$status_id = $post['stat'];\r\n\t\t$completed_time = gmdate('Y-m-d H:i:s');\r\n\r\n\t\t//$task = new Task();\r\n\t\t$data = array('status_id' => $status_id, 'completed_date'=>$completed_time);\r\n\t\t$this->db->where(\"parent_id\", $parent_id);\r\n\t\t$this->db->where(\"task_id\", $task_id);\r\n\t\t$this->db->update(\"sc_tasks\", $data);\r\n\r\n\t}", "public function updateStatus($data)\n {\n $systemJobModel = $this->getSystemJob();\n $json = ($systemJobModel->data) ? json_decode($systemJobModel->data, true) : [ 'log' => $this->getLog() ];\n $systemJobModel->data = json_encode(array_merge($json, $data));\n $systemJobModel->save();\n }", "function updatereviewstatus($assid, $studentid, $datesubmitted, $tid, $pid){\n\t\t\t$strQuery=\"update review_assignments set pid = '$pid', date_submitted='$datesubmitted', status = 'not' where aid='$assid' and stid = '$studentid' and tid='$tid'\";\n\t\t\t$result = $this->query($strQuery);\n\t}", "public function updateStatus()\n\t\t{\n\t\t\t$thingdom = $this->getThingdom();\n\n\t\t\tif(!$thingdom) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$page_count = wp_count_posts('page')->publish;\n\t\t\t$post_count = wp_count_posts()->publish;\n\t\t\t$comment_count = wp_count_comments()->approved;\n\n\t\t\t$thing = $thingdom->getThing($this->thingName, $this->thingType);\n\n\t\t\t$thing->status('page_count', $page_count);\n\t\t\t$thing->status('post_count', $post_count);\n\t\t\t$thing->status('comment_count', $comment_count);\n\t\t}", "function PKG_addStatusJob($client,$packageName,$priority,$params,$status)\n{\n\t$client = trim($client);\n\n\t$clientOptions = CLIENT_getAllOptions($client);\n\t$packagesource = $clientOptions['packagesource'];\n\t$distr\t\t = $clientOptions['distr'];\n\n//search for old job with the same package\n\tif (strstr($packageName,\"m23normal\"))\n\t\t{\n//if we have a m23normal or m23normalRemove package, the params differ\n\t\t\tCHECK_FW(CC_clientname, $client, CC_jobstatus, $status, CC_nochecknow, $params, CC_package, $packageName, CC_packagepriority, $priority);\n\n\t\t\t//Split the parameter into two parts: e.g. mc###12345\n\t\t\tif (strpos($params,'###') !== false)\n\t\t\t{\n\t\t\t\t$temp = explode('###', $params);\n\t\t\t\t$params = $temp[0];\n\t\t\t\t$installedSize = $temp[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$installedSize = 0;\n\t\t\t}\n\n\t\t\t$sql = \"SELECT id FROM `clientjobs` WHERE client='$client' AND status='$status' AND normalPackage='$params'\";\n\n\t\t\t$insertSql=\"INSERT INTO clientjobs (client,package,priority,status,normalPackage,installedSize) VALUES\n\t\t\t('$client', '$packageName', $priority, '$status', '$params','$installedSize');\";\n\t\t}\n\telse //if we have other packages the package names differ\n\t\t{\n\t\t\tCHECK_FW(CC_clientname, $client, CC_jobstatus, $status, CC_nochecknow, $params, CC_package, $packageName, CC_packagepriority, $priority);\n\t\t\t$sql = \"SELECT id FROM `clientjobs` WHERE client='$client' AND status='$status' AND package='$packageName' AND priority='$priority'\";\n\n\t\t\t$insertSql=\"INSERT INTO clientjobs (client,package,priority,status,params) VALUES\n\t\t\t('$client', '$packageName', '$priority', '$status', '$params');\";\n\t\t}\n\n\t$result=DB_query($sql); //FW ok\n\n\tif ($line=mysql_fetch_row($result))\n\t\t{//we got one old job: let's delete it\n\t\t\t$sql=\"DELETE FROM clientjobs WHERE id = '\".$line[0].\"';\";\n\t\t\tDB_query($sql); //FW ok\n\t\t}\n\n\tDB_query($insertSql); //FW ok\n}", "public function updateBookingStatus(){\n $command = Yii::$app->db->createCommand();\n $id= Yii::$app->request->bodyParams[\"booking2\"];\n\n try {\n $command->update('car', ['pendingTime' => 'on', 'inUse' => 'pending'], 'id = '.$id)->execute();\n } catch (Exception $e) {\n printf(\"Cannot update data\");\n }\n }", "function _updateStatus($a_obj_id, $a_usr_id, $a_obj = null, $a_percentage = false, $a_no_raise = false, $a_force_raise = false)\n\t{\n//global $ilLog;\n//$ilLog->write(\"ilLPStatus-_updateStatus-\");\n\n\t\t$status = $this->determineStatus($a_obj_id, $a_usr_id, $a_obj);\n\t\t$percentage = $this->determinePercentage($a_obj_id, $a_usr_id, $a_obj);\n\t\t$changed = self::writeStatus($a_obj_id, $a_usr_id, $status, $percentage);\n\t\t\n\t\tif(!$a_no_raise && \n\t\t\t($changed || $a_force_raise)) // #15529\n\t\t{\n\t\t\tself::raiseEvent($a_obj_id, $a_usr_id, $status, $percentage);\t\t\t\n\t\t}\t\t\t\n\t}", "public function updateStatus($params)\r\n {\r\n }", "Public Function GetJobstatus($jobId)\n {\n \t$this->jobId = $jobId;\n \t$this->status = 'Not in bevomedia_queue';\n \t\n \t\t$DatabaseObj = Zend_Registry::get('Instance/DatabaseObj');\n\t\t\t\n \t//Lets get all entries that have envelopes and have not been started\n \t$Query = \"\n \t\tSELECT\n \t\t\tstarted, completed, Deleted\n \t\tFROM\n \t\t\tbevomedia_queue\n \t\tWHERE\n \t\t\tjobId = '{$this->jobId}'\t\n \t\t\n \t\";\n \t\n \t$Results = $DatabaseObj->fetchAll($Query);\n \tif(count($Results)>0)\n \t{\n\t \tforeach($Results as $Value)\n\t \t{\n\t \t\tif($Value->started == '0000-00-00 00:00:00' && $Value->completed == '0000-00-00 00:00:00')\n\t \t\t{\n\t \t\t\t$this->status = 'bevomedia_queued';\n\t \t\t}\n\t \t\telseif($Value->started == '0000-00-00 00:00:00' && $Value->completed != '0000-00-00 00:00:00')\n\t \t\t{\n\t \t\t\t$this->status = 'Processing';\n\t \t\t}\n\t \t\telseif($Value->started != '0000-00-00 00:00:00' && $Value->completed != '0000-00-00 00:00:00')\n\t \t\t{\n\t \t\t\t$this->status = 'completed';\n\t \t\t}\n\t \t\telseif($Value->Deleted == 1)\n\t \t\t{\n\t \t\t\t$this->status = 'Deleted';\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t//Not sure what this could be\n\t \t\t\t$this->status = 'Error';\n\t \t\t}\n\t \t}\n \t}\n\n \treturn $this->status; \t\n \t\n }", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }", "public function changeStatus()\n {\n }", "public function changestatusAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n\n if($user_params['status'] == 'closed')\n $data = array(\"status\"=>$user_params['status'], \"cancelled_at\"=>date('Y-m-d H:i:s'));////////updating\n elseif($user_params['status'] == 'done')\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>date('Y-m-d H:i:s'));////////updating\n else\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\n $contactId = $requestdetails[0]['request_by'];\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\n $contactName = $contactdetails[0]['first_name'].\" \".$contactdetails[0]['last_name'];\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\n $parameters['ftvcontactName'] = $contactName;\n $ftvrequest_obj->updateFtvRequests($data,$query);\n ////making the time resume if its in pause////\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\n if($inpause == 'yes')\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id = '\".$user_params['requestId'].\"' AND resume_at IS NULL \";\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\n }\n if($user_params['status'] == 'done')\n {\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\n {\n $parameters['ftvrequestlink'] = \"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\";\n $parameters['ftvType'] = \"chaine\";\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n else // in case jhony change the status\n {\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n }\n\n }", "abstract public function getStatus();", "public function massStatusAction()\n {\n $offermanagerIds = $this->getRequest()->getParam('offermanager');\n if (!is_array($offermanagerIds)) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('Please select Offer(s)'));\n } else {\n try {\n foreach ($offermanagerIds as $offermanagerId) {\n $offermanager = Mage::getSingleton('offermanager/offermanager')\n ->load($offermanagerId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d record(s) were successfully updated', count($offermanagerIds))\n );\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n }\n $this->_redirect('*/*/index');\n }", "public function massStatusAction()\n {\n $scheduleIds = $this->getRequest()->getParam('schedule');\n if (!is_array($scheduleIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('Please select schedule.')\n );\n } else {\n try {\n foreach ($scheduleIds as $scheduleId) {\n $schedule = Mage::getSingleton('bs_schedule/schedule')->load($scheduleId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d schedule were successfully updated.', count($scheduleIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('There was an error updating schedule.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "protected function status()\n {\n }", "private function updateTask(int $status, Model $job)\n {\n $job->status = $status;\n $job->save();\n }", "public function jobStatusChange(Request $request)\n {\n $job=JobRegister::find($request->id);\n if ($job) {\n $job->update(['job_status'=>$request->status]);\n return true;\n }else{\n return false;\n }\n }", "public function pingJob(): void\n {\n $this->storage->pingJob($this->storedJob);\n }", "public function getUpdateStatus() {\n return $this->_statusManager->getStatus ();\n }", "public function massStatusAction(){\r\n $siegeIds = $this->getRequest()->getParam('siege');\r\n if(!is_array($siegeIds)) {\r\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('reseauchx_reservationreseau')->__('Please select sieges.'));\r\n }\r\n else {\r\n try {\r\n foreach ($siegeIds as $siegeId) {\r\n $siege = Mage::getSingleton('reseauchx_reservationreseau/siege')->load($siegeId)\r\n ->setStatus($this->getRequest()->getParam('status'))\r\n ->setIsMassupdate(true)\r\n ->save();\r\n }\r\n $this->_getSession()->addSuccess($this->__('Total of %d sieges were successfully updated.', count($siegeIds)));\r\n }\r\n catch (Mage_Core_Exception $e){\r\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n }\r\n catch (Exception $e) {\r\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('reseauchx_reservationreseau')->__('There was an error updating sieges.'));\r\n Mage::logException($e);\r\n }\r\n }\r\n $this->_redirect('*/*/index');\r\n }", "public function massStatusAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public static function munim_schedule_status_update() {\n\t\tif ( ! wp_next_scheduled( 'munim_update_estimate_status' ) ) {\n\t\t\twp_schedule_event( time(), 'daily', 'munim_update_estimate_status' );\n\t\t}\n\t}", "public function massStatusAction()\n {\n $traineedocIds = $this->getRequest()->getParam('traineedoc');\n if (!is_array($traineedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('Please select trainee document.')\n );\n } else {\n try {\n foreach ($traineedocIds as $traineedocId) {\n $traineedoc = Mage::getSingleton('bs_traineedoc/traineedoc')->load($traineedocId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d trainee document were successfully updated.', count($traineedocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('There was an error updating trainee document.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function updateSubmissionStatus() {\n\n $updateStatus = Usersubmissionstatus::where('user_id', Auth::user()->id)\n ->where('quarter_id', Quarter::getRunningQuarter()->id)\n ->update(['status_id' => config('constant.status.L1_APPROVAL_PENDING')]);\n // Let's notify user and L1 about user submission status.\n return $this->sendMail(config('constant.email_status.INFORM_APPRAISEE'));\n }", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function inProgress()\n {\n $this->setStatus(self::STATUS_IN_PROGRESS);\n }", "public function preUpdate($status) {\n $total = (int)$this->getForm()->get('tiempototal')->getData();\n $parte = (int)$this->getForm()->get('tiempo')->getData();\n $actual = date(\"Y-m-d H:i:s\");\n $status->setModificado(\\DateTime::createFromFormat('Y-m-d H:i:s', $actual));\n \n if($parte <$total){\n $porcent = $parte * 100 / $total;\n $status->setPorcentaje($porcent);\n }else{\n $status->setTiempo($this->getForm()->get('tiempototal')->getData());\n $status->setPorcentaje('100');\n }\n }", "public function doUpdateStatus()\n\t{\n\n\t\t\n\t\t$rules = array(\n\t\t\t'row_id' => 'required', \n\t\t\t'status' => 'required'\n\t\t);\n\t\t\n\t\t// run the validation rules \n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\t\n\t\t\treturn Redirect::to('order')\n\t\t\t\t->withErrors($validator);\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t \n\t\t\t$object = Object::find(Input::get('row_id'));\n\t\t\t$object->fk_status = Input::get('status');\n\t\t\t$object->save();\n\t\t\t\n $logDetails = json_encode(['row_id' => Input::get('row_id'),\n\t\t\t\t\t\t\t\t\t 'status' => Input::get('status')]);\n\t\t\t\t\t\n\t\t\tActivity::log([\n\t\t\t\t'contentId' => Auth::User()->id,\n\t\t\t\t'contentType' => 'admin_pickup_status',\n\t\t\t\t'action' => 'Updated',\n\t\t\t\t'description' => 'Pickup Status Updated',\n\t\t\t\t'details' => $logDetails,\n\t\t\t\t'updated' => true,\n\t\t\t]);\n\t\t\t\n\t\t\t Session::flash('message', 'Order #' . Input::get('row_id') . ' updated');\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t \n\t\t\tSession::flash('error', $e->getMessage() );\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\t\n\t\t\n\t}", "private function checkStatusOfSearchJob() {\n $response = $this->client->request('GET', \"search/jobs/{$this->jobId}\", ['http_errors' => false]);\n if ($response->getStatusCode() === 429) {\n return self::RATE_LIMITED;\n }\n $data = json_decode($response->getBody());\n $state = $data->state;\n switch ($state) {\n case \"NOT STARTED\" :\n return self::NOT_STARTED;\n case \"GATHERING RESULTS\";\n return self::IN_PROGRESS;\n case \"DONE GATHERING RESULTS\";\n return self::COMPLETE;\n default:\n return self::CANCELLED;\n }\n }", "public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}", "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 }", "public function getLastStatus()\n {\n }", "function PKG_getClientjobsStatus($client,$package,$distr,$params,$normalPackage)\n{\n\tCHECK_FW(CC_clientname, $client, CC_package, $package, CC_nochecknow, $params, CC_package, $normalPackage);\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t$sql=\"SELECT status,id FROM `clientjobs` WHERE client='$client' AND package='$package' OR (params='$params' AND normalPackage='$normalPackage')\";\t\n\n\t$result = db_query($sql); //FW ok\n\t$line=mysql_fetch_row($result);\n\n\tif (strstr($line[0],\"wait4acc\"))\n\t\t$action=$I18N_preselected;\n\t\t\n\tif (!empty($distr))\n\t\t{\n\t\t\tinclude_once(\"/m23/inc/distr/$distr/packages.php\");\n\t\t\t$status = PKG_translateClientjobsStatus($line[0]);\n\n\t\t\t$outStatus=\"$status / $action\";\n\t\t}\n\telse\n\t\t$outStatus=$action;\n\n\treturn($outStatus);\n}", "public function getCronStatus()\n {\n // get the last job with status pending or running\n $lastJob = Mage::getModel('cron/schedule')->getCollection()\n ->addFieldToFilter('status', array(\n 'in' => array(\n Mage_Cron_Model_Schedule::STATUS_PENDING,\n Mage_Cron_Model_Schedule::STATUS_RUNNING,\n )\n )\n )\n ->setOrder('scheduled_at', Varien_Data_Collection_Db::SORT_ORDER_DESC)\n ->setPageSize(1)\n ->getFirstItem();\n\n // check if last job has been scheduled within allowed interval\n $ok = true;\n if ($lastJob && $lastJob->getId()) {\n $locale = Mage::app()->getLocale();\n\n $scheduledAt = $locale->date($lastJob->getScheduledAt(), Varien_Date::DATETIME_INTERNAL_FORMAT);\n $scheduledAt = $locale->utcDate(null, $scheduledAt);\n\n // now\n $now = $locale->date(null, Varien_Date::DATETIME_INTERNAL_FORMAT);\n $now = $locale->utcDate(null, $now);\n\n // if last job was scheduled before the current time\n if ($now->isLater($scheduledAt)) {\n $allowedTime = $now->subHour($this->_allowedTimeDiffJob);\n if ($allowedTime->isLater($scheduledAt)) {\n $ok = false;\n }\n }\n } else {\n $ok = false;\n }\n\n $message = '';\n if ($ok) {\n $image = $this->_getTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Magento Cron Process has been correctly configured!',\n $image\n );\n } else {\n $image = $this->_getUnTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Magento Cron Process has not been correctly activated!',\n $image\n );\n }\n\n return $message;\n }", "public function massStatusAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getSingleton('bs_kst/ifeedback')->load($ifeedbackId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d instructor feedbacks were successfully updated.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function jobActive($user_id,$status){\n $job = Job::find($user_id);\n $job->job_status = $status;\n // $slider->slider_position = $count + 1;\n $job->save();\n Session::flash('message', \"Job Active\");\n return redirect()->back();\n\n }", "function ajax_jobStatus()\n{\n\n $cc = new CapabilityCheck('jobStatus');\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('jobStatus', $_POST);\n $cpjm->RunJob();\n}", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "function update_status() {\n global $order;\n if ($this->enabled && ((int) constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_ZONE\") > 0)) {\n $check_flag = false;\n $check_query = tep_db_query(\"select zone_id from \" . TABLE_ZONES_TO_GEO_ZONES . \" where geo_zone_id = '\" . constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_ZONE\") . \"' and zone_country_id = '\" . $order->delivery['country']['id'] . \"' order by zone_id\");\n while ($check = tep_db_fetch_array($check_query)) {\n if ($check['zone_id'] < 1) {\n $check_flag = true;\n break;\n } else if ($check['zone_id'] == $order->delivery['zone_id']) {\n $check_flag = true;\n break;\n }\n }\n \n if (! $check_flag) {\n $this->enabled = false;\n }\n }\n }", "protected static function set_status()\n {\n }", "public function statusAction(){\n $this->_models->changeStatusIcons($this->_arrParam,array('task' => 'change-submit-status'));\n redirect::locationHeader('admin','user','index');\n }", "public function changeStatusAjaxAction()\n\t{\n\t\t$data = $this->getRequest()->getPost();\n\t\tif($data){\n\t\t\tif($data['lb_item_status']!=\"\"){\n\t\t\t\t$order = Mage::getModel('sales/order')->load($data['order_id']);\n\t\t\t\t$orderStatus = $order->getStatus();\n\t\t\t\t$lbOrderItemInstance = Mage::getModel('dropship360/orderitems')->getCollection()->addFieldToFilter('item_id', $data['lb_item_id']);\n\t\t\t\ttry{\n\t\t\t\t\tif($lbOrderItemInstance->count() > 0){\t\t\t\n\t\t\t\t\t\tforeach($lbOrderItemInstance as $item){\n\t\t\t\t\t\t\t$itemStatusHistory = Mage::helper('dropship360')->getSerialisedData($item, $data['lb_item_status'], $orderStatus);\n\t\t\t\t\t\t\t$item->setLbItemStatus($data['lb_item_status']);\n\t\t\t\t\t\t\t$item->setItemStatusHistory($itemStatusHistory);\n\t\t\t\t\t\t\t$item->setUpdatedBy('User');\n\t\t\t\t\t\t\t$item->setUpdatedAt(Mage::getModel('core/date')->gmtDate());\n\t\t\t\t\t\t\t$item->save();\t\n\t\t\t\t\t\t\tif($data['lb_item_status']==$item->getLbItemStatus()){\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status successfully changed to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status unable to change to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\tif($data['lb_item_status'] == 'Transmitting'){\n\t\t\t\t\t\tMage::getModel('dropship360/logicbroker')->setupNotification();\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$result = Mage::helper('core')->jsonEncode($data);\n\t\t\t\t\tMage::app()->getResponse()->setBody($result);\n\t\t\t\t}catch(Exception $e){\t\t\t\n\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$data['msg'] = 'Unable to perform the required operation';\n\t\t}\t\n\t}", "protected function getSelfStatus() {}", "protected function performUpdate() {}", "protected function getSelfStatus() {}", "function getStatus(){\n $this->status = 'Unknown';\n if($this->finAid == 1 && $this->totalOwed != 0){\n if($this->finaidQuestion[1] == ''){\n $this->status = 'Waiting for finaid application';\n return;\n }else{\n $this->status = 'Waiting for finaid decision';\n return;\n }\n }\n if($this->schoolFeeOwed != 0){\n $this->status = 'Waiting for school fee payment';\n return;\n }\n if($this->countryId[1] == 0){\n $this->status = 'Waiting for country preferences';\n return;\n }\n if($this->countryId[1] != 0 && $this->countryConfirm != 1){\n $this->status = 'Waiting for country assignments';\n return;\n }\n if($this->delegateFeeOwed != 0){\n $this->status = 'Waiting for delegate fee payment';\n return;\n }\n if(sizeof($this->attendees) == 0){\n $this->status = 'Waiting for attendee info';\n return;\n }\n if($this->totalOwed < 0){\n $this->status = 'Need Refund';\n return;\n }\n if(sizeof($this->attendees) == $this->totalAttendees && $this->totalOwed == 0){\n $this->status = 'Ready';\n return;\n }\n }", "public function changepackagerenewStatus()\n\t{\n\t\t\n\t\t$this->Checklogin();\n\t\t$status=$this->input->post('id');\n\t\t$package_id=$this->input->post('package_id');\n \n \n\t\t$idlist=implode(\",\",$package_id);\n\t\t\n\t\tif ($status == 0 || $status == 1)\n\t\t{\n\t\t\t$a=$this->package_model->changepackagerenewStatus($status,$package_id);\n\t\t\t\n\t\t\tif ($status == 0)\n\t\t\t{\n\t\t\t\tsetSAActivityLogs('Transaction_activity','SAPackagerenew_status',\"Updates Status Deactivated :- \".$idlist);\n if(count($package_id)>1)\n { \n\t\t\t\t $this->session->set_flashdata('success','Packages has been deactivated successfully');\n\t\t\t }\n else\n {\n $this->session->set_flashdata('success','Package has been deactivated successfully'); \n }\n } else\n\t\t\t{\n\t\t\t\tsetSAActivityLogs('Transaction_activity','SAPackagerenew_status',\"Updates Status Activated :- \".$idlist);\n if(count($package_id)>1)\n { \n\t\t\t\t $this->session->set_flashdata('success','Packages has been activated successfully');\n\t\t\t }\n else\n {\n $this->session->set_flashdata('success','Package has been activated successfully'); \n } \n }\n\t\t\techo true;\n\t\t} else\n\t\t{\n\t\t\t\n\t\t\t$this->session->set_flashdata('error','Something went wrong');\n\t\t\techo true;\n\t\t}\n\t\n\t}", "public function massStatusAction()\n {\n $traineecertIds = $this->getRequest()->getParam('traineecert');\n if (!is_array($traineecertIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('Please select trainee certificates.')\n );\n } else {\n try {\n foreach ($traineecertIds as $traineecertId) {\n $traineecert = Mage::getSingleton('bs_traineecert/traineecert')->load($traineecertId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d trainee certificates were successfully updated.', count($traineecertIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('There was an error updating trainee certificates.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function actionMarkUpdated() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n $searchCriteria=new CDbCriteria;\r\n $deedMaster= DeedMaster::model()->findByPk($DeedID);\r\n $deedMaster->ArchiveUpdate = True;\r\n if($deedMaster->save()) $res=1;\r\n \r\n print CJSON::encode($res);\r\n }", "public function massStatusAction()\n {\n $aircraftIds = $this->getRequest()->getParam('aircraft');\n if (!is_array($aircraftIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_misc')->__('Please select aircraft.')\n );\n } else {\n try {\n foreach ($aircraftIds as $aircraftId) {\n $aircraft = Mage::getSingleton('bs_misc/aircraft')->load($aircraftId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d aircraft were successfully updated.', count($aircraftIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_misc')->__('There was an error updating aircraft.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\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 }", "function updateStatus() {\n global $status, $spambotDataLoc;\n return file_put_contents( $spambotDataLoc.'sbstatus', serialize($status) ); \n}", "private function loadQueueStatus() {\n $this->queue_position = $this->core->getGradingQueue()->getQueueStatusAGV($this);\n }", "public function updateStatus(): void\n {\n $data = json_encode($this->getStatus(), JSON_PRETTY_PRINT);\n File::put(public_path(self::STATUS_FILE_NAME), $data);\n }", "public function updateJobStatus($status, $additional_info=null, $datasource_id=null){\n $this->status = $status;\n $this->additional_info = $additional_info;\n $this->datasource_id = $datasource_id;\n return $this->submit();\n }", "public function updating()\n {\n # code...\n }", "private function processStatus(){\n\t\t$this->facilityData = $this->getFacilityStatus();\n\n\t\t/** Set the date if it's not set for the proved facility */\n\t\t$this->setFacilityStatus();\n\t}", "public function massStatusAction()\n {\n $coursedocIds = $this->getRequest()->getParam('coursedoc');\n if (!is_array($coursedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('Please select course docs.')\n );\n } else {\n try {\n foreach ($coursedocIds as $coursedocId) {\n $coursedoc = Mage::getSingleton('bs_coursedoc/coursedoc')->load($coursedocId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d course docs were successfully updated.', count($coursedocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('There was an error updating course docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function massStatusAction()\n {\n $curriculumdocIds = $this->getRequest()->getParam('curriculumdoc');\n if (!is_array($curriculumdocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Please select curriculum docs.')\n );\n } else {\n try {\n foreach ($curriculumdocIds as $curriculumdocId) {\n $curriculumdoc = Mage::getSingleton('bs_curriculumdoc/curriculumdoc')->load($curriculumdocId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d curriculum docs were successfully updated.', count($curriculumdocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was an error updating curriculum docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "function wv_update_commission_status($oid,$pid,$sts){\n \n update_post_meta($oid,'woo_commision_status_'.$pid,$sts);\n \n \n }", "function updates()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['updates'] == 1 ) ? 'Database Update' : 'Database Updates';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'reverted' : 'executed';\n\t\t\n\t\tforeach ( $this->xml_array['updates_group']['update'] as $k => $v )\n\t\t{\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->do_update( \"{$v['table']['VALUE']}\", array( \"{$v['key']['VALUE']}\" => \"{$v['new_value']['VALUE']}\" ), \"{$v['where']['VALUE']}\" );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $v['old_value'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_update( \"{$v['table']['VALUE']}\", array( \"{$v['key']['VALUE']}\" => \"{$v['old_value']['VALUE']}\" ), \"{$v['where']['VALUE']}\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['updates']} {$object} {$operation}....\" );\n\t}" ]
[ "0.7107267", "0.7099361", "0.6856061", "0.6627047", "0.66234565", "0.6594672", "0.6578937", "0.6506085", "0.64097893", "0.63432175", "0.6263854", "0.6255753", "0.6252873", "0.6227075", "0.6181117", "0.6165519", "0.60912836", "0.60596794", "0.60281", "0.60278136", "0.60137975", "0.60025525", "0.5996455", "0.5965742", "0.5950725", "0.5913147", "0.59058386", "0.5903368", "0.5891034", "0.5884411", "0.58802944", "0.5871956", "0.5863644", "0.5857177", "0.58562505", "0.5853843", "0.5848154", "0.5843047", "0.58421606", "0.58391374", "0.5837077", "0.5836457", "0.58334374", "0.5806323", "0.5800317", "0.57952327", "0.5786134", "0.5785292", "0.57831824", "0.57812685", "0.5777312", "0.57687277", "0.5767779", "0.57663506", "0.5758637", "0.57494605", "0.5735885", "0.5732202", "0.5725578", "0.5721446", "0.5715802", "0.5714468", "0.57119447", "0.57082725", "0.5699587", "0.5694485", "0.56924", "0.5678621", "0.56774706", "0.56769717", "0.56738585", "0.5671631", "0.5670587", "0.5660548", "0.56595993", "0.5647486", "0.56432796", "0.56432796", "0.56406695", "0.5636462", "0.563082", "0.5622683", "0.5619902", "0.56194097", "0.5618375", "0.5604576", "0.55975235", "0.5594961", "0.5590001", "0.55899596", "0.558728", "0.558184", "0.55809975", "0.5580592", "0.5568378", "0.55659", "0.55618936", "0.55510294", "0.5539393", "0.5539028", "0.5537358" ]
0.0
-1
Hent jobbens overordnede status
public function getStatus(): string { return $this->status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJobStatus()\n {\n }", "protected function getSelfStatus() {}", "protected function getSelfStatus() {}", "public function update_status();", "abstract public function getStatus();", "public function statusBulu(){\r\n\t\t\treturn parent::lihatBulu();\r\n\t\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 }", "public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}", "function status ($id = null) {\n\n $this->disableCache();\n\n $j = $this->Job->read(array (\n 'Job.id',\n 'Job.title',\n 'Job.status',\n 'Job.created',\n ), $id);\n\n $skey = 'jobstatus' . $j['Job']['id'] . 'since';\n if ($this->Session->check ($skey)) {\n $since = $this->Session->read ($skey);\n }\n else {\n $since = time ();\n }\n $this->Session->write ($skey, time());\n\n $this->set ('job', $j);\n $status = $this->Job->bgpGetStatus ();\n $this->set ('status', $status);//$since)); ignoring this for now as status update page currently too simple for it\n $async = $this->RequestHandler->isAjax ();\n $this->set ('async', $async);\n \n \n if ($j['Job']['status'] >= 2) // if job is complete, with or without error\n $this->redirect(array('action' => 'report', $id));\n elseif ($j['Job']['status'] == 0 && !$async) // job is pending\n $this->Job->tryProcessNext();\n elseif ($j['Job']['status'] == 1) // job is running\n $this->Job->bgpBOYD(); // check if *this job* has crashed\n \n if (!!$async) {\n $sd = md5(serialize($status['statusFile']));\n if ($this->Session->read ('Job.statustxt.lastStatusData') !== $sd) {\n // data have changed\n $this->Session->write ('Job.statustxt.lastStatusData',$sd);\n $this->Session->write ('Job.statustxt.lastStatusTime',time());\n }\n header ('ax-new-epoch: ' . time());\n header ('ax-latest-epoch: ' . $this->Session->read ('Job.statustxt.lastStatusTime'));\n }\n }", "function getStatus() ;", "function getStatus() ;", "function getStatus() ;", "private function status()\n {\n echo \"<br /><br />Status (number of soldiers alive): <br />\";\n echo $this->_army1->getName() . \": \" . $this->_army1->_numOfSoldiers . \"<br />\";\n echo $this->_army2->getName() . \": \" . $this->_army2->_numOfSoldiers;\n }", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "abstract public function GetStatus();", "protected function status()\n {\n }", "public function status();", "public function status();", "public function changejobstatusAction(){\n\t \ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\tif($request->isPost()){\n\t\t\t\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$job_id = $posts['job_id'];\n\t\t\t\t$status = $posts['status'];\n\t\t\t\t\n\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\n\t\t\t\techo $jobPacketTable->changeJobStatus($job_id, $status);\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t }", "public function updateStatus(array $jobs);", "public function getLastStatus()\n {\n }", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "private function checkStatusOfSearchJob() {\n $response = $this->client->request('GET', \"search/jobs/{$this->jobId}\", ['http_errors' => false]);\n if ($response->getStatusCode() === 429) {\n return self::RATE_LIMITED;\n }\n $data = json_decode($response->getBody());\n $state = $data->state;\n switch ($state) {\n case \"NOT STARTED\" :\n return self::NOT_STARTED;\n case \"GATHERING RESULTS\";\n return self::IN_PROGRESS;\n case \"DONE GATHERING RESULTS\";\n return self::COMPLETE;\n default:\n return self::CANCELLED;\n }\n }", "function format_state($row) {\n $url = url_job_detail($row['id']);\n if ($row['status'] == 'done') {\n if (!is_null($row['score'])) {\n $msg = html_escape(sprintf(\"%s: %s puncte\",\n $row['eval_message'], $row['score']));\n } else {\n $msg = html_escape($row['eval_message']);\n if (isset($row[\"feedback_available\"])) {\n $msg .= \": rezultate partiale disponibile\";\n }\n }\n $msg = \"<span class=\\\"job-status-done\\\">$msg</span>\";\n return format_link($url, $msg, false);\n }\n if ($row['status'] == 'processing') {\n $msg = '<img src=\"'.url_static('images/indicator.gif').'\" />';\n $msg .= '<span class=\"job-status-processing\">se evalueaza';\n// if (array_key_exists('done_tests', $row)) {\n// $done = $row['done_tests'];\n// $total = $row['total_tests'];\n// if ($done < $total) {\n// ++$done;\n// }\n// $msg .= '(' . $done . '/' . $total . ')';\n// }\n $msg .= '</span>';\n return format_link($url, $msg, false);\n }\n if ($row['status'] == 'waiting') {\n $msg = '<span class=\"job-stats-waiting\">in asteptare</span>';\n return format_link($url, $msg, false);\n }\n\n if ($row['status'] == 'skipped') {\n $msg = '<span class=\"job-status-skipped\">Submisie ignorata</span>';\n return format_link($url, $msg, false);\n }\n log_error(\"Invalid job status\");\n }", "Public Function GetJobstatus($jobId)\n {\n \t$this->jobId = $jobId;\n \t$this->status = 'Not in bevomedia_queue';\n \t\n \t\t$DatabaseObj = Zend_Registry::get('Instance/DatabaseObj');\n\t\t\t\n \t//Lets get all entries that have envelopes and have not been started\n \t$Query = \"\n \t\tSELECT\n \t\t\tstarted, completed, Deleted\n \t\tFROM\n \t\t\tbevomedia_queue\n \t\tWHERE\n \t\t\tjobId = '{$this->jobId}'\t\n \t\t\n \t\";\n \t\n \t$Results = $DatabaseObj->fetchAll($Query);\n \tif(count($Results)>0)\n \t{\n\t \tforeach($Results as $Value)\n\t \t{\n\t \t\tif($Value->started == '0000-00-00 00:00:00' && $Value->completed == '0000-00-00 00:00:00')\n\t \t\t{\n\t \t\t\t$this->status = 'bevomedia_queued';\n\t \t\t}\n\t \t\telseif($Value->started == '0000-00-00 00:00:00' && $Value->completed != '0000-00-00 00:00:00')\n\t \t\t{\n\t \t\t\t$this->status = 'Processing';\n\t \t\t}\n\t \t\telseif($Value->started != '0000-00-00 00:00:00' && $Value->completed != '0000-00-00 00:00:00')\n\t \t\t{\n\t \t\t\t$this->status = 'completed';\n\t \t\t}\n\t \t\telseif($Value->Deleted == 1)\n\t \t\t{\n\t \t\t\t$this->status = 'Deleted';\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t//Not sure what this could be\n\t \t\t\t$this->status = 'Error';\n\t \t\t}\n\t \t}\n \t}\n\n \treturn $this->status; \t\n \t\n }", "public function getStatus(): void{\n\n echo json_encode([ 'Undefined','To start','In progress','Stopped','Finished' ]);\n\n }", "function getStatus();", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "function printStatus($jobId) {\n $this->printDebugMessage('printStatus', 'Begin', 1);\n $retVal = '';\n $status = $this->getStatus($jobId);\n echo \"<p>Status for job <a href=\\\"?jobId=$jobId\\\">$jobId</a>: $status</p>\\n\";\n if($status == 'FINISHED') {\n $this->printResultsSummary($jobId);\n }\n else {\n $retVal = $this->genMetaRefresh($jobId);\n }\n $this->printDebugMessage('printStatus', 'End', 1);\n return $retVal;\n }", "public function UpdateStatusFromBookings()\n\t{\tif ($this->id)\n\t\t{\t$this->UpdateStatus(count($this->GetBookings()) >= $this->details['tqty'] ? 'sold_out' : 'in_stock');\n\t\t}\n\t}", "function getStatus(){\n $this->status = 'Unknown';\n if($this->finAid == 1 && $this->totalOwed != 0){\n if($this->finaidQuestion[1] == ''){\n $this->status = 'Waiting for finaid application';\n return;\n }else{\n $this->status = 'Waiting for finaid decision';\n return;\n }\n }\n if($this->schoolFeeOwed != 0){\n $this->status = 'Waiting for school fee payment';\n return;\n }\n if($this->countryId[1] == 0){\n $this->status = 'Waiting for country preferences';\n return;\n }\n if($this->countryId[1] != 0 && $this->countryConfirm != 1){\n $this->status = 'Waiting for country assignments';\n return;\n }\n if($this->delegateFeeOwed != 0){\n $this->status = 'Waiting for delegate fee payment';\n return;\n }\n if(sizeof($this->attendees) == 0){\n $this->status = 'Waiting for attendee info';\n return;\n }\n if($this->totalOwed < 0){\n $this->status = 'Need Refund';\n return;\n }\n if(sizeof($this->attendees) == $this->totalAttendees && $this->totalOwed == 0){\n $this->status = 'Ready';\n return;\n }\n }", "function GetStatus() {\n if ($this->buttons['lunch_end']) {\n return \"Out to lunch.\";\n }\n if ($this->buttons['work_start']) {\n return \"Not working.\";\n }\n else {\n return \"Working.\";\n }\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "private function status()\n {\n $this->botman->hears('status', function(BotMan $bot) {\n\n $status = 'subscribed';\n $user = Subscriber::where('telegram_user_id', $bot->getUser()->getId())->first();\n\n if(is_null($user))\n {\n $status = 'unsubscribed';\n }\n\n $bot->reply('status: '. $status);\n });\n }", "public function changeStatus()\n {\n }", "protected function calculateStatus(): int\n {\n return 200;\n }", "public function getJobStatus()\n {\n return $this->jobStatus;\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function status() {\n\t\treturn self::STATUS_DESCRIPTIONS[$this->oehhstat];\n\t}", "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 }", "protected static function set_status()\n {\n }", "public function getJobStatus() {\r\n\t\t$status = array();\r\n\t\t\t$status[0] = snappy_image('icons/cross.png') . 'Canceled';\r\n\t\t\t$status[1] = snappy_image('icons/bullet_yellow.png'). 'Inprogress';\r\n\t\t\t$status[2] = snappy_image('icons/tick.png'). 'Completed';\r\n\t\treturn $status; //array\r\n\t}", "public function updateStatusFinish()\n {\n $this->resetStatuses();\n }", "public function fetchStatus()\n { \n $quoteId = $this->_orderItem->getQuoteId();\n \n $quote = Mage::getModel('sales/quote');\n $quote->loadByIdWithoutStore($quoteId);\n\n $order = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('quote_id', $quoteId)->getFirstItem();\n\n if ($order->getId() > 0) {\n return 'completed';\n }\n\n $forgottenCollection = Mage::getResourceModel('reports/quote_collection');\n $forgottenCollection->addFieldToFilter('main_table.entity_id', $quoteId);\n\n $timeoutLimit = new DateTime();\n $timeoutInterval = new DateInterval(\"PT\".(int)(Mage::helper('marketingsoftware/config')->getAbandonedTimeout()).\"M\");\n $timeoutInterval->invert = 1;\n $timeoutLimit->add($timeoutInterval);\n\n $forgottenCollection->addFieldToFilter('main_table.updated_at', array('lt' => $timeoutLimit->format(\"Y-m-d H:i:s\")));\n $forgottenCollection->prepareForAbandonedReport(array());\n\n if (count($forgottenCollection)) {\n return 'abandoned'; \n }\n\n return 'basket';\n }", "function PKG_getClientjobsStatus($client,$package,$distr,$params,$normalPackage)\n{\n\tCHECK_FW(CC_clientname, $client, CC_package, $package, CC_nochecknow, $params, CC_package, $normalPackage);\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t$sql=\"SELECT status,id FROM `clientjobs` WHERE client='$client' AND package='$package' OR (params='$params' AND normalPackage='$normalPackage')\";\t\n\n\t$result = db_query($sql); //FW ok\n\t$line=mysql_fetch_row($result);\n\n\tif (strstr($line[0],\"wait4acc\"))\n\t\t$action=$I18N_preselected;\n\t\t\n\tif (!empty($distr))\n\t\t{\n\t\t\tinclude_once(\"/m23/inc/distr/$distr/packages.php\");\n\t\t\t$status = PKG_translateClientjobsStatus($line[0]);\n\n\t\t\t$outStatus=\"$status / $action\";\n\t\t}\n\telse\n\t\t$outStatus=$action;\n\n\treturn($outStatus);\n}", "public function employee_working_status()\n\t{\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('absent'=>'', 'working'=>'','absent_label'=>'', 'working_label'=>'');\n\t\t\n\t\t$current_month = date('Y-m-d');\n\t\t\n\t\t$query = $this->Xin_model->all_employees_status();\n\t\t$total = $query->num_rows();\n\t\t\n\t\t$working = $this->Xin_model->current_month_day_attendance($current_month);\n\t\t\n\t\t// get actual data\n\t\t$employee_w = $working / $total * 100;\n\t\t// absent\n\t\t$abs = $total - $working;\n\t\t//$employee_ab = $abs / $total * 100;\n\t\t$Return['absent'] = $abs;\n\t\t$Return['absent_label'] = $this->lang->line('xin_absent');\n\t\t// working\n\t\t$Return['working_label'] = $this->lang->line('xin_emp_working');\n\t\t$Return['working'] = $working;\n\t\t$this->output($Return);\n\t\texit;\n\t}", "public function status(): int;", "public function get_status(){\n return $this->status;\n }", "abstract public static function getStatuses();", "function updateStatus(&$status, &$statusflag)\n {\n Requirements::customCSS('.col-ScheduledStatusDataColumn i {\n width: 16px;\n height: 16px;\n display: block;\n float: left;\n margin-right: 6px;\n }', 'ScheduledStatusDataColumn_Icons');\n if ( $this->owner->getEmbargoIsSet() ) {\n if ( $this->owner->getScheduledStatus() ) {\n // Under Embargo\n $status .= '<i class=\"font-icon-eye btn--icon-md text-danger\" title=\"Embargo active\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n } else {\n // Embargo expired\n $status .= '<i class=\"font-icon-eye btn--icon-md text-info\" title=\"Embargo expired\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n }\n }\n if ( $this->owner->getExpiryIsSet() ) {\n if ( $this->owner->getEmbargoIsSet() ) {\n $status .= '<br />'; // add a break if both set\n }\n if ( $this->owner->getExpiredStatus() ) {\n // Expired/unpublished\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-danger\" title=\"Expired/unpublished\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n } else {\n // Scheduled to expire\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-warning\" title=\"Scheduled to expire\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n }\n }\n }", "function status();", "public function getStatus()\n {\n }", "public function status() : array\n {\n $this->reloadPids();\n\n $workerStatus = [];\n if (empty($this->pids)) {\n return $workerStatus;\n }\n\n $Client = new \\GearmanClient();\n $Client->addServer($this->gearmanHost, $this->gearmanPort);\n $Client->setTimeout(1000);\n foreach ($this->pids as $pool => $workerPids) {\n $workerStatus[$pool] = [];\n foreach ($workerPids as $workerName => $workerPid) {\n // raises php warning on timeout so we need the \"evil @\" here...\n $workerStatus[$pool][$workerName] = false;\n $start = microtime(true);\n $pong = @$Client->doHigh('ping_'.$workerName, 'ping');\n if ($pong === 'pong') {\n $jobinfo = @$Client->doHigh('jobinfo_'.$workerName, 'foo');\n $jobinfo = json_decode($jobinfo, true);\n $workerStatus[$pool][$workerName] = $jobinfo;\n $pingtime = microtime(true) - $start;\n $workerStatus[$pool][$workerName]['ping'] = $pingtime;\n $workerStatus[$pool][$workerName]['status'] = 'idle';\n } else {\n $workerStatus[$pool][$workerName]['jobs_total'] = 'n/a';\n $workerStatus[$pool][$workerName]['avg_jobs_min'] = 'n/a';\n $workerStatus[$pool][$workerName]['uptime_seconds'] = 0;\n $workerStatus[$pool][$workerName]['ping'] = 0;\n $workerStatus[$pool][$workerName]['status'] = 'busy';\n }\n }\n }\n\n return $workerStatus;\n }", "function rstatus() {\n\t\t$this->checkOnce();\n\t\t$versionPath = $this->getVersionPath();\n\t\t$remoteCmd = 'cd '.$versionPath.' && hg status';\n\t\t$this->ssh_exec($remoteCmd);\n\t}", "public function nStatus(){\n\t\t$database = new Database();\n\t\t$n_status = 0;\n\t\t$holder_stocks = new HolderStocks($this->sh_id);\n\t\t$cur_price =0; \n\t\t$base_price = 0;\n\t\t$holder_stocks->holder_stocks;\n\t\tforeach ($holder_stocks->holder_stocks as $stock) {\n\t\t\t$cur_price = $cur_price + $stock['s_qty']*Stock::getCurPrice($stock['sc_id']) ;\n\t\t\t$base_price += $stock['s_qty']*$stock['pur_price'];\n\t\t}\n\t\tif($cur_price > $base_price){\n\t\t\t$n_status = (float) ((float)$cur_price)/(float)$base_price ;\n\t\t\t$n_status =$n_status -1.0;\n\t\t}elseif($cur_price < $base_price){\n\t\t\t$n_status = (float) ((float)$cur_price)/(float)$base_price ;\n\t\t\t$n_status = 1.0 - $n_status;\n\t\t}else{\n\t\t\t$n_status =0.0;\n\t\t}\n\t\t$n_status *= 100.0;\n\t\tif(isset($this->sh_id)){\n\t\t$query = \"UPDATE \"\t.self::$table;\n\t\t$query .=\" SET n_status = \".$n_status;\n\t\t$query .=\" WHERE id=\".$this->sh_id;\n\t\t$run = $database->query($query);\n\t\tif($run){\n\t\t\t$this->n_status = $n_status;\n\t\t\treturn $n_status;\n\t\t}else{\n\t\t\treturn $n_status;\n\t\t}\n\t\t}\t\n\t}", "function get_status() {\n return $this->status;\n }", "public function status()\n {\n //Check for fatality\n if ($this->fatal_state == 'feed') {\n return $this->config::hungryStatusLabel()[5];\n }\n if ($this->fatal_state == 'stroke') {\n return $this->config::happyStatusLabel()[5];\n }\n //Get the current hungry and happy status\n $feed_status = $this->state(\n 'feed', \n $this->config::overfeed(),\n $this->feed_coef,\n $this->config::hungryStatusLabel(),\n $this->config::feedScale()\n );\n $stroke_status = $this->state(\n 'stroke', \n $this->config::overstroke(),\n $this->stroke_coef,\n $this->config::happyStatusLabel(),\n $this->config::strokeScale()\n );\n $return = new \\stdClass();\n $return->feed_status = $feed_status;\n $return->stroke_status = $stroke_status;\n return $return;\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function status() {\n if ($this->getWillLend()) {\n if ($this->isItHome()) {\n return 'green';\n }\n else {\n return 'yellow';\n }\n }\n else {\n return 'red';\n }\n }", "public function getStatusHistories();", "public function checkStatus()\n {\n echo 'All Branch of Bank is Opened at 9:30 AM<br>';\n }", "function getDetailedStatus() ;", "function health_check()\n {\n $zombies = $this->scheduled_task_model->get_zombies();\n\n if ( $zombies )\n {\n foreach ( $zombies as $zombie )\n {\n $data = array(\n 'type' => config( 'emergency_types' )->scheduled_task,\n 'info' => \"Task: \". $zombie->name,\n 'message' => \"Scheduled task has been running for too long. Check the server \".\n \"and cron log for any errors. It's been moved to active for now.\" );\n\n log_message(\n 'error',\n \"Health Check Failed: \". print_r( $data, TRUE ) );\n\n $data = array(\n 'state' => 'active' );\n\n $this->scheduled_task_model->save( $data, $zombie->id );\n }\n }\n\n return TRUE;\n }", "abstract protected function getStatusesInfos();", "public static function status($status) {}", "public function getStatus() \n {\n if ($this->status) \n {\n \techo 'user status : присутствует<br><br><br>';\n }\n else\n {\n \techo 'user status : отсутствует<br><br><br>';\t\n }\n }", "public function execute()\n {\n if (!$this->getName() || $this->getName() == $this->getPreviousName()) {\n Log::debug('Status skipped');\n return;\n }\n $this->save();\n\n $modelStrat = $this->getModelStrategy();\n if (!$modelStrat instanceof StatusStrategyInterface) {\n Log::warning(get_class($modelStrat) . ' does not implement StatusStrategyInterface');\n return;\n }\n\n // Trigger mail event depending on the model\n if ($modelStrat->triggerStatusChange($this)) {\n if (!$this->getEvent()) {\n $this->setEvent($this->makeEventName());\n $this->save();\n }\n // Trigger Event\n $e = new StatusEvent($this);\n if ($this->getConfig()->getEventDispatcher()) {\n // Fire event to setup status mail messages\n $this->getConfig()->getEventDispatcher()->dispatch(StatusEvents::STATUS_CHANGE, $e);\n // Trigger status events for system wide processing. EG: 'status.placement.not approved', status.placementrequest.pending'\n $this->getConfig()->getEventDispatcher()->dispatch($this->getEvent(), $e);\n // Fire the event to send those messages\n $this->getConfig()->getEventDispatcher()->dispatch(StatusEvents::STATUS_SEND_MESSAGES, $e);\n }\n }\n }", "public function inProgress()\n {\n $this->setStatus(self::STATUS_IN_PROGRESS);\n }", "public function get_status() \n {\n $sess_stat= Session::instance()->get(\"hana_status\", array());\n if(!empty($sess_stat)) $this->status=$sess_stat;\n return $this->status;\n }", "public function getStatuses() {\n\t}" ]
[ "0.68366736", "0.6549133", "0.6546785", "0.64989436", "0.64383966", "0.63693273", "0.63638496", "0.6354427", "0.6352624", "0.62968063", "0.6295633", "0.6295633", "0.6293467", "0.6250492", "0.6250492", "0.61886024", "0.61773145", "0.6167308", "0.6167308", "0.61234176", "0.6109269", "0.6086903", "0.6062265", "0.6062265", "0.6062265", "0.6062265", "0.6062265", "0.6062265", "0.6062265", "0.6062265", "0.6062265", "0.6062265", "0.6047613", "0.6045176", "0.6013287", "0.600298", "0.6000589", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59817815", "0.59811413", "0.59811413", "0.59811413", "0.59811413", "0.59713584", "0.5970285", "0.59514403", "0.5951349", "0.59441304", "0.5925343", "0.5919499", "0.59170264", "0.58577466", "0.5844662", "0.5841247", "0.5840043", "0.5839315", "0.58352405", "0.5834589", "0.5834516", "0.582816", "0.5818922", "0.58140975", "0.5812432", "0.58103174", "0.5796574", "0.578531", "0.5781516", "0.5766264", "0.575701", "0.57497495", "0.5749614", "0.5746319", "0.57428867", "0.57270557", "0.5721081", "0.571702", "0.571663", "0.5708251", "0.5707777", "0.5706453", "0.57016313", "0.5684243", "0.56385934", "0.5635794", "0.5622137", "0.56118953" ]
0.0
-1
Hent info om eieren
public function getEier(): Eier { return $this->eier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function information();", "public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }", "public function getInformation();", "protected function info()\n\t\t{\n\t\t}", "public function getInfo();", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "public function getInfo() {}", "public function getInfo() {}", "public function extraInfo();", "public function info();", "public function info();", "public function getInfotext()\n {\n return $this->_infotext;\n }", "public function getInfo()\n {\n return $this->lastInfo;\n }", "public function getInformation()\n {\n return $this->values[\"info\"];\n }", "function getInfo();", "public function add_information() \r\n {}", "public function add_information() \r\n {}", "function info()\n{\nglobal $client; ←\u0004\nLa programmation objet\nCHAPITRE 9 249\n//Utilisation de variables globales et d'un tableau superglobal\necho \"<h2> Bonjour $client, vous êtes sur le serveur: \",\n➥$_SERVER[\"HTTP_HOST\"],\"</h2>\"; ←\u0007\necho \"<h3>Informations en date du \",date(\"d/m/Y H:i:s\"),\"</h3>\";\necho \"<h3>Bourse de {$this–>bourse[0]} Cotations de {$this–>bourse[1]}\n➥à {$this–>bourse[2]} </h3>\"; ←\u0005\n//Informations sur les horaires d'ouverture\n$now=getdate();\n$heure= $now[\"hours\"];\n$jour= $now[\"wday\"];\necho \"<hr />\";\necho \"<h3>Heures des cotations</h3>\";\nif(($heure>=9 && $heure <=17)&& ($jour!=0 && $jour!=6))\n{ echo \"La Bourse de Paris ( \", self:: PARIS,\" ) est ouverte\n➥<br>\"; } ←\u0006\nelse\n{ echo \"La Bourse de Paris ( \", self:: PARIS,\" ) est fermée <br>\"; }", "public function info() {\n foreach ($this->items as $item) {\n $item->info();\n }\n }", "function info() {\n\t \treturn $this->description;\n\t }", "public function todaInfoProductos(){\n\n for($i = 0; $i < count($this -> listProducto); $i++){\n $this -> listProducto[$i][0] -> getInfoBasic();\n }\n }", "abstract public function infoAll();", "public function ausgeben() {\r\n\t\techo \"Die aktuelle Geschwindigkeit beträgt \" . $this->geschwindigkeit . \": \";\r\n\t}", "public function getHival() {}", "public function info()\n{\necho \"Informations en date du \",date(\"d/m/Y H:i:s\"),\"<br>\";\n\n$now=getdate();\n$heure= $now[\"hours\"];\n$jour= $now[\"wday\"];\n\necho \"<h3>Horaires des cotations</h3>\";\nif(($heure>=9 && $heure <=17)&& ($jour!=0 && $jour!=6))\n{ echo \"La Bourse de Paris est ouverte <br>\"; }\nelse\n{ echo \"La Bourse de Paris est fermée <br>\"; }\nif(($heure>=16 && $heure <=23)&& ($jour!=0 && $jour!=6) )\n{ echo \"La Bourse de New York est ouverte <hr>\"; }\nelse\n{ echo \"La Bourse de New York est fermée <hr>\"; }\n}", "public function getInfo() {\n $str = \"{$this->judul} | {$this->getLable()} (Rp. {$this->harga})\";\n return $str;\n }", "public function info()\n {\n }", "public function getInfo ()\n {\n return $this->info;\n }", "public function getInfo()\r\n {\r\n return $this->setNuki(\r\n __FUNCTION__\r\n );\r\n }", "public function getInfo()\n {\n $str = \"{$this->judul} | {$this->getLabel()} (Rp. {$this->harga})\";\n\n return $str;\n }", "abstract public function getDetails();", "public function studiengang_details() {\r\n\r\n //Sprachen rausfinden:\r\n $this->sprachen = StgProfil::getPossibleLanguages();\r\n //Abschlüsse suchen:\r\n $this->abschlusssuche = new SQLSearch(\"SELECT abschluss_id, name FROM abschluss WHERE name LIKE :input\", _(\"Abschluss eingeben\"));\r\n //zulassungsvoraussetzung:\r\n $this->moeglicheZulassungsvoraussetzungen_wise = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_wise\");\r\n $this->moeglicheZulassungsvoraussetzungen_sose = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_sose\");\r\n //Typen von Studiengängen:\r\n $this->moeglicheStgTypen = StgProfil::getMoeglicheTypen();\r\n\r\n $this->studiengaenge = PersonalRechte::meineStudiengaenge(null, true);\r\n $this->abschluesse = Abschluss::findAllUsed();\r\n $this->profile = StgProfil::getMeineProfile(null, Request::get(\"studiengang_id\"), Request::get(\"abschluss_id\"));\r\n\r\n //Neuen Eintrag in stg_profil erstellen\r\n if (Request::get(\"item_id\") === \"neu\" && !Request::get(\"studiengang_id\")) {\r\n //$this->profil = new StgProfil();\r\n $this->fachsuche = new SQLSearch(\"SELECT studiengang_id, name FROM studiengaenge WHERE name LIKE :input OR beschreibung LIKE :input \", _(\"Studiengang eingeben\"));\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n return;\r\n }\r\n\r\n $this->profil = new StgProfil(Request::get(\"studienprofil_id\") !== \"neu\" ? Request::get(\"studienprofil_id\") : null);\r\n if (!$this->profil->hasPermission()) {\r\n throw new AccessDeniedException(_(\"Sie dürfen diesen Studiengang nicht bearbeiten\"));\r\n }\r\n if (Request::get(\"delete_x\") && Request::get(\"item_id\") && Request::get(\"type\") === \"dokument\") {\r\n $this->profil->deleteDoku(Request::get(\"item_id\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung gelöscht\"));\r\n }\r\n if (Request::get(\"addDocument\")) {\r\n $this->profil->addDoku(Request::get(\"addDocument\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung hinzugefügt\"));\r\n }\r\n //Profil ändern, falls Informationen gesendet worden sind:\r\n if (Request::submitted(\"absenden\")) {\r\n if (Request::get(\"studiengang_id\")) {\r\n //Neuen Eintrag in stg_profil machen:\r\n $this->profil['fach_id'] = Request::get(\"studiengang_id\");\r\n $this->profil->store(); //Nachher wird noch einmal gestored, aber jetzt wollen wir IDs bekommen.\r\n }\r\n if (Request::submitted('informationen')) {\r\n $this->profil->setInformation(Request::getArray(\"informationen\"));\r\n }\r\n if (Request::submitted(\"abschluss_id\")) {\r\n $this->profil['abschluss_id'] = Request::get(\"abschluss_id\");\r\n }\r\n if (Request::submitted('settings')) {\r\n $settings = Request::getArray(\"settings\");\r\n foreach ($settings as $key => $value) {\r\n $this->profil[$key] = $value;\r\n }\r\n if (!$settings['sichtbar']) {\r\n $this->profil['sichtbar'] = 0;\r\n }\r\n }\r\n if (Request::submitted(\"zielvereinbarung\")) {\r\n $this->profil['zielvereinbarung'] = Request::get(\"zielvereinbarung\");\r\n }\r\n if (Request::submitted(\"einleitungstext\")) {\r\n $this->profil['einleitungstext'] = Request::get(\"einleitungstext\");\r\n }\r\n if (Request::submitted('typen')) {\r\n $this->profil->setTypen(Request::getArray(\"typen\"));\r\n }\r\n $this->profil->store();\r\n\r\n if (Request::submitted('textcombination')) {\r\n $textcombinations = (array) @$_REQUEST['textcombination'];\r\n Textbaustein::removeCombination($this->profil->getId());\r\n foreach ($textcombinations as $code => $ids) {\r\n Textbaustein::addCombination($this->profil->getId(), $code, $ids);\r\n }\r\n }\r\n\r\n $this->flash_now(\"success\", _(\"Änderungen wurden übernommen\"));\r\n if (Request::get(\"neues_dokument\")) {\r\n $dokument = new StgFile();\r\n if ($_GET['qqfile'] || isset($_FILES['qqfile'])) {\r\n ob_start();\r\n $dokument->upload();\r\n ob_clean();\r\n }\r\n $dokument['name'] = Request::get(\"neues_dokument_name\");\r\n $dokument['sichtbar'] = Request::get(\"neues_dokument_sichtbar\") ? '1' : '0';\r\n $dokument['jahr'] = Request::get(\"neues_dokument_jahr\");\r\n $dokument['doku_typ_id'] = Request::get(\"neues_dokument_doku_typ_id\");\r\n $dokument['quick_link'] = Request::get(\"neues_dokument_quick_link\");\r\n $dokument['user_id'] = $GLOBALS['user']->id;\r\n $dokument->store();\r\n $dokument->setTags(Request::get(\"neues_dokument_tags\"));\r\n $this->profil->addDoku($dokument->getId());\r\n if ($dokument->isPublic()) {\r\n $this->flash_now(\"success\", _(\"Neues Dokument angelegt und hinzugefügt\"));\r\n } else {\r\n $this->flash_now(\"success\", _(\"Neues internes Dokument angelegt und hinzugefügt. Es kann unter Akkreditierung gefunden werden.\"));\r\n }\r\n }\r\n if (Request::get(\"neuer_ansprechpartner\")) {\r\n $kontakt = new StgAnsprechpartner();\r\n $kontakt['range_typ'] = Request::get(\"range_typ\");\r\n $kontakt['range_id'] = Request::get(\"range_typ\") && Request::get(\"range_id\") ? Request::get(\"range_id\") : \"\";\r\n\r\n if (Request::get(\"ansprechpartner_typ_id\")) {\r\n $typen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n foreach ($typen as $typ) {\r\n if ($typ['ansprechpartner_typ_id'] === Request::get(\"ansprechpartner_typ_id\")) {\r\n $kontakt['ansprechpartner_typ_id'] = Request::get(\"ansprechpartner_typ_id\");\r\n }\r\n }\r\n }\r\n $kontakt['freitext_name'] = Request::get(\"freitext_name\");\r\n $kontakt['freitext_mail'] = Request::get(\"freitext_mail\");\r\n $kontakt['freitext_telefon'] = Request::get(\"freitext_telefon\");\r\n $kontakt['freitext_homepage'] = Request::get(\"freitext_homepage\");\r\n if ($kontakt->store()) {\r\n $this->profil->addAnsprechpartner($kontakt->getId());\r\n $this->flash_now(\"success\", _(\"Neuer Ansprechpartner angelegt und hinzugefügt\"));\r\n }\r\n }\r\n }\r\n\r\n //Informationen:\r\n $this->informationen = $this->profil->getInformation();\r\n\r\n //Verlaufspläne\r\n $this->verlaufsplaene = $this->profil->getVerlaufsplaene();\r\n\r\n //Dateien:\r\n $this->dateien = StgFile::getByStgProfil($this->profil->getId());\r\n $this->dokumentensuche = $this->getDokumentensuche();\r\n\r\n //Kontakte:\r\n $this->kontakte = StgAnsprechpartner::getByStgProfil($this->profil->getId());\r\n usort($this->kontakte, function ($a, $b) {\r\n return strcmp($a->getName('no_title_rev'), $b->getName('no_title_rev'));\r\n });\r\n $this->kontakt_neu = new StgAnsprechpartner();\r\n $this->ansprechpartnertypen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n\r\n\r\n //Aufbaustudiengänge:\r\n $this->mutterstudiengaenge = $this->profil->getAufbauendeStudiengaenge();\r\n $this->profilsuche = $this->getProfilSuche();\r\n\r\n\r\n // Textbausteine\r\n $this->textbausteine = array(\r\n 'de' => Textbaustein::loadAll('de'),\r\n 'en' => Textbaustein::loadAll('en'),\r\n );\r\n $this->textcombinations = Textbaustein::loadCombination($this->profil->getId());\r\n\r\n $this->ansprechpartnersuche = $this->getAnsprechpartnersuche();\r\n $this->datei_url = $this->link_for(\"zsb_dateien/download_file\");\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n //hiernach wird nichts weiter ausgegeben\r\n }", "public function _info($info){\r\n return array('title'=>$info->full, 'block'=>false);\r\n }", "public function getInfo(){ \n return $this->title .' ('. $this->year . ')';\n }", "public function getInfo()\r\n {\r\n return $this->info;\r\n }", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "Public function displayInfo(){ \r\n\t\t\techo \"The info about the dress.\"; \r\n\t\t\techo $this->color; \r\n\t\t\techo $this->fabric ; \r\n\t\t\techo $this->design;\r\n\t\t\techo self::MEDIUM;\r\n\t\t}", "public function getInfo(){\n $info = \"{$this->_titulo} del director {$this->_director} ,\n duracion {$this->_duracion} minutos. Edad {$this->_edadMin} años<br><br>\";\n\n return $info;\n }", "public function affiche_infos()\n {\n $returnValue = null;\n\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AF0 begin\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AF0 end\n\n return $returnValue;\n }", "function information()\n\t\t{\n\t\t\t$this->directPageDetails(\"information\");\n\t\t}", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "public function verDados(){\n\t\t\techo $this->nome.\"<br>\";\n\t\t\techo $this->idade.\"<br>\";\n\t\t\techo $this->senha.\"<br>\";\n\t\t}", "public function info(){\n }", "public function get_info() {\n\n\t\t$sql = \"SELECT COUNT(*) FROM `\" . $this->wpdb->commentmeta . \"` WHERE comment_id NOT IN (SELECT comment_id FROM `\" . $this->wpdb->comments . \"`);\";\n\t\t$commentmeta = $this->wpdb->get_var($sql);\n\t\t$this->found_trash_count += $commentmeta;\n\n\t\t$sql = \"SELECT COUNT(*) FROM `\".$this->wpdb->commentmeta.\"` WHERE meta_key LIKE '%akismet%';\";\n\t\t$akismetmeta = $this->wpdb->get_var($sql);\n\t\t$this->found_akismet_count += $akismetmeta;\n\n\t}", "public function recap(){\n\t\techo \"----- INFO\" . $this->getNom() . \" ----- <br>\";\n\t\techo $this->getNom() . \" a \" . $this->getVie() . ' points de vie <br>';\n\t}", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInformation()\n {\n return $this->information;\n }", "public abstract function showInfo();", "public function get_etat(){ return $this->_etat;}", "public function affiche (){\n\t\t\t//affiche en retour à la ligne\n\t\t\techo '<pre>';\n\t\t\tprint_r(array(\n\t\t\t\tname=>$this->Getname(),\n\t\t\t\tpv=>$this->Getpv(),\n\t\t\t\tlevel=>$this->Getlevel(),\n\t\t\t\tattack1=>$this->Getattack1(),\n\t\t\t\tattack2=>$this->Getattack2(),\n\t\t\t\ttype=>$this->Gettype()\n\t\t\t\t));\n\t\t\techo '</pre>';\n\t\t}", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "function info() {\r\n\t\t$this -> Producto -> recursive = -1;\r\n\t\t$producto = $this -> Producto -> read(null, $this -> data[\"Producto\"][\"id\"]);\r\n\t\techo json_encode($producto);\r\n\t\tConfigure::write('debug', 0);\r\n\t\t$this -> autoRender = false;\r\n\t\texit();\r\n\t}", "function info() {\n global $_TABLE, $_ADMIN;\n if(!isset($_POST['window'])) exit();\n\n $_MODULE['output'] = '[';\n $_MODULE['output'] .= '{';\n $_MODULE['output'] .= 'run:\"getware.ui.content.info.add\",';\n $_MODULE['output'] .= 'window:\"'.$_POST['window'].'\",';\n\n $rows = 'rows:[';\n $data = 'data:[';\n for($i = $_ADMIN['ini']; $i < $_ADMIN['end']; $i++) {\n # GENERA LOS POST QUE NO EXISTEN\n if($this->restrict($i))\n $value = 1;\n else $value = 0;\n\n $rows .= '\"' . $i . '\"';\n $data .= '\"' . $value . '\"';\n if($i < $_ADMIN['end'] - 1) {\n $rows .= ',';\n $data .= ',';\n }\n }\n $rows .= '],';\n $data .= ']';\n\n $_MODULE['output'] .= $rows;\n $_MODULE['output'] .= $data;\n\n $_MODULE['output'] .= '}';\n $_MODULE['output'] .= ']';\n //exit($_MODULE['output']);\n if(preg_match('/\"0\"/', $_MODULE['output']))\n exit($_MODULE['output']);\n else return true;\n}", "private function getInfoForValidtion() {\n\t\t\t$Name = $this->getInterstName();\n\t\t\t$Email = $this->getInterstEmail();\n\t\t\t$Message = $this->getInterstMsg();\n\t\t\t$this->validation->InterestFormValidation($Name,$Email,$Message);\n\t\t}", "function get_transact_information()\n {\n $settings_menu_dashboard = new AdminSettingsMenuExtension();\n $this->recipient_id = $settings_menu_dashboard->get_account_id();\n $this->secret_id = $settings_menu_dashboard->get_secret();\n $this->env = strtoupper($settings_menu_dashboard->get_env()); // TEST or PROD\n\n $settings_post = new AdminSettingsPostExtension($this->post_id);\n $this->price = $settings_post->get_transact_price();\n $this->item_id = $settings_post->get_transact_item_code();\n\n // creates a uniqid, with item_id as prefix and then md5 (32 characters)\n $this->sales_id = md5(uniqid($this->item_id, true));\n\n $this->article_title = get_the_title($this->post_id);\n $this->article_url = get_permalink($this->post_id);\n\n /**\n * todo: what are the options?\n */\n $this->method = 'CLOSE';\n $this->alg = 'HS256';\n\n }", "public function getInfoLengkap(){\n $str = \"{$this->tipe} : {$this->judul} | {$this->getLable()} (Rp. {$this->harga}\";\n if($this->tipe == \"Komik\"){\n $str .= \" - ($this->jmlHalaman) Halaman.\";\n }elseif ($this->tipe == \"Game\"){\n $str .= \" ~ ($this->waktuMain) Jam.\";\n }\n return $str;\n }", "public function getinfo() { \n return $this->bitcoin->getinfo();\n }", "function getInfo () {\n\t\treturn array('id'=>'yahoo');\n\t}", "public function OnGetInfos(&$data)\n\t{\n\t}", "public function info() {\n\t\tglobal $db,$dbprefix;\n\t\t$query = \"SELECT \" . $dbprefix . \"keg_statuses.status, \" . $dbprefix . \"locations.location, \" . $dbprefix . \"keg_sizes.size, \" . $dbprefix . \"beers.beer, \" . $dbprefix . \"keg_warnings.warning FROM \" . $dbprefix . \"kegs INNER JOIN \" . $dbprefix . \"keg_statuses ON \" . $dbprefix . \"kegs.status=\" . $dbprefix . \"keg_statuses.id INNER JOIN \" . $dbprefix . \"locations ON \" . $dbprefix . \"kegs.location=\" . $dbprefix . \"locations.id INNER JOIN \" . $dbprefix . \"keg_sizes ON \" . $dbprefix . \"kegs.size=\" . $dbprefix . \"keg_sizes.id LEFT OUTER JOIN \" . $dbprefix . \"beers ON \" . $dbprefix . \"kegs.beer=\" . $dbprefix . \"beers.id LEFT OUTER JOIN \" . $dbprefix . \"keg_warnings ON \" . $dbprefix . \"kegs.warning=\" . $dbprefix . \"keg_warnings.id WHERE \" . $dbprefix . \"kegs.id=\" . $this->id . \" AND \" . $dbprefix . \"kegs.size=\" . $this->size;\n\t\tif (!($result = $db->query($query))) {\n\t\t\techo \"<p>Error getting info for keg \" . $this->id . \": #\" . $db->errno . \": \" . $db->error . \"</p>\\r\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t$row = $result->fetch_assoc();\n\n\t\techo \"<h2>\" . $row['size'] . \" keg #\" . $this->id . \"</h2>\\r\";\n\t\techo \"<p><strong>Status</strong>: \" . $row['status'] . \"<br />\\r\";\n\t\techo \"<strong>Beer</strong>: \";\n\t\techo ($row['beer']) ? $row['beer'] : \"(empty)\";\n\t\techo \"<br />\\r<strong>Location</strong>: \" . $row['location'] . \"</p>\\r\";\n\n\t\treturn TRUE;\n\t}", "public function sanphamdetail()\n\t\t{\n\t\t\t$id = $_GET['chitiet_sanpham'];\n\t\t\t//goi ham model de xu li\n\t\t\t$ketqua = $this->sanpham_model->OneRecordData1($id);\n\t\t\treturn $ketqua;\n\t\t}", "public function\tgetReferidoInfo(){\r\t\t\r\t\t$model_ref = $this->getModel( 'referido' );\r\t\t$idref = JRequest::getInt( 'idref' );\r\t\t\r\t\t$model_ref->instance( $idref );\r\t\t$inf_ref = $model_ref->getReferidoInf();\r\t\t\r\t\tif( !empty($inf_ref) ){\r\t\t\t\r\t\t\t$model_ref\r\t\t}\r\t\t\r\t}", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "function displayArticleInformation()\n {\n // query saved articles of the account\n $savedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'SAVED'\") or die(mysql_error());\n \n // query deleted articles of the account\n $deletedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'DELETED'\") or die(mysql_error());\n \n // calculate the number of articles\n $savedArticlesCount = mysql_num_rows($savedArticlesQuery);\n $deletedArticlesCount = mysql_num_rows($deletedArticlesQuery);\n $totalArticlesCount = $savedArticlesCount + $deletedArticlesCount;\n \n // display ARTICLE information\n echo \"\n <p>Article Information</p>\n <p id='box'>\n Saved Articles: \".$savedArticlesCount.\"<br />\n Trash Articles: \".$deletedArticlesCount.\"<br /><br>\n Total Articles: \".$totalArticlesCount.\"<br />\n </p>\";\n \n return;\n }", "public function getInfo()\n\t{\n\t\treturn array();\n\t}", "public function allInfo() {\n return $this->infoMsg;\n }", "function __toString()\r\n {\r\n return $this->ime .\" \". $this->prezime .\" (\". $this->korisnickoIme .\")\";\r\n }", "function info(){\n\n\tglobal $nombre;\n\tglobal $apellido;\n\t\t\n\t$rf = $_POST['ref'];\n\t$nombre = $_POST['Nombre'];\n\t$apellido = $_POST['Apellidos'];\n\t\t\n\t$ActionTime = date('H:i:s');\n\t\n\tglobal $logtext;\n\t$logtext = PHP_EOL.\"- USERS VER DETALLES \".$ActionTime.PHP_EOL.\"\\t Nombre: \".$nombre.\" \".$apellido.PHP_EOL;\n\n\trequire 'Inc_Log_Total.php';\n\n\t}", "protected function renderInformationContent() {}", "function info($what){\n if(isset($this->set[$what])) return $this->set[$what];\n return $this->key;\n }", "public function mostrarInfo(Coche $miObjeto){\n if(is_object($miObjeto)){\n $informacion = \"<h1>Informacion del coche</h1>\";\n $informacion .= \"<br/> Modelo: \".$miObjeto->modelo;\n $informacion .= \"<br/> Color: \".$miObjeto->color;\n $informacion .= \"<br/> Marca: \".$miObjeto->marca;\n $informacion .= \"<br/> Caballos: \".$miObjeto->caballos;\n $informacion .= \"<br/> Velocidad: \".$miObjeto->velocidad;\n $informacion .= \"<br/> Plazas: \".$miObjeto->plazas; \n }else{\n $informacion = \"Tu dato es este: \n $miObjeto\";\n }\n\n\n return $informacion;\n }", "function getInfo()\n\t{\n\t\treturn array_merge($this->getDeveloperInfo(), $this->getContact()->getInfo());\n\t}", "public function getAdditionalInformation()\n {\n $compName = '';\n\n if ($compUid = $this->getCompetition()) {\n $competition = tx_rnbase::makeInstance('tx_cfcleague_models_Competition', $compUid);\n $compName = $competition->isValid() ? $competition->getName() : '[invalid!]';\n }\n\n return sprintf('Aktualisierung der Spieler für Wettbewerb >%s<', $compName);\n // return sprintf( $GLOBALS['LANG']->sL('LLL:EXT:mksearch/locallang_db.xml:scheduler_indexTask_taskinfo'),\n // $this->getTargetPath(), $this->getItemsInQueue());\n }", "public function get_additional_info()\n {\n return array();\n }", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getOEInfo(){\n $sql = \"select * from dtattypen order by tat\";\n $res = $this->db->query($sql);\n $rows = $res->fetchAll();\n return $rows;\n }", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function info_niveau()\r\n\t{\r\n\t\tif ($this->niveau == \"LP\")\t\t\r\n\t\t\treturn $this->niveau . \":\" . $this->groupe;\r\n\t\t\r\n\t\telse\r\n\t\t\treturn $this->niveau;\r\n\t}", "public function info()\n {\n return $this->info;\n }", "public function info()\n {\n return $this->info;\n }", "public function extra_voor_verp()\n\t{\n\t}", "public static function returnInfo() {\n }", "function update_info()\n {\n }", "public function info() {\n\t\treturn array (\n\t\t\t\t'text_type' => 'selection',\n\t\t\t\t'module' => 'ZSELEX',\n\t\t\t\t'text_type_long' => $this->__ ( 'Deal Of The Day (DOTD)' ),\n\t\t\t\t'allow_multiple' => true,\n\t\t\t\t'form_content' => false,\n\t\t\t\t'form_refresh' => false,\n\t\t\t\t'show_preview' => true,\n\t\t\t\t'admin_tableless' => true \n\t\t);\n\t}", "function getInfo()\n {\n return 'Probably the XML was not sent as file, but as an input content of an HTML.';\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "protected function collectInformation() {}" ]
[ "0.6733211", "0.64752626", "0.6423097", "0.6372331", "0.63133025", "0.62065953", "0.61983454", "0.61983454", "0.5991071", "0.5907634", "0.5907634", "0.5900688", "0.5898299", "0.58945745", "0.58855236", "0.5878329", "0.5878329", "0.5875631", "0.58753085", "0.58556885", "0.5854249", "0.5839826", "0.5839221", "0.58259106", "0.5825769", "0.5817777", "0.5804919", "0.5783961", "0.5776087", "0.57728475", "0.57692826", "0.57689726", "0.575883", "0.5754285", "0.5735727", "0.5724489", "0.5724489", "0.5722847", "0.5705938", "0.5702441", "0.5698592", "0.56793046", "0.5670029", "0.5668756", "0.56606716", "0.56487125", "0.5634796", "0.5634796", "0.5634796", "0.5634796", "0.5634796", "0.5634796", "0.5634796", "0.56291366", "0.5627251", "0.5623489", "0.5619144", "0.55874276", "0.55777395", "0.5568819", "0.55637026", "0.55633706", "0.5553855", "0.5551363", "0.5547792", "0.5547398", "0.5540613", "0.55398417", "0.5533098", "0.5530008", "0.55189484", "0.55182695", "0.5513508", "0.5505795", "0.5505147", "0.5497467", "0.54960847", "0.54930043", "0.54877406", "0.5483975", "0.54717267", "0.5470539", "0.5470539", "0.5470539", "0.5470539", "0.54684657", "0.54684657", "0.5468302", "0.54679614", "0.54679614", "0.54679614", "0.54619294", "0.5458294", "0.5458294", "0.54551345", "0.5445126", "0.54423374", "0.5436795", "0.5430947", "0.5426014", "0.54216075" ]
0.0
-1
Hent info om filmen
public function getFilm(): Film { return $this->film; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function information();", "public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }", "public function show(Filiere $filiere)\n {\n //\n }", "public function readAllInfo()\n {\n //recupération des données en post\n $data = $this->request->data;\n try\n {\n //selection d'une UE en foction de l'identifiant\n if (!empty($data['id_matiere'])) {\n $results = $this->model->read_all_info_id((int)$data['id_matiere']);\n\n if (empty($results)) {\n $this->_return('la matière demandée n\\'existe pas dans la base de donnée', false);\n }\n $this->_return('Informations sur la matière '.$results->nom_matiere.' ', true, $results);\n }\n //selection de toutes les UE d'enseignement\n $results = $this->model->read_all_info_matiere();\n if (empty($results)) {\n $this->_return('Vous n\\'avez pas encore de matière en base de données', false);\n }\n $this->_return('liste des matières disponibles dans la base de données', true, $results);\n }\n catch(Exception $e)\n {\n $this->_exception($e);\n }\n }", "protected function traerFoto(){\n $foto = Fotoperfil::where('id_user', \\Auth::user()->id )->get();\n return $foto[0]->foto;\n }", "private function Info() {\n\n\t\t$db=$GLOBALS['db'];\n\n\t\t$sql=\"SELECT *\n\t\t\t\t\tFROM \".$GLOBALS['database_prefix'].\"v_document_files\n\t\t\t\t\tWHERE document_id = '\".$this->document_id.\"'\n\t\t\t\t\t\";\n\t\t//echo $sql.\"<br>\";\n\t\t$result = $db->Query($sql);\n\n\t\tif ($db->NumRows($result) > 0) {\n\t\t\twhile($row=$db->FetchArray($result)) {\n\t\t\t\t/* HERE WE CALL THE FIELDS AND SET THEM INTO DYNAMIC VARIABLES */\n\t\t\t\t$arr_cols=$db->GetColumns($result);\n\t\t\t\tfor ($i=1;$i<count($arr_cols);$i++) {\n\t\t\t\t\t$col_name=$arr_cols[$i];\n\t\t\t\t\t$this->$col_name=$row[$col_name];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL B ON B.VIAGEM = A.HANDLE AND B.EHINICIOVIAGEM = 'S'\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL C ON C.VIAGEM = A.HANDLE AND C.EHTERMINOVIAGEM = 'S'\n WHERE A.HANDLE = '$this->handle' \");\n $query->execute();\n $dataSet = $query->fetch(PDO::FETCH_ASSOC);\n\n $this->filialDestino = $dataSet['FILIALDESTINO'];\n $this->filialOrigem = $dataSet['FILIALORIGEM'];\n }", "public function getFil(): Fil\n {\n return $this->fil;\n }", "function detailFilm($nom){\n\n $file_db_films = new PDO(\"sqlite:../../../BD/base_de_donnes_FILM.sqlite\");\n $request = $file_db_films->query(\"SELECT * FROM films WHERE titre='$nom'\");\n $c = $request->fetch();\n $heure = substr($c[4], -3, 1);\n $minute = substr($c[4], -2);\n echo \"<ul id='liste'><br>\";\n echo \"<li><h2>$c[1]</h2><br><img src = '../images/films/$c[6]' style = 'width:50%'><br><br>\n <p>Pays : $c[2]</p><p>Date : $c[3]</p><p>Durée : $heure h $minute</p></li><br>\";\n echo \"</ul><br>\";\n $file_db = null;\n }", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "public function show(Filme $filmes)\n {\n //\n }", "function detailActeur($nom)\n {\n\n $file_db_acteurs_du_film = new PDO(\"sqlite:../../../BD/base_de_donnes_FILM.sqlite\");\n\n $id_film = $file_db_acteurs_du_film->query(\"SELECT code_film FROM films WHERE titre='$nom'\"); //---> sortie The mask : [2]\n\n $donnee = $id_film->fetch();\n\n //echo $donnee[0];\n\n $films = $file_db_acteurs_du_film->query(\"SELECT * FROM films WHERE code_film ='$donnee[0]'\"); // sortie toute les infos sur le film.\n\n $id_acteur = $file_db_acteurs_du_film ->query(\"SELECT * FROM ACTEURDANSFILM NATURAL JOIN acteurs WHERE ref_code_film ='$donnee[0]' and ref_code_acteur=code_indiv\"); // sort les id des acteurs en fonction de l'id du film au dessus.\n\n echo \"<fieldset id = 'blanc'> \";\n echo \"<h3 id='centrer'> -------------------------- ACTEUR(S) --------------------------</h3>\";\n echo \"<ul id='liste'><br>\";\n while($donnee2 = $id_acteur->fetch()){\n echo \"<a href='../Recherche/reponse_acteur.php?nom_recherche=\" . $donnee2['code_indiv'] . \"' ><li><br><br><h2> \" . $donnee2['prenom'] .\" \".$donnee2['nom'].\"</h2><br><img src = '../images/acteurs/\" . $donnee2['image'] .\" ' style = 'width:50%'><br><br></li></a><br>\";\n }\n $id_acteur->closeCursor();\n echo \"</ul><br>\";\n echo \"</fieldset> \";\n $file_db_acteurs_du_film = null;\n}", "public function getInformation();", "public function getIdFil()\n {\n return $this->idFil;\n }", "function get_file_info($namafile) {\n $tmp = explode(\".\",$namafile);\n $nama = $tmp[0];\n $tipe = strtolower(end($tmp));\n $info = array(\n \"file_name\" => $nama,\n \"file_type\" => $tipe\n );\n return $info;\n }", "function show_list_nominee()\n {\n // $id = $_SESSION['UsEmp_ID'];\n $this->load->model('M_pef_file_present', 'list');\n $data['emp_nominee'] = $this->list->get_nominee()->result();\n\n $this->load->model('M_pef_file_present', 'file');\n $data['emp_file'] = $this->file->get_all()->result();\n\n $this->output('consent/v_add_file_present', $data);\n }", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "function display(){\n\t\t\t\n\t\t\t// LIMITACIONES GENERALES\n\t\t\t\n\t\t\t\t// Si es galería o file, necesita field, table, linked_field\n\t\t\t\t\n\t\t\t\tif($this->type != 'same'){\n\t\t\t\t\tif(!$this->field\t || \t!$this->linked_field || !$this->table || !$this->linked_field_id){\n\t\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante \"field - linked_field - table\"</p>'; \t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$linked_field = 'data-linked=\"'.$this->linked_field.'\"';\t\n\t\t\t\t\t\t$linked_field_id = 'data-linkedid=\"'.$this->linked_field_id.'\"';\t\t\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t// No se requiere $linked_field\n\t\t\t\t\t$linked_field = '';\n\t\t\t\t\t$linked_field_id = '';\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Si no existe la ruta, se corta el input\n\t\t\t\tif(!$this->path){ \n\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante \"path\"</p>'; \n\t\t\t\t\texit; \n\t\t\t\t}else{\n\t\t\t\t\t//Nos aseguramos que exista diagonal al final\t\t\t\n\t\t\t\t\t$this->path = rtrim($this->path, '/') . '/';\n\t\t\t\t\tif(!is_dir('../../'.$this->path)){\n\t\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - La ruta \"'.$this->path.'\" no existe.</p>'; exit; \t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Si no existe la tabla\n\t\t\t\tif(!$this->table || !$this->field){ \n\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante \"Table o Field\"</p>'; \n\t\t\t\t\texit; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// TIPOS DE ARCHIVO \n\t\t\t\t\t$types_ok = '';\n\t\t\t\t\t// En Galería\n\t\t\t\t\t\t//accept=\".xls,.xlsx\"\n\t\t\t\t\tif($this->type === 'gallery'){\n\t\t\t\t\t\t$types_ok = 'accept=\".jpg,.png,.svg\"';\n\t\t\t\t\t}\n\t\t\t\n\n\t\t\t$output = '';\n\t\t\t\n\t\t\tif(!$this->type){ return $output='<p>No se ha definido el tipo de input_file</p>'; }\t\t\n\t\t\t\t// Limitaciones\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// #1.A) Con CROP: Si se requiere corte CROP y no se tiene el ancho\n\t\t\t\t\tif(!$this->width && $this->crop){ \n\t\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante: \"with\"</p>'; exit; \n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Preparamos los parametros\n\t\t\t\t\n\t\t\t\t\t// #Ancho Final\n\t\t\t\t\t$thisWidth = ($this->width) ? 'data-width=\"'.$this->width.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Alto Final\n\t\t\t\t\t$thisHeight = ($this->height) ? 'data-height=\"'.$this->height.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Ancho maximo\n\t\t\t\t\t$thisMaxWidth = ($this->max_width) ? 'data-allowedwidth=\"'.$this->max_width.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Alto maximo\n\t\t\t\t\t$thisMaxHeight = ($this->max_height) ? 'data-allowedheight=\"'.$this->max_height.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Calidad de la imagen\n\t\t\t\t\t$thisQuality = ($this->quality) ? 'data-quality=\"'.$this->quality.'\"' : '' ;\n\t\t\t\t\t\n\t\t\t\t\t// #Recorte\n\t\t\t\t\t$thisCrop = ($this->crop) ? 'data-crop=\"1\"' : 'data-crop=\"0\"';\n\t\t\t\t\n\t\t\t\t\t// #Miniatura\n\t\t\t\t\t$thisThumb = ($this->thumb) ? 'data-thumb=\"1\"' : 'data-thumb=\"0\"';\n\t\t\t\t\t// #Ancho miniatura\n\t\t\t\t\t$thisThumbWith = ($this->thumbWidth) ? 'data-thumbwidht=\"'.$this->thumbWidth.'\"' : '';\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t// EDIT\n\t\t\t\t\t\n\t\t\t\t\tif($this->action == 'edit'){\n\t\t\t\t\t\tif(file_exists('../../'.$this->data) && !is_dir('../../'.$this->data)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$pathInfo = pathinfo($this->data);\n\t\t\t\t\t\t\t\t$file_folder = \t$pathInfo['dirname'];\n\t\t\t\t\t\t\t\t$file_name = $pathInfo['basename'];\n\t\t\t\t\t\t\tif(file_exists('../../'.$file_folder.'/min_'.$file_name)){\n\t\t\t\t\t\t\t\t$file_path = $file_folder.'/min_'.$file_name; \t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$file_path = $this->data;\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$loaded_items = '\n\t\t\t\t\t\t\t<div class=\"loaded_item_row\">\n\t\t\t\t\t\t\t\t<div class=\"loaded_img\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.$file_path.'\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"loaded_file_name\">\n\t\t\t\t\t\t\t\t\t<p>'.substr($file_name,14).'</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"loaded_file_options loaded_edit_file_delete file_delete\"\n\t\t\t\t\t\t\t\t\tdata-file = \"'.substr($file_name,14).'\"\n\t\t\t\t\t\t\t\t\tdata-field = \"'.$this->field.'\"\n\t\t\t\t\t\t\t\t\tdata-table = \"'.$this->table.'\"\n\t\t\t\t\t\t\t\t\tdata-pathfile=\"'.$this->data.'\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"icon icon-sudi-trash\"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<input name=\"'.$this->field.'\" type=\"hidden\" class=\"spryManage\" value=\"'.$this->data.'\">\n\t\t\t\t\t\t\t</div>\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} // if file exits (end)\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$loaded_items = '';\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output .= '\n\t\t\t\t\t<div class=\"upload_container\">\n\t\t\t\t\t\t<div class=\"fileName\"><div class=\"files_container blur_effect\">'.$loaded_items.'</div>\n\t\t\t\t\t\t\t<div class=\"file_loading\">\n\t\t\t\t\t\t\t\t<div class=\"loader_wrapper\"><div class=\"cssload-loader\"></div></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"upload\">\n\t\t\t\t\t\t\t<p class=\"upload_text\"><i class=\"icon icon-sudi-'.$this->icon.'\"></i>'.$this->text.'</p>\n\t\t\t\t\t\t<input type=\"file\" name=\"image_upload\" data-type=\"'.$this->type.'\" '.$thisCrop.' '.$thisThumb.' '.$thisThumbWith.' '.$thisWidth.' '.$thisHeight.' '.$thisMaxWidth.''.$types_ok.''.$thisMaxHeight.' '.$thisQuality.' data-path=\"'.$this->path.'\" data-code=\"'.$this->code.'\" data-field=\"'.$this->field.'\" data-table=\"'.$this->table.'\" '.$linked_field .' '.$linked_field_id.' />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t';\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function getInfo();", "public function get_info() {\n\n\t\t$sql = \"SELECT COUNT(*) FROM `\" . $this->wpdb->commentmeta . \"` WHERE comment_id NOT IN (SELECT comment_id FROM `\" . $this->wpdb->comments . \"`);\";\n\t\t$commentmeta = $this->wpdb->get_var($sql);\n\t\t$this->found_trash_count += $commentmeta;\n\n\t\t$sql = \"SELECT COUNT(*) FROM `\".$this->wpdb->commentmeta.\"` WHERE meta_key LIKE '%akismet%';\";\n\t\t$akismetmeta = $this->wpdb->get_var($sql);\n\t\t$this->found_akismet_count += $akismetmeta;\n\n\t}", "protected function format_file_fields( $gestores, $ID_PUBLICACION = null, $filter = null ){\n\t\tforeach( $gestores as $g ){\n\t\t\t$this->array_campos_file = $g->campos->where('tipo','file')->lists('nombre');\n\n\t\t\t$query_data = DB::table( 'contenido_'.$g->contenido )->where('activo',1);\n\n\t\t\t// si no es novedad toma solo el contenido del gestor, novedades es global, no filtra por gestor\n\t\t\tif( $filter != 'novedad'){\n\t\t\t\t$query_data = $query_data->where('id_gestor',$g->id);\n\t\t\t}\n\n\t\t\tif( $filter != 'novedad' && ISSET($this->subcategoria) ){\n\t\t\t\t$query_data = $query_data->where('id_subcategoria',$this->subcategoria->id);\n\t\t\t}\n\n\t\t\t$query_data = $query_data->orderBy('orden','asc');\n\n\t\t\tif( $filter == 'novedad' ){\n\t\t\t\t$query_data = $query_data->where('novedad',1);\n\t\t\t}\n\n\t\t\tif( $ID_PUBLICACION ){\n\t\t\t\t$g->data = $query_data->where( 'id', $ID_PUBLICACION )->first();\n\t\t\t}else{\n\t\t\t\t$g->data = $query_data->get();\n\t\t\t}\n\t\t\t\n\t\t\tif( $g->data ){\n\t\t\t\tif( is_Array($g->data) ){\n\t\t\t\t\tforeach( $g->data as $d ){\n\t\t\t\t\t\t$this->format_current( $g, $d );\n\t\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t\t$d->{$this->cutted_text} = Formatear::cortar( $d->{$this->cutted_text}, 140 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->format_current( $g, $g->data );\n\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t$g->{$this->cutted_text} = Formatear::cortar( $g->{$this->cutted_text}, 140 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( is_Array($g->data) ){\n\t\t\t\t$g->data = array_reverse($g->data);\n\t\t\t}\n\t\t}\n\t}", "public function fileInfo() {\n $this->file = file_load($this->fid);\n\n // Creating an array of stream wrappers that will be removed.\n $streams = array();\n foreach (stream_get_wrappers() as $stream) {\n $streams[] = $stream . '://';\n }\n\n // Generate the folder name by the unique URI of the file.\n $file_name = str_replace($streams, '', $this->file->uri);\n $folder_name = str_replace(array('.', '_'), '-', $file_name);\n\n $files_folder = variable_get('file_public_path', conf_path() . '/files');\n\n $this->filePath = $files_folder . '/' . $file_name;\n $this->extractPath = $files_folder . '/' . $folder_name;\n }", "public function studiengang_details() {\r\n\r\n //Sprachen rausfinden:\r\n $this->sprachen = StgProfil::getPossibleLanguages();\r\n //Abschlüsse suchen:\r\n $this->abschlusssuche = new SQLSearch(\"SELECT abschluss_id, name FROM abschluss WHERE name LIKE :input\", _(\"Abschluss eingeben\"));\r\n //zulassungsvoraussetzung:\r\n $this->moeglicheZulassungsvoraussetzungen_wise = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_wise\");\r\n $this->moeglicheZulassungsvoraussetzungen_sose = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_sose\");\r\n //Typen von Studiengängen:\r\n $this->moeglicheStgTypen = StgProfil::getMoeglicheTypen();\r\n\r\n $this->studiengaenge = PersonalRechte::meineStudiengaenge(null, true);\r\n $this->abschluesse = Abschluss::findAllUsed();\r\n $this->profile = StgProfil::getMeineProfile(null, Request::get(\"studiengang_id\"), Request::get(\"abschluss_id\"));\r\n\r\n //Neuen Eintrag in stg_profil erstellen\r\n if (Request::get(\"item_id\") === \"neu\" && !Request::get(\"studiengang_id\")) {\r\n //$this->profil = new StgProfil();\r\n $this->fachsuche = new SQLSearch(\"SELECT studiengang_id, name FROM studiengaenge WHERE name LIKE :input OR beschreibung LIKE :input \", _(\"Studiengang eingeben\"));\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n return;\r\n }\r\n\r\n $this->profil = new StgProfil(Request::get(\"studienprofil_id\") !== \"neu\" ? Request::get(\"studienprofil_id\") : null);\r\n if (!$this->profil->hasPermission()) {\r\n throw new AccessDeniedException(_(\"Sie dürfen diesen Studiengang nicht bearbeiten\"));\r\n }\r\n if (Request::get(\"delete_x\") && Request::get(\"item_id\") && Request::get(\"type\") === \"dokument\") {\r\n $this->profil->deleteDoku(Request::get(\"item_id\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung gelöscht\"));\r\n }\r\n if (Request::get(\"addDocument\")) {\r\n $this->profil->addDoku(Request::get(\"addDocument\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung hinzugefügt\"));\r\n }\r\n //Profil ändern, falls Informationen gesendet worden sind:\r\n if (Request::submitted(\"absenden\")) {\r\n if (Request::get(\"studiengang_id\")) {\r\n //Neuen Eintrag in stg_profil machen:\r\n $this->profil['fach_id'] = Request::get(\"studiengang_id\");\r\n $this->profil->store(); //Nachher wird noch einmal gestored, aber jetzt wollen wir IDs bekommen.\r\n }\r\n if (Request::submitted('informationen')) {\r\n $this->profil->setInformation(Request::getArray(\"informationen\"));\r\n }\r\n if (Request::submitted(\"abschluss_id\")) {\r\n $this->profil['abschluss_id'] = Request::get(\"abschluss_id\");\r\n }\r\n if (Request::submitted('settings')) {\r\n $settings = Request::getArray(\"settings\");\r\n foreach ($settings as $key => $value) {\r\n $this->profil[$key] = $value;\r\n }\r\n if (!$settings['sichtbar']) {\r\n $this->profil['sichtbar'] = 0;\r\n }\r\n }\r\n if (Request::submitted(\"zielvereinbarung\")) {\r\n $this->profil['zielvereinbarung'] = Request::get(\"zielvereinbarung\");\r\n }\r\n if (Request::submitted(\"einleitungstext\")) {\r\n $this->profil['einleitungstext'] = Request::get(\"einleitungstext\");\r\n }\r\n if (Request::submitted('typen')) {\r\n $this->profil->setTypen(Request::getArray(\"typen\"));\r\n }\r\n $this->profil->store();\r\n\r\n if (Request::submitted('textcombination')) {\r\n $textcombinations = (array) @$_REQUEST['textcombination'];\r\n Textbaustein::removeCombination($this->profil->getId());\r\n foreach ($textcombinations as $code => $ids) {\r\n Textbaustein::addCombination($this->profil->getId(), $code, $ids);\r\n }\r\n }\r\n\r\n $this->flash_now(\"success\", _(\"Änderungen wurden übernommen\"));\r\n if (Request::get(\"neues_dokument\")) {\r\n $dokument = new StgFile();\r\n if ($_GET['qqfile'] || isset($_FILES['qqfile'])) {\r\n ob_start();\r\n $dokument->upload();\r\n ob_clean();\r\n }\r\n $dokument['name'] = Request::get(\"neues_dokument_name\");\r\n $dokument['sichtbar'] = Request::get(\"neues_dokument_sichtbar\") ? '1' : '0';\r\n $dokument['jahr'] = Request::get(\"neues_dokument_jahr\");\r\n $dokument['doku_typ_id'] = Request::get(\"neues_dokument_doku_typ_id\");\r\n $dokument['quick_link'] = Request::get(\"neues_dokument_quick_link\");\r\n $dokument['user_id'] = $GLOBALS['user']->id;\r\n $dokument->store();\r\n $dokument->setTags(Request::get(\"neues_dokument_tags\"));\r\n $this->profil->addDoku($dokument->getId());\r\n if ($dokument->isPublic()) {\r\n $this->flash_now(\"success\", _(\"Neues Dokument angelegt und hinzugefügt\"));\r\n } else {\r\n $this->flash_now(\"success\", _(\"Neues internes Dokument angelegt und hinzugefügt. Es kann unter Akkreditierung gefunden werden.\"));\r\n }\r\n }\r\n if (Request::get(\"neuer_ansprechpartner\")) {\r\n $kontakt = new StgAnsprechpartner();\r\n $kontakt['range_typ'] = Request::get(\"range_typ\");\r\n $kontakt['range_id'] = Request::get(\"range_typ\") && Request::get(\"range_id\") ? Request::get(\"range_id\") : \"\";\r\n\r\n if (Request::get(\"ansprechpartner_typ_id\")) {\r\n $typen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n foreach ($typen as $typ) {\r\n if ($typ['ansprechpartner_typ_id'] === Request::get(\"ansprechpartner_typ_id\")) {\r\n $kontakt['ansprechpartner_typ_id'] = Request::get(\"ansprechpartner_typ_id\");\r\n }\r\n }\r\n }\r\n $kontakt['freitext_name'] = Request::get(\"freitext_name\");\r\n $kontakt['freitext_mail'] = Request::get(\"freitext_mail\");\r\n $kontakt['freitext_telefon'] = Request::get(\"freitext_telefon\");\r\n $kontakt['freitext_homepage'] = Request::get(\"freitext_homepage\");\r\n if ($kontakt->store()) {\r\n $this->profil->addAnsprechpartner($kontakt->getId());\r\n $this->flash_now(\"success\", _(\"Neuer Ansprechpartner angelegt und hinzugefügt\"));\r\n }\r\n }\r\n }\r\n\r\n //Informationen:\r\n $this->informationen = $this->profil->getInformation();\r\n\r\n //Verlaufspläne\r\n $this->verlaufsplaene = $this->profil->getVerlaufsplaene();\r\n\r\n //Dateien:\r\n $this->dateien = StgFile::getByStgProfil($this->profil->getId());\r\n $this->dokumentensuche = $this->getDokumentensuche();\r\n\r\n //Kontakte:\r\n $this->kontakte = StgAnsprechpartner::getByStgProfil($this->profil->getId());\r\n usort($this->kontakte, function ($a, $b) {\r\n return strcmp($a->getName('no_title_rev'), $b->getName('no_title_rev'));\r\n });\r\n $this->kontakt_neu = new StgAnsprechpartner();\r\n $this->ansprechpartnertypen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n\r\n\r\n //Aufbaustudiengänge:\r\n $this->mutterstudiengaenge = $this->profil->getAufbauendeStudiengaenge();\r\n $this->profilsuche = $this->getProfilSuche();\r\n\r\n\r\n // Textbausteine\r\n $this->textbausteine = array(\r\n 'de' => Textbaustein::loadAll('de'),\r\n 'en' => Textbaustein::loadAll('en'),\r\n );\r\n $this->textcombinations = Textbaustein::loadCombination($this->profil->getId());\r\n\r\n $this->ansprechpartnersuche = $this->getAnsprechpartnersuche();\r\n $this->datei_url = $this->link_for(\"zsb_dateien/download_file\");\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n //hiernach wird nichts weiter ausgegeben\r\n }", "abstract public function infoAll();", "function setInfo() {\n //Sanatize using Regex\n $santizied=$this->sanitize($this->rawTitle);\n \n \n //IMDB API Options\n $plot='full'; //Plot format Full or Simple\n $limit=1; //Number of results\n \n $reply=file_get_contents('http://imdbapi.org/?title='.$santizied.'&type=json&plot='.$plot.'&episode=0&limit='.$limit.'&yg=0&mt=M&lang=en-US&offset=&aka=simple&release=simple');\n $obj = json_decode($reply,true);\n\t\t\n\n \n if (@is_null($obj[0]['title'])) { \n $this->download=false;\n }\n else { \n $this->title=$obj[0]['title'];\n $this->time=$obj[0]['runtime'][0];\n $this->genres=$obj[0]['genres'];\n $this->rating=$obj[0]['rating'];\n $this->plot=$obj[0]['plot_simple'];\n $this->director=$obj[0]['directors'][0];\n $this->casts=$obj[0]['actors'];\n $this->year=$obj[0]['year'];\n\t\t\t $this->imdbid=$obj[0]['imdb_id'];\n //TODO: Uncomment this\n //$this->poster=$obj[0]['poster'];\n\t\t\t $this->poster=$this->thePoster($obj[0]['poster']);\n //$this->poster='http://localhost:8080/wordpress/wp-content/uploads/2013/01/d.jpg';\n \n $this->download=TRUE;\n\n } \n \n\n }", "protected function info()\n\t\t{\n\t\t}", "public function affFormModifInfos(){\n $error = \"\";\n $idVisiteur = Session::get('id');\n $gsbFrais = new GsbFrais();\n $info = $gsbFrais->getInfosPerso($idVisiteur);\n return view('formModifInfos', compact('info', 'error'));\n }", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "public function affiche_infos()\n {\n $returnValue = null;\n\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AF0 begin\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AF0 end\n\n return $returnValue;\n }", "protected function getFileInfo()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$row = \\IPS\\cms\\Media::load( \\IPS\\Request::i()->id );\n\t\t\t$fileObject = \\IPS\\File::get( 'cms_Media', $row->file_object );\n\t\t}\n\t\tcatch( \\OutOfRangeException $ex )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* Make a human-readable size */\n\t\t$filesize = \\IPS\\Output\\Plugin\\Filesize::humanReadableFilesize( $fileObject->filesize() );\n\t\t\\IPS\\Member::loggedIn()->language()->parseOutputForDisplay( $filesize );\n\n\t\t$output = array( \n\t\t\t'fileSize' => $filesize,\n\t\t\t'dimensions' => NULL\n\t\t);\n\n\t\t/* If this is an image we'll also show the dimensions */\n\t\tif( $row->is_image )\n\t\t{\n\t\t\t$dimensions = $fileObject->getImageDimensions();\n\t\t\t$output['dimensions'] = $dimensions[0] . ' x ' . $dimensions[1];\n\t\t}\n\n\t\t\\IPS\\Output::i()->sendOutput( json_encode( $output ), 200, 'application/json', \\IPS\\Output::i()->httpHeaders );\n\t}", "public function getDetalle();", "public function todaInfoProductos(){\n\n for($i = 0; $i < count($this -> listProducto); $i++){\n $this -> listProducto[$i][0] -> getInfoBasic();\n }\n }", "function file_info()\n\t{\n\t\t$file_id = ee()->input->get('file_id');\n\n\t\t$data = $file_id ? call_user_func($this->config['file_info_callback'], $file_id) : array();\n\n\t\tif (count($data) == 0)\n\t\t{\n\t\t\techo '{}';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode($data);\n\t\t}\n\t\texit;\n\t}", "function fonctionBaliseFermante($parseur, $nomBalise)\r\n {\r\n global $derniereBaliseRencontree;\r\n global $titre;\r\n global $lien;\r\n global $description;\r\n\r\n switch ($nomBalise) {\r\n case \"ITEM\" :\r\n // nous quittons un bloc item\r\n // nous pouvons afficher le titre de l'article\r\n echo \"<tr><td height='28'><a href=\\\"$lien\\\" target='_blank'>\".$titre.\"</a></td></tr>\";\r\n echo \"<tr><td>$description</td></tr>\";\r\n // et on oublie\r\n $titre = \"\";\r\n $lien = \"\";\r\n $description = \"\";\r\n break;\r\n }\r\n \r\n // On oublie la dernière balise rencontrée\r\n // et tout le reste\r\n $derniereBaliseRencontree = \"\";\r\n }", "public function info() {\n foreach ($this->items as $item) {\n $item->info();\n }\n }", "public function getInfo() {}", "public function getInfo() {}", "public function getInfotext()\n {\n return $this->_infotext;\n }", "public function show(Fichier $fichier)\n {\n //\n }", "protected function format_file_fields_novedades( $gestores ){\n\n\t\tforeach( $gestores as $g ){\n\n\t\t\t$this->array_campos_file = $g->campos->where('tipo','file')->lists('nombre');\n\n\t\t\t$g->data = DB::table( 'contenido_nota' )->where('activo',1)->where('id_gestor',$g->id)->where('novedad',1)->orderBy('orden','asc')->get();\n\t\t\t\n\t\t\t// DUPLICADO. OPTIMIZAR\n\t\t\tif( $g->data ){\n\t\t\t\tif( is_Array($g->data) ){\n\t\t\t\t\tforeach( $g->data as $d ){\n\t\t\t\t\t\t$this->format_current( $g, $d );\n\t\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t\t$d->{$this->cutted_text} = Formatear::cortar( strip_tags($d->{$this->cutted_text}), 140 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->format_current( $g, $g->data );\n\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t$g->{$this->cutted_text} = Formatear::cortar( strip_tags($g->{$this->cutted_text}), 140 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$g->data = array_reverse($g->data);\n\t\t}\n\t}", "function getInfo();", "protected function loadMetaInformation()\n {\n try {\n $logger = new Logger('exiftool');\n $reader = BookReader::create($logger);\n $metadataBag = $reader->files($this->file->getRealPath())->first();\n foreach ($metadataBag as $meta) {\n $tagName = $meta->getTag()->getName();\n if (0 === strcasecmp($tagName, 'MIMEType')) {\n $this->mime = $meta->getValue()->asString();\n }\n if (0 === strcasecmp($tagName, 'FileType')) {\n $this->ext = strtolower($meta->getValue()->asString());\n }\n if ($this->ext && $this->mime) {\n break;\n }\n }\n } catch (\\Exception $e) {\n $logger->addNotice($e->getMessage());\n }\n finally {\n $this->mime = empty($this->mime) ? $this->file->getMimeType() : $this->mime;\n $this->ext = empty($this->ext) ? $this->file->guessExtension(): $this->ext;\n }\n }", "public function id_fiche(){ return $this->id_fiche; }", "public function show(Fornecedores $fornecedores)\n {\n //\n }", "function ft_hook_info() {}", "public function getFactuurFile() {\n\t\treturn $this->factuurFile;\n\t}", "public function printDetails() \n {\n\n echo count($this->filesArray) . ' files has been updated' . PHP_EOL\n . ' New details are given below ' . PHP_EOL;\n // list down files after updation\n foreach ($this->filesArray as $file) {\n echo $file . ' ' . filesize($file) . 'kb' . PHP_EOL;\n }\n }", "function get_desc_file_fields() {\n\treturn array (\n\t\t\t\"Taxonomic name (Name)\",\n\t\t\t\"Diagnostic Description\",\n\t\t\t\"Distribution\",\n\t\t\t\"Habitat\",\n\t\t\t\"Size\",\n\t\t\t\"Habitus image\",\n\t\t\t\"Morphological Description\",\n\t\t\t\"Habitat image\",\n\t\t\t\"Simlar Species (Name)\",\n\t\t\t\"Pronotum image\",\n\t\t\t\"Elytral microsculpture\",\n\t\t\t\"Genitalia left image\",\n\t\t\t\"General description\",\n\t\t\t\"Genetics\" \n\t);\n}", "public function get_bydeler_info()\n\t{\n\t\t$bydeler = array();\n\t\tforeach (game::$bydeler as $bydel)\n\t\t{\n\t\t\t$bydeler[$bydel['id']] = array(\n\t\t\t\t\"cars\" => 0,\n\t\t\t\t\"b_id\" => $bydel['id'],\n\t\t\t\t\"b_active\" => $bydel['active'],\n\t\t\t\t\"ff_id\" => null,\n\t\t\t\t\"ff_name\" => null,\n\t\t\t\t\"garage\" => null,\n\t\t\t\t\"garage_max_cars\" => null,\n\t\t\t\t\"garage_free\" => 0,\n\t\t\t\t\"garage_next_rent\" => null\n\t\t\t);\n\t\t}\n\t\t\n\t\t// antall biler vi har i de ulike bydelene (garasjene)\n\t\t$result = \\Kofradia\\DB::get()->query(\"\n\t\t\tSELECT b_id, COUNT(id) AS ant\n\t\t\tFROM users_gta\n\t\t\tWHERE ug_up_id = \".$this->up->id.\"\n\t\t\tGROUP BY b_id\");\n\t\twhile ($row = $result->fetch())\n\t\t{\n\t\t\tif (!isset($bydeler[$row['b_id']])) continue;\n\t\t\t$bydeler[$row['b_id']]['cars'] = $row['ant'];\n\t\t}\n\t\t\n\t\t// informasjon om garasjene vi har\n\t\t$result = \\Kofradia\\DB::get()->query(\"\n\t\t\tSELECT ugg_b_id, ugg_places, ugg_time_next_rent, ff_id, ff_name\n\t\t\tFROM users_garage\n\t\t\t\tLEFT JOIN ff ON ff_id = ugg_ff_id\n\t\t\tWHERE ugg_up_id = \".$this->up->id);\n\t\twhile ($row = $result->fetch())\n\t\t{\n\t\t\tif (!isset($bydeler[$row['ugg_b_id']])) continue;\n\t\t\t$bydeler[$row['ugg_b_id']]['garage'] = true;\n\t\t\t$bydeler[$row['ugg_b_id']]['ff_id'] = $row['ff_id'];\n\t\t\t$bydeler[$row['ugg_b_id']]['ff_name'] = $row['ff_name'];\n\t\t\t$bydeler[$row['ugg_b_id']]['garage_max_cars'] = $row['ugg_places'];\n\t\t\t$bydeler[$row['ugg_b_id']]['garage_free'] = max(0, $row['ugg_places'] - $bydeler[$row['ugg_b_id']]['cars']);\n\t\t\t$bydeler[$row['ugg_b_id']]['garage_next_rent'] = $row['ugg_time_next_rent'];\n\t\t}\n\t\t\n\t\treturn $bydeler;\n\t}", "function info() {\r\n\t\t$this -> Producto -> recursive = -1;\r\n\t\t$producto = $this -> Producto -> read(null, $this -> data[\"Producto\"][\"id\"]);\r\n\t\techo json_encode($producto);\r\n\t\tConfigure::write('debug', 0);\r\n\t\t$this -> autoRender = false;\r\n\t\texit();\r\n\t}", "public function getIdadeFilho1() {\n return $this->iIdadeFilho1;\n }", "public function postCargarInformacion(){\n\t\t$fecha = date(\"Y-d-m H:i:s\");\n\t\t$registro = DB::SELECT(\"SELECT ident_current('MODBID_INFORMACIONPUBLIC') AS [LastID_1]\");\t\t\n\t\t$id_foto = (($registro[0]->LastID_1)+1).\".jpg\";\n\t\t\t\t\n\t\tDB::table('MODBID_INFORMACIONPUBLIC')->insert(\n\t\t \tarray(\n\t\t \t\t'id_usuario' => Auth::user()->id,\t\t \t\t\n\t\t \t\t'titulo' => Input::get('titulo'),\n\t\t \t\t'foto' => $id_foto,\n\t\t \t\t'tipo' => Input::get('tipo'),\n\t\t \t\t'texto' => Input::get('texto'),\t\t\t \t\t\n\t\t \t\t'created_at' => $fecha,\n\t \t\t\t'updated_at' => $fecha,\n\t \t\t\t'fecha_noticia' => Input::get('fecha_info')\n\n\t\t \t)\n\t\t);\n\n\t\t$path_foto = public_path().'/assets/bid/informacion/'.(($registro[0]->LastID_1)+1).\"/\";\n\t\tInput::file('foto')->move($path_foto,$id_foto);\n\t\treturn Redirect::to('vista1_bid')->with('status', 'ok_estatus');\n\t}", "function filmograf(&$res,$type) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match(\"/<a name=\\\"$type\\\"(.*?)<\\/div>/msi\",$this->page[\"Name\"],$match)) {\n if (preg_match_all(\"/<a(.*?)href=\\\"\\/title\\/tt(\\d{7})\\/\\\">(.*?)<\\/a>\\s*(\\((\\d{4})\\)|)([^<]*?\\.\\.\\.\\.\\s*<a href=\\\"\\/character\\/ch(\\d{7})\\/\\\">(.*?)<\\/a>|([^<]*?|\\s*<small>.*?<\\/small>\\s*)\\.\\.\\.\\.\\s*(.*?)\\s*<|)/i\",$match[1],$matches)) {\n $mc = count($matches[0]);\n for ($i=0;$i<$mc;++$i) {\n if (empty($matches[8][$i])) $matches[8][$i] = $matches[10][$i];\n $res[] = array(\"mid\"=>$matches[2][$i],\"name\"=>$matches[3][$i],\"year\"=>$matches[5][$i],\"chid\"=>$matches[7][$i],\"chname\"=>$matches[8][$i]);\n }\n }\n }\n }", "public function extraInfo();", "public function show(Feriado $feriado)\n {\n //\n }", "function info(){\n\n\tglobal $nombre;\n\tglobal $apellido;\n\t\t\n\t$rf = $_POST['ref'];\n\t$nombre = $_POST['Nombre'];\n\t$apellido = $_POST['Apellidos'];\n\t\t\n\t$ActionTime = date('H:i:s');\n\t\n\tglobal $logtext;\n\t$logtext = PHP_EOL.\"- USERS VER DETALLES \".$ActionTime.PHP_EOL.\"\\t Nombre: \".$nombre.\" \".$apellido.PHP_EOL;\n\n\trequire 'Inc_Log_Total.php';\n\n\t}", "protected static function filtes()\n {\n /*\n * The filters fetches are transported\n * to router Bus calls\n **/\n }", "public function\tgetReferidoInfo(){\r\t\t\r\t\t$model_ref = $this->getModel( 'referido' );\r\t\t$idref = JRequest::getInt( 'idref' );\r\t\t\r\t\t$model_ref->instance( $idref );\r\t\t$inf_ref = $model_ref->getReferidoInf();\r\t\t\r\t\tif( !empty($inf_ref) ){\r\t\t\t\r\t\t\t$model_ref\r\t\t}\r\t\t\r\t}", "function getHtmlFileInfo(){\n\t\n\t\treturn $this->html_info;\n\t}", "public function verDados(){\n\t\t\techo $this->nome.\"<br>\";\n\t\t\techo $this->idade.\"<br>\";\n\t\t\techo $this->senha.\"<br>\";\n\t\t}", "public function tampilDataGalang(){\n\t\t\n\t}", "public function renvoi_infos() {\n\t\t$info = @stream_get_meta_data ( $this->connexion );\n\t\t\n\t\treturn $info;\n\t}", "public abstract function showInfo();", "public function ambilData() {\n // read file & get the data (file_get_contents)\n $data = file_get_contents($this->file);\n $this->daftar_barang = json_decode($data, true);\n $this->daftar_barang = array_values($this->daftar_barang);\n }", "public function info();", "public function info();", "public function listarFilosofia(){\n \n //percorrer estantes pelas categorias para eliminar a categ desnecessaria\n foreach ($this->estante as $this->) {\n // code...\n \n if ($this->getCategoria() == \"FILOSOFIA\"){\n echo \"<h2> LIVROS DE FILOSOFIA </h2>\";\n echo \"\";\n //listar todos os livros:\n foreach ($this->livros as $livro){\n $livro->mostrarDados(); \n }\n } else {\n echo \"NENHUM LIVRO DE FILOSOFIA\";\n }\n \n } \n }", "function annotation_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {\n return null;\n}", "function complete_new_file_info( $fn ){\n\n // Retrieve file path\n $filepath = $this->get_file_info($fn)['filepath'];\n\n // Calculate MD5 sum\n $file_md5 = md5_file($filepath);\n //print $file_md5 . \"<br><br>\\n\";\n\n // Extract id3 tag data\n global $getID3;\n $fid3 = $getID3->analyze($filepath);\n //print_r($fid3['tags']);\n //print \"<br /><br />\";\n\n $filelength = \"\";\n if( isset($fid3['playtime_string']) ) {\n $filelength = $fid3['playtime_string'];\n }\n $filetitle = \"\";\n if( isset($fid3['tags']['id3v2']['title'][0]) ) {\n $filetitle = $fid3['tags']['id3v2']['title'][0];\n }\n $fileauthor = \"\";\n if( isset($fid3['tags']['id3v2']['artist'][0]) ) {\n $fileauthor = $fid3['tags']['id3v2']['artist'][0];\n }\n $audiotype = \"\";\n if( isset($fid3['tags']['id3v2']['genre'][0]) ) {\n $audiotype = $fid3['tags']['id3v2']['genre'][0];\n }\n $passage = \"\";\n if( isset($fid3['tags']['id3v2']['comment'][0]) ) {\n $passage = $fid3['tags']['id3v2']['comment'][0];\n }\n $series = \"\";\n if( isset($fid3['tags']['id3v2']['album'][0]) ) {\n $series = $fid3['tags']['id3v2']['album'][0];\n }\n $tracknumber = 0;\n if( isset($fid3['tags']['id3v2']['track_number'][0]) ) {\n $tracknumber = $fid3['tags']['id3v2']['track_number'][0];\n }\n //print $fileauthor . \" - \" . $series . \" - \" . $tracknumber . \" - \" . $filetitle . \" - \" . $filelength . \" - \" . $audiotype . \" - \" . $passage . \"<br />\\n\";\n\n $fid3 = null;\n\n // Prepare UPDATE statement to update file information in DB\n $update = \"UPDATE files SET md5_sign = :md5,\n length = :length,\n title = :title,\n series = :series,\n tracknumber = :tracknumber,\n audiotype = :audiotype,\n author = :author,\n passage = :passage,\n newfile = 0 WHERE\n filename = :filename\";\n\n $stmt = $this->pdo->prepare($update);\n\n // Bind parameters\n $stmt->bindParam(':md5', $file_md5);\n $stmt->bindParam(':length',$filelength);\n $stmt->bindParam(':title', $filetitle);\n $stmt->bindParam(':series', $series);\n $stmt->bindParam(':tracknumber', $tracknumber);\n $stmt->bindParam(':audiotype', $audiotype);\n $stmt->bindParam(':author', $fileauthor);\n $stmt->bindParam(':passage', $passage);\n $stmt->bindParam(':filename', $fn);\n\n // Execute statement\n $stmt->execute();\n\n return;\n }", "public function getFileInfo()\n {\n return $this->_info;\n }", "public function getNameFil()\n\t {\n\t return $this->nameFile;\n\t }", "public function ObtenerDat()\n {\n $this->validate([\n 'folio'=>'required'\n ]) ;\n\n $datos = Empleado::where('folio', $this->folio)->first();\n\n if($datos){\n\n $this->nombre= $datos->nombre; \n\n $this->apellido_p= $datos->apellido_p;\n \n $this->apellido_m= $datos->apellido_m;\n \n $this->puesto= $datos->puestos->puesto;\n \n if(!empty($this->imagen)){\n $this->imagen=$datos->imagen->store(\"public\");\n }else{\n $this->imagen= null;\n }\n\n }else{\n\n session()->flash('MensajeD','El empleado no trabaja en este Hotel.');\n\n $this->nombre= ''; \n\n $this->apellido_p= '';\n \n $this->apellido_m= '';\n \n $this->puesto= '';\n \n }\n\n }", "public function show($id)\n {\n //\n $categorie = Categorie::find($id);\n\n $fichier_arr = array($categorie) ;\n $fichier_arr[0]['fichier_total'] = $categorie->fichiers->count(); // for your $arr2\n unset($fichier_arr[0]['fichiers']);\n\n //$fichier_arr\n\n //return $categorie;\n return $fichier_arr[0];\n }", "public function Information()\n {\n $this->imgInfo = list($width, $height, $type, $attr) = getimagesize($this->pathToImage);\n !empty($this->imgInfo) or self::errorMessage(\"The file doesn't seem to be an image.\");\n $mime = $this->imgInfo['mime'];\n\n if($this->verbose) {\n $this->imgInfo['filesize'] = $filesize = filesize($this->pathToImage);\n self::verbose(\"Image file: {$this->pathToImage}\");\n self::verbose(\"Image information: \" . print_r($this->imgInfo, true));\n self::verbose(\"Image width x height (type): {$width} x {$height} ({$type}).\");\n self::verbose(\"Image file size: {$filesize} bytes.\");\n self::verbose(\"Image mime type: {$mime}.\");\n }\n }", "public function before_get_info() {\n\n\t\t$this->found_trash_count = 0;\n\t\t$this->found_akismet_count = 0;\n\n\t}", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "function show_perfil($visitado){\n\t\t\n\t\tif ($visitado != null) {\n\n\t\t\t$posts = show_posts2($visitado);\n\t\t\tif (count($posts)) {\n\t\t\t\t\t\t\t// Passando frase por frase\n\t\t\t\t\t\t\tforeach($posts as $key = > $list) {\n\n\t\t\t\t\t\t\t\t\t$tempo = time_elapsed_string($list['stamp']);\n\t\t\t\t\t\t\t\t\t$str = $list['userid'];\n\t\t\t\t\t\t\t\t\t$id_post = $list['id'];\n\t\t\t\t\t\t\t\t\t$tag1 = $list['tag1'];\n\t\t\t\t\t\t\t\t\t$tag2 = $list['tag2'];\n\t\t\t\t\t\t\t\t\t$tag3 = $list['tag3'];\n\n\n\t\t\t\t\t\t\t\t\t//vendo a cor dos botões\n\t\t\t\t\t\t\t\t\t$query1 = $list['id'];\n\n\t\t\t\t\t\t\t\t\t$pontos = apreciados($query1);\n\n\t\t\t\t\t\t\t\t\t$sql = mysql_query(\"select ponto_ruim,ponto_coracao,ponto_estrela from apreciados where id_apreciado='$query1' and id_apreciador='$id_principal'\");\n\t\t\t\t\t\t\t\t\t$row0 = mysql_fetch_array($sql);\n\t\t\t\t\t\t\t\t\t$ponto_ruim = $row0['ponto_ruim'];\n\t\t\t\t\t\t\t\t\t$ponto_estrela = $row0['ponto_estrela'];\n\t\t\t\t\t\t\t\t\t$ponto_coracao = $row0['ponto_coracao'];\n\n\t\t\t\t\t\t\t\t\tif ($ponto_ruim == 1) {\n\t\t\t\t\t\t\t\t\t\t\t$corlike = 'span_hang2';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t$corlike = 'span_hang';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ($ponto_estrela == 1) {\n\t\t\t\t\t\t\t\t\t\t\t$corlike2 = 'span_estrela2';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t$corlike2 = 'span_estrela';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ($ponto_coracao == 1) {\n\t\t\t\t\t\t\t\t\t\t\t$corlike3 = 'span_coracao2';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t$corlike3 = 'span_coracao';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// fim vendo a cor dos botões\n\t\t\t\t\t\t\t\t\t//CONTAINER DO POST\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"post\\\" lang='$id_post' >\";\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"top-post\\\" lang='$id_post'>\";\n\t\t\t\t\t\t\t\t\techo \"<div>\";\n\t\t\t\t\t\t\t\t\techo \"<img class=\\\"circulo\\\" onclick=\\\"location.href='perfil.php?id=$str'\\\" src=\\\"getImagem.php?cod=\".$list['userid'].\"\\\"/>\";\n\t\t\t\t\t\t\t\t\techo \"</div>\";\n\t\t\t\t\t\t\t\t\techo \"<h1 onclick=\\\"location.href='perfil.php?id=$str'\\\">\".$list['nome'].'&nbsp'.$list['sobrenome'].\"</h1>\";\n\n\t\t\t\t\t\t\t\t\t// ---- tags --- \n\t\t\t\t\t\t\t\t\tif ($tag1 != null) {\n\t\t\t\t\t\t\t\t\t\t\tif ($tag2 != null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($tag3 != null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<div class=\\\"exibir_tag\\\">\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \" <span class=\\\"tag_container\\\" onclick=\\\"location.href='painel_tags.php?id=$tag1'\\\" >\".$tag1.\"</span>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \" <span class=\\\"tag_container\\\" onclick=\\\"location.href='painel_tags.php?id=$tag2'\\\" >\".$tag2.\"</span>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \" <span class=\\\"tag_container\\\" onclick=\\\"location.href='painel_tags.php?id=$tag3'\\\" >\".$tag3.\"</span>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"</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\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<div class=\\\"exibir_tag\\\">\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \" <span class=\\\"tag_container\\\" onclick=\\\"location.href='painel_tags.php?id=$tag1'\\\" >\".$tag1.\"</span>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \" <span class=\\\"tag_container\\\" onclick=\\\"location.href='painel_tags.php?id=$tag2'\\\" >\".$tag2.\"</span>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"</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}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<div class=\\\"exibir_tag\\\">\";\n\t\t\t\t\t\t\t\t\t\t\t\t\techo \" <span class=\\\"tag_container\\\" onclick=\\\"location.href='painel_tags.php?id=$tag1'\\\" >\".$tag1.\"</span>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\techo \"</div>\";\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\techo \"<div class=\\\"exibir_tag\\\">\";\n\t\t\t\t\t\t\t\t\t\t\techo \"<span ></span>\";\n\t\t\t\t\t\t\t\t\t\t\techo \"</div>\";\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// ---- fim tags --- \n\t\t\t\t\t\t\t\t\techo \"<h2>\".$tempo.\"</h2>\";\n\t\t\t\t\t\t\t\t\t// fecha div top\n\t\t\t\t\t\t\t\t\techo \"</div>\";\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"container\\\">\";\n\t\t\t\t\t\t\t\t\techo \"<img class=\\\"foto1\\\" src=\\\"getImagem1.php?cod=\".$query1.\"\\\"/>\";\n\t\t\t\t\t\t\t\t\techo \"</div>\";\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"post-bot\\\" lang='$id_post'>\";\n\t\t\t\t\t\t\t\t\techo \"<a alt=\\\"ponto_estrela\\\" class=\\\"hvr-icon-pop\\\">Contemplar<span id=\\\"\".$id_post.\"est\\\" class=\\\"$corlike2\\\"></span></a>\";\n\t\t\t\t\t\t\t\t\techo \"<span class=\\\"ponto_estrela\\\">\";\n\t\t\t\t\t\t\t\t\techo \"<span class=\\\"valor1\\\">\".$pontos['ponto_estrela'].\"</span>\";\n\t\t\t\t\t\t\t\t\techo \"</span>\";\n\t\t\t\t\t\t\t\t\techo \"<a alt=\\\"ponto_coracao\\\" class=\\\"hvr-icon-coracao\\\">Admirar<span id=\\\"$id_post\\\" class=\\\"$corlike3\\\"></span></a>\";\n\t\t\t\t\t\t\t\t\techo \"<span class=\\\"ponto_coracao\\\">\";\n\t\t\t\t\t\t\t\t\techo \"<span class=\\\"valor2\\\">\".$pontos['ponto_coracao'].\"</span>\";\n\t\t\t\t\t\t\t\t\techo \"</span>\";\n\t\t\t\t\t\t\t\t\techo \"<a alt=\\\"ponto_ruim\\\" class=\\\"hvr-icon-hang\\\">Desprezar<span id=\\\"\".$id_post.\"desp\\\" class=\\\"$corlike\\\"></span></a>\";\n\t\t\t\t\t\t\t\t\techo \"<span class=\\\"ponto_ruim\\\">\";\n\t\t\t\t\t\t\t\t\techo \"<span class=\\\"valor3\\\">\".$pontos['ponto_ruim'].\"</span>\";\n\t\t\t\t\t\t\t\t\techo \"</span>\";\n\t\t\t\t\t\t\t\t\techo \"</div>\";\n\n\t\t\t\t\t\t\t\t\techo \"</div>\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<p style=\\\"position:relative; left:300px; font-size:25px; margin-bottom:250px;\\\"><b> <?php print ($dados_visitado['nome']); ?> não tem postagens.</b></p>\";\n\t\t\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\t\t\theader('location:painel.php');\n\t\t}\n\t\t\n\t}", "function getInfo()\n {\n return 'Probably the XML was not sent as file, but as an input content of an HTML.';\n }", "function contactmod_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {\n return null;\n}", "function DetailBIPOT() {\r\n global $_lf;\r\n $bipotid = $_REQUEST['bipotid'];\r\n $bpt = GetFields('bipot', 'BIPOTID', $bipotid, '*');\r\n $prg = GetaField('program', 'ProgramID', $bpt['ProgramID'], 'Nama');\r\n $prd = GetaField('prodi', 'ProdiID', $bpt['ProdiID'], 'Nama');\r\n \r\n $nmf = HOME_FOLDER . DS . \"tmp/$_SESSION[_Login].bipot.dwoprn\";\r\n $f = fopen($nmf, 'w');\r\n $mxc = 114;\r\n $grs = str_pad('-', $mxc, '-').$_lf;\r\n $hdr = str_pad(\"Daftar Biaya & Potongan $bpt[TahunID]\", $mxc, ' ', STR_PAD_BOTH).$_lf.\r\n str_pad($bpt['Nama'], $mxc, ' ', STR_PAD_BOTH).$_lf.\r\n str_pad(\"Program: $prg, Prodi: $prd\", $mxc, ' ', STR_PAD_BOTH).$_lf.\r\n $grs . \"No. Prio \".\r\n str_pad(\"Nama\", 30).\r\n str_pad(\"Jumlah\", 12, ' ', STR_PAD_LEFT). ' '.\r\n str_pad(\"Penarikan\", 12).\r\n str_pad(\"Oto?\", 5).' '.\r\n str_pad(\"St.Awal\", 12).' '.\r\n str_pad(\"St.Mhsw\", 12).' '.\r\n str_pad(\"Grade\", 5).' '.\r\n $_lf . $grs;\r\n \r\n $s = \"select b2.*, bn.Nama, format(b2.Jumlah, 0) as JML,\r\n t.Nama as NMTRX, s.Nama as SAAT\r\n from bipot2 b2\r\n left outer join bipotnama bn on b2.BIPOTNamaID=bn.BIPOTNamaID\r\n left outer join saat s on b2.SaatID=s.SaatID\r\n left outer join trx t on b2.TrxID=t.TrxID\r\n where b2.BIPOTID='$bipotid' and KodeID='$_SESSION[KodeID]'\r\n order by b2.TrxID, b2.Prioritas, b2.GradeNilai\";\r\n $r = _query($s); $n = 0;\r\n fwrite($f, $hdr);\r\n while ($w = _fetch_array($r)) {\r\n $n++;\r\n $jml = number_format($w['Jumlah']);\r\n $sa = TRIM($w['StatusAwalID'], '.');\r\n $sa = str_replace('.', ',', $sa);\r\n $sm = TRIM($w['StatusMhswID'], '.');\r\n $sm = str_replace('.', ',', $sm);\r\n fwrite($f, str_pad($n, 4).\r\n str_pad($w['Prioritas'], 5).\r\n str_pad($w['Nama'], 30).\r\n str_pad($jml, 12, ' ', STR_PAD_LEFT). ' '.\r\n str_pad($w['SAAT'], 12).\r\n str_pad($w['Otomatis'], 5, ' ', STR_PAD_BOTH) . ' '.\r\n str_pad($sa, 12). ' '.\r\n str_pad($sm, 12). ' '.\r\n str_pad($w['GradeNilai'], 5, ' ', STR_PAD_BOTH).\r\n $_lf);\r\n }\r\n fwrite($f, $grs);\r\n fclose($f);\r\n TampilkanFileDWOPRN($nmf);\r\n}", "function load_Info()\n {\n\n $this->Facility_Info($this->facilities[0]);\n }", "function traiteFichierLieuDMF($t_filename,$t_idno_prefix,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym,$vn_place_other;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tprint \"traitement des lieux\\n\";\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=1;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_place_id=getPlaceID($libelle, $t_idno_prefix.\"_\".($row-$nb_lignes_vides), $vn_place_other, $parent_selected, $explode_separator_array)) {\n\t\t\t\t} else {\n\t\t\t\t\tprint \"PLACE CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t $parent[$nb_tab]=$vn_place_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "function formulaires_editer_feuillederoute_charger_dist() {\n\t$valeurs = array( '_texte' => '' );\n\tlire_fichier_securise(_DIR_IMG . 'feuillederoute.php',$contenu);\n\t$contenu = @unserialize($contenu);\n\tif($contenu){\n\t\t$valeurs['_texte'] = $contenu;\n\t}\n\treturn $valeurs;\n}", "public function fileInfo()\n {\n return R::findAll('uploaddetail');\n }", "public function _info($info){\r\n return array('title'=>$info->full, 'block'=>false);\r\n }", "function Display_Photo($Nom, $Prenom, $id, $Font_Size)\n{\n\tif(!isset($Font_Size)) {\n\t\t$Font_Size=\"1\";\n\t}\n\t\n\tif (file_exists(\"Photos/Individu_\".$id.\".jpg\")) { \n\t\tif ($Prenom == \"NO LINK\"){\n\t\t\techo '<A HREF='.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].' class=\"tooltip\"><FONT SIZE=\"'.$Font_Size.'\">'.$Nom.'</FONT>';\n\t\t\techo '<em><span></span>';\n\t\t\techo \"<img src='Photos/Individu_\".$id.\".jpg' height='100' border='1' alt='Paroissien_\".$id.\"'>\";\n\t\t\techo '<br><font face=verdana size=1>'.$Nom.'</font>';\n\t\t\techo '</em></A>';\n\t\t} else {\n\t\t\techo '<A HREF=/SuiviParoissien.php?action=edit_Individu&id='.$id.' class=\"tooltip\"><FONT SIZE=\"'.$Font_Size.'\">'.$Prenom.' '.$Nom.'</FONT>';\n\t\t\techo '<em><span></span>';\n\t\t\techo \"<img src='Photos/Individu_\".$id.\".jpg' height='100' border='1' alt='Paroissien_\".$id.\"'>\";\n\t\t\techo '<br><font face=verdana size=1>'.$Prenom.' '.$Nom.'</font>';\n\t\t\techo '</em></A>';\n\t\t}\n\t} else {\n\t\tif ($Prenom == \"NO LINK\"){\n\t\t\techo '<A HREF='.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'>';\n\t\t\techo '<FONT SIZE=\"'.$Font_Size.'\">' .$Nom. '</FONT> ';\n\t\t\techo '</A>';\n\t\t} else {\n\t\t\techo '<A HREF=/SuiviParoissien.php?action=edit_Individu&id='.$id.'>';\n\t\t\techo '<FONT SIZE=\"'.$Font_Size.'\">' .$Prenom. ' ' .$Nom. '</FONT> ';\n\t\t\techo '</A>';\n\t\t}\n\t}\n}", "public function tampilkanFileNafil($ids){\n // $filenafil = FileNafil::all();\n $filenafil = FileNafil::where('nafil_id',$ids)->get();\n \n $maxids = FileNafil::select('id')->where('nafil_id', $ids)->orderby('id','desc')->first(); \n $naskahfinal = NaskahFinal::find($ids);\n return view('filenafil.infofilenafil',compact('filenafil','naskahfinal','maxids'));\n }", "public function uploadverhaal() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }", "private function extractInfo($filename) {\n\t \t$modelSellers = new Sellers();\n\t\t\t$modelConsumers = new Consumers();\n\t\t\t$modelSales = new Sales();\n\t\t\t$arrSalesman = array();\n\n\t\t\t$pathFile = $this->input_dir.'/'.$filename;\n\n\t\t\t$fileContent = file($pathFile);\n\t\t\tnatsort($fileContent);\n\n\t\t\tforeach($fileContent as $line) {\n\t\t\t $arrLine = explode('ç', $line);\n\t\t\t if($arrLine[0] == '001') {\n\t\t\t\t \t$cpf = $arrLine[1];\n\t\t\t\t \t$name = $arrLine[2];\n\t\t\t\t \t$salary = $arrLine[3];\n\t\t\t\t \t$modelSellers->addSalesman($cpf, $name, $salary);\n\t\t\t }\n\t\t\t elseif($arrLine[0] == '002') {\n\t\t\t \t$cnpj = $arrLine[1];\n\t\t\t \t$name = $arrLine[2];\n\t\t\t \t$business_area = $arrLine[3];\n\n\t\t\t \t$modelConsumers->addConsumer($cnpj, $name, $business_area);\n\t\t\t } elseif($arrLine[0] == '003') {\n\t\t\t \t$id = $arrLine[1];\n\t\t\t \t$items = $arrLine[2];\n\t\t\t \t$salesman_name = $arrLine[3];\n\n\t\t\t \t$modelSales->addSale($id, $salesman_name, $items, $modelSellers->getAll());\n\t\t\t }\n\t\t\t}\n\n\t\t\t$totalConsumers = $totalSellers = $expensivesaleID = 0;\n\t\t\t$worstSellerName = '';\n\n\t\t\t$totalSellers = $modelSellers->getTotalSellers();\n\t\t\tif($totalSellers > 0) {\n\t\t\t\t$arrSellersAmount = $modelSales->getSellersAmount();\n\t\t\t\tforeach($arrSellersAmount as $obj) {\n\t\t\t\t\t$modelSellers->updateTotalSales($obj->name, $obj->total);\n\t\t\t\t}\n\t\t\t\t$worstSellerName = $modelSellers->getWorstSeller()->name;\n\t\t\t\t$expensivesaleID = $modelSales->getMostExpensiveSale()->id;\n\t\t\t}\n\n\t\t\t$totalConsumers = $modelConsumers->getTotalConsumers();\n\t\t\t$reportFilename = basename($filename, '.'.pathinfo($filename, PATHINFO_EXTENSION));\n\t\t\t$this->generateReport($reportFilename, $totalConsumers, $totalSellers, $expensivesaleID, $worstSellerName);\n\t\t}", "function cicleinscription_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {\n return null;\n}", "Public function displayInfo(){ \r\n\t\t\techo \"The info about the dress.\"; \r\n\t\t\techo $this->color; \r\n\t\t\techo $this->fabric ; \r\n\t\t\techo $this->design;\r\n\t\t\techo self::MEDIUM;\r\n\t\t}", "function filmdata(){\r\n\tglobal $pdo;\r\n\tglobal $movie;\r\n\tglobal $movie_id;\r\n\tglobal $favoriettext;\r\n\t\t//ophalen genres\r\n\t$sql = \"SELECT genre_name FROM Movie m JOIN movie_genre g on m.movie_id = g.movie_id where m.movie_id = \".$movie_id.\";\";\r\n\t$genres = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC) or die(print_r($pdo->errorInfo(), true));\r\n\t\t//ophalen directors\r\n\t$sql = \"SELECT p.firstname, p.lastname FROM Movie m JOIN Movie_Director d ON m.movie_id = d.movie_id JOIN Person p ON d.person_id = p.person_id WHERE d.movie_id = \".$movie_id.\" ORDER BY p.firstname ASC;\";\r\n\t$directors = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t//ophalen actors\r\n\t$sql = \"SELECT p.firstname, p.lastname FROM Movie m JOIN Movie_Cast c ON m.movie_id = c.movie_id JOIN Person p ON c.person_id = p.person_id WHERE c.movie_id = \".$movie_id.\" ORDER BY p.firstname ASC;\";\r\n\t$actors = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t//lengte van film in uren berekenen\r\n\t$filmlengte = date('G\\u\\u\\r i\\M\\i\\n', mktime(0,$movie[0]['duration']));\r\n\t\t//cover_image vullen\r\n\tif(!isset($movie[0]['cover_image'])){\r\n\t\t$movie[0]['cover_image'] = \"placeholder.png\";\r\n\t}\r\n\t\t//trailer URL vullen\r\n\tif(!isset($movie[0]['URL'])){\r\n\t\t$movie[0]['URL'] = 'https://www.youtube.com/embed/ponurLICAoM';\r\n\t}\r\n\t\t//genres formatten\r\n\tif($genres){\r\n\t\t$formattedgenres = \"\";\r\n\t\tforeach($genres as $genre){\r\n\t\t\t$formattedgenres = $formattedgenres.implode(\" \", $genre).\", \";\r\n\t\t}\r\n\t\t$formattedgenres = rtrim($formattedgenres, \", \");\r\n\t}\r\n\t\t//directors array formatten\r\n\tif($directors){\r\n\t\t$formatteddirectors = \"\";\r\n\t\tforeach($directors as $director){\r\n\t\t\t$formatteddirectors = $formatteddirectors.implode(\" \", $director).\", \";\r\n\t\t}\r\n\t\t$formatteddirectors = rtrim($formatteddirectors, \", \");\r\n\t}\r\n\t\t//actors array formatten\r\n\tif($actors){\r\n\t\t$formattedactors = \"\";\r\n\t\tforeach($actors as $actor){\r\n\t\t\t$formattedactors = $formattedactors.implode(\" \", $actor).\", \";\r\n\t\t}\r\n\t\t$formattedactors = rtrim($formattedactors, \", \");\r\n\t}\r\n\t\t//printen waardes\r\n\techo '<div class=\"movie-flex\">';\r\n\techo '<h1>'.$movie[0]['title'].'</h1>';\r\n\techo '<h3>('.$movie[0]['publication_year'].')</h3>';\r\n\techo '<br>';\r\n\techo '<form action=\"#\" method=\"post\"><input class=\"button\" id=\"submit\" type=\"submit\" name=\"favoriet\" width=\"20\" height=\"10\" value=\"'.$favoriettext.'\"/></form>';\r\n\techo '</div>';\r\n\techo '<p> '.$filmlengte.' | '.$formattedgenres.' | '.$movie[0]['publication_year'].'</p>';\r\n\techo '<div class=\"movie-flex\">';\r\n\techo '<a href=\"data/image_data/'.$movie[0]['cover_image'].'\"><img src=\"data/image_data/'.$movie[0]['cover_image'].'\" height=\"200\" width=\"150\" alt=\"The Matrix\"></a>';\r\n\techo '<div class=\"movieinformation-flex\">';\r\n\techo '<p id=\"description\">'.$movie[0]['description'].'</p>';\r\n\tif(isset($formatteddirectors)){\r\n\t\techo '<p>Directors: '.$formatteddirectors.'.</p>';\r\n\t}\r\n\tif(isset($formattedactors)){\r\n\t\techo '<p>Actors: '.$formattedactors.'.</p>';\r\n\t}\r\n\techo '<button class=\"button\" style=\"width:100px;height:50px\"><a style=\"text-decoration=none;\" href=\"afspelen.php?movie_id='.$movie_id.'\">Afspelen</a></button>';\r\n\techo '</div>';\r\n\techo '</div>';\r\n\techo '<div id=\"trailer\">';\r\n\techo '<iframe width=\"420\" height=\"315\" src=\"'.$movie[0]['URL'].'\"></iframe>';\r\n\techo '</div>';\r\n}", "protected function renderInformationContent() {}", "public function getsvinfoAction()\n {\n $uid = $this->uid;\n $fid = $this->_request->getParam('fid', null);\n\n $result1 = Hapyfish2_Island_Bll_SuperVisitor::getSuperVisitor($uid, $fid);\n\n // update by hdf add compound visitor\n $result2 = Hapyfish2_Island_Bll_CompoundSuperVisitor::getSuperVisitor($uid, $fid);\n $result['spVisitors'] = array_merge($result1['spVisitors'], $result2['spVisitors']); \n\n $this->echoResult($result);\n }", "function CategoriaDetalle(){\n if (isset($_POST['filtrar']) && (\"ERROR\"!=$_POST['filtrar'])) {\n $categoriaFiltrada = $_POST['filtrar'];\n $servicios = $this->Smodel->GetDetalleServicios($categoriaFiltrada);\n $filtro = $this->Cmodel->getCategorias();\n $this->view->ShowDetalleCategoria($servicios,$filtro);\n }\n else {\n header('Location: '.SERVICIOS);\n }\n }", "public function getCodiceFiscale(){ return $this->codiceFiscale;}", "public function getInfo(){\n $info = \"{$this->_titulo} del director {$this->_director} ,\n duracion {$this->_duracion} minutos. Edad {$this->_edadMin} años<br><br>\";\n\n return $info;\n }", "private function loadFileInfo()\n\t{\n\t\t$this->loadBasicData();\n\t\tswitch ($this->data['mimetypeType']) \n\t\t{\n\n\t\t\tcase 'image':\n\t\t\t\tlist($this->data['width'], $this->data['height']) = getimagesize ( $this->filepath );\n\t\t\t\t$this->data['resolution'] = $this->data['width'].'x'.$this->data['height'];\n\n\t\t\t\tswitch ($this->data['mimetype']) \n\t\t\t\t{\n\t\t\t\t\tcase 'image/jpeg':\n\t\t\t\t\tcase 'image/pjpeg':\n\t\t\t\t\tcase 'image/tiff':\n\t\t\t\t\tcase 'image/x-tiff':\n\n\t\t\t\t\t\t$this->loadExfiData();\n\t\t\t\t\t\t$this->loadIPTCKeywords();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'image/png':\n\t\t\t\t\tcase 'image/jp2':\n\t\t\t\t\tcase 'image/jpx':\n\t\t\t\t\tcase 'image/jpm':\n\t\t\t\t\tcase 'image/mj2':\n\t\t\t\t\t\t$this->loadIPTCKeywords();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t# code...\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\t}", "function informationsMonCompte() {\n $this->vue = new V_Vue(\"../vues/templates/template.inc.php\");\n $this->vue->ecrireDonnee(\"titreVue\",\"Margo : Mon Compte\");\n $this->vue->ecrireDonnee('centre',\"../vues/includes/gestionDeCompte/centreMonCompte.inc.php\");\n \n $this->vue->ecrireDonnee(\"titreSection\",\"Mon Compte: Informations\");\n // Centre : formulaire de connexion\n $this->vue->ecrireDonnee('loginAuthentification',MaSession::get('login')); \n \n // ... depuis la BDD \n $daoPers = new M_DaoPersonne();\n $daoPers->connecter();\n $perso = $daoPers->getOneByLogin(MaSession::get('login'));\n \n $this->vue->ecrireDonnee(\"infoPerso\",$perso);\n \n $this->vue->afficher();\n }", "function ActionDetail ($field, $term) \n{\n \n $dataFromFile = GetListing(\"Data/ActionsList.data\", $field, $term);\n \n // then we cycle through each array in the set and divide its elements into the \n // specific stats for each entry\n \n foreach($dataFromFile as $individualListing)\n {\n list($name, $time, $type, $description) = $individualListing;\n \n // for each entry we create a formatted string using the stats\n \n $actionstring = \"<h3>$name \";\n if ($time != \"\") {$actionstring .= \"($time)</h3>\";}\n if ($type == \"Maneuver\") {$actionstring .= \"<p>($name is a <a href=\\\"Combat.php#ManeuverBonus\\\">special maneuver</a>)</h5>\";}\n if ($description != \"\") {$actionstring .= \"<p>$description</p>\";}\n \n // finally we print each entry and repeat for as many arrays as there are in the set\n \n print $actionstring;\n \n }\n \n}" ]
[ "0.5958908", "0.58537966", "0.58209616", "0.5808039", "0.57933295", "0.5788794", "0.57839847", "0.57832426", "0.5762298", "0.5755125", "0.5736176", "0.5725711", "0.57168305", "0.56965715", "0.5638339", "0.56225854", "0.56210214", "0.5602461", "0.55993605", "0.5585581", "0.5540339", "0.552464", "0.5517598", "0.55014074", "0.5489532", "0.5484742", "0.54714733", "0.5465941", "0.54659384", "0.5459533", "0.54547155", "0.54523665", "0.54428536", "0.54399675", "0.54130846", "0.54097366", "0.54097366", "0.540781", "0.5397951", "0.53963846", "0.53939", "0.5393175", "0.5386971", "0.53672254", "0.53670746", "0.536104", "0.5360314", "0.5357031", "0.53557235", "0.5345925", "0.53289735", "0.53234786", "0.53202385", "0.5313463", "0.5298386", "0.52856404", "0.5284274", "0.52767617", "0.52755517", "0.52661854", "0.5263289", "0.5261818", "0.5251676", "0.5240431", "0.52396667", "0.52396667", "0.52377594", "0.5237201", "0.5231258", "0.52262366", "0.5217616", "0.52168155", "0.52148557", "0.5207742", "0.5204068", "0.5198319", "0.51974416", "0.5197001", "0.5196063", "0.51955366", "0.51910824", "0.5187656", "0.51869404", "0.5183794", "0.5172902", "0.51723427", "0.51704514", "0.51661235", "0.51658076", "0.51630926", "0.5159728", "0.5158886", "0.51567286", "0.51508456", "0.5145925", "0.5140034", "0.5132546", "0.51321304", "0.5130783", "0.5128528", "0.5126706" ]
0.0
-1
Hent detaljer om filen
public function getFil(): Fil { return $this->fil; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function filtes()\n {\n /*\n * The filters fetches are transported\n * to router Bus calls\n **/\n }", "public function show(Filme $filmes)\n {\n //\n }", "public function getIdFil()\n {\n return $this->idFil;\n }", "protected function format_file_fields( $gestores, $ID_PUBLICACION = null, $filter = null ){\n\t\tforeach( $gestores as $g ){\n\t\t\t$this->array_campos_file = $g->campos->where('tipo','file')->lists('nombre');\n\n\t\t\t$query_data = DB::table( 'contenido_'.$g->contenido )->where('activo',1);\n\n\t\t\t// si no es novedad toma solo el contenido del gestor, novedades es global, no filtra por gestor\n\t\t\tif( $filter != 'novedad'){\n\t\t\t\t$query_data = $query_data->where('id_gestor',$g->id);\n\t\t\t}\n\n\t\t\tif( $filter != 'novedad' && ISSET($this->subcategoria) ){\n\t\t\t\t$query_data = $query_data->where('id_subcategoria',$this->subcategoria->id);\n\t\t\t}\n\n\t\t\t$query_data = $query_data->orderBy('orden','asc');\n\n\t\t\tif( $filter == 'novedad' ){\n\t\t\t\t$query_data = $query_data->where('novedad',1);\n\t\t\t}\n\n\t\t\tif( $ID_PUBLICACION ){\n\t\t\t\t$g->data = $query_data->where( 'id', $ID_PUBLICACION )->first();\n\t\t\t}else{\n\t\t\t\t$g->data = $query_data->get();\n\t\t\t}\n\t\t\t\n\t\t\tif( $g->data ){\n\t\t\t\tif( is_Array($g->data) ){\n\t\t\t\t\tforeach( $g->data as $d ){\n\t\t\t\t\t\t$this->format_current( $g, $d );\n\t\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t\t$d->{$this->cutted_text} = Formatear::cortar( $d->{$this->cutted_text}, 140 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->format_current( $g, $g->data );\n\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t$g->{$this->cutted_text} = Formatear::cortar( $g->{$this->cutted_text}, 140 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( is_Array($g->data) ){\n\t\t\t\t$g->data = array_reverse($g->data);\n\t\t\t}\n\t\t}\n\t}", "protected function traerFoto(){\n $foto = Fotoperfil::where('id_user', \\Auth::user()->id )->get();\n return $foto[0]->foto;\n }", "public function show(Filiere $filiere)\n {\n //\n }", "function CategoriaDetalle(){\n if (isset($_POST['filtrar']) && (\"ERROR\"!=$_POST['filtrar'])) {\n $categoriaFiltrada = $_POST['filtrar'];\n $servicios = $this->Smodel->GetDetalleServicios($categoriaFiltrada);\n $filtro = $this->Cmodel->getCategorias();\n $this->view->ShowDetalleCategoria($servicios,$filtro);\n }\n else {\n header('Location: '.SERVICIOS);\n }\n }", "public function getListeFilmsAccueil() {\n try {\n $lesFilms = DB::table('FILM')\n ->Select('NOMIMAGE')\n ->get();\n return $lesFilms;\n } catch (QueryException $e) {\n throw new MonException($e->getMessage());\n }\n }", "public function getListeFilms() {\n try {\n $mesFilms = DB::table('FILM')\n ->Select('NOMIMAGE')\n ->get();\n return $mesFilms;\n } catch (QueryException $e) {\n throw new MonException($e->getMessage());\n }\n }", "private function set_files()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "public function fichas(){\n return $this->hasMany('App\\Ficha', 'id_representante', 'representante_id');\n }", "public function files();", "public function files();", "public function files();", "public function actionFiles($id){\n //zur startseite, wenn id fehlt\n if(!$id)\n\t\t\t$this->redirect(Yii::app()->createAbsoluteUrl(''));\n //tabellen joinen\n\t\t$model = Books::model()->findByPk($id);\n if(!$model)\n\t\t\t$this->redirect(Yii::app()->createAbsoluteUrl(''));\n \n $rating = Comments::model()->findBySql('select SUM(`rating`) as `rating`, count(id) as `count` from comments WHERE ref_id=:id AND rating != 0', array(':id'=>$id));\n \n //genres auslesen und als 1 string schreiben\n $genre = $model->bookgenres;\n $genres = '';\n $genreArray = array();\n foreach($genre as $value){\n $genreArray[] = $value->genreName->genre;\n }\n if($genreArray)\n $genres = implode(\", \", $genreArray);\n else\n $genres = '';\n //buchtyp auslesen\n $type = Booktype::model()->findByPk($model->booktype_id)->type;\n //languages \n $lang = Languanges::model()->findByPk($model->language_id)->language;\n //autor auslesen\n $author = UserData::model()->findByPk($model->author)->name;\n \n //pseudo view counter\n $views = $model->views + 1;\n Books::model()->updateByPk($id, array('views'=> $views));\n\n //comments\n $commentForm = new Comments();\n $commentForm->users_id = Yii::app()->user->id;\n $commentForm->date = Yii::time(time());\n $commentForm->ref_id = $id;\n $commentForm->belongsTo = 0;\n \n $comments = array();\n $commentList = Comments::model()->with('users')->findAllByAttributes(array('ref_id'=>$id),array('order'=>'date desc'));\n foreach($commentList as $comment){\n if($comment->belongsTo == 0)\n $comments[] = $comment;\n }\n\n\t\t//Meta daten fuer Facebookshare\n Yii::app()->clientScript->registerMetaTag($model->description, 'og:description');\n Yii::app()->clientScript->registerMetaTag($model->title, 'og:title');\n Yii::app()->clientScript->registerMetaTag(YII::app()->createAbsoluteUrl('/upload/cover/original/'.((strlen($model->extension)<=5?$model->id.'.':'').$model->extension)), 'og:image');\n \n\t\t$this->render('files',array('model' => $model, 'lang' => $lang, 'genres' => $genres, 'type'=>$type, 'author'=>$author, 'commentForm'=>$commentForm, 'comments'=>$comments,'rating'=>$rating));\n\t}", "private function set_files_by_published()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*.*.*.*.NULL.*.*.*.*.*.*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "public function listarFilosofia(){\n \n //percorrer estantes pelas categorias para eliminar a categ desnecessaria\n foreach ($this->estante as $this->) {\n // code...\n \n if ($this->getCategoria() == \"FILOSOFIA\"){\n echo \"<h2> LIVROS DE FILOSOFIA </h2>\";\n echo \"\";\n //listar todos os livros:\n foreach ($this->livros as $livro){\n $livro->mostrarDados(); \n }\n } else {\n echo \"NENHUM LIVRO DE FILOSOFIA\";\n }\n \n } \n }", "private function set_files_by_draft()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*.*.*.*.draft.*.*.*.*.*.*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "public function filtrar()\n {\n $lin_ped_model = new Lineas_pedidos_Model();\n session_start();\n\n $campo = (isset($_REQUEST['campo'])) ? $_REQUEST['campo'] : \"cod_articulo\";\n $filtro = (isset($_REQUEST['filtro'])) ? $_REQUEST['filtro'] : \"contiene\";\n $texto = (isset($_REQUEST['texto'])) ? $_REQUEST['texto'] : \"%\";\n\n //Le pedimos al modelo todos los Piezas\n $lin_pedidos = $lin_ped_model->filterBy($campo, $filtro, $texto);\n\n //Pasamos a la vista toda la información que se desea representar\n if (isset($_SESSION['cliente'])) {\n $usuario[\"cliente\"] = $_SESSION['cliente'];\n }\n $varVistaFormFiltrar = [\"campo\" => $campo, \"filtro\" => $filtro, \"texto\" => $texto];\n $varVistaListar['articulos'] = $lin_pedidos;\n $usuario[\"usuario\"] = $_SESSION[\"usuario\"];\n //Finalmente presentamos nuestra plantilla\n $this->view->show(\"cabecera.php\");\n $this->view->show(\"plantilla_header.php\", $usuario);\n $this->view->show(RUTA_VISTAS . \"listar_header.php\");\n $this->view->show(RUTA_VISTAS . \"listar_pedido.php\", $varVistaFormFiltrar);\n $this->view->show(RUTA_VISTAS . \"listar.php\", $varVistaListar);\n $this->view->show(\"plantilla_pie.php\");\n $this->view->show(\"pie.php\", $usuario);\n }", "function display(){\n\t\t\t\n\t\t\t// LIMITACIONES GENERALES\n\t\t\t\n\t\t\t\t// Si es galería o file, necesita field, table, linked_field\n\t\t\t\t\n\t\t\t\tif($this->type != 'same'){\n\t\t\t\t\tif(!$this->field\t || \t!$this->linked_field || !$this->table || !$this->linked_field_id){\n\t\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante \"field - linked_field - table\"</p>'; \t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$linked_field = 'data-linked=\"'.$this->linked_field.'\"';\t\n\t\t\t\t\t\t$linked_field_id = 'data-linkedid=\"'.$this->linked_field_id.'\"';\t\t\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t// No se requiere $linked_field\n\t\t\t\t\t$linked_field = '';\n\t\t\t\t\t$linked_field_id = '';\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Si no existe la ruta, se corta el input\n\t\t\t\tif(!$this->path){ \n\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante \"path\"</p>'; \n\t\t\t\t\texit; \n\t\t\t\t}else{\n\t\t\t\t\t//Nos aseguramos que exista diagonal al final\t\t\t\n\t\t\t\t\t$this->path = rtrim($this->path, '/') . '/';\n\t\t\t\t\tif(!is_dir('../../'.$this->path)){\n\t\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - La ruta \"'.$this->path.'\" no existe.</p>'; exit; \t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Si no existe la tabla\n\t\t\t\tif(!$this->table || !$this->field){ \n\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante \"Table o Field\"</p>'; \n\t\t\t\t\texit; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// TIPOS DE ARCHIVO \n\t\t\t\t\t$types_ok = '';\n\t\t\t\t\t// En Galería\n\t\t\t\t\t\t//accept=\".xls,.xlsx\"\n\t\t\t\t\tif($this->type === 'gallery'){\n\t\t\t\t\t\t$types_ok = 'accept=\".jpg,.png,.svg\"';\n\t\t\t\t\t}\n\t\t\t\n\n\t\t\t$output = '';\n\t\t\t\n\t\t\tif(!$this->type){ return $output='<p>No se ha definido el tipo de input_file</p>'; }\t\t\n\t\t\t\t// Limitaciones\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// #1.A) Con CROP: Si se requiere corte CROP y no se tiene el ancho\n\t\t\t\t\tif(!$this->width && $this->crop){ \n\t\t\t\t\t\treturn '<p style=\"font-size:.7em;\"><i style=\"color:#FF0000;\" class=\"icon icon-sudi-warning\"></i> File - Propiedad faltante: \"with\"</p>'; exit; \n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Preparamos los parametros\n\t\t\t\t\n\t\t\t\t\t// #Ancho Final\n\t\t\t\t\t$thisWidth = ($this->width) ? 'data-width=\"'.$this->width.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Alto Final\n\t\t\t\t\t$thisHeight = ($this->height) ? 'data-height=\"'.$this->height.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Ancho maximo\n\t\t\t\t\t$thisMaxWidth = ($this->max_width) ? 'data-allowedwidth=\"'.$this->max_width.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Alto maximo\n\t\t\t\t\t$thisMaxHeight = ($this->max_height) ? 'data-allowedheight=\"'.$this->max_height.'\"' : '';\n\t\t\t\t\t\n\t\t\t\t\t// #Calidad de la imagen\n\t\t\t\t\t$thisQuality = ($this->quality) ? 'data-quality=\"'.$this->quality.'\"' : '' ;\n\t\t\t\t\t\n\t\t\t\t\t// #Recorte\n\t\t\t\t\t$thisCrop = ($this->crop) ? 'data-crop=\"1\"' : 'data-crop=\"0\"';\n\t\t\t\t\n\t\t\t\t\t// #Miniatura\n\t\t\t\t\t$thisThumb = ($this->thumb) ? 'data-thumb=\"1\"' : 'data-thumb=\"0\"';\n\t\t\t\t\t// #Ancho miniatura\n\t\t\t\t\t$thisThumbWith = ($this->thumbWidth) ? 'data-thumbwidht=\"'.$this->thumbWidth.'\"' : '';\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t// EDIT\n\t\t\t\t\t\n\t\t\t\t\tif($this->action == 'edit'){\n\t\t\t\t\t\tif(file_exists('../../'.$this->data) && !is_dir('../../'.$this->data)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$pathInfo = pathinfo($this->data);\n\t\t\t\t\t\t\t\t$file_folder = \t$pathInfo['dirname'];\n\t\t\t\t\t\t\t\t$file_name = $pathInfo['basename'];\n\t\t\t\t\t\t\tif(file_exists('../../'.$file_folder.'/min_'.$file_name)){\n\t\t\t\t\t\t\t\t$file_path = $file_folder.'/min_'.$file_name; \t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$file_path = $this->data;\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$loaded_items = '\n\t\t\t\t\t\t\t<div class=\"loaded_item_row\">\n\t\t\t\t\t\t\t\t<div class=\"loaded_img\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.$file_path.'\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"loaded_file_name\">\n\t\t\t\t\t\t\t\t\t<p>'.substr($file_name,14).'</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"loaded_file_options loaded_edit_file_delete file_delete\"\n\t\t\t\t\t\t\t\t\tdata-file = \"'.substr($file_name,14).'\"\n\t\t\t\t\t\t\t\t\tdata-field = \"'.$this->field.'\"\n\t\t\t\t\t\t\t\t\tdata-table = \"'.$this->table.'\"\n\t\t\t\t\t\t\t\t\tdata-pathfile=\"'.$this->data.'\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"icon icon-sudi-trash\"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<input name=\"'.$this->field.'\" type=\"hidden\" class=\"spryManage\" value=\"'.$this->data.'\">\n\t\t\t\t\t\t\t</div>\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} // if file exits (end)\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$loaded_items = '';\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output .= '\n\t\t\t\t\t<div class=\"upload_container\">\n\t\t\t\t\t\t<div class=\"fileName\"><div class=\"files_container blur_effect\">'.$loaded_items.'</div>\n\t\t\t\t\t\t\t<div class=\"file_loading\">\n\t\t\t\t\t\t\t\t<div class=\"loader_wrapper\"><div class=\"cssload-loader\"></div></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"upload\">\n\t\t\t\t\t\t\t<p class=\"upload_text\"><i class=\"icon icon-sudi-'.$this->icon.'\"></i>'.$this->text.'</p>\n\t\t\t\t\t\t<input type=\"file\" name=\"image_upload\" data-type=\"'.$this->type.'\" '.$thisCrop.' '.$thisThumb.' '.$thisThumbWith.' '.$thisWidth.' '.$thisHeight.' '.$thisMaxWidth.''.$types_ok.''.$thisMaxHeight.' '.$thisQuality.' data-path=\"'.$this->path.'\" data-code=\"'.$this->code.'\" data-field=\"'.$this->field.'\" data-table=\"'.$this->table.'\" '.$linked_field .' '.$linked_field_id.' />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t';\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function tampilkanFileNafil($ids){\n // $filenafil = FileNafil::all();\n $filenafil = FileNafil::where('nafil_id',$ids)->get();\n \n $maxids = FileNafil::select('id')->where('nafil_id', $ids)->orderby('id','desc')->first(); \n $naskahfinal = NaskahFinal::find($ids);\n return view('filenafil.infofilenafil',compact('filenafil','naskahfinal','maxids'));\n }", "protected function format_file_fields_novedades( $gestores ){\n\n\t\tforeach( $gestores as $g ){\n\n\t\t\t$this->array_campos_file = $g->campos->where('tipo','file')->lists('nombre');\n\n\t\t\t$g->data = DB::table( 'contenido_nota' )->where('activo',1)->where('id_gestor',$g->id)->where('novedad',1)->orderBy('orden','asc')->get();\n\t\t\t\n\t\t\t// DUPLICADO. OPTIMIZAR\n\t\t\tif( $g->data ){\n\t\t\t\tif( is_Array($g->data) ){\n\t\t\t\t\tforeach( $g->data as $d ){\n\t\t\t\t\t\t$this->format_current( $g, $d );\n\t\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t\t$d->{$this->cutted_text} = Formatear::cortar( strip_tags($d->{$this->cutted_text}), 140 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->format_current( $g, $g->data );\n\t\t\t\t\tif( ISSET($d->{$this->cutted_text}) ){ // algunos contenidos no tienen \"texto\"\n\t\t\t\t\t\t$g->{$this->cutted_text} = Formatear::cortar( strip_tags($g->{$this->cutted_text}), 140 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$g->data = array_reverse($g->data);\n\t\t}\n\t}", "public function filtrar()\n {\n $Articulos_model = new Articulos_Model();\n session_start();\n\n $campo = (isset($_REQUEST['campo'])) ? $_REQUEST['campo'] : \"cod_articulo\";\n $filtro = (isset($_REQUEST['filtro'])) ? $_REQUEST['filtro'] : \"contiene\";\n $texto = (isset($_REQUEST['texto'])) ? $_REQUEST['texto'] : \"%\";\n\n //Le pedimos al modelo todos los Piezas\n $articulos = $Articulos_model->filterBy($campo, $filtro, $texto);\n\n if (isset($_SESSION['cliente'])) {\n $usuario[\"cliente\"] = $_SESSION['cliente'];\n }\n //Pasamos a la vista toda la información que se desea representar\n $varVistaFormFiltrar = [\"campo\" => $campo, \"filtro\" => $filtro, \"texto\" => $texto];\n $varVistaListar['articulos'] = $articulos;\n $usuario[\"usuario\"] = $_SESSION[\"usuario\"];\n //Finalmente presentamos nuestra plantilla\n $this->view->show(\"cabecera.php\");\n $this->view->show(\"plantilla_header.php\", $usuario);\n $this->view->show(RUTA_VISTAS . \"listar_header.php\");\n $this->view->show(RUTA_VISTAS . \"form_filtrar.php\", $varVistaFormFiltrar);\n $this->view->show(RUTA_VISTAS . \"listar.php\", $varVistaListar);\n $this->view->show(\"plantilla_pie.php\");\n $this->view->show(\"pie.php\", $usuario);\n }", "public function show(Fichier $fichier)\n {\n //\n }", "public function get_files()\n {\n }", "function detailFilm($nom){\n\n $file_db_films = new PDO(\"sqlite:../../../BD/base_de_donnes_FILM.sqlite\");\n $request = $file_db_films->query(\"SELECT * FROM films WHERE titre='$nom'\");\n $c = $request->fetch();\n $heure = substr($c[4], -3, 1);\n $minute = substr($c[4], -2);\n echo \"<ul id='liste'><br>\";\n echo \"<li><h2>$c[1]</h2><br><img src = '../images/films/$c[6]' style = 'width:50%'><br><br>\n <p>Pays : $c[2]</p><p>Date : $c[3]</p><p>Durée : $heure h $minute</p></li><br>\";\n echo \"</ul><br>\";\n $file_db = null;\n }", "public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL B ON B.VIAGEM = A.HANDLE AND B.EHINICIOVIAGEM = 'S'\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL C ON C.VIAGEM = A.HANDLE AND C.EHTERMINOVIAGEM = 'S'\n WHERE A.HANDLE = '$this->handle' \");\n $query->execute();\n $dataSet = $query->fetch(PDO::FETCH_ASSOC);\n\n $this->filialDestino = $dataSet['FILIALDESTINO'];\n $this->filialOrigem = $dataSet['FILIALORIGEM'];\n }", "public function altPerfil()\n {\n $this->Dados = filter_input_array(INPUT_POST, FILTER_DEFAULT);\n if (!empty($this->Dados['EditPerfil']))\n {\n unset($this->Dados['EditPerfil']);\n //var_dump($this->Dados);\n\n $this->Dados['imagem'] = ($_FILES['imagem'] ? $_FILES['imagem'] : null);\n $altPerfilBd = new AdmsEditarPerfil();\n $altPerfilBd->altPerfil($this->Dados);\n if ($altPerfilBd->getResultado()) {\n\n $UrlDestino = URLADM . 'ver-perfil/perfil';\n header(\"Location: $UrlDestino\");\n\n } else {\n\n $this->Dados['form'] = $this->Dados;\n $this->altPerfilPriv();\n\n }\n\n }\n else {\n\n $verPerfil = new AdmsVerPerfil();\n $this->Dados['form'] = $verPerfil->verPerfil();\n $this->altPerfilPriv();\n\n\n }\n\n\n }", "function detailActeur($nom)\n {\n\n $file_db_acteurs_du_film = new PDO(\"sqlite:../../../BD/base_de_donnes_FILM.sqlite\");\n\n $id_film = $file_db_acteurs_du_film->query(\"SELECT code_film FROM films WHERE titre='$nom'\"); //---> sortie The mask : [2]\n\n $donnee = $id_film->fetch();\n\n //echo $donnee[0];\n\n $films = $file_db_acteurs_du_film->query(\"SELECT * FROM films WHERE code_film ='$donnee[0]'\"); // sortie toute les infos sur le film.\n\n $id_acteur = $file_db_acteurs_du_film ->query(\"SELECT * FROM ACTEURDANSFILM NATURAL JOIN acteurs WHERE ref_code_film ='$donnee[0]' and ref_code_acteur=code_indiv\"); // sort les id des acteurs en fonction de l'id du film au dessus.\n\n echo \"<fieldset id = 'blanc'> \";\n echo \"<h3 id='centrer'> -------------------------- ACTEUR(S) --------------------------</h3>\";\n echo \"<ul id='liste'><br>\";\n while($donnee2 = $id_acteur->fetch()){\n echo \"<a href='../Recherche/reponse_acteur.php?nom_recherche=\" . $donnee2['code_indiv'] . \"' ><li><br><br><h2> \" . $donnee2['prenom'] .\" \".$donnee2['nom'].\"</h2><br><img src = '../images/acteurs/\" . $donnee2['image'] .\" ' style = 'width:50%'><br><br></li></a><br>\";\n }\n $id_acteur->closeCursor();\n echo \"</ul><br>\";\n echo \"</fieldset> \";\n $file_db_acteurs_du_film = null;\n}", "function descargar($id) {\n\t\t$documento = $this->TrabajadoresDocumento->findById($id);\n\t\t$archivo['data'] = $documento['TrabajadoresDocumento']['file_data'];\n\t\t$archivo['size'] = $documento['TrabajadoresDocumento']['file_size'];\n\t\t$archivo['type'] = $documento['TrabajadoresDocumento']['file_type'];\n\t\t$archivo['name'] = $this->Util->getFileName(\"conprobante_\" . $documento['TrabajadoresDocumento']['id'], $documento['TrabajadoresDocumento']['file_type']);\n\t\t$this->set(\"archivo\", $archivo);\n\t\tif (!empty($this->params['named']['mostrar']) && $this->params['named']['mostrar'] == true) {\n\t\t\t$this->set(\"mostrar\", true);\n\t\t}\n\t\t$this->render(\"../elements/descargar\", \"descargar\");\n\t}", "public function actionProfieandern()\n {\n $model = $this->findModel(\\Yii::$app->user->getId());\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \n $FotoName = $model->MarterikelNr;\n // die Instance von File zu kriegen\n if($model->file = UploadedFile::getInstance($model,'file')){\n $model->file->saveAs('../../profiefoto/'.$FotoName.'.'.$model->file->extension);\n $model->Profiefoto = '../../profiefoto/'.$FotoName.'.'.$model->file->extension;\n Image::thumbnail($model->Profiefoto, 160, 160)->save($model->Profiefoto , ['quality' => 90]);\n }\n //$model->file->saveAs('../../profiefoto/'.$FotoName.'.'.$model->file->extension);\n //$model->Profiefoto = '../../profiefoto/'.$FotoName.'.'.$model->file->extension;\n $model->save();\n \n return $this->redirect(['view', 'id' => $model->MarterikelNr]);\n } else {\n return $this->render('profieandern', [\n 'model' => $model,\n ]);\n }\n }", "public function file(){\n $multilevel = menuadmin::get_data();\n $index = menuadmin::where('part','file')->first();\n $aktif_menu = menuadmin::aktif_menu($index['id']);\n return view('backend.att.file', compact('multilevel','aktif_menu'));\n }", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "protected function _FILES()\n\t{\n\t\t\n\t}", "function show_list_nominee()\n {\n // $id = $_SESSION['UsEmp_ID'];\n $this->load->model('M_pef_file_present', 'list');\n $data['emp_nominee'] = $this->list->get_nominee()->result();\n\n $this->load->model('M_pef_file_present', 'file');\n $data['emp_file'] = $this->file->get_all()->result();\n\n $this->output('consent/v_add_file_present', $data);\n }", "public function getFactuurFile() {\n\t\treturn $this->factuurFile;\n\t}", "function traiteFichierDMF($t_filename,$t_idno_prefix,$t_list_description,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\tif (!$vn_list_id=getListID($t_list,\"dmf_\".$t_idno_prefix,$t_list_description)) {\n\t\t\tprint \"Impossible de trouver la liste dmf_\".$t_idno_prefix.\" !.\\n\";\n\t\t\tdie();\n\t\t} else {\n\t\t\tprint \"Liste dmf_\".$t_idno_prefix.\" : $vn_list_id\\n\";\n\t\t} \n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=0;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_item_id=getItemID($t_list,$vn_list_id,$vn_list_item_type_concept,$t_idno_prefix.\"_\".($row-$nb_lignes_vides),$libelle,\"\",1,0, $parent_selected, null, $explode_separator_array )) {\n\t\t\t\t\t//if ($VERBOSE) print \"LIST ITEM CREATED : \".$libelle.\"\";\n\t\t\t\t} else {\n\t\t\t\t\tprint \"LIST ITEM CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t\t\t//print $nb_tab_pre.\" \".$nb_tab.\" - parent :\".$parent_selected.\" \".$lexutil;\n\t\t\t\t// si au moins 1 tabulation, conservation de l'item pour l'appeler comme parent\n\t\t\t\t// $vn_item_id=$nb_tab;\n\t\t $parent[$nb_tab]=$vn_item_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "public function fotos($id)\n {\n $maleza = Maleza::find($id);\n $fotos = $maleza->fotos()->get();\n Session::flash(\"id_maleza\",$maleza->id);\n return view(\"admin.maleza_fotos\")->with(\"fotos\",$fotos)->with(\"nombre\",$maleza->nombre_comun);\n }", "function ferme_fichier($id_fichier) {\n\t\t fclose($id_fichier);\n}", "public function getAllFiles()\n {\n }", "public function port_ids() {\n $file = new CmsFile;\n $files = $file->find_all();\n foreach($files as $file) {\n $new = new WildfireFile;\n $s_path = rtrim(str_replace(\"public/\",\"\",strrchr($file->path,\"public/files\")), \"/\" );\n $new_file = $new->filter(\"filename = '{$file->filename}' AND rpath LIKE '%{$s_path}%'\" )->first();\n if($new_file->id) {\n $new_file->oldid = $file->id;\n $new_file->description = $file->caption;\n $new_file->save();\n }\n }\n exit;\n }", "public function verDocumentoPDFSinArchivo($id){\r\n $atr=array();\r\n $sql = \"SELECT \r\n \r\n contentType_visualiza \r\n ,nom_visualiza\r\n ,IDDoc\r\n ,formulario\r\n FROM mos_documentos \r\n WHERE IDDoc = $id \"; \r\n //echo $sql;\r\n $this->operacion($sql, $atr);\r\n return $this->dbl->data[0];\r\n }", "public function files() {\n\t\t$files = $this->ApiFile->fileList($this->path);\n\t\t$this->set('files', $files);\n\t}", "public function showForo( $id)\n {\n $user=Auth::user();\n $count=Tematica::where('fk_id_foro',$id)->count();\n\n if($count!=0)\n {\n\n $frs=DB::table('tbl_tematicas')\n ->where('fk_id_foro','=',$id)\n ->orderBy('created_at')\n ->get();\n\n $perfiles = DB::table('tbl_usuarios')\n ->join('tbl_personas','tbl_usuarios.fk_id_persona','=','tbl_personas.pk_id_persona')\n ->select('tbl_personas.rt_nombre_persona',\n 'tbl_personas.*',\n 'tbl_usuarios.*')\n ->get();\n return view('Foros/crearTematicas')\n ->with('user',$user)->with('frs', $frs)\n ->with('idf',$id)\n ->with('perfiles', $perfiles);\n }else{\n\n return view('Foros/crearTematicas')\n ->with('user',$user)\n ->with('idf',$id);\n }\n\n\n\n\n //return $id;\n\n }", "public function getFiles()\n {\n return $this->hasMany(File::className(), ['fil_fkstatus' => 'sta_id']);\n }", "public function dga($id_foto){\n $group = 'anfitriones';\n if ($this->ion_auth->in_group($group)){\n \n $row = $this->Fotos_model->get_by_id($id_foto);\n if ($row) {\n //ob_clean(); \n $this->load->helper('download');\n $data = file_get_contents(site_url('files/fotos/resized/'.$row->foto)); \n $name = $row->foto; \n force_download($name,$data); \n $this->session->set_flashdata('message', 'Descarga completada');\n } \n }else{\n $this->session->set_flashdata('message', '<h4>No esta autorizado</h4>');\n }\n $this->index();\n }", "public function listFilms(){\n $dbc = $this->connexionBDD();\n $req = $dbc->prepare('SELECT * FROM films');\n $req->execute();\n $films = $req->fetchAll(PDO::FETCH_OBJ);\n return $films;\n }", "public function show($id)\n {\n //\n $categorie = Categorie::find($id);\n\n $fichier_arr = array($categorie) ;\n $fichier_arr[0]['fichier_total'] = $categorie->fichiers->count(); // for your $arr2\n unset($fichier_arr[0]['fichiers']);\n\n //$fichier_arr\n\n //return $categorie;\n return $fichier_arr[0];\n }", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "public function getFilmAleatoire() {\n try {\n $mesFilms = DB::table('FILM')\n ->Select('FILM.IDFILM', 'NOMFILM', 'NOMIMAGE', 'RESUME','DUREE','DATESORTIE','NOMREAL', 'PRENOMREAL','LIBELLEGENRE', 'LIENBA')\n ->join('APPARTIENT', 'APPARTIENT.IDFILM', '=', 'FILM.IDFILM')\n ->join('GENRE', 'GENRE.IDGENRE', '=', 'APPARTIENT.IDGENRE')\n ->join('REALISE', 'REALISE.IDFILM', '=', 'FILM.IDFILM')\n ->join('REALISATEUR', 'REALISATEUR.IDREALISATEUR', '=', 'REALISE.IDREALISATEUR')\n ->inRandomOrder()\n ->first();\n\n return $mesFilms;\n } catch (QueryException $e) {\n throw new MonException($e->getMessage());\n }\n }", "public function makeFileVisible($id){\n\t\t$failas = File::find($id);\n\t\t$failas->visibility = 1;\n\t\t$failas->save();\n\t\treturn redirect()->back();\n\t}", "function checkSavedFiles(){\n\t\t \n\t\t $tableFiles = new TabOut_TableFiles;\n\t\t $baseFileName = $this->tableID;\n\t\t $tableFiles->getAllFileSizes($baseFileName);\n\t\t $this->files = $tableFiles->savedFileSizes;\n\t\t $metadata = $this->metadata;\n\t\t $tableFields = $metadata[\"tableFields\"];\n\t\t unset($metadata[\"tableFields\"]);\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $tableFields; //just for sake of order! :)\n\t\t $this->metadata = $metadata;\n\t\t \n\t }", "public function fileInfo()\n {\n return R::findAll('uploaddetail');\n }", "function cargar($sender, $param)\n {\n if($sender->HasFile) \t \n $carpeta=$this->t1->text;\n $ruta=\"attach/archivo/\".$carpeta.\"/\";//ruta donde se guardan los adjuntos que se han subido \n $this->t2->text=$this->t2->text.\"$ruta$sender->FileName\".\"\\n\";\n $sender->saveAs($ruta.$sender->FileName);\n }", "function rutasFerrys ($id){\r\n $aux = false;\r\n for($j=0; $j<count($this->ferrys($i)) && ($enc==false); $j++){\r\n if ($this->ferry[$i] != null){\r\n if ($this->ferrys[$i]->getId() == $id) {\r\n $islaorigen = count($this->ferrys[$i]->rutasFerryOrigen());\r\n $islafinal = count($this->ferrys[$i]->rutasFerryDestino());\r\n $enc = true;\r\n } \r\n }\r\n }\r\n }", "public function getFiles() {}", "public function accionPerfilArtista(){\n // (si es que hay alguno logueado)\n $sw = false;\n $codRole = 0;\n \n if(Sistema::app()->Acceso()->hayUsuario()){\n $sw = true;\n \n $nick = Sistema::app()->Acceso()->getNick();\n $codRole = Sistema::app()->ACL()->getUsuarioRole($nick);\n \n }\n \n // Si el usuario que intenta acceder es un restaurante, administrador\n // o simplemente no hay usuario validado, lo mando a una página de\n // error. Los artistas tienen el rol 5\n if(!$sw || $codRole != 5){\n Sistema::app()->paginaError(403, \"No tiene permiso para acceder a esta página.\");\n exit();\n }\n \n // Una vez comprobado que está accediendo un artista, procedo a\n // obtener los datos del artista\n $art = new Artistas();\n \n // El nick del usuario es el correo electrónico. Es un valor\n // único, por lo que puedo buscar al artista por\n // su dirección de correo\n if(!$art->buscarPor([\"where\"=>\"correo='$nick'\"])){\n \n Sistema::app()->paginaError(300,\"Ha habido un problema al encontrar tu perfil.\");\n return;\n \n }\n \n $imagenAntigua = $art->imagen;\n $nombre=$art->getNombre();\n \n // Si se modifican los datos del artista, esta variable\n // pasará a true para notificar a la vista\n $artistaModificado = false;\n if (isset($_POST[$nombre]))\n {\n $hayImagen = true;\n // Si ha subido una nueva imagen, recojo su nombre\n if($_FILES[\"nombre\"][\"name\"][\"imagen\"]!=\"\"){\n $_POST[\"nombre\"][\"imagen\"] = $_FILES[\"nombre\"][\"name\"][\"imagen\"];\n }\n else{\n $hayImagen = false;\n $_POST[\"nombre\"][\"imagen\"] = $art->imagen;\n }\n // El coreo es una clave foránea, así que tengo\n // que cambiar el correo en la tabla ACLUsuarios\n Sistema::app()->ACL()->setNick($nick, $_POST[\"nombre\"][\"correo\"]);\n \n $art->setValores($_POST[$nombre]);\n \n if ($art->validar())\n {\n // Si se ha guardado correctamente, actualizo la imagen de perfil\n // e inicio sesión con el nuevo correo automáticamente\n if ($art->guardar()){\n $artistaModificado = true;\n if($hayImagen){\n // Obtengo la carpeta destino de la imagen\n $carpetaDestino = $_SERVER['DOCUMENT_ROOT'].\"/imagenes/artistas/\";\n // Elimino la imagen antigua\n unlink($carpetaDestino.$imagenAntigua);\n \n // Y guardo la nueva\n move_uploaded_file($_FILES['nombre']['tmp_name']['imagen'], $carpetaDestino.$_POST[\"nombre\"][\"imagen\"]);\n }\n Sistema::app()->Acceso()->registrarUsuario(\n $_POST[\"nombre\"][\"correo\"],\n mb_strtolower($art->nombre),\n 0,\n 0,\n [1,1,1,1,1,0,0,0,0,0]);\n }\n \n }\n }\n \n $this->dibujaVista(\"perfilArtista\",\n [\"art\"=>$art, \"artistaModificado\"=>$artistaModificado],\n \"Perfil\");\n \n }", "public function getOldFileOffenders()\n\t{\n\t $this->load->model('cleanup','',FALSE);\n\t $this->load->model('configuration');\n\t $dbList = $this->configuration->getDBList();\n\t foreach($dbList->result() as $db) {\n\t \t//if($db == \"som\") {\n\t \techo \"Starting Old File Detection For: \".$db->friendlyName;\n\t \techo \"<br />\";\n\t \t$this->cleanup->getOldFiles($db->dbGroup,$db->fullpath,$db->fsInodeNumber,$db->friendlyName);\n\t \techo \"<hr /><br />\";\n\t //}\n\t }\n\t //$this->cleanup->sendNotices(\"oldfile\");\n\t}", "public function getFiltradas() {\n return $this->aFiltradas;\n }", "function traiteFichierLieuDMF($t_filename,$t_idno_prefix,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym,$vn_place_other;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tprint \"traitement des lieux\\n\";\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=1;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_place_id=getPlaceID($libelle, $t_idno_prefix.\"_\".($row-$nb_lignes_vides), $vn_place_other, $parent_selected, $explode_separator_array)) {\n\t\t\t\t} else {\n\t\t\t\t\tprint \"PLACE CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t $parent[$nb_tab]=$vn_place_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "public function actionDetalle($id)\n {\n $model= $this->findModel($id);\n //$codfacultad=$model->taller->codfac;\n $searchAlumnos = new VwAlutallerSearch();\n $dataProviderAlumnos = $searchAlumnos->searchByFacultad(\n h::request()->queryParams,$model->taller->codfac);\n return $this->render('consola_psicologo',[\n 'model'=>$model,\n 'dataProvider'=> $dataProviderAlumnos\n ] ); \n \n \n }", "function ficheroamatriz2(){\n chdir($this->directorio);\n //Abrimos el fichero en modo sólo lectura\n $idfich = @fopen($this->fichero, \"r\") or die(\"No existe el fichero $this->fichero\");\n $this->contador = 0;\n while($linea= fgets($idfich,1024)){\n $temp = explode(\"~\",$linea);\n #$this->diccionario[$this->contador] = Array(\"Traduccion\"=>$temp[1],\"Palabra\"=>$temp[2]);\n $this->diccionario[] = Array(\"Palabra\"=>$temp[2],\"Traduccion\"=>$temp[1]);\n $this->contador++;\n }\n fclose($idfich);\n }", "public function rechercher() \n {\n //sécurité\n $action = 'listAllFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $search = $this->request->getPostAttribute('search');\n $dossier = DossierManager::rechercherIdOrName($search);\n $prez = DossierHtml::toHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "public function getFileListV2() {\n $files= scandir(public_path('kiosks'));\n $urlList = $this->readUrls();\n $allowedFileExt = explode(',', env(\"PBS_MIMES\"));\n\n $id = 1;\n $fileList = array();\n // Get Kiosk IDs from parameters\n $kparameters = $this->readKioskParamsIni();\n foreach ($kparameters as $k => $row) { $kioskList[] = $row['id']; }\n\n // Get active files from params files\n $selFiles = $this->readParamFiles($kioskList);\n\n // Build Titles Records\n $titres = array('ID', 'Noms de fichiers');\n $kioskCols = array();\n foreach($kioskList as $key => $kioskID) {\n array_push($titres, $kioskID); \n array_push($kioskCols, $kioskID);\n }\n array_push($titres, 'Delete'); \n\n // Build data records & give selected files \n foreach($files as $key => $value) {\n $row = array();\n $fext = pathinfo($value, PATHINFO_EXTENSION);\n $isSelected = in_array($value, $selFiles) ? \"checked\" : \"\";\n if($value!='.' && $value != '..' && in_array($fext, $allowedFileExt)) {\n $row = array('id' => $id, 'filename' => $value, 'ftype' => 'file', 'selected' => $isSelected);\n foreach($kioskCols as $key => $colID) {\n $row[$colID] = $colID;\n }\n // $row = array_merge($rowHead, $kioskCols);\n $row['action'] = \"actions a faire for $id\";\n $fileList[] = $row;\n $id++;\n }\n }\n\n /**\n * \n */\n foreach($urlList as $key => $value) {\n $isSelected = in_array($value, $selFiles) ? \"checked\" : \"\";\n $row = array('id' => $id, 'filename' => $value, 'ftype' => 'url');\n foreach($kioskCols as $key => $colID) {\n $row[$colID] = $colID;\n }\n $row['action'] = \"actions a faire for $id\";\n $fileList[] = $row;\n $id++;\n }\n \n $retValues = array(\"status\" => \"OK\", \"msg\" => 'OK', \"data\" => $fileList, \"titres\" => $titres, \"kiosksIDS\" => $kioskCols, \"selected\" => $selFiles);\n return response()->json($retValues);\n }", "public function upload_foto_profil_kades()\n {\n $where = $this->input->post('id_kades');\n if ($_FILES != null) {\n $this->aksi_upload_foto_profil_kades($_FILES);\n }\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/detail_data_kades/' . $where);\n }", "public function files()\n {\n if(isset($_GET['img']) || isset($_GET['js']) || isset($_GET['css']) || isset($_GET['pdf'])){\n if(isset($_GET['img'])){\n return $this->filesManager($_GET['img'], false, 'img');\n }\n if(isset($_GET['js'])){\n return $this->filesManager($this->nombreModulo, $_GET['js'], 'js');\n }\n if(isset($_GET['css'])){\n return $this->filesManager($this->nombreModulo, $_GET['css'], 'css');\n }\n if(isset($_GET['pdf'])){\n\n }\n }else{\n exit('Método no disponible');\n\n }\n }", "public function show(Feriado $feriado)\n {\n //\n }", "public function show(Fornecedores $fornecedores)\n {\n //\n }", "public function reescalarPerfil(){\n// $directorio = '/files/fotos_perfil';\n $path = public_path().'/files/actividades/';\n $ficheros = scandir($path);\n// foreach ($ficheros as $file){\n//// $rutaComp = $path.$file;\n// echo $file.'<br>';\n//// $image = new ImageResize($rutaComp);\n//// $image->resizeToWidth(1200);\n//// $image->save($rutaComp);\n// }\n for($i=2;$i<count($ficheros);$i++){\n echo $ficheros[$i].'<br>';\n $rutaComp = $path.$ficheros[$i];\n $image = new ImageResize($rutaComp);\n $image->resizeToWidth(1200);\n $image->save($rutaComp);\n }\n\n }", "function get_file_objs() {\n return $this->file_objs;\n }", "public function verDocumentoFuenteSinArchivo($id){\r\n $atr=array();\r\n $sql = \"SELECT \r\n doc_fisico\r\n ,contentType\r\n ,Codigo_doc\r\n ,nombre_doc\r\n ,version\r\n ,IDDoc\r\n ,formulario\r\n FROM mos_documentos \r\n WHERE IDDoc = $id \"; \r\n //echo $sql;\r\n $this->operacion($sql, $atr);\r\n return $this->dbl->data[0];\r\n }", "function afficheFilms($films,$db){\n\t\t$changeColor = true;\n\n\t\tforeach ($films as $film) {\n\n\t\t/*if($changeColor) $class=\"rouge\";\n\t\telse $class=\"bleu\";\t*/\n\n\t\t\t//opérateur ternaire : si changeColor vaut true alors rouge sinon bleu\n\t\t$class = $changeColor ? \"rouge\" : \"bleu\";\n\n\t\t$changeColor = !$changeColor;\n\t\t\t\n\t\techo '<div class=\"film '.$class.'\">';\n\n\t\t\techo '<div class=\"image\">\n\t\t\t\t\t<img src=\"images/'.$film['films_affiche'].'\" \n\t\t\t\t\ttitle=\"'.$film['films_titre'].'\" \n\t\t\t\t\talt=\"'.$film['films_titre'].'\"/>\n\t\t\t\t </div>';\n\n\n\t\t\techo '<div class=\"contenu\">';\t \n\t\t\t\techo '<h2 class=\"titre\" >'.$film['films_titre'].'</h2><div class=\"annee\">'.$film['films_annee'].'</div>';\n\n\t\t\t\t/*********** GENRES **************/\n\t\t\t\t//récupération des genres pour le film courant grâce à l'identifiant du film\n\t\t\t\t$requete = $db->prepare('SELECT genres_nom FROM genres \n\t\t\t\t\tJOIN films_genres ON fg_genres_id=genres_id WHERE fg_films_id=:id ');\n\t\t\t\t//j'exécute la requête en passant la valeur pour le param :id, et \n\t\t\t\t//ensuite je récupère via le fetchAll() \n\t\t\t\t$requete->execute( array('id' => $film['films_id'] ) );\n\n\t\t\t\t$genres = $requete->fetchAll();\n\t\t\t\t$size = count($genres);\n\t\t\t\techo '<div>';\n\t\t\t\tforeach ($genres as $key=>$genre) {\n\t\t\t\t\techo $genre['genres_nom'];\n\t\t\t\t\tif($key < $size-1){\n\t\t\t\t\t\techo \" | \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '</div>';\n\t\t\t\t//var_dump($genres);\t\t\t\t\t\n\n\t\t\t\t/*********** REALISATEUR ****************/\n\t\t\t\techo '<div> <label>Réalisateur : </label> '\n\t\t\t\t.$film['real_nom'].'</div>';\n\n\t\t\t\t/*********** ACTEURS **************/\n\t\t\t\t$requete = $db->prepare('SELECT acteurs_nom FROM acteurs \n\t\t\t\t\tJOIN films_acteurs ON fa_acteurs_id=acteurs_id WHERE fa_films_id=:poney ');\n\t\t\t\t//j'exécute la requête en passant la valeur pour le param :id, et \n\t\t\t\t//ensuite je récupère via le fetchAll() \n\t\t\t\t$requete->execute( array('poney' => $film['films_id'] ) );\n\n\t\t\t\t$acteurs = $requete->fetchAll();\n\t\t\t\t$size = count($acteurs);\n\t\t\t\techo '<div><label> Acteurs : </label>';\n\t\t\t\tforeach ($acteurs as $key=>$acteur) {\n\t\t\t\t\techo $acteur['acteurs_nom'];\n\t\t\t\t\tif($key < $size-1){\n\t\t\t\t\t\techo \", \";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"...\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '</div>';\n\n\n\t\t\t\t/*********** DUREE **************/\n\t\t\t\t$duree = $film['films_duree'];\n\t\t\t\t$heures = (int) ($duree/60);\n\t\t\t\t$minutes = $duree%60;\n\t\t\t\tif($minutes<10){\n\t\t\t\t\t$minutes = '0'.$minutes;\n\t\t\t\t}\n\t\t\t\techo '<div> <label>Durée : </label>'\n\t\t\t\t\t\t.$heures.'h'.$minutes.\n\t\t\t\t\t'</div>';\n\n\t\t\t\t/*********** RESUME **************/\t\n\t\t\t\techo '<div class=\"resume\">'.$film['films_resume'].'</div>';\n\t\t\techo '</div>';\t\n\n\n\t\techo '</div>';\n\t\t}\n}", "public function getNameFil()\n\t {\n\t return $this->nameFile;\n\t }", "public function getIdadeFilho1() {\n return $this->iIdadeFilho1;\n }", "public function fileInfo() {\n $this->file = file_load($this->fid);\n\n // Creating an array of stream wrappers that will be removed.\n $streams = array();\n foreach (stream_get_wrappers() as $stream) {\n $streams[] = $stream . '://';\n }\n\n // Generate the folder name by the unique URI of the file.\n $file_name = str_replace($streams, '', $this->file->uri);\n $folder_name = str_replace(array('.', '_'), '-', $file_name);\n\n $files_folder = variable_get('file_public_path', conf_path() . '/files');\n\n $this->filePath = $files_folder . '/' . $file_name;\n $this->extractPath = $files_folder . '/' . $folder_name;\n }", "public function fotos()\n {\n return $this->hasMany(foto::class,'fk_id_producto');\n }", "private function _extractFiles() \n\t{\n\t\t$entries = $this->getAllTags('entry');\n\t\t$author = null;\n\t\tforeach($entries as $entry) {\n\t\t\t$file = new SBTFile();\n\t\t\t\n\t\t\tforeach ($entry as $item) {\n\t\t\t\tif ($item['tag'] == 'td:uuid') {\n\t\t\t\t\t$file->setFileId($item['value']);\n\t\t\t\t} else if ($item['tag'] == 'td:label') {\n\t\t\t\t\t$file->setLabel($item['value']);\n\t\t\t\t} else if ($item['tag'] == 'td:selfUrl') {\n\t\t\t\t\t$file->setSelfUrl($item['value']);\n\t\t\t\t} else if ($item['tag'] == 'content') {\n\t\t\t\t\t$file->setDownloadUrl($item['attributes']['src']);\n\t\t\t\t} else if ($item['tag'] == 'td:objectTypeName') {\n\t\t\t\t\t$file->setType($item);\n\t\t\t\t} else if ($item['tag'] == 'category') {\n\t\t\t\t\t$file->setCategory($item);\n\t\t\t\t} else if ($item['tag'] == 'td:totalMediaSize') {\n\t\t\t\t\t$file->setSize($item);\n\t\t\t\t} else if ($item['tag'] == 'link') {\n\t\t\t\t\tif (isset($item['attributes']['rel']) && $item['attributes']['rel'] == 'edit-media') {\n\t\t\t\t\t\t$file->setEditMediaLink($item['attributes']['href']);\n\t\t\t\t\t} else if (isset($item['attributes']['href']) && $item['attributes']['rel'] == 'edit') {\n\t\t\t\t\t\t$file->setEditLink($item['attributes']['href']);\n\t\t\t\t\t} else if (isset($item['attributes']['href']) && $item['attributes']['rel'] == 'thumbnail') {\n\t\t\t\t\t\t$file->setThumbnailUrl($item['attributes']['href']);\n\t\t\t\t\t}\n\t\t\t\t} else if ($item['tag'] == 'author') {\n\t\t\t\t\tif ($item['type'] == 'open') {\n\t\t\t\t\t\t$author = array('tag' => 'author');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$file->setAuthor($author);\n\t\t\t\t\t\t$author = null;\n\t\t\t\t\t}\n\t\t\t\t} else if ($author != null) {\n\t\t\t\t\tif ($item['tag'] == 'name') {\n\t\t\t\t\t\t$author['name'] = $item['value'];\n\t\t\t\t\t} else if ($item['tag'] == 'snx:userid') {\n\t\t\t\t\t\t$author['userid'] = $item['value'];\n\t\t\t\t\t} else if ($item['tag'] == 'snx:orgId') {\n\t\t\t\t\t\t$author['orgId'] = $item['value'];\n\t\t\t\t\t} else if ($item['tag'] == 'snx:orgName') {\n\t\t\t\t\t\t$author['orgName'] = $item['value'];\n\t\t\t\t\t} else if ($item['tag'] == 'snx:userState') {\n\t\t\t\t\t\t$author['userState'] = $item['value'];\n\t\t\t\t\t}\n\t\t\t\t} else if ($item['tag'] == 'title') {\n\t\t\t\t\t$file->setTitle($item['value']);\n\t\t\t\t} \n\t\t\t}\n\t\t\tarray_push($this->files, $file);\n\t\t}\n\t}", "public function hapusFoto($id)\n\t{\n\t\t$guru_id = array(\n\t\t\t'guru_id' => $id,\n\t\t);\n\t\t$x = $this->primary_model->getDataBy('tb_guru',$guru_id);\n\t\tforeach($x as $m)\n\t\t{\n\t\t\t$foto=$m->foto;\n\t\t}\n\t\t$dir =\"data/guru/photo/\".$foto;\n\t\tunlink($dir);\n\t\t$data=array('foto' => '');\n\t\t$this->primary_model->updateData('guru_id',$id,'tb_guru',$data);\n\t\t$this->session->set_flashdata('msgFoto','Foto berhasil di hapus');\n\t\tredirect('guru/data_guru/'.$id);\n\t\t\n\t}", "public function getFileList() {\n\n try {\n\n // get user id\n $userId = $this->session->get(\"userId\");\n\n //used to modify the files array\n $index = 0;\n\n // looking for user´s files\n $files =$this->modelsManager->createBuilder()\n ->columns([\"name\" => \"Files.name\", \"extension\" => \"Files.extension\", \"version\" => \"Files.version\", \"date\" => \"Files.date\"])\n ->from(['TagsFiles'=>'App\\Models\\TagsFiles'])\n ->leftJoin('App\\Models\\Files', 'TagsFiles.file_id = Files.id', 'Files')\n ->leftJoin('App\\Models\\Tags', 'TagsFiles.tag_id = Tags.id', 'Tags')\n ->where('Files.userId = ?1', [1 => $userId] )\n ->getQuery()\n ->execute();\n\n // change resultset to array\n $files->setHydrateMode(\n Resultset::HYDRATE_ARRAYS\n );\n\n // looking for user´ tagId´s so he can finds the client\n $tagIds =$this->modelsManager->createBuilder()\n ->columns([\"tagId\" => \"Tags.id\"])\n ->from(['TagsFiles'=>'App\\Models\\TagsFiles'])\n ->leftJoin('App\\Models\\Files', 'TagsFiles.file_id = Files.id', 'Files')\n ->leftJoin('App\\Models\\Tags', 'TagsFiles.tag_id = Tags.id', 'Tags')\n ->where('Files.userId = ?1', [1 => $userId] )\n ->getQuery()\n ->execute();\n $tagIds->toArray();\n\n // use tagId to find the correct client\n foreach ($tagIds as $tagId) {\n $count = 0;\n\n $tag = ClientsTags::findFirst(\n [\n \"tag_id = :tag:\",\n \"bind\" => [\"tag\" => $tagId['tagId']],\n ]);\n\n $clients = $tag->client;\n\n // modify the files array and add the clientName\n foreach ($files as $file){\n if ($index == $count) {\n $result[] = array(\"no\" => $index+1) + array_slice($file, 0, 5, true) +\n array(\"clientName\" => $clients->name); //+\n // array_slice($file, 3, count($file) - 1, true);\n }\n $count++;\n }\n $index++;\n }\n\n if (!$result) {\n return [];\n }\n\n return $result;\n\n } catch (\\PDOException $e) {\n if ($e->getCode() == 12004) {\n throw new ServiceException('Cannot find files', self::ERROR_UNABLE_TO_FIND_FILES);\n } else {\n throw new ServiceException($e->getMessage(). $e->getCode(), $e); }\n }catch (\\Exception $e){\n $this->response->setStatusCode(500, 'Internal Server Error');\n }\n }", "public function actionhacereporte($id,$idfiltrodocu,$file=0){\n\t\t$this->layout=\"\";\n\t\t$id=MiFactoria::cleanInput((int)$id);\n\t\t$idfiltrodocu=MiFactoria::cleanInput((int)$idfiltrodocu);\n\t\t$modelo=$this->loadModel($id);\n\t\t$nombremodelo=$modelo->modelo;\n\t\t///////////////////////////////////////////////////////\n\t\t///sancao el numero de paginas\n\t\t$criterio=New CDbCriteria;\n\t\t$criterio->addCondition($modelo->campofiltro.\"=:vidifiltrodocu\");\n\t\t$criterio->params=ARRAY(\":vidifiltrodocu\"=>$idfiltrodocu);\n\t\t$proveedordatos=new Miproveedor($nombremodelo,array('pagination' => false,\"criteria\"=>$criterio));\n $filasdatos=$proveedordatos->getdata();\n\t\t$filamuestracabecera=$filasdatos[0]; ///una fila de datos para la cabcerea\n\t\t$registrostotales=count($filasdatos);\n\t\t$numeropaginas=ceil($registrostotales/$modelo->registrosporpagina);\n\t\t//$numeropaginas=3;\n\t\t$proveedorestilo=$modelo->hijos;\n\t\t$proveedordatos->camposasumar=Coordreporte::totalizables($id);\n\t\t$mpdf=Yii::app()->ePdf->mpdf(\n\t\t\t'',trim($modelo->tamanopapel));\n\t\tif(!is_null($modelo->estilo)) {\n\t\t\t$hojaestilo = file_get_contents ( $this->rutaestilos . DIRECTORY_SEPARATOR . $modelo->estilo );\n\t\t\t//$hojaestilo=file_get_contents('themes/abound/css'.DIRECTORY_SEPARATOR.'estilovale.css');\n\t\t\t$mpdf->WriteHTML ( $hojaestilo , 1 );\n\t\t}\n\t\t$mpdf->pagenumPrefix = 'Página ';\n\t\t$mpdf->pagenumSuffix = ' ';\n\t\t$mpdf->nbpgPrefix = ' de ';\n\t\t$mpdf->nbpgSuffix = '';\n\t\tif($modelo->tienepie=='1')\n\t\t$mpdf->SetFooter('Usuario : '.yii::app()->user->um->loadUserById(yii::app()->user->id)->username.'|'.date(\"d-m-Y H : i : s\").'|{PAGENO}{nbpg}');\n\t\t$mpdf->SetDisplayMode('fullpage');\n /*echo var_dump($proveedordatos);\n\t\tyii::app()->end();*/\n\t//\t$arraycamposasumar=array('subto','cant');\n\t\t$amontobase=array();\n\t\t/*foreach($arraycamposasumar as $mclave => $mvalor){\n\t\t\t$amontobase[$mvalor]=0;\n\t\t}*/\n /*echo $this->cabecera($filamuestracabecera,$proveedorestilo,$modelo);\n\t\tyii::app()->end();*/\n$cadena=\"\";\n\t\t for($i = 1; $i <= $numeropaginas; $i++)\n\t\t {\n\n\t\t\t $criterioporpagina=New CDbCriteria;\n\t\t\t // $criterioporpagina->addCondition($modelo->campofiltro.\"=:vidifiltrodocu \");\n\t\t\t $criterioporpagina->addCondition($modelo->campofiltro.\"= \".$idfiltrodocu);\n\t\t\t //var_dump(Estado::estadosnocalculables($modelo->codocu));yii::app()->end();\n\t\t\t $criterioporpagina->addNotInCondition($modelo->campoestado,Estado:: estadosnocalculablesdetalle($modelo->codocu));\n\t\t\t // $criterioporpagina->params=ARRAY(\":vidifiltrodocu\"=>$idfiltrodocu);\n\t\t\t $criterioporpagina->limit=$modelo->registrosporpagina;\n\t\t\t $criterioporpagina->offset=$modelo->registrosporpagina*($i-1);\n\t\t\t $proveedorporpagina=new Miproveedor($nombremodelo,array('pagination' => false,\"criteria\"=>$criterioporpagina));\n\t\t\t $proveedorporpagina->camposasumar=Coordreporte::totalizables($id);\n $amontoagregado= $proveedorporpagina->Total();\n\t\t\t \t$cadena=$this->renderpartial('reporte',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'columnas' =>$this->makeColumnas($proveedorestilo,$amontobase,$amontoagregado,$id),\n\t\t\t\t\t\t'cadenacabecera'=>$this->cabecera($filamuestracabecera,$proveedorestilo,$modelo),\n\t\t\t\t\t\t'proveedordatos'=>$proveedorporpagina,\n\t\t\t\t\t\t'modelo'=>$modelo,\n\t\t\t\t\t),TRUE,\ttrue);\n\n\t\t\t $amontobase=$this->sumaarray($amontobase,$amontoagregado);\n\t\t\t if($i==$numeropaginas and $modelo->comercial=='1'){ //Si es la utima pag y ademas es doc comercial\n\n\t\t\t\t if($numeropaginas==1){\n\t\t\t\t\t $grantotal=$amontobase[$modelo->campototal];\n\t\t\t\t }else {\n\t\t\t\t\t $grantotal=$amontobase[$modelo->campototal]+$amontoagregado[$modelo->campototal];\n\t\t\t\t }\n\t\t\t\t\t $cadena.=$this->colocaimpuestos($modelo->codocu,$idfiltrodocu,$modelo->xresumen,$modelo->yresumen,$grantotal);\n\t\t\t }\n\n\t\t\t $mpdf->WriteHTML($cadena,2);\n\t\t\t if($i<$numeropaginas)\n\t\t\t $mpdf->AddPage();\n\n\t\t }\n\n\n\n //echo $cadena;\n\t\tif(Yii::app()->settings->get('documentos', 'documentos_selloagua')=='1') {\n\t\t\t\t\t$mpdf->SetWatermarkImage(yii::app()->getBaseUrl(false).Yii::app()->settings->get('documentos', 'documentos_archivo_sello_agua').DIRECTORY_SEPARATOR.'NOAPROBADO.JPG');\n\t\t\t$mpdf->showWatermarkImage = true;\n\t\t}\n\n\n\n\n\n\t\t//if($file==1){\n\t\t\t$ruta='assets/'.$modelo->codocu.$idfiltrodocu.'_'.yii::app()->user->id.'.pdf';\n\t\t\t$mpdf->Output($ruta,'F');\n\n\t\t\t$this->render('pdf',array('ruta'=>yii::app()->getBaseUrl(false).DIRECTORY_SEPARATOR.$ruta));\n\t\t//}else{\n\t\t//\t$mpdf->Output();\n\t\t//}\n\n\t\t//////////////////////////////////////////\n\n\t\t//sacando el dataprovider\n\t\t/*\n\t\t$criterio=New CDbCriteria;\n\t\t$criterio->addCondition($modelo->campofiltro.\"=:vidifiltrodocu\");\n\t\t$criterio->params=ARRAY(\":vidifiltrodocu\"=>$idfiltrodocu);\n $proveedordatos=new Miproveedor($nombremodelo,\n\t\t\t array(\"criteria\"=>$criterio,\n\t\t\t \t\t\t\t 'pagination' => array(\n\t\t\t \t\t\t\t\t\t\t\t\t'pageSize' => 100,\n\t\t \t\t\t\t\t\t\t\t\t\t),\n\t\t\t ));\n\t\t$proveedordatos->camposasumar=array('preciounit','cant');\n $filasdatos=$proveedordatos->getData();\n\t\t$filamuestracabecera=$filasdatos[0]; ///una fila de datos para la cabcerea\n\t\t$proveedorestilo=$modelo->hijos;\n\t\t$cadena=$this->renderpartial('reporte',\n\t\t\t array(//'proveedor'=>$proveedordatos,\n\t\t\t\t\t\t 'columnas' =>$this->makeColumnas($proveedorestilo,$proveedordatos),\n\t\t\t\t\t\t 'cadenacabecera'=>$this->cabecera($filamuestracabecera,$proveedorestilo),\n\t\t\t 'proveedordatos'=>$proveedordatos,\n\t\t\t\t\t\t 'modelo'=>$modelo,\n\t\t\t\t\t\t ),\n\t\t\t TRUE,\n\t\t\t true);\n\n\t\t$mpdf=Yii::app()->ePdf->mpdf(\n\t\t\t'',trim($modelo->tamanopapel));\n\t\t$hojaestilo=file_get_contents('themes/abound/css'.DIRECTORY_SEPARATOR.'estilooc.css');\n\t\t$mpdf->WriteHTML($hojaestilo,1);\n\t\t$mpdf->pagenumPrefix = 'Página ';\n\t\t$mpdf->pagenumSuffix = ' ';\n\t\t$mpdf->nbpgPrefix = ' de ';\n\t\t$mpdf->nbpgSuffix = '';\n\t\t$mpdf->SetFooter('{PAGENO}{nbpg}');\n\t\t$mpdf->SetDisplayMode('fullpage');\n\t\t$mpdf->WriteHTML($cadena,2);\n\t\t$mpdf->Output();\n */\n\t}", "function gestfiles($values, $oldvalues = null)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = realpath($this->path);\n //dprint_r($_FILES);\n $newvalues = $values;\n //----gestione campi d tipo FILES o IMAGE\n $unirecid = $newvalues[$this->primarykey];\n foreach ( $newvalues as $key=>$value )\n {\n $type = isset($this->fields[$key]) ? $this->fields[$key] : null;\n if ( isset($type->type) && ($type->type == 'file' || $type->type == 'image') )\n {\n //dprint_r($values);\n //cancello i vecchi record se esiste il nuovo\n if ( isset($_FILES[$key]['tmp_name']) && $_FILES[$key]['tmp_name'] != \"\" && $oldvalues != null && isset($values[$key]) ) // se è un aggiornamento\n {\n $oldfileimage = isset($values[$this->primarykey]) ? \"$path/$databasename/$tablename/\" . $values[$this->primarykey] . \"/\" . $key . \"/\" . $oldvalues[$key] : \"\";\n $oldfilethumb = isset($values[$this->primarykey]) ? \"$path/$databasename/$tablename/\" . $values[$this->primarykey] . \"/\" . $key . \"/thumbs/\" . $oldvalues[$key] . \".jpg\" : \"\";\n if ( $oldvalues[$key] != \"\" && file_exists($oldfilethumb) )\n {\n unlink($oldfilethumb);\n }\n if ( $oldvalues[$key] != \"\" && file_exists($oldfileimage) )\n {\n unlink($oldfileimage);\n\n if ( !file_exists(\"$path/$databasename/$tablename/$unirecid/$key\") && $unirecid != \"\" && $key != \"\" && $databasename != \"\" )\n {\n //remove_dir_rec(\"$path/$databasename/$tablename/$unirecid/$key/\");\n }\n }\n }\n // cancellazione di un record\n if ( isset($_POST[\"__isnull__$key\"]) && $_POST[\"__isnull__$key\"] == \"null\" )\n {\n $oldfileimage = isset($values[$this->primarykey]) ? \"$path/$databasename/$tablename/\" . $values[$this->primarykey] . \"/\" . $key . \"/\" . $oldvalues[$key] : \"\";\n $oldfilethumb = isset($values[$this->primarykey]) ? \"$path/$databasename/$tablename/\" . $values[$this->primarykey] . \"/\" . $key . \"/thumbs/\" . $oldvalues[$key] . \".jpg\" : \"\";\n if ( $oldvalues[$key] != \"\" && file_exists($oldfilethumb) )\n {\n unlink($oldfilethumb);\n rmdir(dirname($oldfilethumb));\n }\n if ( $oldvalues[$key] != \"\" && file_exists($oldfileimage) )\n {\n unlink($oldfileimage);\n rmdir(dirname($oldfileimage));\n }\n }\n\n if ( isset($_FILES[$key]['tmp_name']) && $_FILES[$key]['tmp_name'] != \"\" )\n {\n if ( preg_match('/.php/is',$_FILES[\"$key\"]['name']) || preg_match('/.php3/is',$_FILES[\"$key\"]['name']) || preg_match('/.php4/is',$_FILES[\"$key\"]['name']) || preg_match('/.php5/is',$_FILES[\"$key\"]['name']) || preg_match('/.phtml/is',$_FILES[\"$key\"]['name']) )\n {\n touch(\"$path/$databasename/$tablename/$unirecid/$key/\" . $_FILES[\"$key\"]['name']);\n }\n else\n {\n if ( !file_exists(\"$path/$databasename/$tablename/$unirecid\") )\n mkdir(\"$path/$databasename/$tablename/$unirecid\");\n if ( !file_exists(\"$path/$databasename/$tablename/$unirecid/$key\") )\n mkdir(\"$path/$databasename/$tablename/$unirecid/$key\");\n if ( !move_uploaded_file(realpath($_FILES[$key]['tmp_name']),\"$path/$databasename/$tablename/$unirecid/$key/\" . $_FILES[\"$key\"]['name']) )\n copy(realpath($_FILES[$key]['tmp_name']),\"$path/$databasename/$tablename/$unirecid/$key/\" . $_FILES[\"$key\"]['name']);\n //dprint_r($path);\n //dprint_r(realpath($path));\n //dprint_r(realpath(\"$path/$databasename/$tablename/$unirecid/$key/\"));\n\n\n $create_thumb[$key] = true;\n }\n }\n }\n }\n\n //---------------- creazione anteprime per le immagini ----------------------\n foreach ( $this->fields as $field )\n {\n switch ($field->type)\n {\n case \"image\" :\n if ( isset($values[$field->name]) && $values[$field->name] != \"\" ) // se il cmpo è stato aggiornato\n {\n $fileimage = isset($values[$this->primarykey]) ? \"$path/$databasename/$tablename/\" . $values[$this->primarykey] . \"/\" . $field->name . \"/\" . $values[$field->name] : \"\";\n $filethumb = isset($values[$this->primarykey]) ? \"$path/$databasename/$tablename/\" . $values[$this->primarykey] . \"/\" . $field->name . \"/thumbs/\" . $values[$field->name] . \".jpg\" : false;\n\n if ( file_exists($fileimage) && (isset($create_thumb[$key]) || ($filethumb && !file_exists($filethumb))) )\n {\n $size = isset($field->thumbsize) ? $field->thumbsize : 22;\n $size_w = isset($field->thumbsize_w) ? $field->thumbsize_w : \"\";\n $size_h = isset($field->thumbsize_h) ? $field->thumbsize_h : \"\";\n if ( $size < 16 )\n $size = 16;\n xmldb_create_thumb($fileimage,$size,$size_h,$size_w);\n\n }\n }\n break;\n }\n }\n\n }", "function filmdata(){\r\n\tglobal $pdo;\r\n\tglobal $movie;\r\n\tglobal $movie_id;\r\n\tglobal $favoriettext;\r\n\t\t//ophalen genres\r\n\t$sql = \"SELECT genre_name FROM Movie m JOIN movie_genre g on m.movie_id = g.movie_id where m.movie_id = \".$movie_id.\";\";\r\n\t$genres = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC) or die(print_r($pdo->errorInfo(), true));\r\n\t\t//ophalen directors\r\n\t$sql = \"SELECT p.firstname, p.lastname FROM Movie m JOIN Movie_Director d ON m.movie_id = d.movie_id JOIN Person p ON d.person_id = p.person_id WHERE d.movie_id = \".$movie_id.\" ORDER BY p.firstname ASC;\";\r\n\t$directors = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t//ophalen actors\r\n\t$sql = \"SELECT p.firstname, p.lastname FROM Movie m JOIN Movie_Cast c ON m.movie_id = c.movie_id JOIN Person p ON c.person_id = p.person_id WHERE c.movie_id = \".$movie_id.\" ORDER BY p.firstname ASC;\";\r\n\t$actors = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t//lengte van film in uren berekenen\r\n\t$filmlengte = date('G\\u\\u\\r i\\M\\i\\n', mktime(0,$movie[0]['duration']));\r\n\t\t//cover_image vullen\r\n\tif(!isset($movie[0]['cover_image'])){\r\n\t\t$movie[0]['cover_image'] = \"placeholder.png\";\r\n\t}\r\n\t\t//trailer URL vullen\r\n\tif(!isset($movie[0]['URL'])){\r\n\t\t$movie[0]['URL'] = 'https://www.youtube.com/embed/ponurLICAoM';\r\n\t}\r\n\t\t//genres formatten\r\n\tif($genres){\r\n\t\t$formattedgenres = \"\";\r\n\t\tforeach($genres as $genre){\r\n\t\t\t$formattedgenres = $formattedgenres.implode(\" \", $genre).\", \";\r\n\t\t}\r\n\t\t$formattedgenres = rtrim($formattedgenres, \", \");\r\n\t}\r\n\t\t//directors array formatten\r\n\tif($directors){\r\n\t\t$formatteddirectors = \"\";\r\n\t\tforeach($directors as $director){\r\n\t\t\t$formatteddirectors = $formatteddirectors.implode(\" \", $director).\", \";\r\n\t\t}\r\n\t\t$formatteddirectors = rtrim($formatteddirectors, \", \");\r\n\t}\r\n\t\t//actors array formatten\r\n\tif($actors){\r\n\t\t$formattedactors = \"\";\r\n\t\tforeach($actors as $actor){\r\n\t\t\t$formattedactors = $formattedactors.implode(\" \", $actor).\", \";\r\n\t\t}\r\n\t\t$formattedactors = rtrim($formattedactors, \", \");\r\n\t}\r\n\t\t//printen waardes\r\n\techo '<div class=\"movie-flex\">';\r\n\techo '<h1>'.$movie[0]['title'].'</h1>';\r\n\techo '<h3>('.$movie[0]['publication_year'].')</h3>';\r\n\techo '<br>';\r\n\techo '<form action=\"#\" method=\"post\"><input class=\"button\" id=\"submit\" type=\"submit\" name=\"favoriet\" width=\"20\" height=\"10\" value=\"'.$favoriettext.'\"/></form>';\r\n\techo '</div>';\r\n\techo '<p> '.$filmlengte.' | '.$formattedgenres.' | '.$movie[0]['publication_year'].'</p>';\r\n\techo '<div class=\"movie-flex\">';\r\n\techo '<a href=\"data/image_data/'.$movie[0]['cover_image'].'\"><img src=\"data/image_data/'.$movie[0]['cover_image'].'\" height=\"200\" width=\"150\" alt=\"The Matrix\"></a>';\r\n\techo '<div class=\"movieinformation-flex\">';\r\n\techo '<p id=\"description\">'.$movie[0]['description'].'</p>';\r\n\tif(isset($formatteddirectors)){\r\n\t\techo '<p>Directors: '.$formatteddirectors.'.</p>';\r\n\t}\r\n\tif(isset($formattedactors)){\r\n\t\techo '<p>Actors: '.$formattedactors.'.</p>';\r\n\t}\r\n\techo '<button class=\"button\" style=\"width:100px;height:50px\"><a style=\"text-decoration=none;\" href=\"afspelen.php?movie_id='.$movie_id.'\">Afspelen</a></button>';\r\n\techo '</div>';\r\n\techo '</div>';\r\n\techo '<div id=\"trailer\">';\r\n\techo '<iframe width=\"420\" height=\"315\" src=\"'.$movie[0]['URL'].'\"></iframe>';\r\n\techo '</div>';\r\n}", "public function index()\n {\n return Filmes::all();\n }", "public function postCargarInformacion(){\n\t\t$fecha = date(\"Y-d-m H:i:s\");\n\t\t$registro = DB::SELECT(\"SELECT ident_current('MODBID_INFORMACIONPUBLIC') AS [LastID_1]\");\t\t\n\t\t$id_foto = (($registro[0]->LastID_1)+1).\".jpg\";\n\t\t\t\t\n\t\tDB::table('MODBID_INFORMACIONPUBLIC')->insert(\n\t\t \tarray(\n\t\t \t\t'id_usuario' => Auth::user()->id,\t\t \t\t\n\t\t \t\t'titulo' => Input::get('titulo'),\n\t\t \t\t'foto' => $id_foto,\n\t\t \t\t'tipo' => Input::get('tipo'),\n\t\t \t\t'texto' => Input::get('texto'),\t\t\t \t\t\n\t\t \t\t'created_at' => $fecha,\n\t \t\t\t'updated_at' => $fecha,\n\t \t\t\t'fecha_noticia' => Input::get('fecha_info')\n\n\t\t \t)\n\t\t);\n\n\t\t$path_foto = public_path().'/assets/bid/informacion/'.(($registro[0]->LastID_1)+1).\"/\";\n\t\tInput::file('foto')->move($path_foto,$id_foto);\n\t\treturn Redirect::to('vista1_bid')->with('status', 'ok_estatus');\n\t}", "public function show($id)\n {\n $data = Formulir::find($id);\n if($data == null){\n return redirect()->back();\n }\n $filename = $data->file;\n $file_path = base_path() .'/public/formulir/'. $filename;\n if (file_exists($file_path))\n {\n return Response::download($file_path, $filename, [\n 'Content-Length: '. filesize($file_path)\n ]);\n }\n else\n {\n return redirect()->back()->with('error', 'File tidak ditemukan');\n }\n }", "function edit_file_nominee()\n {\n $pefs_file = $_FILES['fil']['tmp_name'];\n $fil_name = $_FILES['fil']['name'];\n $Emp_ID = $this->input->post(\"Emp_ID\");\n\n $this->load->model('Da_pef_file_present', 'pef');\n $this->pef->fil_location = $Emp_ID . \"_\" . $fil_name;\n $this->pef->fil_emp_id = $Emp_ID;\n\n $this->pef->update_file(); // update file to table pef_file\n copy($pefs_file, 'upload/' . $Emp_ID . \"_\" . $fil_name); // add file to floder upload\n $this->show_list_nominee();\n }", "public function getFiles ();", "public function export_addFilesFromRelations() {}", "public function upload_foto_kk_rt()\n {\n $where_rt = $this->input->post('id_rt');\n $where = $this->input->post('id_warga');\n if ($_FILES != null) {\n $this->aksi_upload_foto_kk($_FILES);\n }\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/detail_data_rt/' . $where_rt);\n }", "public function getSpecificFileList( array $data) {\n\n try {\n\n // get user id\n $userId = $this->session->get(\"userId\");\n\n //used to modify the files array\n $index = 0;\n\n // find tag in database\n if (array_keys($data)[0] == 'tag') {\n\n $tag = Tags::findFirst(\n [\n \"name = :tag:\",\n \"bind\" => [\"tag\" => $data[array_keys($data)[0]]],\n ]);\n\n\n // looking for user´s files\n $files =$this->modelsManager->createBuilder()\n ->columns([\"name\" => \"Files.name\", \"extension\" => \"Files.extension\", \"version\" => \"Files.version\", \"date\" => \"Files.date\"])\n ->from(['TagsFiles'=>'App\\Models\\TagsFiles'])\n ->leftJoin('App\\Models\\Files', 'TagsFiles.file_id = Files.id', 'Files')\n ->leftJoin('App\\Models\\Tags', 'TagsFiles.tag_id = Tags.id', 'Tags')\n ->where('Files.userId = ?1 AND Tags.id = ?2',\n [1 => $userId,\n 2 => $tag->id\n ])\n ->getQuery()\n ->execute();\n\n // change resultset to array\n $files->setHydrateMode(\n Resultset::HYDRATE_ARRAYS\n );\n\n $tagIds =$this->modelsManager->createBuilder()\n ->columns([\"tagId\" => \"Tags.id\"])\n ->from(['TagsFiles'=>'App\\Models\\TagsFiles'])\n ->leftJoin('App\\Models\\Files', 'TagsFiles.file_id = Files.id', 'Files')\n ->leftJoin('App\\Models\\Tags', 'TagsFiles.tag_id = Tags.id', 'Tags')\n ->where('Files.userId = ?1 AND Tags.name = ?2',\n [1 => $userId,\n 2 => $data[array_keys($data)[0]]\n ])\n ->getQuery()\n ->execute();\n $tagIds->toArray();\n\n }else{\n\n // looking for user´s files\n $files =$this->modelsManager->createBuilder()\n ->columns([\"name\" => \"Files.name\", \"extension\" => \"Files.extension\", \"version\" => \"Files.version\", \"date\" => \"Files.date\"])\n ->from(['TagsFiles'=>'App\\Models\\TagsFiles'])\n ->leftJoin('App\\Models\\Files', 'TagsFiles.file_id = Files.id', 'Files')\n ->leftJoin('App\\Models\\Tags', 'TagsFiles.tag_id = Tags.id', 'Tags')\n ->where('Files.userId = ?1 AND Files.'.array_keys($data)[0].' = ?2',\n [1 => $userId,\n 2 => $data[array_keys($data)[0]]\n ])\n ->getQuery()\n ->execute();\n\n\n // change resultset to array\n $files->setHydrateMode(\n Resultset::HYDRATE_ARRAYS\n );\n\n // looking for user´ tagId´s so he can finds the client\n $tagIds =$this->modelsManager->createBuilder()\n ->columns([\"tagId\" => \"Tags.id\"])\n ->from(['TagsFiles'=>'App\\Models\\TagsFiles'])\n ->leftJoin('App\\Models\\Files', 'TagsFiles.file_id = Files.id', 'Files')\n ->leftJoin('App\\Models\\Tags', 'TagsFiles.tag_id = Tags.id', 'Tags')\n ->where('Files.userId = ?1 AND Files.'.array_keys($data)[0].' = ?2',\n [1 => $userId,\n 2 => $data[array_keys($data)[0]]\n ])\n ->getQuery()\n ->execute();\n $tagIds->toArray();\n\n }\n\n\n // use tagIds to find the correct client\n foreach ($tagIds as $tagId) {\n $count = 0;\n\n $tag = ClientsTags::findFirst(\n [\n \"tag_id = :tag:\",\n \"bind\" => [\"tag\" => $tagId['tagId']],\n ]);\n\n $clients = $tag->client;\n\n // modify the files array and add the clientName\n foreach ($files as $file){\n if ($index == $count) {\n $result[] = array(\"no\" => $index+1) + array_slice($file, 0, 5, true) +\n array(\"clientName\" => $clients->name); //+\n // array_slice($file, 3, count($file) - 1, true);\n }\n $count++;\n }\n $index++;\n }\n\n if (!$result) {\n return [];\n }\n\n return $result;\n\n } catch (\\PDOException $e) {\n if ($e->getCode() == 12004) {\n throw new ServiceException('Cannot find files', self::ERROR_UNABLE_TO_FIND_FILES);\n } else {\n throw new ServiceException($e->getMessage(). $e->getCode(), $e); }\n }catch (\\Exception $e){\n $this->response->setStatusCode(500, 'Internal Server Error');\n }\n\n\n\n }", "public function get_fatura() {\n $criteria = new Criteria;\n $criteria->add(new Filter('id_processo', '=', $this->id_processo));\n return (new Repository(Fatura::class))->load($criteria);\n }", "public function perfiles(){\n return $this->belongsToMany('App\\Perfil', 'cliente_perfil', 'cliente_id', 'perfil_id' );\n }", "public function upload_foto_profil_rt()\n {\n $where = $this->input->post('id_rt');\n if ($_FILES != null) {\n $this->aksi_upload_foto_profil_rt($_FILES);\n }\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/detail_data_rt/' . $where);\n }", "public function Documentos()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "function getAuthorViewableReviewFiles() {\r\n\t\treturn $this->getData('authorViewableReviewFiles');\r\n\t}", "public function upload_foto_kk_kades()\n {\n $where = $this->input->post('id_kades');\n if ($_FILES != null) {\n $this->aksi_upload_foto_kk_kades($_FILES);\n }\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/detail_data_kades/' . $where);\n }", "private function fileFields()\n {\n $disk = 'public';\n\n if ($this->jsonData['disk']) {\n $disk = $this->jsonData['disk'];\n }\n\n $newData = [\n 'type' => $this->jsonData['type'],\n 'component' => 'file-field',\n 'vue' => $this->getCorrectVueComponent('form-file-field'),\n 'deletable' => true,\n 'downloadable' => false,\n 'deletable' => false,\n 'previewUrl' => null,\n 'thumbnailUrl' => null,\n 'disk' => $disk,\n 'textAlign' => 'center',\n ];\n\n $this->data = array_merge($this->data, $newData);\n }", "function show()\n {\n $this->load->library('form_validation');\n $this->load->helper('form');\n $this->load->model('file_model');\n\n $table_id = $this->uri->rsegment(4);\n $table_name = $this->uri->rsegment(3);\n if (!$this->_check_table_id($table_id, $table_name)) {\n return;\n }\n\n $filter = [\n 'status' => config('verify_yes', 'main'),\n 'table_id' => $table_id,\n 'table_name' => $table_name\n ];\n $total = model('comment')->filter_get_total($filter);\n\n $page_size = $this->input->get('per_page');\n $page = $this->input->get('page');\n $limit = ($page - 1) * $page_size;\n $limit = max(0, $limit);\n\n $input = array();\n $input['order'] = array('created', 'DESC');\n $input['limit'] = array($limit, $page_size);\n\n $filter['parent_id'] = 0;\n\n // Lay danh sach\n $list = model('comment')->filter_get_list($filter, $input);\n foreach ($list as $row) {\n $user = model('user')->get_info($row->user_id, 'name');\n $row->user = $user;\n $image = $this->file_model->get_info_of_mod('user', $row->user_id, 'avatar', 'id, file_name');\n if ($image)\n $row->user->avatar = $image->file_name;\n\n\n if ($table_name == 'product')\n $row = mod('product')->comment_add_info($row);\n else\n $row = mod(\"product\")->comment_add_info($row);\n }\n\n if ($table_name == 'product')\n $this->data['info'] = model('product')->get_info($table_id);\n else\n $this->data['info'] = model('lesson')->get_info($table_id);\n\n $this->data['list'] = $list;\n $this->data['total'] = $total;\n $this->data['page'] = $page;\n $this->data['page_size'] = $page_size;\n $this->data['ajax_pagination_total'] = ceil($total / $page_size);\n\n // Hien thi view\n $temp = 'site/_widget/' . $table_name . '/comment/_list';\n $this->load->view($temp, $this->data);\n }", "public function tierraDetalles(Request $request, $id)\n {\n if(isset($id) && !empty($id))\n {\n try{\n $document = Pubfija::findOrFail($id);\n $usuarioRevisor = User::findOrFail($document->revisor);\n $fotos = array();\n if( count($document->fotos) > 0 )\n {\n foreach ($document->fotos as $foto)\n array_push($fotos, Storage::disk('s3')->url($foto));\n }\n\n return view('coordinador.tierra.detalle')\n ->with('registro', $document)\n ->with('revisor', $usuarioRevisor)\n ->with('fotos', $fotos);\n }catch (ModelNotFoundException $e)\n {\n return view('shared.complete.404')->with('mensaje', 'Registro no encontrado');\n }\n }else{\n return view('shared.complete.404')->with('mensaje', 'No se puede localizar el registro');\n }\n }", "public function manageAction()\n {\n $mimeProperty = $this->_privateConfig->mime->property;\n $fileClass = $this->_privateConfig->class;\n $fileModel = $this->_privateConfig->model;\n $store = $this->_owApp->erfurt->getStore();\n\n $query = new Erfurt_Sparql_SimpleQuery();\n $query->setProloguePart('SELECT DISTINCT ?mime_type ?uri')\n ->addFrom((string)$this->_getConfigModelUri())\n ->setWherePart(\n 'WHERE\n {\n ?uri a <' . $fileClass . '>.\n ?uri <' . $fileModel . '> <' . (string)$this->_owApp->selectedModel . '>.\n ?uri <' . $mimeProperty . '> ?mime_type.\n }'\n )\n ->setOrderClause('?uri')\n ->setLimit(10); // TODO: paging\n\n if ($result = $store->sparqlQuery($query, array('use_ac' => false))) {\n $files = array();\n foreach ($result as $row) {\n if (is_readable($this->getFullPath($row['uri']))) {\n array_push($files, $row);\n }\n }\n $this->view->files = $files;\n } else {\n $this->view->files = array();\n }\n\n $this->view->placeholder('main.window.title')->set($this->_owApp->translate->_('File Manager'));\n OntoWiki::getInstance()->getNavigation()->disableNavigation();\n\n $toolbar = $this->_owApp->toolbar;\n\n $filePath = _OWROOT\n . rtrim($this->_privateConfig->path, '/')\n . DIRECTORY_SEPARATOR;\n\n $url = new OntoWiki_Url(array('controller' => 'files', 'action' => 'upload'), array());\n\n if (is_writable($filePath)) {\n\n $toolbar->appendButton(\n OntoWiki_Toolbar::DELETE,\n array('name' => 'Delete Files', 'class' => 'submit actionid', 'id' => 'filemanagement-delete')\n );\n\n $toolbar->appendButton(\n OntoWiki_Toolbar::ADD,\n array('name' => 'Upload File', 'class' => 'upload-file', 'url' => (string)$url)\n );\n\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $msgString = sprintf(\n $this->_owApp->translate->_('Directory \"%s\" is not writeable. To upload files set it writable.'),\n rtrim($this->_privateConfig->path, '/') . DIRECTORY_SEPARATOR\n );\n $this->_owApp->appendMessage(\n new OntoWiki_Message($msgString, OntoWiki_Message::INFO)\n );\n }\n\n if (!defined('ONTOWIKI_REWRITE')) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('Rewrite mode is off. File URIs may not be accessible.', OntoWiki_Message::WARNING)\n );\n return;\n }\n\n $url->action = 'delete';\n $this->view->formActionUrl = (string)$url;\n $this->view->formMethod = 'post';\n $this->view->formClass = 'simple-input input-justify-left';\n $this->view->formName = 'filemanagement-delete';\n }" ]
[ "0.60942745", "0.6044171", "0.5981389", "0.5974022", "0.59601825", "0.59399796", "0.5896837", "0.5877442", "0.5840485", "0.5824281", "0.5818902", "0.5784837", "0.5784837", "0.5784837", "0.57695365", "0.5677723", "0.5673326", "0.5663925", "0.56503814", "0.5644413", "0.5638005", "0.5623058", "0.5620914", "0.5614424", "0.5609416", "0.5609213", "0.56089497", "0.5566948", "0.5532374", "0.5508652", "0.5496307", "0.5480671", "0.5475737", "0.54617023", "0.54612374", "0.5458888", "0.5433392", "0.54246354", "0.5419137", "0.54188496", "0.54148406", "0.54090506", "0.5400275", "0.5388229", "0.5376064", "0.5367634", "0.53592116", "0.5346396", "0.53434384", "0.5341668", "0.5336732", "0.53317016", "0.5316869", "0.5296521", "0.5290841", "0.5287718", "0.528689", "0.52827454", "0.5268139", "0.52666426", "0.5264029", "0.5263926", "0.52618974", "0.52512556", "0.5247243", "0.52374357", "0.5237172", "0.52347505", "0.52293396", "0.52280265", "0.5221333", "0.52112526", "0.5210408", "0.5206018", "0.519613", "0.51920676", "0.51847667", "0.5183158", "0.5181955", "0.5181246", "0.51784253", "0.5174203", "0.5171461", "0.51581204", "0.51573664", "0.5153721", "0.5147388", "0.5142679", "0.5140077", "0.513927", "0.5139222", "0.51385826", "0.5136124", "0.51343703", "0.5133418", "0.5131992", "0.5131528", "0.51286834", "0.51260674", "0.51217806" ]
0.6072827
1
Hent all info vi har om filmen Burde kanskje begrense noe hva som gis ut her? Hvis angitt keyparameter, vil den returnere verdi, eller false hvis verdien ikke finnes
public function getDatabaseData(String $key = null): array { if (!is_null($key)) { if (isset($this->data[$key])) { return $this->data[$key]; } return false; } return $this->data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasKeyValueParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_K);\n }", "function SetupKeyValues($key) {\r\n\t\tglobal $rekeningju;\r\n\t\t$arrKeyFlds = explode(EW_COMPOSITE_KEY_SEPARATOR, $key);\r\n\t\tif (count($arrKeyFlds) >= 1) {\r\n\t\t\t$rekeningju->kode_otomatis->setFormValue($arrKeyFlds[0]);\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "public function has_param($key)\n {\n }", "public function hasKeyIDParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_KID);\n }", "function has_keep_parameters()\n{\n static $answer = null;\n if ($answer !== null) {\n return $answer;\n }\n\n foreach (array_keys($_GET) as $key) {\n if (\n isset($key[0]) &&\n $key[0] == 'k' &&\n substr($key, 0, 5) == 'keep_'\n //&& $key != 'keep_devtest' && $key != 'keep_show_loading'/*If testing memory use we don't want this to trigger it as it breaks the test*/\n ) {\n $answer = true;\n return $answer;\n }\n }\n $answer = false;\n return $answer;\n}", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "function getParamInfo() {\n\t\treturn FALSE;\n\t}", "public function hasKeyTypeParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_KTY);\n }", "function is($key = '')\n {\n }", "function verifyKey($msg){\n\n // TODO: check if this key is in the database!\n if(isset($_GET['key'])){\n $apiKey = $_GET['key'];\n $userid = $_GET['userid'];\n\n if($apiKey == getApiKey($userid)){\n // Fillter on datatype\n filterRequest($msg);\n }else{\n $msg->message = 'Invalid key!';\n $msg->toJson();\n }\n }else{\n $msg->message = 'Key not set!';\n $msg->toJson();\n }\n}", "function validate_key($key)\n{\n if ($key == 'PhEUT5R251')\n return true;\n else\n return false;\n}", "function inputHas($key)\n\t{\n\treturn isset($_REQUEST[$key]);\n\t\n\t}", "private function verify_parameters(){\n if( empty( $_GET['email'] ) || empty( $_GET['pms_key'] ) || empty( $_GET['subscription_id'] ) )\n return false;\n\n return true;\n }", "function inputHas($key){\n\n\treturn isset($_REQUEST[$key]);\n\n}", "private function validateReviewerKey(){\n\t\treturn true;\n\t}", "public function hasPublicKeyUseParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_USE);\n }", "function inputHas($key) {\n\t// check to see if $_REQUEST has a key/value\n\t// return true if the $key is set on $_REQUEST\n\t// else return true if it is not\n\treturn isset($_REQUEST[$key]);\n\n}", "function SetupKeyValues($key) {\r\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\r\n\t\tif (count($arrKeyFlds) >= 1) {\r\n\t\t\t$this->Id_Proveedor->setFormValue($arrKeyFlds[0]);\r\n\t\t\tif (!is_numeric($this->Id_Proveedor->FormValue))\r\n\t\t\t\treturn FALSE;\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "public function hasParams(){\n return $this->_has(8);\n }", "function key()\n\t{\n\t\tglobal $Cl_root_path, $errors, $template, $security;\n\t\t\n\t\t$status = '';\n\t\t\n\t\tif ( isset( $_POST[ 'UL' ] ) )\n\t\t{ // an upload has happened\n\t\t\t$err = $_FILES[ 'key' ][ 'error' ];\n\t\t\tif ( $err != 0 )\n\t\t\t{\n\t\t\t\t$status = '<span style=\"color: red\">' . $this->lang[ 'Key_err' . $err ] . '</span>';\n\t\t\t}else\n\t\t\t{\n\t\t\t\tif ( @move_uploaded_file( $_FILES[ 'key' ][ 'tmp_name' ], $Cl_root_path . 'console/config/mykey.dat' ) )\n\t\t\t\t{\n\t\t\t\t\t$status = '<span style=\"color: green\">' . $this->lang[ 'Key_uploaded' ] . '</span>';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$status = '<span style=\"color: red\">' . $this->lang[ 'Key_errx' ] . '</span>';\n\t\t\t\t}\n\t\t\t}\n\t\t}elseif ( isset( $_POST[ 'DL' ] ) )\n\t\t{\n\t\t\t// have to send the raw file to the user\n\t\t\tif ( is_readable( $Cl_root_path . 'console/config/mykey.dat' ) )\n\t\t\t{\n\t\t\t\tob_clean();\n\t\t\t\theader( 'Content-type: file/text' );\n\t\t\t\theader ( 'Content-Disposition: attachment; filename=\"mykey.dat\"' );\n\t\t\t\techo @file_get_contents( $Cl_root_path . 'console/config/mykey.dat' );\n\t\t\t\texit;\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$status = '<span style=\"color: red\">' . $this->lang[ 'Key_noread' ] . '</span>';\n\t\t\t}\n\t\t}elseif ( isset( $_POST[ 'RM' ] ) )\n\t\t{\n\t\t\tif ( !@file_exists( $Cl_root_path . 'console/config/mykey.dat' ) )\n\t\t\t{\n\t\t\t\t$status = '<span style=\"color: green\">' . $this->lang[ 'Key_removed' ] . '</span>';\n\t\t\t}elseif ( @unlink( $Cl_root_path . 'console/config/mykey.dat' ) )\n\t\t\t{\n\t\t\t\t$status = '<span style=\"color: green\">' . $this->lang[ 'Key_removed' ] . '</span>';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$status = '<span style=\"color: red\">' . $this->lang[ 'Key_notremoved' ] . '</span>';\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// show it\n\t\t$template->assign_block_vars( 'key', '', array(\n\t\t\t\t'L_TITLE' => $this->lang[ 'Key_title' ],\n\t\t\t\t'L_EXPLAIN' => $this->lang[ 'Key_explain' ],\n\t\t\t\t'L_KEY' => $this->lang[ 'Key_ulfield' ],\n\t\t\t\t'L_UPLOAD' => $this->lang[ 'Key_upload' ],\n\t\t\t\t'L_REMOVE' => $this->lang[ 'Key_remove' ],\n\t\t\t\t'L_DOWNLOAD' => $this->lang[ 'Key_download' ],\n\t\t\t\t\n\t\t\t\t'S_FRAME_ACTION' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_advance&s=key' ),\n\t\t\t\t\n\t\t\t\t'STATUS' => $status\n\t\t\t) );\n\t\t$template->assign_switch( 'key', TRUE );\n\t}", "function getParam($key, $parameter) {\r\n $params =& new mosParameters( $parameter );\r\n $return = $params->get( $key, false );\r\n\tunset( $params );\r\n\treturn $return;\r\n\r\n /*\r\n\tif (!$params) return false;\r\n\t$params = split(\"\\n\",$params);\r\n\tforeach ($params AS $param) {\r\n\t list($keyn,$value) = split('=', $param);\r\n\t if ($keyn == $key) return $value;\r\n }\r\n return false;\r\n\t*/\r\n}", "public function parameterExists($key);", "public function hasData($key = '');", "function validate_key($key,$mobile){\n $apiEncrypter = new ApiEncrypter();\n $d_key = $apiEncrypter->decrypt($key);\n return $d_key == $mobile ? true : false;\n}", "public function getParameterFields()\n {\n return false;\n }", "public function hasKeyOperationsParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_KEY_OPS);\n }", "abstract protected function getParameter($key);", "public function hasParameters(){\n return $this->_has(2);\n }", "function get_param($key, $default=false){\n if (is_array($key)){\n foreach ($key as $onekey){\n $ret = get_param($onekey);\n if ($ret)\n return $ret;\n }\n }else{ \n \n if ($_GET)\n if (array_key_exists($key,$_GET))\n return $_GET[$key];\n if ($_POST)\n if (array_key_exists($key,$_POST))\n return $_POST[$key]; \n }\n \n return $default;\n}", "public function checkPublicKey()\n {\n if (!$this->CI) {\n $this->CI = &get_instance(); \n }\n \n //if it is public, check our \"key\" they sent along to prevent abuse\n $get_vars = explode('&', $_SERVER['QUERY_STRING']);\n if ($get_vars) {\n foreach ($get_vars as $k=>$v) { \n $x = explode('=', $v); \n if (count($x) > 1) {\n $_GET[$x[0]] = $x[1]; \n } else {\n return false;\n }\n }\n \n $this->CI->load->helper('reqkey');\n $reqk = $_GET['reqk'];\n $seck = $_GET['seck'];\n $key_check = checkReqKey($seck, $reqk);\n if ($key_check) {\n return true;\n }\n }\n return false;\n }", "public function isLogedInOrHasKey(){\n if (isset($_GET['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_GET['key'], $this->keys) )) ) return true;\n \n if (isset($_POST['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_POST['key'], $this->keys) )) ) return true;\n \n return false;\n }", "function get($key) {\n\t\t/* stub */\n\t\treturn false;\n\t}", "function SetupKeyValues($key) {\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\n\t\tif (count($arrKeyFlds) >= 0) {\n\t\t}\n\t\treturn TRUE;\n\t}", "function SetupKeyValues($key) {\r\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\r\n\t\tif (count($arrKeyFlds) >= 1) {\r\n\t\t\t$this->idfb_posts->setFormValue($arrKeyFlds[0]);\r\n\t\t\tif (!is_numeric($this->idfb_posts->FormValue))\r\n\t\t\t\treturn FALSE;\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "public function hasKey() {\n return $this->_has(1);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "function nvp_CheckGet($params) {\r\n $result=true;\r\n if (!empty ($params)) {\r\n foreach ($params as $eachparam) {\r\n if (isset($_GET[$eachparam])) {\r\n if (empty ($_GET[$eachparam])) {\r\n $result=false; \r\n }\r\n } else {\r\n $result=false;\r\n }\r\n }\r\n }\r\n return ($result);\r\n }", "function SetupKeyValues($key) {\r\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\r\n\t\tif (count($arrKeyFlds) >= 2) {\r\n\t\t\t$this->identries->setFormValue($arrKeyFlds[0]);\r\n\t\t\tif (!is_numeric($this->identries->FormValue))\r\n\t\t\t\treturn FALSE;\r\n\t\t\t$this->id->setFormValue($arrKeyFlds[1]);\r\n\t\t\tif (!is_numeric($this->id->FormValue))\r\n\t\t\t\treturn FALSE;\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "public function hasFirstPrimeFactorParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_P);\n }", "function parse_param_exists($param_key, $data, $debug = false) {\n\n\n if ($debug) {\n echo __FUNCTION__ . \" \";\n print_r(compact('param_key', 'data'));\n }\n $chain = $this->parse_param_chain($param_key);\n switch (count($chain)) {\n case 1:\n return array_key_exists($param_key, $data);\n break;\n case 2:\n return\n array_key_exists($chain[0], $data) &&\n array_key_exists($chain[1], $data[$chain[0]]);\n break;\n case 3:\n return\n array_key_exists($chain[0], $data) &&\n array_key_exists($chain[1], $data[$chain[0]]) &&\n array_key_exists(\n $chain[2], $data[$chain[0]][$chain[1]]);\n break;\n case 4:\n return\n array_key_exists($chain[0], $data) &&\n array_key_exists($chain[1], $data[$chain[0]]) &&\n array_key_exists(\n $chain[2], $data[$chain[0]][$chain[1]]) &&\n array_key_exists(\n $chain[3], $data[$chain[0]][$chain[1]][$chain[2]]);\n break;\n }\n return false;\n }", "public function checkKeyWord(){\n if(trim($this->keyword) == '') return false;\n return 1;\n }", "public function hasKey()\n\t{\n\t\treturn !empty($this->key);\n\t}", "function check_key($id_questions,$auth_token,$msg_auth_failed)\n{\n\t$found_key = check_question_keys($id_questions,$auth_token);\n\t\n\tif (empty($found_key))\n\t{\n\t\tdie($msg_auth_failed);\n\t}\n\t\n\treturn $found_key;\n\t\n}", "public function hasOtherPrimesInfoParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_OTH);\n }", "public function hasAlgorithmParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_ALG);\n }", "public function getParameter($key);", "function has($key = '')\n {\n }", "public function _get_key($email,$device){\n $query = \"select * from login_keys where user_email = '$email' and device_id='$device'\";\n $output=$this->db->query($query)->num_rows();\n //debugging check no. of selected rows\n //echo $output;\n if($output==0){\n return FALSE;}\n else {\n return TRUE;}\n }", "public function paramExists (string $key)\n {\n if (array_key_exists($key, $this->getParams()))\n return true;\n\n return false;\n }", "public function isApiKeyConfigured()\n {\n $public_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/public_key'));\n $private_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/private_key'));\n return (!empty($private_key) && !empty($public_key));\n }", "function persisted_or_stored($posted_key, $stored_key) {\n\n $form_data = Session::getFormData();\n if (isset($form_data[$posted_key])) {\n echo $form_data[$posted_key];\n } else {\n echo $stored_key;\n }\n \n \n}", "function check_lti2_key() {\n global $PDOX, $CFG;\n\n if ( ! isset($_SESSION['id']) ) return 'You are not logged in.';\n $row = $PDOX->rowDie(\n \"SELECT request_id, user_id, admin, state, lti\n FROM {$CFG->dbprefix}key_request\n WHERE user_id = :UID AND lti = 2 LIMIT 1\",\n array(\":UID\" => $_SESSION['id'])\n );\n\n if ( $row === false ) {\n return 'You have not requested a key for this service.';\n }\n\n if ( $row['state'] == 0 ) {\n return 'You key has not yet been approved. '.$row['admin'];\n }\n\n if ( $row['state'] != 1 ) {\n return 'Your key request was not approved. '.$row['admin'];\n }\n\n if ( $row['lti'] != 2 ) {\n return 'Your did not request an LTI 2.0 key. '.$row['admin'];\n }\n\n return true;\n}", "function SetupKeyValues($key) {\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\n\t\tif (count($arrKeyFlds) >= 1) {\n\t\t\t$this->userlevelid->setFormValue($arrKeyFlds[0]);\n\t\t\tif (!is_numeric($this->userlevelid->FormValue))\n\t\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function SetupKeyValues($key) {\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\n\t\tif (count($arrKeyFlds) >= 1) {\n\t\t\t$this->id->setFormValue($arrKeyFlds[0]);\n\t\t\tif (!is_numeric($this->id->FormValue))\n\t\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function SetupKeyValues($key) {\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\n\t\tif (count($arrKeyFlds) >= 1) {\n\t\t\t$this->id->setFormValue($arrKeyFlds[0]);\n\t\t\tif (!is_numeric($this->id->FormValue))\n\t\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function SetupKeyValues($key) {\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\n\t\tif (count($arrKeyFlds) >= 1) {\n\t\t\t$this->id->setFormValue($arrKeyFlds[0]);\n\t\t\tif (!is_numeric($this->id->FormValue))\n\t\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function SetupKeyValues($key) {\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\n\t\tif (count($arrKeyFlds) >= 1) {\n\t\t\t$this->id->setFormValue($arrKeyFlds[0]);\n\t\t\tif (!is_numeric($this->id->FormValue))\n\t\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function get_inchikey($substance)\r\n {\r\n return false;\r\n }", "protected function checkCronjobKey() {\n return (!isset($_REQUEST['key']) || ($_REQUEST['key'] != $this->cronjob_key)) ? false : true;\n }", "protected function getAuthParam(){\n\t\treturn '?key=' . $this->key . '&token=' . $this->token;\n\t}", "function llave($banderas){\n \t\tif(stripos($banderas,\"_key\"))\n\t\t\treturn true\t;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function validatePasskey( $key ) {\n\t\t$pk = self::getPasskey( $key );\n\n\t\tif ( ( $pk == 'false' ) || ( $pk === false ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/*\n\t\tif ( empty( $pk->active ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $pk->type_def['valid'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $pk->trials <= 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\t*/\n\n\t\treturn true;\n\t}", "function isMultipleKey(): bool;", "function SetupKeyValues($key) {\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\n\t\tif (count($arrKeyFlds) >= 1) {\n\t\t\t$this->row_id->setFormValue($arrKeyFlds[0]);\n\t\t\tif (!is_numeric($this->row_id->FormValue))\n\t\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function get_param($key)\n {\n }", "function cp_check_param($array, $mandatory_keys, $optional_keys = array()){\r\n $array = array_keys($array);\r\n if (count(array_diff($mandatory_keys, $array)) > 0){\r\n return false;\r\n }\r\n if (count(array_diff($array, array_merge($mandatory_keys,$optional_keys))) > 0){\r\n return false;\r\n }\r\n \r\n return true;\r\n}", "function KeyWhere(&$keys, $table = \"\")\n{\n\tglobal $strTableName, $cman;\n\t\n\tif( !$table )\n\t\t$table = $strTableName;\n\t$strWhere=\"\";\n\t\n\t$pSet = new ProjectSettings($table);\n\t$cipherer = new RunnerCipherer($table);\n\t$connection = $cman->byTable( $table );\n\t\n\t$keyFields = $pSet->getTableKeys();\n\tforeach($keyFields as $kf)\n\t{\n\t\tif( strlen($strWhere) )\n\t\t\t$strWhere.= \" and \";\n\t\t\t\n\t\t$value = $cipherer->MakeDBValue($kf, $keys[ $kf ], \"\", true);\n\t\t\n\t\tif( $connection->dbType == nDATABASE_Oracle )\n\t\t\t$valueisnull = $value === \"null\" || $value == \"''\";\n\t\telse\n\t\t\t$valueisnull = $value === \"null\";\n\t\t\n\t\tif( $valueisnull )\n\t\t\t$strWhere.= RunnerPage::_getFieldSQL($kf, $connection, $pSet).\" is null\";\n\t\telse\n\t\t\t$strWhere.= RunnerPage::_getFieldSQLDecrypt($kf, $connection, $pSet, $cipherer).\"=\".$cipherer->MakeDBValue($kf, $keys[ $kf ], \"\", true);\n\t}\n\treturn $strWhere;\n}", "function POST_key_or_exit($key) {\n return array_key_or_exit($key, $_POST, 'missing POST parameter \"'.$key.'\"');\n}", "function hasValidBitcointalkData()\n{\n $isValid =\n isset($_POST[\"profil\"]) && isset($_POST[\"signature\"]);\n \n return $isValid;\n}", "function get_exists($parameter){\n return key_exists($parameter, $_GET) && strlen(trim($_GET[$parameter])) > 0;\n}", "public function hasFirstFactorCRTExponentParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_DP);\n }", "function validateRequest(){\n // if ($_GET['key'] != getenv(\"LAB_NODE_KEY\")){\n // exit;\n // }\n if ($_GET['key'] != ''){\n exit;\n }\n }", "function tabledata_url_generer_post_ecrire ($fonction,$txt_var_post, $txtbtnsubmit=\"Enregistrer\",$boolVoirSPIP=false)\r\n{\r\n global $boolDebrid;\r\n\r\n if ($boolVoirSPIP != \"masquer\")\r\n {\r\n if ($boolVoirSPIP==\"voir\" || $boolDebrid)\r\n {\r\n $txt_var_post .= \"<input type='hidden' name='debrid' value='aGnFJwE'/>\\n\";\r\n }\r\n }\r\n // if ($boolVoirSPIP || $boolDebrid) $txt_var_post= $txt_var_post.\"&debrid=aGnFJwE\" ;\r\n// return generer_url_post_ecrire ($fonction,$txt_var_post);\r\n return generer_form_ecrire($fonction, $txt_var_post,\"\",$txtbtnsubmit);\r\n}", "public function getParameter();", "public function getParameter();", "private function checkPresharedkeyForm(){\n\t\tif(!isset($_POST['services_ipsec_key_pskey'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_key_pskey');\n\t\t}\n\t\t\n\t\tif(ErrorHandler::errorCount() > 0){\n\t\t\tthrow new Exception('There is invalid form input');\n\t\t}\n\t}", "protected function verifyParams() {\n\t\t\treturn true;\n\t\t}", "protected function getParameterKey()\n {\n // gro_round_description\n return 'round';\n }", "public function getKey() {\n\t\tif (!empty($this->api_key)) {\n\t\t\treturn $this->api_key;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function exist_param($fieldname){\n return array_key_exists($fieldname, $_REQUEST);\n }", "public function get_fingerprint_data() {\n\t\tif ($this->session->userdata('current_finger_data')) {\n\t\t\techo true;\n\t\t} else {\n\t\t\techo false;\n\t\t}\n\t}", "function flashdata($param) {\n $nama_session = trim(rtrim(stripslashes(htmlspecialchars($param))));\n\n // cek apakah ada session dengan nama dari isi parameter variabel $param\n if (isset($_SESSION[$nama_session])) {\n\n return $_SESSION[$nama_session]['pesan'];\n }\n}", "public function setKey_dosage($fv_key_dossage)\n {\n \tif(!empty($fv_key_dossage))\n \t{\n \t\treturn $this->fv_key_dossage = $fv_key_dossage;\t\n \t}\n $this->fv_error_message = $this->fv_error_message .'<br> - Llave de Dosificacion '.ERROR_NULL;\n return $this->fv_key_dossage = null;\n }", "function vkey_exists($key)\r\n{\r\n global $db;\r\n $db->select(tbl(\"video\"),\"videokey\",\" videokey='$key'\");\r\n if($db->num_rows>0)\r\n return true;\r\n else\r\n return false;\r\n}", "function wg_is_valid_key($key) {\n\tglobal $wgg;\n\n\t$key = escapeshellarg($key);\n\n\t$retval = mwexec(\"echo {$key} | {$wgg['wg']} pubkey\");\n\n\treturn ($retval <> 0 ? false : true);\n\n}", "public function setKey($key) {\n\t\tif (!empty($key)) {\n\t\t\t$this->api_key = $key;\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function hasPassWord(){\n return $this->_has(3);\n }", "function addKeyeva($eva_details){\n\t if ($this->db->insert('vc_keyeva',$eva_details))\n\t\t\t { \n\t\t\t return TRUE;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t return FALSE;\n\t\t\t }\n }", "protected function saveItemKey($key) {\n\t\tif($key == 'id') return false;\n\t\treturn true; \n\t}" ]
[ "0.6247013", "0.62009287", "0.6191371", "0.6167822", "0.6003899", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5881389", "0.585414", "0.58512414", "0.58498716", "0.58440274", "0.581488", "0.5785226", "0.5773345", "0.57642156", "0.5763935", "0.5758801", "0.5758778", "0.5723291", "0.5705789", "0.5702507", "0.5700114", "0.56743383", "0.56641626", "0.5642819", "0.5634882", "0.5627816", "0.56254965", "0.5615591", "0.56002927", "0.55988604", "0.5583819", "0.55517966", "0.5549362", "0.5538842", "0.55320036", "0.55320036", "0.55320036", "0.55320036", "0.55320036", "0.5521889", "0.55032724", "0.5491412", "0.54758126", "0.54735905", "0.5469046", "0.5460529", "0.54594535", "0.5443977", "0.5439217", "0.5430182", "0.54140383", "0.5413628", "0.5409157", "0.540448", "0.5401601", "0.5394726", "0.5388765", "0.5388765", "0.5388765", "0.5388765", "0.53748953", "0.53635764", "0.53581405", "0.53537875", "0.53518647", "0.5350377", "0.53333735", "0.5330874", "0.5323064", "0.5316049", "0.5315624", "0.5300807", "0.5297577", "0.52897394", "0.5289624", "0.5289536", "0.5285145", "0.5285145", "0.5272534", "0.52701485", "0.52660966", "0.5264941", "0.52647096", "0.5261951", "0.5259259", "0.52587444", "0.52437824", "0.5242858", "0.52418417", "0.5237721", "0.5235931", "0.5234886" ]
0.0
-1
insert others leave type
public function save_leave_type($data = array()){ return $this->db->insert('leave_type', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allottedLeave(){\n if(empty($this->data)){\n //$alloted_leavesdata = $this->\n }\n else{\n \n }\n \n }", "function makeType($rType, $blocktype){\n sqlQuery(\"INSERT INTO types (type_name, type_blocktype) VALUES ('$rType', '$blocktype')\");\n alog(\"Added type $rType\");\n}", "public function savePostType($post_type)\n {\n //if normal was selected - do nothing\n //if main was selected\n if ($post_type == 1){\n //check if there is a previous post with main tag and make it normal\n $current_main = Article::where('post_type', $post_type)->first();\n if ($current_main){\n $current_main->post_type = 0;\n $current_main->save();\n }\n }\n //if post up is selected\n //check if there is a previous post with post-up tag and make it normal\n //if not just change post type to post up\n if ($post_type == 2){\n //check if there is a previous post with main tag and make it normal\n $current_up = Article::where('post_type', $post_type)->first();\n if ($current_up){\n $current_up->post_type = 0;\n $current_up->save();\n }\n }\n //if post down is selected\n //check if there is a previous post with post-down tag and make it normal\n //if not just change post type to post down\n if ($post_type == 3){\n //check if there is a previous post with main tag and make it normal\n $current_down = Article::where('post_type', $post_type)->first();\n if ($current_down){\n $current_down->post_type = 0;\n $current_down->save();\n }\n }\n }", "function manipularLead($type , $value = NULL, $reason = NULL){\n $param = array(\"email\"=> $this->getEmail(), \"funnel_name\"=> \"default\", \"value\" => $value , \"reason\"=> $reason);\n\n return $this->dispararEventos(\"POST\", self::URL_EVENT, json_encode(array(\n \"event_type\"=> $type,\n \"event_family\"=>\"CDP\", \n \"payload\"=>array_filter($param))));\n }", "function bestillingAvBrod($type, $antall, $tidspunkt){\r\n //Kunden får oversikt over alle brøene som er tilgjengelig\r\n\r\n //kunden får oversikt over hvor mange brød man kan bestillinger\r\n\r\n //Kunden velger tidspunkt nå brød skal hentes.\r\n\r\n //Informasjon sendes mot database i tabellen som man trenger.\r\n }", "function insert_type($type)\n\t\t{\n\t\t\t$this->db->select_max('revenue_type_value');\n\t\t\t\n\t\t\t$query\t\t\t\t\t=\t\t$this->db->get('da_inventory_revenue_type');\n\t\t\t\n\t\t\tforeach($query->result() as $max)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t$max_value\t\t\t=\t\t$max->revenue_type_value;\n\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t$revenue_type\t\t=\t\t$type;\n\t\t\t\n\t\t\t$data \t\t\t\t\t= \t\tarray\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'revenue_id' =>''\t,\t\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\t\t'revenue_type' => $revenue_type,\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\t\t'revenue_type_value'=>$max_value + 1\n \t \t\t\t\t\t\t \t\t\t\t\t\t\t);\n\n\t\t\t$this->db->insert('da_inventory_revenue_type', $data);\n\t\t\t\n\t\t}", "function _insert_into_post_button($type)\n {\n }", "function editTypeOfArea($data) {\n\t\t\t$conn = $this->connect();\n\t\t\t$pType = $this->modify(mysqli_real_escape_string($conn, $data['pType']));\n\t\t\t$uid = $_SESSION['userid'];\n\t\t\t$pid = $_SESSION['pid'];\n\t\t\tif(empty($pType)) {\n\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[a-z ]+$/i\", $pType)) {\n\t\t\t\t\tif($this->length($pType, 25, 3)) {\n\t\t\t\t\t\t$result = $this->changepost('newpost', 'post_p_type', $pType, $uid , $pid);\n\t\t\t\t\t\tif($result == true) {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Successfully_Changed\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Failed!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&length=tooBigOrSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&invalid=type\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function process_type(&$list)\n{\n\tforeach ($list as $index => $row) {\n\t\tif ($row['climb_type'] == 'Lead')\n\t\t\t$list[$index]['climb_type'] = 'L';\n\t\telse\n\t\t\t$list[$index]['climb_type'] = '';\n\t}\n}", "public function safeUp() {\n $this->insert('rgentity', array(\n 'dbview' => 'reg_viewjoined',\n 'name' => 'Имя реестра'\n ));\n\n $lastId = $this->dbConnection->getLastInsertID('rgentity_id_seq'); \n\n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'name',\n 'filtertype' => '0',\n 'alias' => 'Имя атрибута',\n 'enabled' => 'true',\n ));\n\n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'producer_id',\n 'filtertype' => '0',\n 'alias' => 'Ид продюсера',\n 'enabled' => 'true',\n ));\n\n $this->insert('rgentity', array(\n 'dbview' => 'reg_speciality',\n 'name' => 'Имя реестра специальностей большое длинное название неизвестно сколько символов.'\n ));\n \n $lastId = $this->dbConnection->getLastInsertID('rgentity_id_seq'); \n \n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'id',\n 'filtertype' => '0',\n 'alias' => 'Имя атрибута',\n 'enabled' => 'true',\n ));\n\n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'name',\n 'filtertype' => '0',\n 'alias' => 'какое-тоимя',\n 'enabled' => 'true',\n ));\n }", "function getLeaveTypes()\n {\n $leaveTypes = [];\n $leaves = DB::table('dbo.LEAVE_TYPE')->lists('leave_type');\n $userGender = Employee::find(Auth::user()->Emp_id)->Emp_Gender;\n \n foreach ($leaves as $leaveType )\n {\n array_push($leaveTypes, $leaveType);\n }\n\n if($userGender == \"M\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Maternity\"));\n }\n\n if($userGender == \"F\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Paternity\"));\n }\n\n return $leaveTypes;\n }", "public function __construct($leave_Type_Name = null)\n {\n $this\n ->setLeave_Type_Name($leave_Type_Name);\n }", "protected abstract function joinTypes();", "public function insertOrderTable($type)\n {\n $this->last_id++;\n $time = time();\n if ($type == 'sell') {\n $type = 'sell';\n $vendor_id = 0;\n $this->row = $sqlSellOrderType = \"INSERT INTO pish_hikashop_order (order_user_id, order_status, order_id, order_created, order_modified, order_vendor_id)\" .\n \" VALUES($this->hika_user_id, '\" . $type . \"', $this->last_id, $time, $time,$vendor_id)\";\n $rows = $this->conn->query($sqlSellOrderType);\n\n // if($rows->num_rows>0){\n\n // }else{\n\n // }\n }\n\n if ($type == 'subsell') {\n $type = 'subsell';\n\n $vendor_id = 0;\n $this->row = $sqlSellOrderType = \"INSERT INTO pish_hikashop_order (order_user_id, order_status, order_id, order_created, order_modified, order_vendor_id)\" .\n \" VALUES($this->hika_user_id, '\" . $type . \"', $this->last_id, $time, $time,0)\";\n $rows = $this->conn->query($sqlSellOrderType);\n }\n }", "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "function editTypeOfRent($data) {\n\t\t\t$conn = $this->connect();\n\t\t\t$tOFr = $this->modify(mysqli_real_escape_string($conn, $data['tOFr']));\n\t\t\t$uid = $_SESSION['userid'];\n\t\t\t$pid = $_SESSION['pid'];\n\t\t\tif(empty($tOFr)) {\n\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[a-z ]+$/i\", $tOFr)) {\n\t\t\t\t\tif($this->length($tOFr, 25, 3)) {\n\t\t\t\t\t\t$result = $this->changepost('newpost', 'post_type_of_Rent', $tOFr, $uid , $pid);\n\t\t\t\t\t\tif($result == true) {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Successfully_Changed\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Failed!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&length=tooBigOrSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&invalid=type\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function addLeaves($id=null){\n \n if($this->Session->read('LOGEDID')==1){\n if(!empty($this->data['Location']['name'])){\n $leave_data = $this->data; \n $this->Leavetype->create(); \n if ($this->Leavetype->save($leave_data)) //saving the data in table\n {\n $this->Session->setFlash('Data saved sucessfully !!');\n $this->redirect(array('controller'=>'leaves','action'=>'index'));\n } \n }\n else{\n if($id){\n \n if(empty($this->data)){\n $this->data = $this->Leavetype->read(null, $id);\n \n }\n }\n \n }\n \n }\n }", "public function leaveType()\n {\n return $this->belongsTo(LeaveType::class, 'leave_type_id');\n }", "public function insert_people($id_reserve, $name, $lastname, $comment, $type){\n $query=\"INSERT INTO `\".DB_PREFIX.\"people` (`id`,\n\t\t\t\t\t\t\t\t\t\t\t\t`id_reserve` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`name` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`lastname` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`passport` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`type`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($id_reserve).\"','\".$this->link->myesc($name).\"','\".$this->link->myesc($lastname).\"','\".$this->link->myesc($comment).\"','\".$this->link->myesc($type).\"')\";\n $result = $this->link->execute($query);\n return $result;\n\t}", "public function lead_type_add($data)\n {\n if($query = $this->db->query(\"call lead_type_add(\n\n '\".$data['lead_type'].\"',\n '\".$data['c_on'].\"',\n '\".$data['c_by'].\"'\n )\"))\n { save_query_in_log(); return true; }else{ save_query_in_log(); return false; }\n }", "public function save()\n {\n $error = false;\n\n // Save the not language specific part\n $pre_save_agitator_type = new self($this->agitator_type_id, $this->clang_id);\n\n // saving the rest\n if (0 === $this->agitator_type_id || $pre_save_agitator_type !== $this) {\n $query = \\rex::getTablePrefix() .'d2u_machinery_agitator_types SET '\n .\"agitator_ids = '|\". implode('|', $this->agitator_ids) .\"|', \"\n .\"pic = '\". $this->pic .\"' \";\n\n if (0 === $this->agitator_type_id) {\n $query = 'INSERT INTO '. $query;\n } else {\n $query = 'UPDATE '. $query .' WHERE agitator_type_id = '. $this->agitator_type_id;\n }\n\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n if (0 === $this->agitator_type_id) {\n $this->agitator_type_id = (int) $result->getLastId();\n $error = $result->hasError();\n }\n }\n\n if (false === $error) {\n // Save the language specific part\n $pre_save_agitator_type = new self($this->agitator_type_id, $this->clang_id);\n if ($pre_save_agitator_type !== $this) {\n $query = 'REPLACE INTO '. \\rex::getTablePrefix() .'d2u_machinery_agitator_types_lang SET '\n .\"agitator_type_id = '\". $this->agitator_type_id .\"', \"\n .\"clang_id = '\". $this->clang_id .\"', \"\n .\"name = '\". addslashes($this->name) .\"', \"\n .\"translation_needs_update = '\". $this->translation_needs_update .\"' \";\n\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n $error = $result->hasError();\n }\n }\n\n return !$error;\n }", "function set_event_type($eventType, $secondaryType)\n{\n\n if ($eventType && $secondaryType) {\n // If both type and secondary type\n\n $secondaryType .= ', ' . $eventType;\n\n $types = explode(\", \", $secondaryType);\n\n } elseif ($eventType && !$secondaryType) {\n // If only type and no secondary type\n\n $types[] = $eventType;\n\n } else {\n // In case there is not type at all\n\n $types[] = 'Misc';\n }\n\n $finalTypes = array_unique($types);\n\n return implode(\",\", $finalTypes);\n\n}", "public function canAddFieldsToTCATypeAndReplaceExistingOnes() {}", "private function _addOrEdit($user,$type= 'add') {\n \n $user_id = $user['id'];\n\n //Get the creator's id\n if(isset($this->request->data['user_id'])){\n if($this->request->data['user_id'] == '0'){ //This is the holder of the token - override '0'\n $this->request->data['user_id'] = $user_id;\n }\n }\n\n $check_items = array(\n\t\t\t'available_to_siblings',\n\t\t\t'suffix_permanent_users',\n\t\t\t'suffix_vouchers',\n 'suffix_devices'\n\t\t);\n\t\t\n foreach($check_items as $i){\n if(isset($this->request->data[$i])){\n $this->request->data[$i] = 1;\n }else{\n $this->request->data[$i] = 0;\n }\n }\n \n if($type == 'add'){ \n $entity = $this->{$this->main_model}->newEntity($this->request->data());\n }\n \n if($type == 'edit'){\n $entity = $this->{$this->main_model}->get($this->request->data['id']);\n $this->{$this->main_model}->patchEntity($entity, $this->request->data());\n }\n \n if ($this->{$this->main_model}->save($entity)) {\n $this->set(array(\n 'success' => true,\n '_serialize' => array('success')\n ));\n } else {\n $message = 'Error';\n \n $errors = $entity->errors();\n $a = [];\n foreach(array_keys($errors) as $field){\n $detail_string = '';\n $error_detail = $errors[$field];\n foreach(array_keys($error_detail) as $error){\n $detail_string = $detail_string.\" \".$error_detail[$error]; \n }\n $a[$field] = $detail_string;\n }\n \n $this->set(array(\n 'errors' => $a,\n 'success' => false,\n 'message' => array('message' => __('Could not create item')),\n '_serialize' => array('errors','success','message')\n ));\n }\n\t}", "function post_visibilite_insert_all($var1,$var2){\r\n \t return DB::GetInstance()->Set(\"INSERT INTO post_visibilite VALUES ($var1,$var2)\");\r\n }", "function ubercontent_save_node_types($types) {\n\n\t// create a new node type for each\n\tforeach($types as $type) {\n\t\t// Create the content type object\n\t\t$type = node_type_set_defaults($type);\n\n\t\t/**\n\t\t * Saving the content type after saving the variables allows modules to act\n\t\t * on those variables via hook_node_type_insert().\n\t\t */\n\t\t$status = node_type_save($type);\n\n\t\tdrupal_set_message('Node type \"'. $type->type . '\" ' . ($status == 2 ? 'Updated' : 'Saved'));\n\t}\n\n\t// rebuild the menus so we can see our new types\n\tnode_types_rebuild();\n\tmenu_rebuild();\n}", "public function addLeave() {\n try {\n if (!($this->leave instanceof Base_Model_ObtorLib_App_Core_Employee_Entity_Leave)) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception(\" Leave Entity not initialized\");\n } else {\n $objLeave = new Base_Model_ObtorLib_App_Core_Employee_Dao_Leave();\n $objLeave->leave = $this->leave;\n return $objLeave->addLeave();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception($ex);\n }\n }", "public function run()\n {\n $time = Carbon::now();\n DB::table('leave_type')->truncate();\n DB::table('leave_type')->insert(\n [\n ['leave_type_name' => 'Earn Leave','num_of_day'=>'0','created_at'=>$time,'updated_at'=>$time],\n ['leave_type_name' => 'Casual Leave','num_of_day'=>'22','created_at'=>$time,'updated_at'=>$time],\n ['leave_type_name' => 'Sick Leave\t','num_of_day'=>'20','created_at'=>$time,'updated_at'=>$time],\n ]\n );\n }", "public function postNew(){\n if(Input::has('save')){\n if(strlen(Input::get('itemtype'))<2){\n Session::flash('sms_warn', trans('require_field'));\n return Redirect::to('itemtype/new');\n }else{\n $itemtypenew=new RItemType();\n $itemtypenew->en=Input::get('itemtype');\n $itemtypenew->description=Input::get('description');\n\n if($itemtypenew->save()){\n Session::flash('sms_success', trans('sta.save_data_success'));\n return Redirect::to('itemtype');\n }\n }\n }\n }", "public function saveType()\n {\n }", "public function get_all_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \treturn $query->result();\n }", "public function addMealType(){\n \t$id = $this->formValueForKey(\"mealTypeSelection\");\n \t\n \t$foundMealType = BLGenericRecord::recordMatchingKeyAndValue(\"MealType\", \"id\", $id);\n \t$this->currentRecipe()->addMealType($foundMealType);\n }", "public function add_or_ignore()\n {\n $this->insert_ignore('table', array('foo' => 'bar'));\n\n // you can also do\n $this->ignore();\n $this->insert('table', array('foo' => 'bar'));\n }", "protected function afterInsertAccepting()\n {\n }", "function RESET_DB($type) {\n\n $id=$this->IDpr;\n $this->DB->query(\"UPDATE products SET end_{$type}=NULL , {$type}=NULL WHERE id='{$id}' \");\n }", "public function addLedger($etc = array(), $data = array()) {\r\n $this->db->insert('ksr_ledger', $data);\r\n }", "public function _insert_replace_helper($table, $data, $format = \\null, $type = 'INSERT')\n {\n }", "public function insertStatAndRoyalitiesAction(){\n \n }", "function postflight($type, $parent) \n {\n /* I fix lft and rgt attribute in the #__categories for the created categories */\n self::fixCategoryAttributes();\n }", "function insert_regel_into_db($class, $regel, $geometry_type, $konvertierung_id, $stelle_id, $bereich_gml_id, $bereich_index) {\n\t\t$uml_class = $this->get_uml_classname($class);\n\n\t\t$sql = \"INSERT INTO xplankonverter.regeln\";\n\t\t$sql .= \"(class_name, factory, sql, geometrietyp, name, beschreibung, konvertierung_id, stelle_id, bereich_gml_id)\";\n\t\t$sql .= \" SELECT \";\n\t\t$sql .= \"'\" . $uml_class . \"' AS class_name, \";\n\t\t$sql .= \"'sql'::xplankonverter.enum_factory AS factory, \";\n\t\t$sql .= \"'\" . $regel . \"' AS sql, \";\n\t\tswitch($geometry_type) {\n\t\t\tcase \"ST_Point\":\n\t\t\tcase \"ST_MultiPoint\":\n\t\t\t\t$sql .= \" 'Punkte'::xplankonverter.enum_geometrie_typ AS geometrietyp, \";\n\t\t\t\t$sql .= \"'\" . $uml_class . \"_\" . $bereich_index . \"_\" . \"Punkte' AS name, \";\n\t\t\t\tbreak;\n\t\t\tcase \"ST_LineString\":\n\t\t\tcase \"ST_MultiLineString\":\n\t\t\tcase \"ST_CompoundCurve\":\n\t\t\t\t$sql .= \" 'Linien'::xplankonverter.enum_geometrie_typ AS geometrietyp, \";\n\t\t\t\t$sql .= \"'\" . $uml_class . \"_\" . $bereich_index . \"_\" . \"Linien' AS name, \";\n\t\t\t\tbreak;\n\t\t\tcase \"ST_Polygon\":\n\t\t\tcase \"ST_MultiPolygon\":\n\t\t\tcase \"ST_CurvePolygon\":\n\t\t\tcase \"ST_MultiSurface\":\n\t\t\t\t$sql .= \" 'Flächen'::xplankonverter.enum_geometrie_typ AS geometrietyp, \";\n\t\t\t\t$sql .= \"'\" . $uml_class . \"_\" . $bereich_index . \"_\" . \"Flaechen' AS name, \";\n\t\t\t\tbreak;\n\t\t}\n\t\t$sql .= \"'regel created automatically from gmlas extraction' AS beschreibung, \";\n\t\t$sql .= $konvertierung_id . \" AS konvertierung_id, \";\n\t\t$sql .= $stelle_id . \" AS stelle_id, \";\n\t\t$sql .= \"'\" . $bereich_gml_id . \"' AS bereich_gml_id \";\n\t\t#echo 'INSERT regeln: ' . $sql;\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t}", "public function setTypes(){\n $this->var = false;\n $this->symb = false;\n $this->label = false;\n $type = '';\n \n //Ulozi postupne do jednotlivych promennych jestli dany argument odpovida nejakemu danemu vzoru a pote v podminkach rozhodneme typ argumentu (ktery na konci funkce ulozime do typu) a take jestli je argument var, symb, label nebo type\n $var = preg_match(\"/^(TF|LF|GF)@((\\p{L}|-|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n $int = preg_match(\"/^int@([\\+\\-])?([0-9])*$/u\", $this->arg);\n $bool = preg_match(\"/^bool@(true|false)$/u\", $this->arg);\n $string = preg_match(\"/^string@(\\p{L}|[^(\\w\\\\\\)]|\\d|[_]|\\\\\\\\([0-9][0-9][0-9]))*$/u\", $this->arg);\n $nil = preg_match(\"/^nil@nil$/u\", $this->arg);\n $label = preg_match(\"/^((\\p{L}|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n if($var){\n $type = \"var\";\n $this->var = true;\n $this->symb = true;\n }\n if($int){\n $type = \"int\";\n $this->symb = true;\n }\n if($bool){\n $type = \"bool\";\n $this->symb = true;\n }\n if($string){\n $type = \"string\";\n $this->symb = true;\n }\n if($nil){\n $type = \"nil\";\n $this->symb = true;\n }\n if($label){\n if(preg_match(\"/^(int|bool|string)$/u\", $this->arg)){\n $this->type_type = true;\n }\n $type = \"label\";\n $this->label = true; \n }\n if(!($var||$int||$bool||$string||$nil||$label)){\n fwrite(STDERR, \"CHYBA \".ERROR_23.\" - spatny argument\\n\");\n exit(ERROR_23);\n }\n $this->setType($type);\n }", "public function setDefaultTypeData(){\n if(\n is_object($this->source) &&\n is_object($this->target)\n ){\n if(\n $this->source->isAbyss() ||\n $this->target->isAbyss()\n ){\n $this->scope = 'abyssal';\n $this->type = ['abyssal'];\n }else{\n $routeController = new Route();\n $route = $routeController->searchRoute($this->source->systemId, $this->target->systemId, 1);\n\n if($route['routePossible']){\n $this->scope = 'stargate';\n $this->type = ['stargate'];\n }else{\n $this->scope = 'wh';\n $this->type = ['wh_fresh'];\n }\n }\n }\n }", "public function beforeSave($insert)\n {\n \n // die orignale Funktion erstmal durchfueren,\n if(parent::beforeSave($insert))\n {\n //um sich zu entscheiden ,ob es ein neue Kunde ist oder alte\n if($insert)\n {\n \n }\n else\n {\n $model = Klausurnote::find()->where(['KlausurID'=>$this->KlausurID])->all();\n foreach ($model as $klausurnote)\n {\n if($klausurnote->Punkt >= $this->punkt1_0 && $klausurnote->Punkt <= $this->Max_Punkte){\n $klausurnote->Note = 1.0;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt1_3 && $klausurnote->Punkt <= $this->punkt1_0){\n $klausurnote->Note = 1.3;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt1_7 && $klausurnote->Punkt <= $this->punkt1_3){\n $klausurnote->Note = 1.7;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt2_0 && $klausurnote->Punkt <= $this->punkt1_7){\n $klausurnote->Note = 2.0;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt2_3 && $klausurnote->Punkt <= $this->punkt2_0){\n $klausurnote->Note = 2.3;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt2_7 && $klausurnote->Punkt <= $this->punkt2_3){\n $klausurnote->Note = 2.7;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt3_0 && $klausurnote->Punkt <= $this->punkt2_7){\n $klausurnote->Note = 3.0;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt3_3 && $klausurnote->Punkt <= $this->punkt3_0){\n $klausurnote->Note = 3.3;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt3_7 && $klausurnote->Punkt <= $this->punkt3_3){\n $klausurnote->Note = 3.7;\n $klausurnote->save();\n }else if($klausurnote->Punkt >= $this->punkt4_0 && $klausurnote->Punkt <= $this->punkt3_7){\n $klausurnote->Note = 4.0;\n $klausurnote->save();\n }else if($klausurnote->Punkt < $this->punkt4_0){\n $klausurnote->Note = 5.0;\n $klausurnote->save();\n }\n }\n }\n return true;\n }\n else\n {\n return false;\n }\n }", "public function addFeedType ($type)\n\t{\n\t\t$Statement = $this->Database->prepare(\"UPDATE users SET hp_feed_type = ? WHERE id = ?\");\n\t\t$Statement->execute(array($type, $this->id));\n\t}", "public function run()\n {\n LeaveType::create([\n 'type' => 'annual',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'personal',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'without pay',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'long service',\n 'days' => 5,\n ]);\n }", "public function save(Type $type) {\n $typeData = array(\n 'name_ET' => $type->getName()\n );\n\n if ($type->getNum()) {\n // The type has already been saved : update it\n $this->getDb()->update('eventtype', $typeData, array('num_ET' => $type->getNum()));\n } else {\n // The type has never been saved : insert it\n $this->getDb()->insert('eventtype', $typeData);\n // Get the id of the newly created type and set it on the entity.\n $id = $this->getDb()->lastInsertId();\n $type->setNum($id);\n }\n }", "function remove_note_types() {\r\n\t\t$this->code = str_replace('<type', '<type stripme=\"y\"', $this->code, $count);\r\n\t\t$this->logMsgIf('note types removed', $count);\r\n\t}", "public function in_people_mod($id_reserve, $name, $lastname, $comment, $type){\n\t\t\t $query=\"INSERT INTO `\".DB_PREFIX.\"people_mod` (`id`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`id_res_mod`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`name`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`lastname`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`passport`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`type`)\n\t\t\t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($id_reserve).\"','\".$this->link->myesc($name).\"','\".$this->link->myesc($lastname).\"','\".$this->link->myesc($comment).\"','\".$this->link->myesc($type).\"')\";\n\t\t\t $result = $this->link->execute($query);\n\t\t\t return $result;\n\t\t}", "public function lendABook()\n {\n $objectModel = \"lendABook\";\n $errorMessage = \"Oups, désolé mais il est impossible d'ajouter le livre aux prêts.\";\n $successMessage = \"Le livre a bien été ajouté à vos prêts.\";\n\n $this->structureMethodAddOrRemoveFlags($objectModel, $errorMessage, $successMessage);\n }", "abstract public function insert();", "function dbInsert($edit)\r\n\t{\r\n\r\n\t}", "function jornadas_entity_insert($entity, $type) {\n if($type=='data_jornadas'){\n if (!isset($entity->production_time )) return ;\n foreach ($entity->production_time as $lid => $element) {\n foreach ($element as $fid => $time) {\n db_insert('jormada_tiempo_produccion')->fields(array('jid'=>$entity,'lid'=>$lid,'fid'=>$fid,'time'=>$time))->execute();\n }\n }\n }\n \n\n}", "public function newPosteOther($item){\n $reqInsert='INSERT INTO postes\n (\n '.$item.',\n id_operateur,\n id_machine\n )\n\n VALUES (\n '.$this->itemValue.',\n '.$this->id_operateur.',\n '.$this->id_machine.'\n );';\n\n //echo $reqInsert;\n $this->db->execute($reqInsert);\n }", "function onAfterWrite() {\n\t\t$bt = defined('DB::USE_ANSI_SQL') ? \"\\\"\" : \"`\";\n\n\t\tif(!$this->owner->ApproverGroups()->Count() && $this->owner->CanApproveType == 'OnlyTheseUsers') {\n\t\t\t$SQL_group = Convert::raw2sql('site-content-approvers');\n\t\t\t$groupCheckObj = DataObject::get_one('Group', \"{$bt}Code{$bt} = '{$SQL_group}'\");\n\t\t\tif($groupCheckObj) $this->owner->ApproverGroups()->add($groupCheckObj);\n\t\t}\n\t\t\n\t\tif(!$this->owner->PublisherGroups()->Count() && $this->owner->CanPublishType == 'OnlyTheseUsers') {\n\t\t\t$SQL_group = Convert::raw2sql('site-content-publishers');\n\t\t\t$groupCheckObj = DataObject::get_one('Group', \"{$bt}Code{$bt} = '{$SQL_group}'\");\n\t\t\tif($groupCheckObj) $this->owner->PublisherGroups()->add($groupCheckObj);\n\t\t}\n\t}", "public function add_leave() {\n\n\t\tif(!$this->session->userdata('user_id')>0){\n\t\t\tredirect('login');\n\t\t}\n\t\t\n\t\t$form_data = $this->input->post();\n\t\t\n\t\t$form_data['user_id'] = $this->session->userdata('user_id');\n\n\t\t//set the start date and end date for the one day and half day leave\n\t\tif($form_data['leave_plan'] =='half_day' || $form_data['leave_plan']=='one_day') {\n\t\t\t$form_data['leave_start_date'] = $form_data['date'];\n\t\t\t$form_data['leave_end_date'] = $form_data['date'];\n\t\t\tunset($form_data['date']);\n\t\t}\n\t\t\n\t\t$this->load->model('leaves');\n\n\t\t$result = $this->leaves->add_leaves($form_data);\n\n\t\tif($result){\n\t\t\t$this->session->set_flashdata('success', 'You have successfully applied for the leave');\n\t\t}else{\n\t\t\t$this->session->flashdata('error','Sorry We are unable to process the request');\n\t\t}\n\t\tredirect('user/landing/add_leaves');\n\n\t}", "public function canAddFieldsToTCATypeAfterExistingOnes() {}", "public function saveEditedBaseTypesList($data, $dels) {\n\t\t\t$collection = umiHierarchyTypesCollection::getInstance();\n\n\t\t\tif(is_array($data)) {\n\t\t\t\tforeach($data as $id => $info) {\n\t\t\t\t\t$title = getArrayKey($info, 'title');\n\t\t\t\t\t$module = getArrayKey($info, 'module');\n\t\t\t\t\t$method = getArrayKey($info, 'method');\n\n\t\t\t\t\tif($id == \"new\") {\n\t\t\t\t\t\tif($module && $title) {\n\t\t\t\t\t\t\t$collection->addType($module, $title, $method);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$item = $collection->getType($id);\n\n\t\t\t\t\t\tif($item instanceof iUmiHierarchyType) {\n\t\t\t\t\t\t\t$item->setTitle($title);\n\t\t\t\t\t\t\t$item->setName($module);\n\t\t\t\t\t\t\t$item->setExt($method);\n\t\t\t\t\t\t\t$item->commit();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new coreException(\"Hierarchy type #{$id} doesn't exist\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(is_array($dels)) {\n\t\t\t\tforeach($dels as $id) {\n\t\t\t\t\t$collection->delType($id);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function run()\n {\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'VL';\n $leave_type->leave_description = 'Vacation Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SL';\n $leave_type->leave_description = 'Sick Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'ML';\n $leave_type->leave_description = 'Maternity Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'BL';\n $leave_type->leave_description = 'Birthday Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'PL';\n $leave_type->leave_description = 'Paternity Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SIL';\n $leave_type->leave_description = 'Service Incentive Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SPL';\n $leave_type->leave_description = 'Single Parent Leave';\n $leave_type->save();\n\n }", "public function after_insert() {}", "public function createTrancheOld()\n {\n $uniqueId = str_replace(\".\",\"\",microtime(true)).rand(000,999);\n\n if($this->type == 1){\n\n TranchesPoidsPc::create([\n 'nom' => $this->minPoids.\" - \".$this->maxPoids,\n 'min_poids' => $this->minPoids,\n 'max_poids' => $this->maxPoids,\n 'uid' => \"PP\".$uniqueId,\n ]);\n\n\n\n }else{\n TranchesKgPc::create([\n 'nom' => $this->nom,\n 'uid' => \"KP\".$uniqueId,\n ]);\n\n }\n session()->flash('message', 'Tranche \"'.$this->nom. '\" a été crée ');\n\n\n\n $this->reset(['nom','minPoids','maxPoids']);\n\n $this->emit('saved');\n }", "function get_type() \n\t\t{\t\t\n\t\t \t return $thisShift->type;\t\t\n\t\t }", "function hook_uuid_entities_features_export_entity_alter(&$entity, $entity_type) {\n\n}", "function add_types_for_translation() {\n\t\t$dummy = __(\"added\", \"simple-history\");\n\t\t$dummy = __(\"approved\", \"simple-history\");\n\t\t$dummy = __(\"unapproved\", \"simple-history\");\n\t\t$dummy = __(\"marked as spam\", \"simple-history\");\n\t\t$dummy = __(\"trashed\", \"simple-history\");\n\t\t$dummy = __(\"untrashed\", \"simple-history\");\n\t\t$dummy = __(\"created\", \"simple-history\");\n\t\t$dummy = __(\"deleted\", \"simple-history\");\n\t\t$dummy = __(\"updated\", \"simple-history\");\n\t\t$dummy = __(\"nav_menu_item\", \"simple-history\");\n\t\t$dummy = __(\"attachment\", \"simple-history\");\n\t\t$dummy = __(\"user\", \"simple-history\");\n\t\t$dummy = __(\"settings page\", \"simple-history\");\n\t\t$dummy = __(\"edited\", \"simple-history\");\n\t\t$dummy = __(\"comment\", \"simple-history\");\n\t\t$dummy = __(\"logged in\", \"simple-history\");\n\t\t$dummy = __(\"logged out\", \"simple-history\");\n\t\t$dummy = __(\"added\", \"simple-history\");\n\t\t$dummy = __(\"modified\", \"simple-history\");\n\t\t$dummy = __(\"upgraded it\\'s database\", \"simple-history\");\n\t\t$dummy = __(\"plugin\", \"simple-history\");\n\t}", "protected function _addEltDiff($elt, $type)\n {\n if (!$this->track) {\n return;\n }\n\n $ed = &$this->_eltdiff;\n $id = $elt['v'];\n\n if (array_key_exists($id, $ed['o'])) {\n if (($type != 'd') && ($ed['o'][$id] == $elt)) {\n unset(\n $ed['a'][$id],\n $ed['c'][$id],\n $ed['d'][$id],\n $ed['o'][$id]\n );\n\n /* Check for virtual folder change. */\n if ($this->isVfolder($elt)) {\n $ed['c'][$id] = 1;\n }\n return;\n }\n } else {\n $ed['o'][$id] = ($type == 'a')\n ? null\n : $elt;\n }\n\n switch ($type) {\n case 'a':\n unset($ed['c'][$id], $ed['d'][$id]);\n $ed['a'][$id] = 1;\n break;\n\n case 'c':\n if (!isset($ed['a'][$id])) {\n $ed['c'][$id] = 1;\n }\n break;\n\n case 'd':\n unset($ed['a'][$id], $ed['c'][$id]);\n $ed['d'][$id] = 1;\n break;\n }\n }", "public function setLetype(int $letype)\n {\n $letype=(int)$letype;\n //checking $letype is not superieur 2\n if($letype >2){ \n trigger_error('The type is not correct');\n //checking is not empty\n }else if(empty($letype)){\n trigger_error('The type cannot empty!!!');\n }else{\n $this->letype = $letype;\n }\n }", "function alter_types_menu_location($args, $post_type) {\n $skip = [\n 'acf-field',\n 'acf-field-group',\n 'attachment',\n 'custom_css',\n 'customize_changeset',\n 'elementor_library',\n 'media',\n 'nav_menu_item',\n 'oembed_cache',\n 'product',\n 'product_variation',\n 'revision',\n 'scheduled-action',\n 'shop_coupon',\n 'shop_order',\n 'shop_order_refund',\n 'user_request',\n 'wp_block',\n ];\n\n // Skip this as we don't want them in our menu.\n if (in_array($post_type, $skip)) {\n return $args;\n }\n\n // Changes the titles as it will render the secondary all items.\n if (isset($args[\"labels\"]) && is_array($args[\"labels\"])) {\n $name = isset($args[\"labels\"][\"name\"]) ? $args[\"labels\"][\"name\"] : $args[\"labels\"][\"name_admin_bar\"];\n $menu[\"labels\"][\"name\"] = $name;\n }\n\n // Change which menu.\n $menu['show_in_menu'] = 'content';\n\n // Slap it together.\n return array_merge($args, $menu);\n\n}", "function mINSERT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$INSERT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:19:3: ( 'insert' ) \n // Tokenizer11.g:20:3: 'insert' \n {\n $this->matchString(\"insert\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public static function NEW_AREA_BLOCK(){\n\t $SQL_String = \"INSERT INTO area_block VALUES(NULL,:am_id,'new','新增子區','','',:area_load,:accept_max_day,:accept_min_day,:wait_list,'[]',\t:editor,NULL,1,1)\";\n\t return $SQL_String;\n\t}", "public function createBlock($type) {\n $this->completeNode();\n $this->current->appendNode($type);\n }", "public function addType($type);", "function InsertNotOrdinaryFields($data){\n if ($this->nonordinary) {\n foreach ($this->form_fields as $sectionname => $section) {\n foreach ($section as $number => $field) {\n switch ($field[\"control\"]) {\n case \"dbcombobox\":\n case \"dbcheckboxgroup\":\n case \"dbtreecombobox\":\n case \"checkboxgroup\":\n if ($field[\"multiple\"])\n EditPageHelper::InsertDBMultipleField($field, $this);\n break;\n case \"autocomplete\":\n \tif ($field[\"field_table\"]!=\"\")\n EditPageHelper::InsertAutocompleteField($field,$this, $data[$this->key_field]);break;\n default:\n $this->InsertCustomNotOrdinaryField($field);\n \tbreak;\n\n }\n }\n }\n }\n }", "protected function afterInserting()\n {\n }", "public function add_travel_gear_post_type() {\n \t$labels = array(\n \t\t'name' => _x( 'Matériel', 'Post Type General Name', 'ltav' ),\n \t\t'singular_name' => _x( 'Matériel', 'Post Type Singular Name', 'ltav' ),\n \t\t'menu_name' => __( 'Matériel', 'ltav' ),\n \t\t'name_admin_bar' => __( 'Matériel', 'ltav' ),\n \t\t'archives' => __( 'Item Archives', 'ltav' ),\n \t\t'attributes' => __( 'Item Attributes', 'ltav' ),\n \t\t'parent_item_colon' => __( 'Parent Item:', 'ltav' ),\n \t\t'all_items' => __( 'Tout le matériel', 'ltav' ),\n \t\t'add_new_item' => __( 'Ajouter un matériel', 'ltav' ),\n \t\t'add_new' => __( 'Ajouter', 'ltav' ),\n \t\t'new_item' => __( 'Nouveau', 'ltav' ),\n \t\t'edit_item' => __( 'Éditer', 'ltav' ),\n \t\t'update_item' => __( 'Mettre à jour', 'ltav' ),\n \t\t'view_item' => __( 'Afficher', 'ltav' ),\n \t\t'view_items' => __( 'Afficher le matériel', 'ltav' ),\n \t\t'search_items' => __( 'Rechercher', 'ltav' ),\n \t\t'not_found' => __( 'Not found', 'ltav' ),\n \t\t'not_found_in_trash' => __( 'Not found in Trash', 'ltav' ),\n \t\t'featured_image' => __( 'Featured Image', 'ltav' ),\n \t\t'set_featured_image' => __( 'Set featured image', 'ltav' ),\n \t\t'remove_featured_image' => __( 'Remove featured image', 'ltav' ),\n \t\t'use_featured_image' => __( 'Use as featured image', 'ltav' ),\n \t\t'insert_into_item' => __( 'Insert into item', 'ltav' ),\n \t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'ltav' ),\n \t\t'items_list' => __( 'Liste du matériel', 'ltav' ),\n \t\t'items_list_navigation' => __( 'Items list navigation', 'ltav' ),\n \t\t'filter_items_list' => __( 'Filter items list', 'ltav' ),\n \t);\n\n \t$args = array(\n \t\t'label' => __( 'Matériel', 'ltav' ),\n \t\t'description' => __( 'Gestion du matériel', 'ltav' ),\n \t\t'labels' => $labels,\n \t\t'supports' => array( 'title', 'thumbnail', 'editor', 'comments', 'revisions' ),\n \t\t'taxonomies' => array( 'ltav_category' ),\n \t\t'hierarchical' => false,\n \t\t'public' => true,\n \t\t'show_ui' => true,\n \t\t'show_in_menu' => true,\n \t\t'menu_position' => 5,\n 'menu_icon' => 'dashicons-hammer',\n \t\t'show_in_admin_bar' => true,\n \t\t'show_in_nav_menus' => true,\n \t\t'can_export' => true,\n \t\t'has_archive' => true,\n \t\t'exclude_from_search' => false,\n \t\t'publicly_queryable' => true,\n \t\t'capability_type' => 'post',\n \t\t\t'rewrite' \t\t\t\t=> array(\n \t\t\t\t'slug' => 'materiel',\n \t\t\t\t'with_front' => false,\n \t\t\t),\n \t);\n\n \tregister_post_type( 'ltav_gear', $args );\n }", "function add_bustype($text)\n {\n $query=$this->db2->query(\"INSERT INTO buses_type VALUES ('','$text')\");\n if($query)\n return 1;\n else\n return 0;\n }", "private static function movabls_added($movabl_type,$newdata,$movabl_guid = null) {\n\n\n global $mvs_db;\n \n if (!in_array($movabl_type,array('package','place','interface')))\n return false;\n\n $old_movabls = array();\n if (!empty($movabl_guid)) {\n $olddata = self::get_movabl($movabl_type,$movabl_guid);\n $old_movabls = self::get_submovabls($movabl_type,$olddata);\n }\n\n $new_movabls = self::get_submovabls($movabl_type,$newdata);\n\n foreach ($new_movabls as $movabl) {\n if (!in_array($movabl,$old_movabls))\n return true;\n }\n\n return false;\n\n }", "public function toggleDataTypeTokens() {\n \n // get data types (including 'has' and 'composed_of')\n $dtypes = epFieldMap::getSupportedTypes();\n \n // go through all keywords\n foreach($this->keywords as $keyword => $token) {\n \n if (!in_array($keyword, $dtypes)) {\n continue;\n }\n\n // has\n if ($keyword == epFieldMap::DT_HAS) {\n $this->keywords[$keyword] = \n ($token == EPL_T_HAS) ? \n EPL_T_IDENTIFIER : EPL_T_HAS; \n continue;\n }\n \n // composed of\n if ($keyword == epFieldMap::DT_COMPOSED_OF) {\n $this->keywords[$keyword] = \n ($token == EPL_T_COMPOSED_OF) ? \n EPL_T_IDENTIFIER : EPL_T_COMPOSED_OF; \n continue;\n }\n \n // primitive types\n $this->keywords[$keyword] = \n ($token == EPL_T_DATA_TYPE) ? \n EPL_T_IDENTIFIER : EPL_T_DATA_TYPE; \n }\n }", "function postflight($type, $parent) \n\t{\n\t\t// $parent is the class calling this method\n\t\t// $type is the type of change (install, update or discover_install)\n\t\t//echo '<p>' . JText::_('COM_HELLOWORLD_POSTFLIGHT_' . $type . '_TEXT') . '</p>';\n\t}", "function postflight($type, $parent) {\n // $parent is the class calling this method\n // $type is the type of change (install, update or discover_install)\n //echo '<p>' . JText::_('COM_HELLOWORLD_POSTFLIGHT_' . $type . '_TEXT') . '</p>';\n }", "private function _createDefaultAnnotationTypes()\n {\n $elementTable = $this->_db->getTable('Element');\n \n //setting up some annotation types\n $vertellerType = new AnnotationType;\n $vertellerType->item_type_id = 12;\n $vertellerType->collection_id = 4;\n $vertellerType->display_name = 'Verteller';\n $vertellerType->file_permissions = 'Allowed';\n $vertellerType->save();\n\n //setting up some annotation types\n $verzamelaarType = new AnnotationType;\n $verzamelaarType->item_type_id = 12;\n $verzamelaarType->collection_id = 9;\n $verzamelaarType->display_name = 'Verzamelaar';\n $verzamelaarType->file_permissions = 'Allowed';\n $verzamelaarType->save();\n\n $verhaaltypeType = new AnnotationType;\n $verhaaltypeType->item_type_id = 19;\n $verhaaltypeType->collection_id = 3;\n $verhaaltypeType->display_name = 'Volksverhaaltype';\n $verhaaltypeType->file_permissions = 'Allowed';\n $verhaaltypeType->save();\n\n $storyType = new AnnotationType;\n $storyType->item_type_id = 18;\n $storyType->collection_id = 1;\n $storyType->display_name = 'Volksverhaal';\n $storyType->file_permissions = 'Allowed';\n $storyType->tags_tool_id = 8;\n $storyType->save();\n\n $lexiconType = new AnnotationType;\n $lexiconType->item_type_id = 20;\n $lexiconType->collection_id = 2;\n $lexiconType->display_name = 'Lexicon Item';\n $lexiconType->file_permissions = 'Allowed';\n $lexiconType->tags_tool_id = 8;\n $lexiconType->save();\n \n //setting up some tools\n $toolExtreme = new AnnotationTool;\n $toolExtreme->display_name = \"Extreme waarde detector\";\n $toolExtreme->description = \"Detecteert extreme waarden in tekst\";\n $toolExtreme->command = \"http://bookstore.ewi.utwente.nl:24681/extreme\";\n $toolExtreme->get_arguments = \"\";\n //WARNING: STRONG DUTCH PROFANITY BELOW\n $toolExtreme->post_arguments = '{\n \"extreme_terms\":\n {\n \"not_allowed\":[\n \"cock\", \"cocks\", \"lul\", \"pik\", \"piemel\", \"piemels\", \"kut\", \"neuk\", \"neuken\", \"rampetampen\", \"beffen\", \"dildo\", \"dildo\\'s\", \"vibrator\", \n \"vibrators\", \"masturberen\", \"masturbatie\", \"vingeren\", \"kloten\", \"kloot\", \"hoer\", \"hoeren\", \"bordeel\", \"bordelen\", \"temeier\", \"verkracht\", \n \"verkrachten\", \"pedo\", \"pedofiel\", \"homo\", \"homo\\'s\", \"cock sucker\", \"homofiel\", \"faggot\", \"faggots\", \"castreren\", \"castratie\", \"tampeloerus\", \n \"sperma\", \"fist\", \"fuck\", \"plompzakken\", \"pis\", \"pissen\", \"gemecht\", \"gemacht\", \"cum\", \"bdsm\", \" sm \", \"masochisme\", \"sadisme\", \"bondage\", \n \"bruinwerk\", \"bruinwerker\", \"flikkers\", \"orgie\", \"sodom\", \"dp \", \"deep throat\", \"tieten\", \"druiper\", \"herpes\", \"soa\", \"klaarkomen\", \"orgasme\", \n \"travestiet\", \"memmen\", \"godverdomme\", \"kanker\", \"tering\", \"tyfus\", \"hoer\", \"mongool\", \"debiel\", \"jostie\", \"klootzak\", \"nazi\", \"nikker\", \"neger\", \n \"neger.\", \"nigger\", \"niggers\", \"vuile turk\", \"kutmarokkaan\", \"spleetoog\", \"spleetogen\", \"jappen\", \"roodhuiden\", \"roodhuid\", \"zwartjoekel\", \"zwartje\", \n \"zandneger\", \"zandnegers\", \"spaghettivreter\", \"spaghettivreters\", \"chink\", \"chicks\", \"olijfkakker\", \"olijfkakkers\", \"Hitler\", \"dom blond\", \n \"dom blondje\", \"optieften\", \"optyfen\", \"opgetieft\", \"opgetyft\", \"opzouten\", \"opkankeren\", \"opgekankerd\", \"oprotten\", \"opgerot\", \"Parkinson\"\n ], \n \"combinatory\":[\n \"trekken\", \"rukken\", \"naaien\", \"pompen\", \"paal\", \"castreren\", \"castratie\", \"zeik\", \"stront\", \"zaad\", \"sperma\", \"fist\", \"fuck\", \"pis\", \"naaien\", \n \"tongzoen\", \"gemecht\", \"gemacht\", \"pijpen\", \"sadisme\", \"binden\", \"bindt vast\", \"naad\", \"spleet\", \"poot\", \"poten\", \"kont\", \"reet\", \"ballen\", \n \"spuit\", \"fluit\", \"bevredigen\", \"tongen\", \"Tongzoen\", \"flikker\", \"godverdomme\", \"kanker\", \"tering\", \"tyfus\", \"hoer\", \"schijt\", \"stront\", \"kak\", \n \"mongool\", \".mongool\", \"debiel\", \"jostie\", \"klootzak\", \"nazi\", \"nikker\", \"neger\", \"spleetoog\", \"jappen\", \"roodhuiden\", \"roodhuid\", \"spleetogen\", \n \"zwartjoekel\", \"Turk\", \"Turk\", \"Turken\", \"Marokkaan\", \"Marokkanen\", \"Antilliaan\", \"Antillianen\", \"Surinamer\", \"Surinamers\", \"mocro\", \"mocro\\'s\", \n \"jood\", \"joods\", \"joden\", \"luie\", \"vuile\", \"smerige\", \"dief\", \"dieven\", \"crimineel\", \"criminelen\", \"stelen\", \"steelt\", \"fiets\", \"kliko\", \"vuilnisbelt\", \n \"afval\", \"moordenaar\", \"gevangenis\", \"Nederlander\", \"Belg\", \"Duitser\", \"buitenlander\", \"allochtoon\", \"allochtonen\", \"dom\", \"vies\", \"verkrachting\", \n \"werkloos\", \"ww\", \"GAK\", \"moe\", \"uitkering\", \"zwartjoekel\", \"zwartje\", \"gore\", \"sodemieter\", \"gastarbeider\", \"gas\", \"concentratiekamp\", \"douche\", \n \"Hitler\", \"Ethiopië\", \"triatlon\", \"hardlopen\", \"rennen\", \"wijf\", \"keuken\", \"mokkel\", \"slet\", \".slet\", \"aanrecht\", \"ketting\", \"dom blond\", \"koning\", \n \"prins\", \"vuilnisbakken\", \"vuilnisbak\", \"vuilnis\", \"optieften\", \"optyfen\", \"opzouten\", \"opkankeren\", \"oprotten\", \"zakkenvuller\", \"belasting\", \n \"Juliana\", \"Bernhard\", \"Beatrix\", \"Claus\", \"Willem-Alexander\", \"Maxima\", \"president\", \"Amalia\", \"Mabel\", \"depressie\", \"God\", \"Allah\", \"Mohammed\", \n \"pedo\", \"varken\", \"ziek\", \"sex\", \"gas\", \"mongool\", \".mongool\"\n ]\n }\n }'; //send a list of extreme words?\n $toolExtreme->output_format = \"json\";\n $toolExtreme->jsonxml_value_node = \"annotation.value\";\n $toolExtreme->jsonxml_score_node = \"score\";\n $toolExtreme->jsonxml_score_sub_node = \"\";\n $toolExtreme->jsonxml_value_sub_node = \"\";\n $toolExtreme->jsonxml_idx_sub_node = \"\";\n $toolExtreme->save();\n\n $toolCountclass = new AnnotationTool;\n $toolCountclass->display_name = \"Word count class\";\n $toolCountclass->description = \"Telt het aantal woorden in de tekst, en bepaalt een klasse\";\n $toolCountclass->command = \"http://bookstore.ewi.utwente.nl:24681/wordcountclass\";\n $toolCountclass->get_arguments = \"\";\n $toolCountclass->post_arguments = \"\";\n $toolCountclass->output_format = \"json\";\n $toolCountclass->jsonxml_value_node = \"annotation.value\";\n $toolCountclass->jsonxml_score_sub_node = \"\";\n $toolCountclass->jsonxml_value_sub_node = \"\";\n $toolCountclass->jsonxml_idx_sub_node = \"\";\n $toolCountclass->save();\n\n $toolDescription = new AnnotationTool;\n $toolDescription->display_name = \"Summary\";\n $toolDescription->description = \"Maakt een samenvatting van de tekst\";\n $toolDescription->command = \"http://bookstore.ewi.utwente.nl:24681/summary\";\n $toolDescription->get_arguments = \"\";\n $toolDescription->post_arguments = \"\";\n $toolDescription->output_format = \"json\";\n $toolDescription->jsonxml_value_node = \"annotation.summary\";\n $toolDescription->jsonxml_score_sub_node = \"score\";\n $toolDescription->jsonxml_value_sub_node = \"sentence\";\n $toolDescription->jsonxml_idx_sub_node = \"idx\";\n $toolDescription->save();\n \n $toolCount = new AnnotationTool;\n $toolCount->display_name = \"Word count\";\n $toolCount->description = \"Telt het aantal woorden in de tekst\";\n $toolCount->command = \"http://bookstore.ewi.utwente.nl:24681/wordcount\";\n $toolCount->get_arguments = \"\";\n $toolCount->post_arguments = \"\";\n $toolCount->output_format = \"json\";\n $toolCount->jsonxml_value_node = \"annotation.value\";\n $toolCount->jsonxml_score_sub_node = \"\";\n $toolCount->jsonxml_value_sub_node = \"\";\n $toolCount->jsonxml_idx_sub_node = \"\";\n $toolCount->save();\n\n $toolThree = new AnnotationTool;\n $toolThree->display_name = \"Language detection\";\n $toolThree->description = \"Detecteert de taal van de tekst\";\n $toolThree->command = \"http://bookstore.ewi.utwente.nl:24681/language\";\n $toolThree->get_arguments = \"\";\n $toolThree->post_arguments = \"\";\n $toolThree->output_format = \"json\";\n $toolThree->jsonxml_value_node = \"annotation.language\"; \n $toolThree->jsonxml_score_sub_node = \"\";\n $toolThree->jsonxml_value_sub_node = \"\";\n $toolThree->jsonxml_idx_sub_node = \"\";\n $toolThree->save();\n\n $toolFour = new AnnotationTool;\n $toolFour->display_name = \"Subgenre detection\";\n $toolFour->description = \"Detecteert het subgenre van de tekst\";\n $toolFour->command = \"http://bookstore.ewi.utwente.nl:24681/subgenre\";\n $toolFour->get_arguments = \"\";\n $toolFour->post_arguments = \"\";\n $toolFour->output_format = \"json\";\n $toolFour->jsonxml_value_node = \"annotation.subgenre\"; \n $toolFour->jsonxml_score_sub_node = \"\";\n $toolFour->jsonxml_value_sub_node = \"\";\n $toolFour->jsonxml_idx_sub_node = \"\";\n $toolFour->save();\n\n //summary\n //annotation.summary consists of array [score, idx, sentence]\n $toolFive = new AnnotationTool;\n $toolFive->display_name = \"Summary generation\";\n $toolFive->description = \"Maakt een samenvatting van de tekst\";\n $toolFive->command = \"http://bookstore.ewi.utwente.nl:24681/summary\";\n $toolFive->get_arguments = \"\";\n $toolFive->post_arguments = \"\";\n $toolFive->output_format = \"json\";\n $toolFive->jsonxml_value_node = \"annotation.summary\";\n $toolFive->jsonxml_score_sub_node = \"score\";\n $toolFive->jsonxml_value_sub_node = \"sentence\";\n $toolFive->jsonxml_idx_sub_node = \"idx\";\n $toolFive->save();\n\n $toolSix = new AnnotationTool;\n $toolSix->display_name = \"Keywords/Tags generation\";\n $toolSix->description = \"Maakt lijst trefwoorden van de tekst\";\n $toolSix->command = \"http://bookstore.ewi.utwente.nl:24681/keywords\";\n $toolSix->get_arguments = \"\";\n $toolSix->post_arguments = \"\";\n $toolSix->output_format = \"json\";\n $toolSix->jsonxml_value_node = \"annotation.keywords\";\n $toolSix->jsonxml_score_sub_node = \"score\";\n $toolSix->jsonxml_value_sub_node = \"keyword\";\n $toolSix->jsonxml_idx_sub_node = \"\";\n $toolSix->save();\n\n $toolSeven = new AnnotationTool;\n $toolSeven->display_name = \"Named Entities other\";\n $toolSeven->description = \"Maakt lijst met named entities zonder locaties\";\n $toolSeven->command = \"http://bookstore.ewi.utwente.nl:24681/nerother\";\n $toolSeven->get_arguments = \"\";\n $toolSeven->post_arguments = \"\";\n $toolSeven->output_format = \"json\";\n $toolSeven->jsonxml_value_node = \"annotation.entities\";\n $toolSeven->jsonxml_score_sub_node = \"score\";\n $toolSeven->jsonxml_value_sub_node = \"keyword\";\n $toolSeven->jsonxml_idx_sub_node = \"\";\n $toolSeven->save();\n \n $toolEight = new AnnotationTool;\n $toolEight->display_name = \"Named Entities locations\";\n $toolEight->description = \"Maakt lijst named entities locaties uit de tekst\";\n $toolEight->command = \"http://bookstore.ewi.utwente.nl:24681/nerlocations\";\n $toolEight->get_arguments = \"\";\n $toolEight->post_arguments = \"\";\n $toolEight->output_format = \"json\";\n $toolEight->jsonxml_value_node = \"annotation.entities\";\n $toolEight->jsonxml_score_sub_node = \"score\";\n $toolEight->jsonxml_value_sub_node = \"keyword\";\n $toolEight->jsonxml_idx_sub_node = \"\";\n $toolEight->save();\n \n $toolNine = new AnnotationTool;\n $toolNine->display_name = \"Story type\";\n $toolNine->description = \"Deze tool bepaalt het verhaaltype\";\n $toolNine->command = \"http://bookstore.ewi.utwente.nl:24681/storytype\";\n $toolNine->get_arguments = \"\";\n $toolNine->post_arguments = \"\";\n $toolNine->output_format = \"json\";\n $toolNine->jsonxml_value_node = \"annotation.storytypes\";\n $toolNine->jsonxml_score_sub_node = \"score\";\n $toolNine->jsonxml_value_sub_node = \"storytype\";\n $toolNine->jsonxml_idx_sub_node = \"\";\n $toolNine->save();\n \n //input type elements:\n //Folktale\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 1;\n $textElement->prompt = 'Voer de originele tekst in';\n $textElement->english_name = 'text';\n $textElement->order = 1;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = true;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = true;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 41;\n $textElement->prompt = 'De samenvatting van de tekst';\n $textElement->english_name = 'description';\n $textElement->order = 20;\n $textElement->tool_id = $toolDescription->id;\n $textElement->score_slider = true;\n $textElement->long_text = true;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 62; //$dcTitleElement->id;\n $textElement->prompt = 'Extreme values in text';\n $textElement->english_name = 'extreme';\n $textElement->order = 26;\n $textElement->tool_id = $toolExtreme->id;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 61;\n $textElement->prompt = 'Literary text';\n $textElement->english_name = 'literary';\n $textElement->order = 25;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 43;\n $textElement->prompt = 'Het identificatienummer';\n $textElement->english_name = 'identifier';\n $textElement->order = 8;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 40;\n $textElement->prompt = 'Voer de datum in. Over het algemeen de datum van vertellen. Klik 2 datums aan voor een correcte invoer. Als de maand is aangegeven, klik dan de desbetreffende maand aan. Voor fragmenten van jaren of eeuwen, kijk in de selectieboxjes onderaan.';\n $textElement->english_name = 'date';\n $textElement->order = 4;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = true;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 60;\n $textElement->prompt = 'De verzamelaar van het verhaal';\n $textElement->english_name = 'collector';\n $textElement->order = 2; \n $textElement->tool_id = false; //no tool for auto annotation\n $textElement->score_slider = false; //we're not making any text\n $textElement->long_text = false; //a small field will do\n $textElement->html = false;\n $textElement->repeated_field = true; //there can be multiple collectors\n $textElement->date_picker = false; //this is no date\n $textElement->date_range_picker = false; //this is no date\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 50; //look in titles\n $textElement->autocomplete_extra_id = false; //and nowhere else\n $textElement->autocomplete_itemtype_id = false; //dont' restrict to certain item type\n $textElement->autocomplete_collection_id = 9; //but only look in collection verzamelaars\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 39;\n $textElement->prompt = 'De verteller van het verhaal';\n $textElement->english_name = 'creator';\n $textElement->order = 3;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 50; //look in titles\n $textElement->autocomplete_extra_id = false; //and nowhere else\n $textElement->autocomplete_itemtype_id = false; //dont' restrict to certain item type\n $textElement->autocomplete_collection_id = 4; //but only look in collection vertellers\n $textElement->field_scroll = false;\n $textElement->save();\n\n/* $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 37;\n $textElement->prompt = 'De medewerker die het verhaal in de verhalenbank invoert (overbodig)';\n $textElement->english_name = 'contributor';\n $textElement->order = 9;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = true;\n $textElement->save();\n*/ \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 50;\n $textElement->prompt = 'De titel van het verhaal';\n $textElement->english_name = 'title';\n $textElement->order = 9;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 48;\n $textElement->prompt = 'De bron van het verhaal';\n $textElement->english_name = 'source';\n $textElement->order = 5;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 51;\n $textElement->prompt = 'Het type bron van het verhaal (keuze)';\n $textElement->english_name = 'type';\n $textElement->order = 6;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true;\n $textElement->autocomplete_main_id = 51;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = 1;\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 47;\n $textElement->prompt = 'Heeft het Meertens de rechten van dit verhaal?';\n $textElement->english_name = 'rights';\n $textElement->order = 7;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n\t\t$textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 53;\n $textElement->prompt = 'Overig commentaar of informatie over de tekst, of de manier waarop deze verkregen is.';\n $textElement->english_name = 'commentary';\n $textElement->order = 40;\n $textElement->tool_id = false;\n $textElement->score_slider = false;\n $textElement->long_text = true;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 44;\n $textElement->prompt = 'De taal waarin het verhaal verteld is';\n $textElement->english_name = 'language';\n $textElement->order = 24;\n $textElement->tool_id = $toolThree->id;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 58;\n $textElement->prompt = 'Het subgenre van het verhaal';\n $textElement->english_name = 'subgenre';\n $textElement->order = 22;\n $textElement->tool_id = $toolFour->id;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 49;\n $textElement->prompt = 'Het verhaaltype of verhaaltypen. ATU, AT, Brunvand of TM nummer.';\n $textElement->english_name = 'subject';\n $textElement->order = 21;\n $textElement->tool_id = $toolNine->id; //add tool when available\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 43; //look in identifiers\n $textElement->autocomplete_extra_id = 50; //and show the titles (and show titles as well?)\n $textElement->autocomplete_itemtype_id = false; //dont' restrict to certain item type\n $textElement->autocomplete_collection_id = 3; //but only look in collection verhaaltypen\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 52;\n $textElement->prompt = 'De motieven die gevonden kunnen worden in de tekst';\n $textElement->english_name = 'motif';\n $textElement->order = 23;\n $textElement->tool_id = false; //add tool when available\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 43; //look in identifiers\n $textElement->autocomplete_extra_id = 50; //and show the titles\n $textElement->autocomplete_itemtype_id = false; //dont' restrict to certain item type\n $textElement->autocomplete_collection_id = 3; //but only look in collection verhaaltypen\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 63;\n $textElement->prompt = 'De namen (niet locaties) die gevonden kunnen worden in de tekst';\n $textElement->english_name = 'named entity';\n $textElement->order = 27;\n $textElement->tool_id = 9; //add tool when available\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 63; //look in identifiers\n $textElement->autocomplete_extra_id = 0; //and show the titles\n $textElement->autocomplete_itemtype_id = 18; //dont' restrict to certain item type\n $textElement->autocomplete_collection_id = 1; //but only look in collection volksverhalen\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 93;\n $textElement->prompt = 'De namen van locaties die gevonden kunnen worden in de tekst';\n $textElement->english_name = 'named entity location';\n $textElement->order = 28;\n $textElement->tool_id = 10; //add tool when available\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 93; //look in identifiers\n $textElement->autocomplete_extra_id = 0; //and show the titles\n $textElement->autocomplete_itemtype_id = 18; //don't restrict to certain item type\n $textElement->autocomplete_collection_id = 1; //but only look in collection volksverhalen\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 65;\n $textElement->prompt = 'De hoofdlocatie waar te tekst zich afspeelt, of over gaat';\n $textElement->english_name = 'place of action';\n $textElement->order = 29;\n $textElement->tool_id = false; //add tool when available\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = true;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 65; //look in identifiers\n $textElement->autocomplete_extra_id = 0; //and show the titles\n $textElement->autocomplete_itemtype_id = 18; //restrict to certain item type\n $textElement->autocomplete_collection_id = 1; //but only look in collection volksverhalen\n $textElement->field_scroll = false;\n $textElement->save();\n\n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 68;\n $textElement->prompt = 'De kloekecode van waar het verhaal vandaan komt';\n $textElement->english_name = 'kloeke georeference';\n $textElement->order = 30;\n $textElement->tool_id = false; //add tool when available\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = true; //automplete, yes please\n $textElement->autocomplete_main_id = 30; //look in other kloekecodes for now\n $textElement->autocomplete_extra_id = 0; //nope\n $textElement->autocomplete_itemtype_id = 0; //don't restrict to certain item type\n $textElement->autocomplete_collection_id = 0; //no collection\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 94;\n $textElement->prompt = 'De hoeveelheid woorden in de tekst';\n $textElement->english_name = 'word count';\n $textElement->order = 32;\n $textElement->tool_id = $toolCount->id;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n \n $textElement = new AnnotationTypeElement;\n $textElement->type_id = $storyType->id;\n $textElement->element_id = 95;\n $textElement->prompt = 'De klasse van de hoeveelheid woorden in de tekst';\n $textElement->english_name = 'word count group';\n $textElement->order = 33;\n $textElement->tool_id = $toolCountclass->id;\n $textElement->score_slider = false;\n $textElement->long_text = false;\n $textElement->html = false;\n $textElement->repeated_field = false;\n $textElement->date_picker = false;\n $textElement->date_range_picker = false;\n $textElement->autocomplete = false;\n $textElement->autocomplete_main_id = false;\n $textElement->autocomplete_extra_id = false;\n $textElement->autocomplete_itemtype_id = false;\n $textElement->autocomplete_collection_id = false;\n $textElement->field_scroll = false;\n $textElement->save();\n \n// Volksverhaaltype type elements\n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 38;\n $vvtElement->prompt = 'Coverage';\n $vvtElement->english_name = 'coverage';\n $vvtElement->order = 6;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 39;\n $vvtElement->prompt = 'De bedenker van dit verhaaltype';\n $vvtElement->english_name = 'creator';\n $vvtElement->order = 5;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = true;\n $vvtElement->autocomplete_main_id = 39;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = 19;\n $vvtElement->autocomplete_collection_id = 3;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 43;\n $vvtElement->prompt = 'Identificatienummer. Autocomplete is om te kijken of het nummer al bestaat. Kies een nummer dat niet in de lijst voorkomt!';\n $vvtElement->english_name = 'identifier';\n $vvtElement->order = 2;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = true;\n $vvtElement->autocomplete_main_id = 43;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = 19;\n $vvtElement->autocomplete_collection_id = 3;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n/* $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 49;\n $vvtElement->prompt = 'Het onderwerp van het verhaaltype';\n $vvtElement->english_name = 'subject';\n $vvtElement->order = 4;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n*/ \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 50;\n $vvtElement->prompt = 'Titel';\n $vvtElement->english_name = 'Title';\n $vvtElement->order = 3;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 52;\n $vvtElement->prompt = 'Motief';\n $vvtElement->english_name = 'motif';\n $vvtElement->order = 7;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = true;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 53;\n $vvtElement->prompt = 'Commentaar';\n $vvtElement->english_name = 'comments';\n $vvtElement->order = 8;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = true;\n $vvtElement->html = false;\n $vvtElement->repeated_field = true;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 54;\n $vvtElement->prompt = 'Combinaties';\n $vvtElement->english_name = 'combinations';\n $vvtElement->order = 9;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = true;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 55;\n $vvtElement->prompt = 'Origineel verhaaltype';\n $vvtElement->english_name = 'original Tale Type';\n $vvtElement->order = 10;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 56;\n $vvtElement->prompt = 'Category';\n $vvtElement->english_name = 'category';\n $vvtElement->order = 11;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = true;\n $vvtElement->autocomplete_main_id = 56;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = 19;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 57;\n $vvtElement->prompt = 'Subcategory';\n $vvtElement->english_name = 'subcategory';\n $vvtElement->order = 12;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = true;\n $vvtElement->autocomplete_main_id = 57;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = 19;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 58;\n $vvtElement->prompt = 'Subgenre';\n $vvtElement->english_name = 'subgenre';\n $vvtElement->order = 13;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 59;\n $vvtElement->prompt = 'Datum van invullen';\n $vvtElement->english_name = 'entry Date';\n $vvtElement->order = 15;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = false;\n $vvtElement->date_picker = true;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n $vvtElement = new AnnotationTypeElement;\n $vvtElement->type_id = $verhaaltypeType->id;\n $vvtElement->element_id = 64;\n $vvtElement->prompt = 'Literatuur';\n $vvtElement->english_name = 'literature';\n $vvtElement->order = 14;\n $vvtElement->tool_id = false;\n $vvtElement->score_slider = false;\n $vvtElement->long_text = false;\n $vvtElement->html = false;\n $vvtElement->repeated_field = true;\n $vvtElement->date_picker = false;\n $vvtElement->date_range_picker = false;\n $vvtElement->autocomplete = false;\n $vvtElement->autocomplete_main_id = false;\n $vvtElement->autocomplete_extra_id = false;\n $vvtElement->autocomplete_itemtype_id = false;\n $vvtElement->autocomplete_collection_id = false;\n $vvtElement->field_scroll = false;\n $vvtElement->save();\n \n //verzamelaar\n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 50;\n $verzamelaarElement->prompt = 'De naam van de verzamelaar. [VOORNAAM ACHTERNAAM]';\n $verzamelaarElement->english_name = 'title';\n $verzamelaarElement->order = 1;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 84;\n $verzamelaarElement->prompt = 'Geslacht van de verzamelaar';\n $verzamelaarElement->english_name = 'gender';\n $verzamelaarElement->order = 2;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 32;\n $verzamelaarElement->prompt = 'In welke plaats deze verzamelaar geboren is';\n $verzamelaarElement->english_name = 'birthplace';\n $verzamelaarElement->order = 3;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = 32;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = 12;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 31;\n $verzamelaarElement->prompt = 'De geboortedatum van deze verzamelaar';\n $verzamelaarElement->english_name = 'birth date';\n $verzamelaarElement->order = 4;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = true;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 33;\n $verzamelaarElement->prompt = 'De datum van eventueel overlijden';\n $verzamelaarElement->english_name = 'death date';\n $verzamelaarElement->order = 5;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = true;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 85;\n $verzamelaarElement->prompt = 'Straatnaam en nummer';\n $verzamelaarElement->english_name = 'address';\n $verzamelaarElement->order = 6;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 71;\n $verzamelaarElement->prompt = 'Woonplaats (ook in geolocatie gedeelte beneden)';\n $verzamelaarElement->english_name = 'place of residence';\n $verzamelaarElement->order = 7;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 71;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 72;\n $verzamelaarElement->prompt = 'Woonplaats sinds';\n $verzamelaarElement->english_name = 'place of residence since date';\n $verzamelaarElement->order = 8;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = true;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 73;\n $verzamelaarElement->prompt = 'Vorige woonplaats';\n $verzamelaarElement->english_name = 'previous place of residence';\n $verzamelaarElement->order = 9;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 71;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 34;\n $verzamelaarElement->prompt = 'Beroep';\n $verzamelaarElement->english_name = 'occupation';\n $verzamelaarElement->order = 10;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 34;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 70;\n $verzamelaarElement->prompt = 'Geloof';\n $verzamelaarElement->english_name = 'religion';\n $verzamelaarElement->order = 11;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 70;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 89;\n $verzamelaarElement->prompt = 'Privacy gewenst';\n $verzamelaarElement->english_name = 'privacy required';\n $verzamelaarElement->order = 12;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 82;\n $verzamelaarElement->prompt = 'Datum gevisiteerd';\n $verzamelaarElement->english_name = 'date visited';\n $verzamelaarElement->order = 13;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = true;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 74;\n $verzamelaarElement->prompt = 'Naam moeder (liefst [ACHTERNAAM, VOORNAAM])';\n $verzamelaarElement->english_name = 'name mother';\n $verzamelaarElement->order = 14;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 75;\n $verzamelaarElement->prompt = 'Geboorteplaats moeder';\n $verzamelaarElement->english_name = 'birthplace mother';\n $verzamelaarElement->order = 15;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 32;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 91;\n $verzamelaarElement->prompt = 'Geboortedatum moeder';\n $verzamelaarElement->english_name = 'birthdate mother';\n $verzamelaarElement->order = 16;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = true;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 76;\n $verzamelaarElement->prompt = 'Beroep moeder';\n $verzamelaarElement->english_name = 'occupation mother';\n $verzamelaarElement->order = 17;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 34;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 77;\n $verzamelaarElement->prompt = 'Naam vader';\n $verzamelaarElement->english_name = 'name father';\n $verzamelaarElement->order = 18;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 78;\n $verzamelaarElement->prompt = 'Geboorteplaats vader';\n $verzamelaarElement->english_name = 'birthplace father';\n $verzamelaarElement->order = 19;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 32;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 79;\n $verzamelaarElement->prompt = 'Geboortedatum vader';\n $verzamelaarElement->english_name = 'birthdate father';\n $verzamelaarElement->order = 20;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = true;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 80;\n $verzamelaarElement->prompt = 'Het beroep van de vader';\n $verzamelaarElement->english_name = 'occupation father';\n $verzamelaarElement->order = 21;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 34;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 83;\n $verzamelaarElement->prompt = 'Overige familie relaties';\n $verzamelaarElement->english_name = 'family relations';\n $verzamelaarElement->order = 22;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 90;\n $verzamelaarElement->prompt = 'Is getrouwd met ...';\n $verzamelaarElement->english_name = 'married to';\n $verzamelaarElement->order = 23;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 86;\n $verzamelaarElement->prompt = 'Naam van de partner (bij ongetrouwd)';\n $verzamelaarElement->english_name = 'name partner';\n $verzamelaarElement->order = 24;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 87;\n $verzamelaarElement->prompt = 'Geboorteplaats van de partner';\n $verzamelaarElement->english_name = 'birthplace partner';\n $verzamelaarElement->order = 25;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 92;\n $verzamelaarElement->prompt = 'Geboortedatum van de partner';\n $verzamelaarElement->english_name = 'birthdate partner';\n $verzamelaarElement->order = 26;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = true;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 88;\n $verzamelaarElement->prompt = 'Beroep van de partner';\n $verzamelaarElement->english_name = 'occupation partner';\n $verzamelaarElement->order = 27;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 34;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 53;\n $verzamelaarElement->prompt = 'Overig commentaar bij deze persoon';\n $verzamelaarElement->english_name = 'comments';\n $verzamelaarElement->order = 28;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = true;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 67;\n $verzamelaarElement->prompt = 'Het corpus waar deze persoon aan heeft bijgedragen';\n $verzamelaarElement->english_name = 'corpus';\n $verzamelaarElement->order = 29;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 81;\n $verzamelaarElement->prompt = 'Nummers verslagen b65';\n $verzamelaarElement->english_name = 'nummers verslagen b65';\n $verzamelaarElement->order = 30;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = false;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = true;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = true;\n $verzamelaarElement->autocomplete_main_id = 81;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n \n $verzamelaarElement = new AnnotationTypeElement;\n $verzamelaarElement->type_id = $verzamelaarType->id;\n $verzamelaarElement->element_id = 36;\n $verzamelaarElement->prompt = 'De bibiolografie van deze persoon';\n $verzamelaarElement->english_name = 'bibliography';\n $verzamelaarElement->order = 31;\n $verzamelaarElement->tool_id = false;\n $verzamelaarElement->score_slider = false;\n $verzamelaarElement->long_text = true;\n $verzamelaarElement->html = false;\n $verzamelaarElement->repeated_field = false;\n $verzamelaarElement->date_picker = false;\n $verzamelaarElement->date_range_picker = false;\n $verzamelaarElement->autocomplete = false;\n $verzamelaarElement->autocomplete_main_id = false;\n $verzamelaarElement->autocomplete_extra_id = false;\n $verzamelaarElement->autocomplete_itemtype_id = false;\n $verzamelaarElement->autocomplete_collection_id = false;\n $verzamelaarElement->field_scroll = false;\n $verzamelaarElement->save();\n\n //verteller\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 50;\n $vertellerElement->prompt = 'De naam van de verteller. [ACHTERNAAM, VOORNAAM]';\n $vertellerElement->english_name = 'title';\n $vertellerElement->order = 1;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 84;\n $vertellerElement->prompt = 'Geslacht van de verteller';\n $vertellerElement->english_name = 'gender';\n $vertellerElement->order = 2;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 32;\n $vertellerElement->prompt = 'In welke plaats deze verteller geboren is';\n $vertellerElement->english_name = 'birthplace';\n $vertellerElement->order = 3;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = 32;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = 12;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 31;\n $vertellerElement->prompt = 'De geboortedatum van deze verteller';\n $vertellerElement->english_name = 'birth date';\n $vertellerElement->order = 4;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = true;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 33;\n $vertellerElement->prompt = 'De datum van eventueel overlijden';\n $vertellerElement->english_name = 'death date';\n $vertellerElement->order = 5;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = true;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 85;\n $vertellerElement->prompt = 'Straatnaam en nummer';\n $vertellerElement->english_name = 'address';\n $vertellerElement->order = 6;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 71;\n $vertellerElement->prompt = 'Woonplaats (ook via geolocatie functie onderaan)';\n $vertellerElement->english_name = 'place of residence';\n $vertellerElement->order = 7;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 71;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 72;\n $vertellerElement->prompt = 'Woonplaats sinds';\n $vertellerElement->english_name = 'place of residence since date';\n $vertellerElement->order = 8;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = true;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 73;\n $vertellerElement->prompt = 'Vorige woonplaats';\n $vertellerElement->english_name = 'previous place of residence';\n $vertellerElement->order = 9;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 71;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 34;\n $vertellerElement->prompt = 'Beroep';\n $vertellerElement->english_name = 'occupation';\n $vertellerElement->order = 10;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 34;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 70;\n $vertellerElement->prompt = 'Geloof';\n $vertellerElement->english_name = 'religion';\n $vertellerElement->order = 11;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 70;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 89;\n $vertellerElement->prompt = 'Privacy gewenst';\n $vertellerElement->english_name = 'privacy required';\n $vertellerElement->order = 12;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 82;\n $vertellerElement->prompt = 'Datum gevisiteerd';\n $vertellerElement->english_name = 'date visited';\n $vertellerElement->order = 13;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = true;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 74;\n $vertellerElement->prompt = 'Naam moeder';\n $vertellerElement->english_name = 'name mother';\n $vertellerElement->order = 14;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 75;\n $vertellerElement->prompt = 'Geboorteplaats moeder';\n $vertellerElement->english_name = 'birthplace mother';\n $vertellerElement->order = 15;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 32;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 91;\n $vertellerElement->prompt = 'Geboortedatum Mother';\n $vertellerElement->english_name = 'birthdate mother';\n $vertellerElement->order = 16;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = true;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 76;\n $vertellerElement->prompt = 'Beroep Mother';\n $vertellerElement->english_name = 'occupation mother';\n $vertellerElement->order = 17;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 34;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 77;\n $vertellerElement->prompt = 'Naam Vader';\n $vertellerElement->english_name = 'name father';\n $vertellerElement->order = 18;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 78;\n $vertellerElement->prompt = 'Birthplace Father';\n $vertellerElement->english_name = 'birthplace father';\n $vertellerElement->order = 19;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 32;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 79;\n $vertellerElement->prompt = 'Birthdate Father';\n $vertellerElement->english_name = 'birthdate father';\n $vertellerElement->order = 20;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = true;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 80;\n $vertellerElement->prompt = 'Het beroep van de vader';\n $vertellerElement->english_name = 'occupation father';\n $vertellerElement->order = 21;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 34;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 83;\n $vertellerElement->prompt = 'Overige familie relaties';\n $vertellerElement->english_name = 'family relations';\n $vertellerElement->order = 22;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 90;\n $vertellerElement->prompt = 'Is getrouwd met ...';\n $vertellerElement->english_name = 'married to';\n $vertellerElement->order = 23;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 86;\n $vertellerElement->prompt = 'Naam van de partner (bij ongetrouwd)';\n $vertellerElement->english_name = 'name partner';\n $vertellerElement->order = 24;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 87;\n $vertellerElement->prompt = 'Geboorteplaats van de partner';\n $vertellerElement->english_name = 'birthplace partner';\n $vertellerElement->order = 25;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 92;\n $vertellerElement->prompt = 'Geboortedatum van de partner';\n $vertellerElement->english_name = 'birthdate partner';\n $vertellerElement->order = 26;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = true;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 88;\n $vertellerElement->prompt = 'Beroep van de partner';\n $vertellerElement->english_name = 'occupation partner';\n $vertellerElement->order = 27;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 34;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 53;\n $vertellerElement->prompt = 'Overig commentaar bij deze persoon';\n $vertellerElement->english_name = 'comments';\n $vertellerElement->order = 28;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = true;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 67;\n $vertellerElement->prompt = 'Het corpus waar deze persoon aan heeft bijgedragen';\n $vertellerElement->english_name = 'corpus';\n $vertellerElement->order = 29;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 81;\n $vertellerElement->prompt = 'nummers verslagen b65';\n $vertellerElement->english_name = 'nummers verslagen b65';\n $vertellerElement->order = 30;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = false;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = true;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = true;\n $vertellerElement->autocomplete_main_id = 81;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n\n $vertellerElement = new AnnotationTypeElement;\n $vertellerElement->type_id = $vertellerType->id;\n $vertellerElement->element_id = 36;\n $vertellerElement->prompt = 'De bibiolografie van deze persoon';\n $vertellerElement->english_name = 'bibliography';\n $vertellerElement->order = 31;\n $vertellerElement->tool_id = false;\n $vertellerElement->score_slider = false;\n $vertellerElement->long_text = true;\n $vertellerElement->html = false;\n $vertellerElement->repeated_field = false;\n $vertellerElement->date_picker = false;\n $vertellerElement->date_range_picker = false;\n $vertellerElement->autocomplete = false;\n $vertellerElement->autocomplete_main_id = false;\n $vertellerElement->autocomplete_extra_id = false;\n $vertellerElement->autocomplete_itemtype_id = false;\n $vertellerElement->autocomplete_collection_id = false;\n $vertellerElement->field_scroll = false;\n $vertellerElement->save();\n \n //Lexicon\n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 1;\n $lexiconElement->prompt = 'Voer de originele tekst in';\n $lexiconElement->english_name = 'text';\n $lexiconElement->order = 3;\n $lexiconElement->tool_id = false;\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = true;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = false;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = false;\n $lexiconElement->autocomplete_main_id = false;\n $lexiconElement->autocomplete_extra_id = false;\n $lexiconElement->autocomplete_itemtype_id = false;\n $lexiconElement->autocomplete_collection_id = false;\n $lexiconElement->field_scroll = true;\n $lexiconElement->save();\n \n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 39;\n $lexiconElement->prompt = 'De schrijver van de tekst';\n $lexiconElement->english_name = 'creator';\n $lexiconElement->order = 4;\n $lexiconElement->tool_id = false;\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = true; //Lexicon items can be styled\n $lexiconElement->repeated_field = true;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = true; //automplete, yes please\n $lexiconElement->autocomplete_main_id = 50; //look in titles\n $lexiconElement->autocomplete_extra_id = false; //and nowhere else\n $lexiconElement->autocomplete_itemtype_id = false; //dont' restrict to certain item type\n $lexiconElement->autocomplete_collection_id = 4; //but only look in collection vertellers\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n\n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 50;\n $lexiconElement->prompt = 'De titel van het verhaal';\n $lexiconElement->english_name = 'title';\n $lexiconElement->order = 1;\n $lexiconElement->tool_id = false;\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = false;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = false;\n $lexiconElement->autocomplete_main_id = false;\n $lexiconElement->autocomplete_extra_id = false;\n $lexiconElement->autocomplete_itemtype_id = false;\n $lexiconElement->autocomplete_collection_id = false;\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n\n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 53;\n $lexiconElement->prompt = 'Overig commentaar of informatie over de tekst, of de manier waarop deze verkregen is.';\n $lexiconElement->english_name = 'commentary';\n $lexiconElement->order = 6;\n $lexiconElement->tool_id = false;\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = true;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = true;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = false;\n $lexiconElement->autocomplete_main_id = false;\n $lexiconElement->autocomplete_extra_id = false;\n $lexiconElement->autocomplete_itemtype_id = false;\n $lexiconElement->autocomplete_collection_id = false;\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n \n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 49;\n $lexiconElement->prompt = 'Het verhaaltype of verhaaltypen. ATU, AT, Brunvand of TM nummer.';\n $lexiconElement->english_name = 'subject';\n $lexiconElement->order = 21;\n $lexiconElement->tool_id = $toolNine->id; //add tool when available\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = true;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = true; //automplete, yes please\n $lexiconElement->autocomplete_main_id = 43; //look in identifiers\n $lexiconElement->autocomplete_extra_id = 50; //and show the titles (and show titles as well?)\n $lexiconElement->autocomplete_itemtype_id = false; //dont' restrict to certain item type\n $lexiconElement->autocomplete_collection_id = 3; //but only look in collection verhaaltypen\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n\n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 52;\n $lexiconElement->prompt = 'De motieven die gevonden kunnen worden in de tekst';\n $lexiconElement->english_name = 'motif';\n $lexiconElement->order = 23;\n $lexiconElement->tool_id = false; //add tool when available\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = true;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = true; //automplete, yes please\n $lexiconElement->autocomplete_main_id = 43; //look in identifiers\n $lexiconElement->autocomplete_extra_id = 50; //and show the titles\n $lexiconElement->autocomplete_itemtype_id = false; //dont' restrict to certain item type\n $lexiconElement->autocomplete_collection_id = 3; //but only look in collection verhaaltypen\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n \n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 63;\n $lexiconElement->prompt = 'De namen (niet locaties) die gevonden kunnen worden in de tekst';\n $lexiconElement->english_name = 'named entity';\n $lexiconElement->order = 27;\n $lexiconElement->tool_id = 9; //add tool when available\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = true;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = true; //automplete, yes please\n $lexiconElement->autocomplete_main_id = 63; //look in identifiers\n $lexiconElement->autocomplete_extra_id = 0; //and show the titles\n $lexiconElement->autocomplete_itemtype_id = 18; //dont' restrict to certain item type\n $lexiconElement->autocomplete_collection_id = 1; //but only look in collection volksverhalen\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n \n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 93;\n $lexiconElement->prompt = 'De namen van locaties die gevonden kunnen worden in de tekst';\n $lexiconElement->english_name = 'named entity location';\n $lexiconElement->order = 28;\n $lexiconElement->tool_id = 10; //add tool when available\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = true;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = true; //automplete, yes please\n $lexiconElement->autocomplete_main_id = 93; //look in identifiers\n $lexiconElement->autocomplete_extra_id = 0; //and show the titles\n $lexiconElement->autocomplete_itemtype_id = 18; //don't restrict to certain item type\n $lexiconElement->autocomplete_collection_id = 1; //but only look in collection volksverhalen\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n\n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 65;\n $lexiconElement->prompt = 'De hoofdlocatie waar te tekst zich afspeelt, of over gaat';\n $lexiconElement->english_name = 'place of action';\n $lexiconElement->order = 29;\n $lexiconElement->tool_id = false; //add tool when available\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = true;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = true; //automplete, yes please\n $lexiconElement->autocomplete_main_id = 65; //look in identifiers\n $lexiconElement->autocomplete_extra_id = 0; //and show the titles\n $lexiconElement->autocomplete_itemtype_id = 18; //restrict to certain item type\n $lexiconElement->autocomplete_collection_id = 1; //but only look in collection volksverhalen\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n\n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 94;\n $lexiconElement->prompt = 'De hoeveelheid woorden in de tekst';\n $lexiconElement->english_name = 'word count';\n $lexiconElement->order = 32;\n $lexiconElement->tool_id = $toolCount->id;\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = false;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = false;\n $lexiconElement->autocomplete_main_id = false;\n $lexiconElement->autocomplete_extra_id = false;\n $lexiconElement->autocomplete_itemtype_id = false;\n $lexiconElement->autocomplete_collection_id = false;\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n \n $lexiconElement = new AnnotationTypeElement;\n $lexiconElement->type_id = $lexiconType->id;\n $lexiconElement->element_id = 95;\n $lexiconElement->prompt = 'De klasse van de hoeveelheid woorden in de tekst';\n $lexiconElement->english_name = 'word count group';\n $lexiconElement->order = 33;\n $lexiconElement->tool_id = $toolCountclass->id;\n $lexiconElement->score_slider = false;\n $lexiconElement->long_text = false;\n $lexiconElement->html = false;\n $lexiconElement->repeated_field = false;\n $lexiconElement->date_picker = false;\n $lexiconElement->date_range_picker = false;\n $lexiconElement->autocomplete = false;\n $lexiconElement->autocomplete_main_id = false;\n $lexiconElement->autocomplete_extra_id = false;\n $lexiconElement->autocomplete_itemtype_id = false;\n $lexiconElement->autocomplete_collection_id = false;\n $lexiconElement->field_scroll = false;\n $lexiconElement->save();\n }", "public function edit(TypesConges $typesConges)\n {\n //\n }", "public function save() {\n if ($this->isNew()) {\n $this->xpdo->log(MODx::LOG_LEVEL_INFO,'Creating default RegType');\n $regtype = $this->xpdo->newObject('RSVPMeRegType');\n $regtype->fromArray(array(\n 'name' => 'default',\n 'description' => 'default registration type',\n 'code' => (isset($this->code)) ? $this->code : '',\n 'fee' => (isset($this->fee)) ? $this->fee : '',\n ));\n\n $this->addMany($regtype);\n }\n\n /**\n * For now, only 1 registration type is allowed, so we will automatically\n * set the end date to the same as the date of the event. It will be set\n * independently in a future release.\n */\n if (!$this->isNew() && $this->isDirty('date')) {\n $regtypes = $this->getMany('RegistrationType');\n $regtype = array_pop($regtypes);\n $regtype->set('end',$this->get('date'));\n }\n\n /**\n * Since Registration Types will only be editable in a later version,\n * we need to make sure the 'secret code' stays synced\n */\n if (!$this->isNew() && (isset($this->code) || isset($this->fee))) {\n $regtypes = $this->getMany('RegistrationType');\n $regtype = array_pop($regtypes);\n\n if (isset($this->code)) {\n $regtype->set('code',$this->code);\n }\n if (isset($this->fee)) {\n $regtype->set('fee',$this->fee);\n }\n }\n\n /* now we can finish saving, this will also save related objects */\n return parent :: save();\n }", "public function prepareEventBeforeMerge()\n {\n // если голова не знает о пенальти, то счет по пенальти попадет в счет матча и будет задвоение\n if (isset($this->item['statP']['is_penalty']) && ! isset($this->item['headP']['is_penalty']) && isset($this->item['headP']['score_home']) && isset($this->item['headP']['score_away']))\n {\n $this->item['headP']['penalty_home'] = $this->item['headP']['score_home'];\n $this->item['headP']['penalty_away'] = $this->item['headP']['score_away'];\n unset($this->item['headP']['score_home']);\n unset($this->item['headP']['score_away']);\n }\n }", "public function appendNode($type) {\n $node = new Node($type, $this->current);\n $this->current->append($node);\n $this->current = $node;\n }", "function add_id_type()\n\t{\n\t\t$data['name']\t\t\t\t\t=\t$this->input->post('name');\n\t\t$data['created_on']\t\t\t\t= \ttime();\n\t\t$data['created_by']\t\t\t\t= \t$this->session->userdata('user_id');\n\t\t$data['timestamp']\t\t\t\t= \ttime();\n\t\t$data['updated_by']\t\t\t\t= \t$this->session->userdata('user_id');\n\n\t\t$this->db->insert('id_type', $data);\n\n\t\t$this->session->set_flashdata('success', 'New ID type has been added successfully.');\n\n\t\tredirect(base_url() . 'id_type_settings', 'refresh');\n\t}", "private function _make_leave_event($data) {\n\n return array(\n \"title\" => $data->applicant_name,\n \"start\" => $data->start_date . \" \" . \"00:00:00\",\n \"end\" => $data->end_date . \" \" . \"23:59:59\", //show leave applications for the full day\n \"backgroundColor\" => $data->leave_type_color,\n \"borderColor\" => $data->leave_type_color,\n \"extendedProps\" => array(\n \"icon\" => \"log-out\",\n \"leave_id\" => $data->id, //to make is secure we'll use the encrypted id\n \"cycle\" => 0,\n \"event_type\" => \"leave\",\n )\n );\n }", "abstract protected function post_type();", "public function insert2($label_alias_type)\n {\n $query=\"INSERT INTO label_alias_type ( \".\n\t \"id,\".\n \"name,\".\n \"parent,\".\n \"child_order,\".\n \"description,\".\n \"gid \". \n \")\".\n \"VALUES (\".\n \"null,\".\n \"'\".$this->sqlSafe($label_alias_type->name).\"',\".\n \" \".$label_alias_type->parent.\" ,\".\n \" \".$label_alias_type->child_order.\" ,\".\n \"'\".$this->sqlSafe($label_alias_type->description).\"',\".\n \"'\".$this->sqlSafe($label_alias_type->gid).\"' \". \n \")\"; \n\n $id = $this->executeInsert($query);\n\t $label_alias_type->id = $id;\n\t return($label_alias_type);\t\n }", "function wtfdivi099_add_post_types($post_types) {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (!in_array($pt, $post_types) and post_type_supports($pt, 'editor')) {\r\n\t\t\t$post_types[] = $pt;\r\n\t\t}\r\n\t} \r\n\treturn $post_types;\r\n}", "public function edit(Leave $leave)\n {\n //\n }", "public function edit(Leave $leave)\n {\n //\n }", "public function insert_box ($name, $farbe, $menu, $art) {\t \n\t \t$name = htmlentities($name);\n\t \t\n\t \t$menu_id = explode(\",\", $menu);\n\t \t\n\t \tif (count($menu_id) > 1) {\n\t \t\tif (trim($name) == \"\" or trim($farbe) == \"\" or trim($art) == \"\") {\n\t\t \t\techo '<div class=\"error\"><p>Fehler: unvollständige Eingabe</p></div>';\n\t\t \t\t$this->show_box($id);\n\t\t \t\tdie();\n\t \t\t}\n\n\t\t\t$sql = \"INSERT INTO Box ( Name, Farbe, Anzeigen, Art_ID ) VALUES ( ?, ?, 1, ? )\";\t\t\n\t\t\t$res = $this->db->prepare($sql);\n\t\t\t$res->bind_param('ssi', $name, $farbe, $art);\n\t\t\t$res->execute();\n\t\t\t\n\t\t\t$this->db->set(\"what\" , \"ID\");\n\t\t\t$this->db->set(\"from\" , \"Box\");\n\t\t\t$this->db->set(\"where\", \"Name = '$name' AND Farbe = '$farbe'\");\n\t\t\t$this->db->set(\"order\", 0);\n\t\t\t$this->db->set(\"show\" , \"ID\");\n\t\t\t\n\t\t\t$id = $res = $this->db->do_query ();\n\n\t\t\tfor ($i = 0; $i < (count($menu_id)-1); $i++) {\n\t\t\t\t$sql = \"INSERT INTO con_Menu_Box ( Menu_ID, Box_ID, Box_Top, Box_Left ) VALUES ( ?, ?, '100px', '100px')\";\t\t\n\t\t\t\t$res = $this->db->prepare($sql);\n\t\t\t\t$res->bind_param('ii', $menu_id[$i], $id);\n\t\t\t\t$res->execute();\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($art == 2) {\n\t\t\t \t$text = \"...\";\n\t\t\t \n\t\t\t\t$sql = \"INSERT INTO Notizen ( Text, Datum, Box_ID ) VALUES ( ?, NOW(), ? )\";\n\t\t\t\t$res = $this->db->prepare($sql);\n\t\t\t\t$res->bind_param('si', nl2br($text), $id);\n\t\t\t\t$res->execute();\n\t\t\t}\n\t\t\t\n\t\t\techo '<div id=\"alert_box\"><p>Box wurde erstellt</p></div>';\n\t \t} else {\n\t \t\techo '<div class=\"error\"><p>Fehler: unvollständige Eingabe</p></div>';\n\t \t\t$this->show_all_box();\n\t \t\tdie();\n\t \t}\n\t }", "function pro_types($op = null)\n{\n global $user;\n $editorid = $user->uid;\n\n $Block['title'] = 'Professional Type';\n $content = '';\n $time = time();\n \n $_ProType = _pro_roles();\n $type_keys = implode(',',array_keys($_ProType));\n if($op == 'view' || $op == null)\n {\n $sql = \"select count(rid) as cnt, rid from users_roles, maenna_people where rid in ($type_keys) and uid = pid and (delete_marker is null or delete_marker != 1) group by rid\";\n \n $result = db_query($sql);\n while(($Row = db_fetch_object($result)) !== false)\n {\n $cnt = $Row->cnt;\n $rid = $Row->rid;\n $type = $_ProType[\"$rid\"];\n $content .= \"<div class=row style='padding:2px 0;position:relative;'><div style='position:absolute;text-align:right;width:100%'>$cnt</div>$type</div>\";\n }\n// $content .= \"<div style='border-top:solid 1px #ebebeb;text-align:right;'>\".\n// \"<a href='/account?a=professionals&panel=pro_types_panel'>more</a></div>\";\n $Block['body'] = sidebar_box($Block['title'], $content);\n }\n return $Block;\n}", "public function declareOldItems() {\n // Old itemtypes\n define(\"GENERAL_TYPE\", 0);\n define(\"COMPUTER_TYPE\", 1);\n define(\"NETWORKING_TYPE\", 2);\n define(\"PRINTER_TYPE\", 3);\n define(\"MONITOR_TYPE\", 4);\n define(\"PERIPHERAL_TYPE\", 5);\n define(\"SOFTWARE_TYPE\", 6);\n define(\"CONTACT_TYPE\", 7);\n define(\"ENTERPRISE_TYPE\", 8);\n define(\"INFOCOM_TYPE\", 9);\n define(\"CONTRACT_TYPE\", 10);\n define(\"CARTRIDGEITEM_TYPE\", 11);\n define(\"TYPEDOC_TYPE\", 12);\n define(\"DOCUMENT_TYPE\", 13);\n define(\"KNOWBASE_TYPE\", 14);\n define(\"USER_TYPE\", 15);\n define(\"TRACKING_TYPE\", 16);\n define(\"CONSUMABLEITEM_TYPE\", 17);\n define(\"CONSUMABLE_TYPE\", 18);\n define(\"CARTRIDGE_TYPE\", 19);\n define(\"SOFTWARELICENSE_TYPE\", 20);\n define(\"LINK_TYPE\", 21);\n define(\"STATE_TYPE\", 22);\n define(\"PHONE_TYPE\", 23);\n define(\"DEVICE_TYPE\", 24);\n define(\"REMINDER_TYPE\", 25);\n define(\"STAT_TYPE\", 26);\n define(\"GROUP_TYPE\", 27);\n define(\"ENTITY_TYPE\", 28);\n define(\"RESERVATION_TYPE\", 29);\n define(\"AUTHMAIL_TYPE\", 30);\n define(\"AUTHLDAP_TYPE\", 31);\n define(\"OCSNG_TYPE\", 32);\n define(\"REGISTRY_TYPE\", 33);\n define(\"PROFILE_TYPE\", 34);\n define(\"MAILGATE_TYPE\", 35);\n define(\"RULE_TYPE\", 36);\n define(\"TRANSFER_TYPE\", 37);\n define(\"BOOKMARK_TYPE\", 38);\n define(\"SOFTWAREVERSION_TYPE\", 39);\n define(\"PLUGIN_TYPE\", 40);\n define(\"COMPUTERDISK_TYPE\", 41);\n define(\"NETWORKING_PORT_TYPE\", 42);\n define(\"FOLLOWUP_TYPE\", 43);\n define(\"BUDGET_TYPE\", 44);\n\n // Old devicetypes\n define(\"MOBOARD_DEVICE\", 1);\n define(\"PROCESSOR_DEVICE\", 2);\n define(\"RAM_DEVICE\", 3);\n define(\"HDD_DEVICE\", 4);\n define(\"NETWORK_DEVICE\", 5);\n define(\"DRIVE_DEVICE\", 6);\n define(\"CONTROL_DEVICE\", 7);\n define(\"GFX_DEVICE\", 8);\n define(\"SND_DEVICE\", 9);\n define(\"PCI_DEVICE\", 10);\n define(\"CASE_DEVICE\", 11);\n define(\"POWER_DEVICE\", 12);\n }", "function edit_param_exception($action, $type, $val)\n {\n\n if ($action == \"add\") {\n $data = array(\n 'type' => $type,\n 'param' => $val,\n );\n\n return $this->insert_into_table('exception_params', $data);\n } elseif ($action == \"delete\") {\n echo_debug(json_encode($this->get_custom_params()));\n $data = array(\n 'type' => $type,\n 'param' => $val,\n );\n return $this->delete_from_table('exception_params', $data);\n } else {\n return FALSE;\n }\n }", "function add_booktype($params)\n {\n $this->db->insert('booktypes',$params);\n return $this->db->insert_id();\n }", "public function get_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \t$data=$query->result();\n $list = array('' => 'Select One...');\n \tif(!empty($data)){\n \t\tforeach ($data as $value) {\n \t\t\t$list[$value->leave_type_id]=$value->leave_type;\n \t\t}\n \t}\n \treturn $list;\n }", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "function tipoSituacaoEvento($tipo){\n\t\t\t\tswitch($tipo){\n\t\t\t\t\t\n\t\t\t\tcase '1':\n\t\t\t\t\t$tipo\t= 'Solicitada';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '2':\n\t\t\t\t\t$tipo\t= 'Autorizada';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '3':\n\t\t\t\t\t$tipo\t= 'Em Andamento';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '4':\n\t\t\t\t\t$tipo\t= 'Concluida';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\treturn $tipo;\n}", "public function visitLeave(NodeInterface $node);", "public function move_post_type_menu() {\n\t\t// Bail if post type cannot be found.\n\t\tif ( ( ! $post_type = $this->get_post_type() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if post type shouldn't be moved.\n\t\tif ( ! in_array( $post_type, $this->get_post_types() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $menu, $submenu;\n\n\t\t$key = 'edit.php?post_type=';\n\n\t\tif ( $post_type === 'post' ) {\n\t\t\t$key = 'edit.php';\n\t\t} else {\n\t\t\t$key .= $post_type;\n\t\t}\n\n\t\t$i = $this->get_index();\n\n\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\tforeach ( $menu as $index => $value ) {\n\t\t\tif ( ! array_search( $key, $value ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$before = $menu[$index];\n\n\t\t\tunset( $menu[$index] );\n\n\t\t\tif ( $before[2] !== $key ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$menu[$i][1] = $before[1];\n\t\t\t$menu[$i][2] = $before[2];\n\t\t\t$menu[$i][5] = $before[5];\n\n\t\t\t$sub = [\n\t\t\t\t1 => [\n\t\t\t\t\t0 => __( 'All Content', 'wp-content-menu' ),\n\t\t\t\t\t1 => $before[1],\n\t\t\t\t\t2 => 'admin.php?page=content'\n\t\t\t\t]\n\t\t\t];\n\n\t\t\tforeach ( $submenu[$key] as $index => $value ) {\n\t\t\t\tif ( $value[0] === $post_type_object->labels->add_new ) {\n\t\t\t\t\t$value[0] = apply_filters( 'content_menu_add_new_item_label', $post_type_object->labels->add_new_item );\n\t\t\t\t}\n\n\t\t\t\t$sub[$index] = $value;\n\t\t\t}\n\n\t\t\t$submenu[$menu[$i][2]] = $sub;\n\t\t}\n\t}" ]
[ "0.5142426", "0.5082389", "0.5064751", "0.49068695", "0.4893627", "0.48630047", "0.4795121", "0.47806665", "0.47775748", "0.47399652", "0.4737057", "0.47297826", "0.47103852", "0.47041103", "0.46873248", "0.46870318", "0.4686359", "0.468107", "0.46623477", "0.46175316", "0.46018133", "0.4591245", "0.4591139", "0.458594", "0.45829585", "0.45787224", "0.45783824", "0.45779943", "0.4563929", "0.45571226", "0.4551821", "0.45489916", "0.45457637", "0.45453855", "0.4542832", "0.45374265", "0.4528509", "0.45280114", "0.45268103", "0.4525749", "0.45196328", "0.4516856", "0.4515659", "0.4512797", "0.45072487", "0.4506119", "0.44972202", "0.44884637", "0.4463597", "0.44540012", "0.44452092", "0.44346938", "0.44243228", "0.4417459", "0.44081512", "0.44003603", "0.4400183", "0.43925488", "0.4388272", "0.43781304", "0.4376863", "0.43759382", "0.43755203", "0.4367157", "0.43664914", "0.43655765", "0.43630522", "0.43619058", "0.43616566", "0.43616056", "0.43591708", "0.4357576", "0.43490717", "0.43481913", "0.43479872", "0.43450645", "0.43447027", "0.4340863", "0.4336342", "0.43330052", "0.43327597", "0.4331482", "0.43289143", "0.43265462", "0.43259382", "0.43233594", "0.431606", "0.43157998", "0.43146542", "0.43146542", "0.43140435", "0.4313623", "0.43121597", "0.43104145", "0.43076012", "0.43072852", "0.43047684", "0.43011048", "0.42951182", "0.42931318" ]
0.60432804
0
get all leave type for apply leave
public function get_leave_type(){ $this->db->select('*'); $this->db->from('leave_type'); $query=$this->db->get(); $data=$query->result(); $list = array('' => 'Select One...'); if(!empty($data)){ foreach ($data as $value) { $list[$value->leave_type_id]=$value->leave_type; } } return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \treturn $query->result();\n }", "function getLeaveTypes()\n {\n $leaveTypes = [];\n $leaves = DB::table('dbo.LEAVE_TYPE')->lists('leave_type');\n $userGender = Employee::find(Auth::user()->Emp_id)->Emp_Gender;\n \n foreach ($leaves as $leaveType )\n {\n array_push($leaveTypes, $leaveType);\n }\n\n if($userGender == \"M\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Maternity\"));\n }\n\n if($userGender == \"F\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Paternity\"));\n }\n\n return $leaveTypes;\n }", "public function leaveType()\n {\n return $this->belongsTo(LeaveType::class, 'leave_type_id');\n }", "public function getLeave()\n {\n return $this->get(self::_LEAVE);\n }", "public function index()\n {\n return LeaveTypeResource::collection($this->leaveType->all());\n }", "public function f_get_leaveAlloaction_table()\r\n {\r\n\r\n $sql = $this->db->query(\" SELECT * FROM td_leave_dtls WHERE trans_type = 'O'\r\n AND YEAR(trans_dt) = YEAR(CURDATE()) \");\r\n return $sql->result();\r\n\r\n }", "private function _make_leave_event($data) {\n\n return array(\n \"title\" => $data->applicant_name,\n \"start\" => $data->start_date . \" \" . \"00:00:00\",\n \"end\" => $data->end_date . \" \" . \"23:59:59\", //show leave applications for the full day\n \"backgroundColor\" => $data->leave_type_color,\n \"borderColor\" => $data->leave_type_color,\n \"extendedProps\" => array(\n \"icon\" => \"log-out\",\n \"leave_id\" => $data->id, //to make is secure we'll use the encrypted id\n \"cycle\" => 0,\n \"event_type\" => \"leave\",\n )\n );\n }", "public function getLeaveReasonAllowableValues()\n {\n return [\n self::LEAVE_REASON__NAME_LEFT_THE_MEETING,\n self::LEAVE_REASON__NAME_GOT_DISCONNECTED_FROM_THE_MEETING,\n self::LEAVE_REASON_HOST_ENDED_THE_MEETING,\n self::LEAVE_REASON_HOST_CLOSED_THE_MEETING,\n self::LEAVE_REASON_HOST_STARTED_A_NEW_MEETING,\n self::LEAVE_REASON_NETWORK_CONNECTION_ERROR,\n self::LEAVE_REASON_HOST_DID_NOT_JOIN,\n self::LEAVE_REASON_EXCEEDED_FREE_MEETING_MINUTES_LIMIT,\n self::LEAVE_REASON_REMOVED_BY_HOST,\n self::LEAVE_REASON_UNKNOWN_REASON,\n self::LEAVE_REASON_LEAVE_WAITING_ROOM,\n self::LEAVE_REASON_REMOVED_BY_HOST_FROM_WAITING_ROOM,\n ];\n }", "public function getLeaveList()\n {\n $uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : 0;\n $query = $this->db->query(\"SELECT Id,`ApplyDate`, `LeaveFrom`, `LeaveTo`, LeaveValidDays, `LeaveReason`, `LeaveStatus`, `ApproverComment` FROM `EmployeeLeave` WHERE EmployeeId=? order by Id desc limit 30\",\n\t\tarray(\n $uid\n ));\n $res = array();\n\t\t\n foreach ($query->result() as $row) {\n $data = array();\n\t\t\t$data['leaveid'] = $row->Id;\n\t\t\t$todaydate=date(\"Y-m-d\");\n\t\t\t$data['withdrawlsts'] = true;\n\t\t\tif(strtotime($todaydate)>strtotime($row->LeaveFrom))\n\t\t\t\t$data['withdrawlsts'] = false;\n $data['date'] = date(\"dS M'y\", strtotime($row->ApplyDate));\n $data['from'] = date(\"dS M'y\", strtotime($row->LeaveFrom));\n $data['to'] = date(\"dS M'y\", strtotime($row->LeaveTo));\n $data['days'] = ' (' . $row->LeaveValidDays . ')';\n $data['status'] = $this->getpendingatstatus($row->LeaveStatus, $row->Id);// TODO dynamic with the status pending on which employee.\n $data['reason'] = $row->LeaveReason != '' || $row->LeaveReason != null ? $row->LeaveReason : '-';\n $data['comment'] = $row->ApproverComment != '' || $row->ApproverComment != null ? $row->ApproverComment : '-';\n //$data['comment']=$row->ApproverComment;\n $res[] = $data;\n }\n echo json_encode($res);\n }", "public function index()\n {\n $leave_types = LeaveType::orderBy('name')\n ->paginate();\n\n $data = [\n 'title' => 'All Leave Types',\n 'meta_desc' => 'All leave types',\n 'body_class' => null,\n 'user' => $this->user,\n 'menu' => 'hr',\n 'notifications' => notifications($this->user),\n 'new_notification' => countNewNotifications($this->user),\n 'crumbs' => [\n 'performance/leave' => 'Leave',\n 'active' => 'Leave types'\n ],\n 'leave_types' => $leave_types,\n ];\n return view('customer.performance.leave.leave-type.index', $data);\n }", "public function employee_leave_status()\n\t{\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('accepted'=>'', 'accepted_count'=>'','pending'=>'', 'pending_count'=>'','rejected'=>'', 'rejected_count'=>'');\n\t\t\n\t\t//accepted\n\t\t$Return['accepted'] = $this->lang->line('xin_approved');\n\t\t$Return['accepted_count'] = accepted_leave_request();\n\t\t// pending\n\t\t$Return['pending'] = $this->lang->line('xin_pending');\n\t\t$Return['pending_count'] = pending_leave_request();\n\t\t// rejected\n\t\t$Return['rejected'] = $this->lang->line('xin_rejected');\n\t\t$Return['rejected_count'] = rejected_leave_request();\n\t\t$this->output($Return);\n\t\texit;\n\t}", "public function leaves()\n {\n return $this->hasMany('App\\Models\\Absence', 'personnel_no', 'personnel_no')\n ->leavesOnly();\n }", "public function get_leave_type_by_id($id){\n $this->db->where('leave_type_id',$id);\n $query = $this->db->get('leave_type');\n return $query->row();\n }", "public function allottedLeave(){\n if(empty($this->data)){\n //$alloted_leavesdata = $this->\n }\n else{\n \n }\n \n }", "function GetLeaveMonthList($type = NULL) {\n $companyid = $this->companyID;\n //$emp_seqno = $this->empSeqNo;\n $emp_seqno = $_SESSION [\"user\"] [\"emp_seq_no\"];\n $_where = empty($type) ? \" and emp_seq_no = '$emp_seqno'\" : \"\";\n $sql_string = <<<_LeaveYearList_\n select distinct substrb(to_char(my_day,'YYYY-MM-DD'), 6,2) as month1,\n substrb(to_char(my_day,'YYYY-MM-DD'), 6,2) as month2\n from ehr_absence_v\n where company_id = '$companyid'\n $_where\n order by substrb(to_char(my_day,'YYYY-MM-DD'), 6,2) asc\n_LeaveYearList_;\n //print $sql_string;\n return $this->DBConn->GetArray($sql_string);\n }", "public function save_leave_type($data = array()){\n \treturn $this->db->insert('leave_type', $data);\n }", "public function getLeaveForUser(User $user, $leaveType=\"Annual\")\n {\n $leave = $this->dbService->getByField(array('username'=>$user->getUsername(), 'leavetype'=>$leaveType), 'Leave');\n if (!$leave && $user) {\n // Need to create new\n $params = array('username'=>$user->getUsername(), 'days'=>0, 'leavetype'=>$leaveType);\n $leave = $this->dbService->saveObject($params, 'Leave');\n }\n\n if (!$leave) {\n throw new Exception(\"Could not retrieve Leave details for \".$user->getUsername());\n }\n\n return $leave;\n }", "public function apply_leave($id=null){\n $this->layout = 'dashboard';\n $leavesArray = array();\n \n if(!empty($this->data)){\n \n $leavesArray = $this->data; \n $leavePolicy = $this->Common->leavePolicy($this->data['Leave']['leavetype_id']); \n $total_leave = $this->Allottedleave->query(\"SELECT ((SELECT SUM( Allottedleave.values ) FROM `allottedleaves` AS `Allottedleave` WHERE Allottedleave.leavetype_id = \".$this->data['Leave']['leavetype_id'].\" AND Allottedleave.employeetype_id = ( \n SELECT Staff.employeetype_id FROM `staffs` AS `Staff` WHERE Staff.id = \".$this->data['Leave']['staff_id'].\" ) AND Allottedleave.year = \".date('Y').\") - SUM( Leave.total_leaves )\n )left_leave FROM `leaves` AS `Leave` WHERE Leave.staff_id = \".$this->data['Leave']['staff_id'].\" AND Leave.leave_year = \".date('Y').\" AND leavetype_id = \".$this->data['Leave']['leavetype_id'].\" AND Leave.absence_status = 'Approved'\");\n \n //$total_leave = $this->Allottedleave->find('all',array('fields'=>array('SUM(values)'),'conditions'=>array('Allottedleave.leavetype_i'=>$this->data['Leave']['leavetype_id'],'Allottedleave.employeetype_id'=>($this->Staff->find('all','fields'=>array('Staff.employeetype_id'),'conditions'=>array('Staff.id'=>$this->data['Leave']['staff_id'])))))))));\n if($total_leave > 0){\n $diff = abs(strtotime($this->data['Leave']['to_date']) - strtotime($this->data['Leave']['from_date'])); \n $days = floor(($diff)/ (60*60*24));\n /***************Checking for leave policy****************/\n /*if($leavePolicy[0]['Policyleave']['no_of_days_to_apply_in_advance'] =='N'){\n $leavesArray['Leave']['total_leaves'] = $days;\n }else{ \n $applyleaveadvance = $leavePolicy[0]['Policyleave']['no_of_days_to_apply_in_advance'];\n $from = $this->data['Leave']['from_date'];\n $policy_date = date('d-m-Y',strtotime($applyleaveadvance));\n $from_applydate = date('d-m-Y',strtotime($from));\n $date_diff = date('d-m-Y', strtotime($from_applydate. ' - 15 days'));\n \n if((strtotime($from_applydate) <= strtotime($date_diff))){ \n $leavesArray['Leave']['total_leaves'] = $days;\n }\n else{\n \n $this->Session->setFlash('Sorry as per leave policy you can apply leave'.$days.'before.');\n $this->redirect(array('Controller'=>'users','action'=>'home'));\n } \n }*/\n /***************Policy check ends *****************************/\n /*********************Data Insertion Block Start*****************************/\n $leavesArray['Leave']['leave_year'] = date('Y');\n $staff_name = $this->Common->staff_name($this->data['Leave']['staff_id']); \n $leavesArray['Leave']['absence_request_by'] = $staff_name;\n $leavesArray['Leave']['absence_type'] = 1; //for leave\n $leavesArray['Leave']['updated_by'] = $this->Session->read('USERNAME');\n $leavesArray['Leave']['total_leaves'] = $days; \n $this->Leave->create(); \n if ($this->Leave->save($leavesArray)) //saving the data in table\n {\n //$this->email($this->Session->read('Userapprauth'),$days); \n $this->Session->setFlash('Leave Updated Sucessfully !!');\n $this->redirect(Router::url('/', true).'leaves/viewleave');\n } \n /*******************************Insertion and redirect block ends*********************************/\n }//if clause\n else{\n $this->Session->setFlash('Sorry you didn\\'t have enough balance to apply leave !!');\n $this->redirect(array('controller'=>'staffs','action'=>'index'));\n \n }\n $leavesArray['Leave']['staff_id'] = $this->data['Leave']['staff_id'];\n $leavesArray['Leave']['leave_year'] = date('Y');\n $leavesArray['Leave']['from_date']=$this->data['Leave']['from_date'];\n $leavesArray['Leave']['to_date']=$this->data['Leave']['to_date'];\n $leavesArray['Leave']['leavetype_id']=$this->data['Leave']['leavetype_id'];\n $staff_name = $this->Common->staff_name($this->data['Leave']['staff_id']); \n $leavesArray['Leave']['absence_request_by'] = $staff_name;\n $leavesArray['Leave']['absence_type'] = 1; //for leave\n $leavesArray['Leave']['absence_status'] = $this->data['Leave']['absence_status'];\n $leavesArray['Leave']['updated_by'] = $this->Session->read('USERNAME'); \n $this->Leave->create(); \n if ($this->Leave->save($leavesArray)) //saving the data in table\n {\n $this->Session->setFlash('Leave Apply Sucessfully !!');\n $this->redirect(array('controller'=>'staffs','action'=>'index'));\n } \n \n }\n else{\n \n //$this->set('staff_id',$id);\n $this->data = $this->Leave->read(null, $id);\n \n \n }\n }", "public function index()\n {\n\n $leave_types=LeaveType::orderBy('id','ASC')->get();\n return view('admin.leave.leave_types',['leave_types'=> $leave_types]);\n }", "public function run()\n {\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'VL';\n $leave_type->leave_description = 'Vacation Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SL';\n $leave_type->leave_description = 'Sick Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'ML';\n $leave_type->leave_description = 'Maternity Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'BL';\n $leave_type->leave_description = 'Birthday Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'PL';\n $leave_type->leave_description = 'Paternity Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SIL';\n $leave_type->leave_description = 'Service Incentive Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SPL';\n $leave_type->leave_description = 'Single Parent Leave';\n $leave_type->save();\n\n }", "protected function getFilters() {\n return $this->getUser()->getAttribute(viewLeaveEntitlementsAction::FILTERS_ATTRIBUTE_NAME, array(), 'leave');\n }", "private function getEvents($type)\r\n {\r\n if ($type == Stat::TYPE_INQUIRY) {\r\n $inqs = $this->container->get('jcs.ds')->getGroup('inquiry');\r\n return !empty($inqs) ? $inqs : [];\r\n }\r\n elseif ($type == Stat::TYPE_FAMILY_HELP) {\r\n $events = $this->container->getParameter('stat_events');\r\n\r\n return isset($events[$type]) ? $events[$type] : [];\r\n }\r\n }", "public function getLeave()\n {\n return view('leave.list');\n }", "function getFilterType(){\n\t$data = M('event');\n\t$type_set = Array();\n\t$result = $data->group('type')->order('type asc')->select();\n\tforeach($result as $value)\n\t\tarray_push($type_set, $value['type']);\n\n\treturn $type_set;\n}", "public function addLeave() {\n try {\n if (!($this->leave instanceof Base_Model_ObtorLib_App_Core_Employee_Entity_Leave)) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception(\" Leave Entity not initialized\");\n } else {\n $objLeave = new Base_Model_ObtorLib_App_Core_Employee_Dao_Leave();\n $objLeave->leave = $this->leave;\n return $objLeave->addLeave();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception($ex);\n }\n }", "public function getSplitEventType(): array\n {\n return $this->getSplitFilters($this->event_type_filter);\n }", "public function executeLeavesReport() {\n $this->auth->checkIfOperationIsAllowed('native_report_leaves');\n $this->lang->load('leaves', $this->language);\n \n $month = $this->input->get(\"month\") === FALSE ? 0 : $this->input->get(\"month\");\n $year = $this->input->get(\"year\") === FALSE ? 0 : $this->input->get(\"year\");\n $entity = $this->input->get(\"entity\") === FALSE ? 0 : $this->input->get(\"entity\");\n $children = filter_var($this->input->get(\"children\"), FILTER_VALIDATE_BOOLEAN);\n $requests = filter_var($this->input->get(\"requests\"), FILTER_VALIDATE_BOOLEAN);\n \n //Compute facts about dates and the selected month\n if ($month == 0) {\n $start = sprintf('%d-01-01', $year);\n $end = sprintf('%d-12-31', $year);\n $total_days = date(\"z\", mktime(0,0,0,12,31,$year)) + 1;\n } else {\n $start = sprintf('%d-%02d-01', $year, $month);\n $lastDay = date(\"t\", strtotime($start)); //last day of selected month\n $end = sprintf('%d-%02d-%02d', $year, $month, $lastDay);\n $total_days = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n }\n \n $this->load->model('organization_model');\n $this->load->model('leaves_model');\n $this->load->model('types_model');\n $this->load->model('dayoffs_model');\n $types = $this->types_model->getTypes();\n \n //Iterate on all employees of the entity \n $users = $this->organization_model->allEmployees($entity, $children);\n $result = array();\n $leave_requests = array();\n \n foreach ($users as $user) {\n $result[$user->id]['identifier'] = $user->identifier;\n $result[$user->id]['firstname'] = $user->firstname;\n $result[$user->id]['lastname'] = $user->lastname;\n $date = new DateTime($user->datehired);\n $result[$user->id]['datehired'] = $date->format(lang('global_date_format'));\n $result[$user->id]['department'] = $user->department;\n $result[$user->id]['position'] = $user->position;\n $result[$user->id]['contract'] = $user->contract;\n $non_working_days = $this->dayoffs_model->lengthDaysOffBetweenDates($user->contract_id, $start, $end);\n $opened_days = $total_days - $non_working_days;\n \n //If the user has selected All months\n if ($month == 0) {\n $leave_duration = 0;\n for ($ii = 1; $ii <13; $ii++) {\n $linear = $this->leaves_model->linear($user->id, $ii, $year, FALSE, FALSE, TRUE, FALSE);\n $leave_duration += $this->leaves_model->monthlyLeavesDuration($linear);\n $leaves_detail = $this->leaves_model->monthlyLeavesByType($linear);\n //Init type columns\n foreach ($types as $type) {\n if (array_key_exists($type['name'], $leaves_detail)) {\n if (!array_key_exists($type['name'], $result[$user->id])) {\n $result[$user->id][$type['name']] = 0;\n }\n $result[$user->id][$type['name']] += \n $leaves_detail[$type['name']];\n } else {\n $result[$user->id][$type['name']] = '';\n }\n }\n }\n if ($requests) $leave_requests[$user->id] = $this->leaves_model->getAcceptedLeavesBetweenDates($user->id, $start, $end);\n $work_duration = $opened_days - $leave_duration;\n } else {\n $linear = $this->leaves_model->linear($user->id, $month, $year, FALSE, FALSE, TRUE, FALSE);\n $leave_duration = $this->leaves_model->monthlyLeavesDuration($linear);\n $work_duration = $opened_days - $leave_duration;\n $leaves_detail = $this->leaves_model->monthlyLeavesByType($linear);\n if ($requests) $leave_requests[$user->id] = $this->leaves_model->getAcceptedLeavesBetweenDates($user->id, $start, $end);\n //Init type columns\n foreach ($types as $type) {\n if (array_key_exists($type['name'], $leaves_detail)) {\n $result[$user->id][$type['name']] = $leaves_detail[$type['name']];\n } else {\n $result[$user->id][$type['name']] = '';\n }\n }\n }\n $result[$user->id]['leave_duration'] = $leave_duration;\n $result[$user->id]['total_days'] = $total_days;\n $result[$user->id]['non_working_days'] = $non_working_days;\n $result[$user->id]['work_duration'] = $work_duration;\n }\n\n $table = '';\n $thead = '';\n $tbody = '';\n $line = 2;\n $i18n = array(\"identifier\", \"firstname\", \"lastname\", \"datehired\", \"department\", \"position\", \"contract\");\n foreach ($result as $user_id => $row) {\n $index = 1;\n $tbody .= '<tr>';\n foreach ($row as $key => $value) {\n if ($line == 2) {\n if (in_array($key, $i18n)) {\n $thead .= '<th>' . lang($key) . '</th>';\n } else {\n $thead .= '<th>' . $key . '</th>';\n }\n }\n $tbody .= '<td>' . $value . '</td>';\n $index++;\n }\n $tbody .= '</tr>';\n //Display a nested table listing the leave requests\n if ($requests) {\n if (count($leave_requests[$user_id])) {\n $tbody .= '<tr><td colspan=\"' . count($row) . '\">';\n $tbody .= '<table class=\"table table-bordered table-hover\" style=\"width: auto !important;\">';\n $tbody .= '<thead><tr>';\n $tbody .= '<th>' . lang('leaves_index_thead_id'). '</th>';\n $tbody .= '<th>' . lang('leaves_index_thead_start_date'). '</th>';\n $tbody .= '<th>' . lang('leaves_index_thead_end_date'). '</th>';\n $tbody .= '<th>' . lang('leaves_index_thead_type'). '</th>';\n $tbody .= '<th>' . lang('leaves_index_thead_duration'). '</th>';\n $tbody .= '</tr></thead>';\n $tbody .= '<tbody>';\n //Iterate on leave requests\n foreach ($leave_requests[$user_id] as $request) {\n $date = new DateTime($request['startdate']);\n $startdate = $date->format(lang('global_date_format'));\n $date = new DateTime($request['enddate']);\n $enddate = $date->format(lang('global_date_format'));\n $tbody .= '<tr>';\n $tbody .= '<td><a href=\"' . base_url() . 'leaves/view/'. $request['id']. '\" target=\"_blank\">'. $request['id']. '</a></td>';\n $tbody .= '<td>'. $startdate . ' (' . lang($request['startdatetype']). ')</td>';\n $tbody .= '<td>'. $enddate . ' (' . lang($request['enddatetype']). ')</td>';\n $tbody .= '<td>'. $request['type'] . '</td>';\n $tbody .= '<td>'. $request['duration'] . '</td>';\n $tbody .= '</tr>';\n }\n $tbody .= '</tbody>';\n $tbody .= '</table>';\n $tbody .= '</td></tr>';\n } else {\n $tbody .= '<tr><td colspan=\"' . count($row) . '\">----</td></tr>';\n }\n }\n $line++;\n }\n $table = '<table class=\"table table-bordered table-hover\">' .\n '<thead>' .\n '<tr>' .\n $thead .\n '</tr>' .\n '</thead>' .\n '<tbody>' .\n $tbody .\n '</tbody>' .\n '</table>';\n \n echo $table;\n }", "public function model()\n {\n return LeaveRequest::class;\n }", "public function visitLeave(NodeInterface $node);", "function monitor_list_activity_types() {\n $query = \"select distinct(`wf_type`) from `\".GALAXIA_TABLE_PREFIX.\"activities`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_type'];\n }\n return $ret; \n }", "function isOnLeave($guardid){\n\t$resultarray = getRowAsArray(\"SELECT * FROM leaveapplications WHERE leaveenddate > '\".date(\"Y-m-d H:i:s\", strtotime(\"now\")).\"' AND leavestartdate < '\".date(\"Y-m-d H:i:s\", strtotime(\"now\")).\"' AND isactive='Y' AND guardid='\".$guardid.\"'\");\n\t\n\t$response = array(FALSE,\"\",\"\");\n\t\n\t//Check for only those that were approved\n\tif($resultarray['leavetype'] == \"Annual\" && $resultarray['gmapproved'] == \"Y\"){\n\t\t$response = array(TRUE, $resultarray['leavestartdate'], $resultarray['leaveenddate'], $resultarray['sold']);\n\t\t\n\t} else if($resultarray['leavetype'] == \"Pass Leave\" && $resultarray['humanresourceapproved'] == \"Y\" && $resultarray['payrollclerkapproved'] == \"Y\"){\n\t\t$response = array(TRUE, $resultarray['leavestartdate'], $resultarray['leaveenddate'], $resultarray['sold']);\n\t\t\n\t} else if($resultarray['humanresourceapproved'] == \"Y\" && $resultarray['payrollclerkapproved'] == \"Y\" && $row['operationsapproved'] == \"Y\"){\n\t\t$response = array(TRUE, $resultarray['leavestartdate'], $resultarray['leaveenddate'], $resultarray['sold']);\n\t}\n\t\n\treturn $response;\n}", "public function getLeaveList(Request $request)\n {\n $offset = $request->input('start');\n $limit = $request->input('length');\n $keyword = $request->input('search');\n $keyword = strtolower($keyword['value']);\n $leave = DB::table('leaves');\n if (isset($keyword) && trim($keyword) != '') {\n $leave->where('leaves.leave_type', 'LIKE', '%' . $keyword . '%')\n ->orwhere('leaves.leave_total_duration', 'LIKE', '%' . $keyword . '%')\n ->orwhere('leaves.leave_description', 'LIKE', '%' . $keyword . '%');\n }\n\n $columns = $request->input('order');\n $columnIndex = $request->input('columns');\n $columnIndex = $columnIndex[$columns[0]['column']]['data'] == 'id' ? $columnIndex[1]['data'] : $columnIndex[$columns[0]['column']]['data'];\n $orderType = $columns[0]['dir'];\n $leaveCount = $leave->get()->count();\n $leaves = $leave->skip($offset)->take($limit)->orderBy($columnIndex, $orderType)->get();\n $data = [];\n $i = $offset > 0 ? ($offset + 1) : 1;\n foreach ($leaves as $leave) {\n $data[] = [\n 'id' => $i++,\n 'leave_type' => $leave->leave_type,\n 'leave_duration' => $leave->leave_total_duration,\n 'leave_description' => $leave->leave_description,\n 'action' => $leave = '<i class=\"fa fa-edit edit-leave pointer btn btn-sm btn-info\" id=\"' . $leave->id . '\"></i> <i class=\"fa fa-trash pointer delete-leave btn btn-sm btn-danger\" id=\"' . $leave->id . '\"></i>'\n ];\n }\n $count = [\n 'draw' => $request->input('draw') ?? 0,\n 'data' => $data,\n 'recordsTotal' => $leaveCount,\n 'recordsFiltered' => $leaveCount\n ];\n return response()->json($count);\n }", "public static function getAllEventTypes()\n {\n return [\n 'complete' => 'complete',\n 'fail' => 'fail'\n ];\n }", "public function getEmployeeLeaveEarnedForAnEmployee($idEmployee, $idLeaveType=null, $withClosed=true, $selfInclude=true) {\r\n $clauseWhere = \"idEmployee = \".$idEmployee;\r\n if ($idLeaveType!=null) {\r\n $clauseWhere .= \" AND idLeaveType=$idLeaveType\"; \r\n }\r\n if (!$withClosed) {\r\n $clauseWhere .= \" AND idle=0\";\r\n }\r\n if (!$selfInclude) {\r\n $clauseWhere .= \" AND id\".($this->id?\"<>\".$this->id:\" IS NOT NULL\");\r\n } \r\n $listEmpLE = $this->getSqlElementsFromCriteria(null, false, $clauseWhere);\r\n return $listEmpLE;\r\n }", "public function index()\n {\n $leaves= Leave::all();\n $leavetypes= Leavetype::all();\n\n /* $mostleaves = Leave::\n \n where('status','ACTIVO')\n \n ->select('user_id', DB::raw('COUNT(id) as mostleaves'))\n ->groupBy('user_id')\n ->orderBy(DB::raw('COUNT(id)'), 'DESC')\n ->take(5)\n ->get(); */\n\n $mostleaves = DB::table('users as u')\n ->join('leaves as l','u.id','=','l.user_id')\n ->select('u.name','u.ap_paterno','u.ap_materno', DB::raw('COUNT(l.id) as mostleaves'))\n ->where('l.status','ACTIVO')\n ->whereMonth('l.created_at', Carbon::now()->format('m'))\n ->where('l.resp_status','AUTORIZADO')\n ->groupBy('name','ap_paterno','ap_materno')\n ->orderBy(DB::raw('COUNT(l.id)'), 'DESC')\n ->take(10)\n ->get();\n \n\n $leavesaut=Leave::where('resp_status','AUTORIZADO')\n ->where('user_id','auth'()->user()->id)\n ->where('status','ACTIVO')\n ->get();\n $leavesrec=Leave::where('resp_status','RECHAZADO')\n ->where('user_id','auth'()->user()->id)\n ->where('status','ACTIVO')\n ->get();\n $leavespen=Leave::where('resp_status','EN ESPERA')\n ->where('user_id','auth'()->user()->id)\n ->where('status','ACTIVO')\n ->get();\n\n //$max_leaves_for_user_for_offices = auth()->user()->office;\n /* $offices = Office::all();\n //return $users = auth()->user()->office->take(2)->get();\n foreach($offices as $office){\n \n foreach($office->users as $user){\n foreach( $user->leaves as $leave){\n\n return $leave;\n }\n }\n } */\n /* Select Top 1 IDCELULAR, COUNT(IDCELULAR) AS VENTAS \n from Venta \n Group by IdCelular \n Order by count(2) desc */\n /* dd($mostleaves ); */\n return view('home',compact('leaves','leavetypes','leavesaut','leavesrec','leavespen','mostleaves'));\n }", "public function get_event_types()\n {\n return array(0 => 'miscellaneous', 1 => 'appointment', 2 => 'holiday'\n ,3 => 'birthday', 4 => 'personal', 5 => 'education'\n ,6 => 'travel', 7 => 'anniversary', 8 => 'not in office'\n ,9 => 'sick day', 10 => 'meeting', 11 => 'vacation'\n ,12 => 'phone call', 13 => 'business'\n ,14 => 'non-working hours', 50 => 'special occasion'\n );\n }", "public function getExitDescriptors(): array\n {\n //Get the room descriptors from the database\n $exitDescriptors = $this->entityManager\n ->getRepository(ExitDescriptor::class)\n ->findAll();\n\n return $exitDescriptors;\n }", "public function getEventTypes()\n {\n return $this->event_types;\n }", "function GetLeaveYearList($type = NULL) {\n $companyid = $this->companyID;\n $emp_seqno = $this->empSeqNo;\n $_where = empty($type) ? \" and emp_seq_no = '$emp_seqno'\" : \"\";\n $sql_string = <<<eof\n select distinct substrb(to_char(my_day,'YYYY-MM-DD'), 0,4) as year1,\n substrb(to_char(my_day,'YYYY-MM-DD'), 0,4) as year2\n from ehr_absence_v\n where company_id = '$companyid'\n $_where\n order by substrb(to_char(my_day, 'YYYY-MM-DD'), 0, 4) desc\neof;\n return $this->DBConn->GetArray($sql_string);\n }", "public function index()\n {\n $business_id = request()->session()->get('user.business_id');\n $is_admin = $this->moduleUtil->is_admin(auth()->user(), $business_id);\n\n if (!(auth()->user()->can('superadmin') || $this->moduleUtil->hasThePermissionInSubscription($business_id, 'essentials_module')) && !$is_admin) {\n abort(403, 'Unauthorized action.');\n }\n\n if (request()->ajax()) {\n $leave_types = EssentialsLeaveType::where('business_id', $business_id)\n ->select(['leave_type', 'max_leave_count', 'id']);\n\n return Datatables::of($leave_types)\n ->addColumn(\n 'action',\n '<button data-href=\"{{action(\\'\\Modules\\Essentials\\Http\\Controllers\\EssentialsLeaveTypeController@edit\\', [$id])}}\" class=\"btn btn-xs btn-primary btn-modal\" data-container=\".view_modal\"><i class=\"glyphicon glyphicon-edit\"></i> @lang(\"messages.edit\")</button>'\n )\n ->removeColumn('id')\n ->rawColumns([2])\n ->make(false);\n }\n\n return view('essentials::leave_type.index');\n }", "public function index()\n {\n $title = trans('staff_leave_type.staff_leave_types');\n return view('staff_leave_type.index', compact('title'));\n }", "public function index()\n {\n $data['leaves'] = Leave::AllLeave();\n return view(\"leave.list\",$data);\n }", "function find_leaves(){\n\t\t$leaves=array();\n\t\tforeach($this->nodes as $node){\n\t\t\tif(count($node->children)==0){\n\t\t\t$leaves[]=$node;\n\t\t\t}\n\t\t}\n\t\treturn $leaves;\n\t}", "public function requestStatus()\n {\n\n //$leaves = LeaveType::with('history')->get();\n $request_status = RequestStatus::all();\n // dd($leave_type);\n return view('pages.requestStatus.request_status_list')->with('request_status', $request_status);\n }", "public function getPointEventType()\n {\n return PointEventType::all();\n }", "public function defineStyleTRApprovallist($leave_fromdate,$leave_todate,$leave_fromdate){\r\n\r\n $styleidTotalDay = \"style='display:none'\";\r\n $styleidTimeApprovallist = \"style='display:none'\";\r\n $styleidTotalHours = \"style='display:none'\";\r\n\r\n if($leave_fromdate == $leave_todate && $leave_fromdate != \"\"){//if stay away (time off)\r\n $styleidTimeApprovallist = \"\";\r\n $styleidTotalHours = \"\";\r\n }\r\n\r\n if($leave_fromdate != $leave_todate || $leave_fromdate == \"\"){//if not stay away (time off)\r\n $styleidTotalDay = \"\";\r\n }\r\n\r\n return array(\"styleidTotalDay\"=>$styleidTotalDay,\"styleidTimeApprovallist\"=>$styleidTimeApprovallist,\"styleidTotalHours\"=>$styleidTotalHours);\r\n }", "public function lead_type_list()\n {\n \n $result = $this->db->query(\"call lead_type_list()\")->result();\n \n save_query_in_log();\n return $result;\n }", "public function getWarehouseTypes();", "public function equipment_type(){\n\t\t\t$equip_type_qry = $this->db->prepare(\"SELECT * FROM truck_type WHERE status = '1'\");\n\t\t\t$equip_type_qry->execute();\n\t\t\t$fetch= array();\n\t\t\twhile($equip_type_row = $equip_type_qry->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$fetch[]=$equip_type_row;\n\t\t\t}\n\t\t\treturn $fetch;\n\t\t}", "public function nonLeaveAbsences()\n {\n return $this->hasMany('App\\Models\\Absence', 'personnel_no', 'personnel_no')\n ->excludeLeaves();\n }", "public function add_leave() {\n\n\t\tif(!$this->session->userdata('user_id')>0){\n\t\t\tredirect('login');\n\t\t}\n\t\t\n\t\t$form_data = $this->input->post();\n\t\t\n\t\t$form_data['user_id'] = $this->session->userdata('user_id');\n\n\t\t//set the start date and end date for the one day and half day leave\n\t\tif($form_data['leave_plan'] =='half_day' || $form_data['leave_plan']=='one_day') {\n\t\t\t$form_data['leave_start_date'] = $form_data['date'];\n\t\t\t$form_data['leave_end_date'] = $form_data['date'];\n\t\t\tunset($form_data['date']);\n\t\t}\n\t\t\n\t\t$this->load->model('leaves');\n\n\t\t$result = $this->leaves->add_leaves($form_data);\n\n\t\tif($result){\n\t\t\t$this->session->set_flashdata('success', 'You have successfully applied for the leave');\n\t\t}else{\n\t\t\t$this->session->flashdata('error','Sorry We are unable to process the request');\n\t\t}\n\t\tredirect('user/landing/add_leaves');\n\n\t}", "public function run()\n {\n LeaveType::create([\n 'type' => 'annual',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'personal',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'without pay',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'long service',\n 'days' => 5,\n ]);\n }", "public function get_pending($id, $leave_type){\r\n\t\r\n\t\t$id1 = ($id != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($id).\"'\":'NULL';\r\n\t\t\t$leav_type = ($leave_type != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($leave_type).\"'\":'NULL';\r\n\t\t$one = 1;\r\n\t$stat = ($one != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($one).\"'\":'NULL';\r\n\t$sql = $this->hrm_mysql_connect->query(\"SELECT status FROM leave_request_2018 WHERE user_id=$id1 AND status=$stat AND leave_type=$leav_type\");\r\n\tif($sql->num_rows==0){\r\n\t\treturn 0;\r\n\t\t}else {\r\n\t\t\treturn 1;\r\n\t\t\t}\r\n\t\r\n\t}", "public function getNoEffect()\n {\n $xary = array();\n foreach ($this->no_effect as $info) {\n $xary[] = new Type($info->resource_id);\n }\n return $xary;\n }", "function getEarnedLeavesRecord($emp_id)\n\t{\n\t\treturn $this->getRow($this->tb3_name,'*','emp_id='.$emp_id.' and leave_type_id='.EARNED_TYPE,$is_active=1,$is_join=0,$showQuery=false) ;\n\t}", "function viewleave(){\n $this->layout = 'dashboard';\n $user_id = $this->Session->read('LOGEDID');\n \n if($user_id==1){\n $leavesdata = $this->Common->staff_leave('');\n $this->set('leaves',$leavesdata); \n }else{\n $staff_data = $this->Session->read('Leavepending');\n if(isset($staff_data)){\n $staffarray_data = '';\n $i=0;\n foreach ($staff_data as $key=>$value){\n $staffarray_data .= ','.$value['Staff']['id'];\n }\n \n $staffarray = substr($staffarray_data,1);\n $staffarray = explode(',',$staffarray);\n \n /********To Retreive Staff Data********************************/\n $this->recursive = -1;\n $leavesdata = $this->Common->staff_leave($staffarray);\n $this->set('leaves',$leavesdata); \n }\n else{\n $this->Session->setFlash('Sorry you don\\'t have enough permission to access the page.');\n $this->redirect(Router::url('/', true).'users/home');\n }\n } \n \n }", "public function getClasses() {\n if(!property_exists($this->data, 'classes')) $this->loadClasses();\n require_once(\"Event.php\");\n $classes = array();\n foreach($this->data->classes as $class) {\n $class->type = \"LESSON\";\n $class->period = $class->classPeriod;\n unset($class->classPeriod);\n $classes[] = new Event($this->fenixEdu, $class);\n }\n return $classes;\n }", "public function getEventTypeAttribute() {\n return $this->eventType()->getResults();\n }", "public function getIneffective()\n {\n $xary = array();\n foreach ($this->ineffective as $info) {\n $xary[] = new Type($info->resource_id);\n }\n return $xary;\n }", "public function xtestSearchLeave() {\n\n $leaveList = TestDataService::loadObjectList('Leave', $this->fixture, 'set2');\n\n $leaveRequestDao = $this->getMock('LeaveRequestDao', array('fetchLeave'));\n $leaveRequestDao->expects($this->once())\n ->method('fetchLeave')\n ->with(1)\n ->will($this->returnValue($leaveList));\n\n $this->leaveRequestService->setLeaveRequestDao($leaveRequestDao);\n\n $returnedLeaveList = $this->leaveRequestService->searchLeave(1);\n\n foreach ($returnedLeaveList as $leave) {\n $this->assertTrue($leave instanceof Leave);\n }\n\n $this->assertEquals(2, count($returnedLeaveList));\n\n $this->assertEquals(1, $returnedLeaveList[0]->getLeaveId());\n $this->assertEquals('LTY001', $returnedLeaveList[0]->getLeaveTypeId());\n $this->assertEquals(1, $returnedLeaveList[0]->getEmpNumber());\n $this->assertEquals(1, $returnedLeaveList[0]->getLeaveRequestId());\n $this->assertEquals('2010-09-01', $returnedLeaveList[0]->getLeaveDate());\n $this->assertEquals(1, $returnedLeaveList[0]->getLeaveStatus());\n\n $this->assertEquals(2, $returnedLeaveList[1]->getLeaveId());\n $this->assertEquals('LTY001', $returnedLeaveList[1]->getLeaveTypeId());\n $this->assertEquals(1, $returnedLeaveList[1]->getEmpNumber());\n $this->assertEquals(1, $returnedLeaveList[1]->getLeaveRequestId());\n $this->assertEquals('2010-09-02', $returnedLeaveList[1]->getLeaveDate());\n $this->assertEquals(1, $returnedLeaveList[1]->getLeaveStatus());\n\n }", "function applyleavestaff($id=null){\n $this->layout = 'dashboard';\n $userName = $this->Session->read('USERNAME'); \n if(!empty($this->data)){ \n $leavePolicy = $this->Common->leavePolicy($this->data['Leave']['leavetype_id']); //getting leave policy for leave type \n /**********Calculating total leaves for employee****************/\n $total_leave = $this->Allottedleave->query(\"SELECT ((SELECT SUM( Allottedleave.values ) FROM `allottedleaves` AS `Allottedleave` WHERE Allottedleave.leavetype_id = \".$this->data['Leave']['leavetype_id'].\" AND Allottedleave.employeetype_id = ( \n SELECT Staff.employeetype_id FROM `staffs` AS `Staff` WHERE Staff.id = \".$this->data['Leave']['staff_id'].\" ) AND Allottedleave.year = \".date('Y').\") - SUM( Leave.total_leaves )\n )left_leave FROM `leaves` AS `Leave` WHERE Leave.staff_id = \".$this->data['Leave']['staff_id'].\" AND Leave.leave_year = \".date('Y').\" AND leavetype_id = \".$this->data['Leave']['leavetype_id'].\" AND Leave.absence_status = 'Approved'\");\n /***********************************************************/\n if($total_leave >0){\n $diff = abs(strtotime($this->data['Leave']['to_date']) - strtotime($this->data['Leave']['from_date'])); \n /*******************Half day Condition*******************/\n if($this->data['Leave']['half_day']==='1'){\n $days = floor(($diff)/ (60*60*24));\n /*******To check if half day date is greater than 1 day *************/\n if($days > 1){\n $this->Session->setFlash('Enter Correct Leave Day !!');\n $this->redirect(Router::url('/', true).'leave/applyleavestaff');\n }\n else{\n $days = $this->data['Leave']['leave_half'];\n }\n /**************Condition End*********************/\n }else{\n $days = floor(($diff)/ (60*60*24));\n }\n /*************Ends**********************/ \n \n /***************Checking for leave policy****************/\n if($leavePolicy[0]['Policyleave']['no_of_days_to_apply_in_advance'] =='N'){\n $leavesArray['Leave']['total_leaves'] = $days;\n }else{ \n $applyleaveadvance = $leavePolicy[0]['Policyleave']['no_of_days_to_apply_in_advance'];\n $from = $this->data['Leave']['from_date'];\n $policy_date = date('d-m-Y',strtotime($applyleaveadvance));\n $from_applydate = date('d-m-Y',strtotime($from));\n $date_diff = date('d-m-Y', strtotime($from_applydate. ' - 15 days'));\n \n if((strtotime($from_applydate) <= strtotime($date_diff))){ \n $leavesArray['Leave']['total_leaves'] = $days;\n }\n else{\n $base_url = Router::url('/', true); \n $this->Session->setFlash('Sorry as per leave policy you can apply leave'.$date_diff.'before.');\n $this->redirect($base_url.'users/home');\n } \n }\n /***************Policy check ends *****************************/\n /*********************Data Insertion Block Start*****************************/\n $leavesArray['Leave']['staff_id'] = $this->data['Leave']['staff_id'];\n $leavesArray['Leave']['leave_year'] = date('Y');\n $leavesArray['Leave']['from_date']=$this->data['Leave']['from_date'];\n $leavesArray['Leave']['to_date']=$this->data['Leave']['to_date'];\n $leavesArray['Leave']['leavetype_id']=$this->data['Leave']['leavetype_id'];\n $staff_name = $this->Common->staff_name($this->data['Leave']['staff_id']); \n $leavesArray['Leave']['absence_request_by'] = $staff_name;\n $leavesArray['Leave']['absence_type'] = 1; //for leave\n $leavesArray['Leave']['absence_status'] = \"Pending\";\n $leavesArray['Leave']['updated_by'] = $this->Session->read('USERNAME');\n $leavesArray['Leave']['absence_desc'] = $this->data['Leave']['absence_desc']; \n $this->Leave->create(); \n if ($this->Leave->save($leavesArray)) //saving the data in table\n {\n \n //$this->email($this->Session->read('Userapprauth'),$days); \n $this->Session->setFlash('Leave Apply Sucessfully !!');\n $this->redirect(Router::url('/', true).'users/home');\n } \n /*******************************Insertion and redirect block ends*********************************/\n \n }else{\n \n $base_url = Router::url('/', true);\n $this->Session->setFlash('Sorry you don\\'t have enough leave to apply.');\n $this->redirect($base_url.'users/home');\n }\n }else{ \n /*********For Supervisor****************/\n if($userName !='admin'){\n $id = $this->Session->read('LOGEDID');\n }\n /*****************************/ \n $this->set('staff_id',$id);\n \n }\n \n }", "protected function getEntityTypes() : array {\n $existingData = $this->entityTypeManager->getDefinitions();\n\n $entity_types = array_keys(array_intersect_key($this->reportData, $existingData));\n return array_diff($entity_types, [\n // TODO: Remove when crop type is exported.\n 'crop',\n 'update_helper_checklist_update',\n 'access_token',\n 'menu_link_content',\n 'redirect',\n 'shortcut',\n ]);\n }", "function getLeaveApplyCountByDept($whoami = 'assistant')\n {\n $create_by = $whoami=='admin' ? '' : ' and a.create_by = \\''.$_SESSION['user']['user_seq_no'].'\\' ';\n $sql = <<<eof\n select c.segment_no as dept_seq_no,\n\t\t\t c.segment_no_sz as dept_id,\n\t\t\t c.segment_name as dept_name,\n\t\t\t a.flow_status,\n\t\t\t decode(a.flow_status, '01', '已提交', '02', '流程中', '暂存') as flow_status_desc,\n\t\t\t count(a.absence_seq_no) as trows\n\t\t\t from ehr_leave_in_flow_v a, hr_personnel_base b, gl_segment c\n\t\t\t where a.company_id = b.seg_segment_no\n\t\t\t and a.emp_seq_no = b.id\n\t\t\t and b.seg_segment_no = c.seg_segment_no\n\t\t\t and b.seg_segment_no_department = c.segment_no \n and a.company_id = :company_id\n and a.flow_status < '03'\n $create_by\n group by c.segment_no, c.segment_no_sz ,c.segment_name, a.flow_status\n order by c.segment_no_sz\neof;\n //$this->DBConn->debug =1;\n return $this->DBConn->CacheGetArray(self::DATA_CACHE_SECONDS,$sql,array('company_id'=>$this->companyID));\n }", "public function getLeaveDetails($userid, $type, $status)\n {\n if($status == 'total')\n $where = \" AND status IN ('inprocess','refused', 'approved') \";\n else\n $where = \" AND status = '\".$status.\"' \";\n $query = \"select * FROM \".$this->_name.\" WHERE created_by = '\".$userid.\"' AND type = '\".$type.\"' $where\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "public function index()\n {\n //returning the leaves applied by an employess\n $leaves = Auth::user()->leave()->latest()->get();\n return view('employee/leave/index',compact('leaves'));\n }", "public function run()\n {\n $types = [\n '年假',\n '病假',\n '公共假期',\n ];\n\n foreach ($types as $type) {\n \\App\\Http\\Models\\LeaveTypeModel::create([\n 'name' => $type,\n 'status' => \\App\\Http\\Models\\LeaveModel::STATUS_NORMAL,\n ]);\n }\n }", "public function getTypeEvenement()\n {\n return $this->typeEvenement;\n }", "public function getRoomTypesList()\n {\n return RoomType::all()->pluck('name', 'id');\n }", "public function get_available_days($type){\n $sql = \"SELECT DISTINCT `day` FROM wp_dcms_reservation_config\n WHERE `type`='{$type}' and qty > 0\";\n $result = $this->wpdb->get_results( $sql );\n\n error_log(print_r($result,true));\n\n $res = [];\n foreach ($result as $item){\n $res[] = $item->day;\n }\n\n return $res;\n }", "public static function getList($idle=null,$idEmployee=null) {\r\n $lvEarned = new EmployeeLeaveEarned();\r\n $crit=[];\r\n if ($idle!==null) {\r\n $crit[\"idle\"]=\"$idle\";\r\n }\r\n if($idEmployee){\r\n $crit[\"idEmployee\"]=$idEmployee;\r\n }\r\n $lvEarnedList = $lvEarned->getSqlElementsFromCriteria($crit);\r\n return $lvEarnedList;\r\n }", "public function getEnumValues()\n {\n return array(\n 'MTYPE_AGENT_REPORT' => self::MTYPE_AGENT_REPORT,\n 'MTYPE_AGENT_REPORT_R' => self::MTYPE_AGENT_REPORT_R,\n 'MTYPE_AGENT_HEATBEAT' => self::MTYPE_AGENT_HEATBEAT,\n 'MTYPE_CENTER_MASTER_NOTICE' => self::MTYPE_CENTER_MASTER_NOTICE,\n 'MTYPE_CENTER_MASTER_NOTICE_R' => self::MTYPE_CENTER_MASTER_NOTICE_R,\n 'MTYPE_CENTER_SUBTASK_CMD' => self::MTYPE_CENTER_SUBTASK_CMD,\n 'MTYPE_CENTER_SUBTASK_CMD_R' => self::MTYPE_CENTER_SUBTASK_CMD_R,\n 'MTYPE_AGENT_SUBTASK_PROCESS' => self::MTYPE_AGENT_SUBTASK_PROCESS,\n 'MTYPE_AGENT_SUBTASK_CMD_RESULT' => self::MTYPE_AGENT_SUBTASK_CMD_RESULT,\n 'MTYPE_AGENT_SUBTASK_CMD_RESULT_R' => self::MTYPE_AGENT_SUBTASK_CMD_RESULT_R,\n 'MTYPE_CENTER_OPR_CMD' => self::MTYPE_CENTER_OPR_CMD,\n 'MTYPE_CENTER_OPR_CMD_R' => self::MTYPE_CENTER_OPR_CMD_R,\n 'MTYPE_CENTER_AGENT_SUBTASK_OUTPUT' => self::MTYPE_CENTER_AGENT_SUBTASK_OUTPUT,\n 'MTYPE_CENTER_AGENT_SUBTASK_OUTPUT_R' => self::MTYPE_CENTER_AGENT_SUBTASK_OUTPUT_R,\n 'MTYPE_CENTER_AGENT_RUNNING_TASK' => self::MTYPE_CENTER_AGENT_RUNNING_TASK,\n 'MTYPE_CENTER_AGENT_RUNNING_TASK_R' => self::MTYPE_CENTER_AGENT_RUNNING_TASK_R,\n 'MTYPE_CENTER_AGENT_RUNNING_OPR' => self::MTYPE_CENTER_AGENT_RUNNING_OPR,\n 'MTYPE_CENTER_AGENT_RUNNING_OPR_R' => self::MTYPE_CENTER_AGENT_RUNNING_OPR_R,\n 'MTYPE_UI_AGENT_SUBTASK_OUTPUT' => self::MTYPE_UI_AGENT_SUBTASK_OUTPUT,\n 'MTYPE_UI_AGENT_SUBTASK_OUTPUT_R' => self::MTYPE_UI_AGENT_SUBTASK_OUTPUT_R,\n 'MTYPE_UI_AGENT_RUNNING_SUBTASK' => self::MTYPE_UI_AGENT_RUNNING_SUBTASK,\n 'MTYPE_UI_AGENT_RUNNING_SUBTASK_R' => self::MTYPE_UI_AGENT_RUNNING_SUBTASK_R,\n 'MTYPE_UI_AGENT_RUNNING_OPR' => self::MTYPE_UI_AGENT_RUNNING_OPR,\n 'MTYPE_UI_AGENT_RUNNING_OPR_R' => self::MTYPE_UI_AGENT_RUNNING_OPR_R,\n 'MTYPE_UI_EXEC_OPR' => self::MTYPE_UI_EXEC_OPR,\n 'MTYPE_UI_EXEC_OPR_R' => self::MTYPE_UI_EXEC_OPR_R,\n 'MTYPE_UI_EXEC_DUP_OPR' => self::MTYPE_UI_EXEC_DUP_OPR,\n 'MTYPE_UI_EXEC_DUP_OPR_R' => self::MTYPE_UI_EXEC_DUP_OPR_R,\n 'MTYPE_UI_AGENT_INFO' => self::MTYPE_UI_AGENT_INFO,\n 'MTYPE_UI_AGENT_INFO_R' => self::MTYPE_UI_AGENT_INFO_R,\n 'MTYPE_UI_INVALID_AGENT' => self::MTYPE_UI_INVALID_AGENT,\n 'MTYPE_UI_INVALID_AGENT_R' => self::MTYPE_UI_INVALID_AGENT_R,\n 'MTYPE_UI_TASK_CMD_INFO' => self::MTYPE_UI_TASK_CMD_INFO,\n 'MTYPE_UI_TASK_CMD_INFO_R' => self::MTYPE_UI_TASK_CMD_INFO_R,\n 'MTYPE_UI_OPR_CMD_INFO' => self::MTYPE_UI_OPR_CMD_INFO,\n 'MTYPE_UI_OPR_CMD_INFO_R' => self::MTYPE_UI_OPR_CMD_INFO_R,\n 'MTYPE_UI_SUBTASK_PROCESS' => self::MTYPE_UI_SUBTASK_PROCESS,\n 'MTYPE_UI_SUBTASK_PROCESS_R' => self::MTYPE_UI_SUBTASK_PROCESS_R,\n 'MTYPE_UI_EXEC_TASK' => self::MTYPE_UI_EXEC_TASK,\n 'MTYPE_UI_EXEC_TASK_R' => self::MTYPE_UI_EXEC_TASK_R,\n 'MTYPE_UI_FETCH_AGENT_HOSTNAME' => self::MTYPE_UI_FETCH_AGENT_HOSTNAME,\n 'MTYPE_UI_FETCH_AGENT_HOSTNAME_R' => self::MTYPE_UI_FETCH_AGENT_HOSTNAME_R,\n 'MTYPE_UI_AUTH_INVALID_AGENT' => self::MTYPE_UI_AUTH_INVALID_AGENT,\n 'MTYPE_UI_AUTH_INVALID_AGENT_R' => self::MTYPE_UI_AUTH_INVALID_AGENT_R,\n 'MTYPE_UI_SCRIPTS' => self::MTYPE_UI_SCRIPTS,\n 'MTYPE_UI_SCRIPTS_R' => self::MTYPE_UI_SCRIPTS_R,\n 'MTYPE_UI_SCRIPT_INFO' => self::MTYPE_UI_SCRIPT_INFO,\n 'MTYPE_UI_SCRIPT_INFO_R' => self::MTYPE_UI_SCRIPT_INFO_R,\n 'MTYPE_INVALID_MTYPE' => self::MTYPE_INVALID_MTYPE,\n 'MTYPE_CENTER_INTERNAL_CONN' => self::MTYPE_CENTER_INTERNAL_CONN,\n 'MTYPE_CENTER_INTERNAL_CONN_R' => self::MTYPE_CENTER_INTERNAL_CONN_R,\n );\n }", "public static function getEntityTypeEvents() {\n $event = ['onEntityTypeEvent', 100];\n $events[EntityTypeEvents::CREATE][] = $event;\n $events[EntityTypeEvents::UPDATE][] = $event;\n $events[EntityTypeEvents::DELETE][] = $event;\n return $events;\n }", "public function employees_with_leaves()\n {\n $params = array('header' => $this->_leaveheaders, \n 'class' => array('table table-striped table-bordered dt-table'));\n \n $this->_ci->load->library('MY_table', $params, 'regemployees');\n \n $empleaves = $this->_ci->employees->regular_employees_with_leaves();\n \n if (isset($empleaves) && !empty($empleaves))\n {\n for ($i = 0; $i < count($empleaves); $i++)\n {\n $tabledata[] = array($this->_leavemodal($empleaves[$i]->EmployeeNumber),\n $empleaves[$i]->FirstName,\n $empleaves[$i]->LastName,\n $empleaves[$i]->Vacation,\n $empleaves[$i]->Emergency,\n $empleaves[$i]->Sick,\n $empleaves[$i]->Maternity,\n $empleaves[$i]->Paternity,);\n }\n \n if (isset($tabledata) && !empty($tabledata))\n {\n return $this->_ci->regemployees->generate($tabledata);\n }\n else\n {\n $this->_ci->leave_listings->add_row(array('data' => 'No results found.', \n 'colspan' => count($this->_leaveheaders)));\n return $this->_ci->regemployees->generate();\n }\n }\n else\n {\n $this->_ci->leave_listings->add_row(array('data' => 'No results found.', \n 'colspan' => count($this->_leaveheaders)));\n return $this->_ci->regemployees->generate();\n }\n }", "public function index()\n {\n $data['leaves']=LeaveEmployee::all();\n return view('leave.index',$data);\n }", "public function viewleave(){\n\n\t\t $this->load->database();\n\t\t $this->load->model('Employee_leave');\n\t\t $leaves = $this->Employee_leave->get_all_data();\n\t\t $data = array(\n\t\t\t 'leaves' => $leaves,\n\t\t );\n\t\t $this->load->view('admin/base');\n\t\t $this->load->view('admin/viewleave', $data);\n\t }", "public function show(Leave $Leave)\n {\n //\n }", "function remindAboutGuardsPastLeave(){\n\t$guards_on_leave = array();\n\t$leave_end_dates = array();\n\t$lastschedule = array();\n\t\n\t$leaveresult = mysql_query(\"SELECT * FROM leaveapplications WHERE isactive = 'Y'\");\n\t\n\twhile($line = mysql_fetch_array($leaveresult,MYSQL_ASSOC)){\n\t\t//Check for those who are on leave\n\t\tif(($line['leavetype'] == \"Annual\" && $line['gmapproved'] == \"Y\") || ($line['leavetype'] == \"Pass Leave\" && $line['humanresourceapproved'] == \"Y\" && $line['payrollclerkapproved'] == \"Y\") || ($line['humanresourceapproved'] == \"Y\" && $line['operationsapproved'] == \"Y\" && $line['payrollclerkapproved'] == \"Y\")){\n\t\t\n\t\t\tif((strtotime($line['leavestartdate']) < strtotime(\"now\")) && (strtotime($line['leaveenddate']) < strtotime(\"now\"))){\n\t\t\t\t\n\t\t\t\tarray_push($guards_on_leave, $line['guardid']);\n\t\t\t\tarray_push($leave_end_dates, $line['leaveenddate']);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//If they are still on leave after the leave end date, show a message on the dashboard\n\t//First, pick the last entered row in the schedule and determine the current status of \n\t//the guard\n\t$scheduleresult = mysql_query(\"SELECT * FROM guardschedule\");\n\t\n\t//Looks for the last entered schedule\t\n\tif(mysql_data_seek($scheduleresult, (mysql_num_rows($scheduleresult) - 1))){\n\t\t$lastschedule = mysql_fetch_assoc($scheduleresult);\n\t\t$schedulearray_normal = split(\",\",$lastschedule[\"schedule\"]);\n\t\t$schedulearray_overtime = split(\",\",$lastschedule[\"overtimeentry\"]);\n\t\t\n\t\t//Go through those on leave to check for those not yet reported\n\t\tfor($i=0;$i<count($guards_on_leave);$i++){\n\t\t\t$ispresent = \"\";\n\t\t\t\n\t\t\t//Check the normal schedule for their current status\n\t\t\tfor($k=0;$k<count($schedulearray_normal);$k++){\n\t\t\t\t$guardstatus = split(\"=\",$schedulearray_normal[$k]);\n\t\t\t\tif($guards_on_leave[$i] == $guardstatus[0] && $guardstatus[1] == \"Leave\"){\n\t\t\t\t\t$ispresent = \"FALSE\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Also check the overtime schedule in case the guard just worked overtime\n\t\t\tfor($j=0;$j<count($schedulearray_overtime);$j++){\n\t\t\t\t$guardstatus = split(\"=\",$schedulearray_overtime[$j]);\n\t\t\t\tif($guards_on_leave[$i] == $guardstatus[0] && $guardstatus[1] == \"Leave\"){\n\t\t\t\t\t$ispresent = \"FALSE\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the guard is not yet back and no message was recorded to the same effect,\n\t\t\t// record a new msg\n\t\t\t$guardname_array = getRowAsArray(\"SELECT p.firstname, p.lastname, p.othernames FROM guards g, persons p WHERE g.personid = p.id AND g.guardid = '\".$guards_on_leave[$i].\"'\");\n\t\t\tif($ispresent == \"FALSE\" && (howManyRows(\"SELECT * FROM messages WHERE reason = 'STILL ON LEAVE' AND details LIKE '%\".$guardname_array[\"firstname\"].\" \".$guardname_array[\"lastname\"].\"%' AND details LIKE '%\".date(\"d-M-Y\",strtotime($leave_end_dates[$i])).\"%'\") == 0)){\n\t\t\t\t\n\t\t\t\tmysql_query(\"INSERT INTO messages (reason, details, sentby, sentto, date) VALUES ('STILL ON LEAVE', '\".$guardname_array[\"firstname\"].\" \".$guardname_array[\"lastname\"].\" is still on leave. His authorised leave ended on \".date(\"d-M-Y\",strtotime($leave_end_dates[$i])).\".', '', '1,80,81,84,85', NOW())\");\n\t\t\t}\n\t\t}\n\t}\n}", "function get_type() \n\t\t{\t\t\n\t\t \t return $thisShift->type;\t\t\n\t\t }", "function leave_manager() {\n\t\t$data = array();\n\t\t$user_nip = $this->session->userdata('user_name');\n\t\t$getEmpLeaveList = $this->m_leave->getStaffLeave($user_nip);\n\t\t// var_dump($getEmpLeaveList); exit();\n\t\tforeach ($getEmpLeaveList as $key => $value) {\n\t\t\t$data[\"row\"][] = array(\n\t\t\t\t'emp_fullname' \t\t\t\t\t => $value->emp_fullname,\n\t\t\t\t'master_nip' \t\t\t\t\t\t => $value->master_nip,\n\t\t\t\t'leave_id' \t\t\t\t\t\t\t => $value->leave_id,\n\t\t\t\t'leave_type'\t\t\t\t\t\t => $value->leave_type,\n\t\t\t\t'leave_from'\t\t\t\t\t\t => $value->leave_from,\n\t\t\t\t'leave_to' \t\t\t\t\t\t\t => $value->leave_to,\n\t\t\t\t'leave_days' \t\t\t\t\t\t => $value->leave_days,\n\t\t\t\t'leave_reason' \t\t\t\t \t => $value->leave_reason,\n\t\t\t\t'leave_manager_flag' \t\t => $value->leave_manager_flag,\n\t\t\t\t'leave_manager_nip' \t\t => $value->leave_manager_nip,\n\t\t\t\t'leave_approved_date' \t => $value->leave_approved_date,\n\t\t\t\t'leave_hr_flag' \t\t\t => $value->leave_hr_flag,\n\t\t\t\t'leave_hr_nip' \t\t\t\t\t => $value->leave_hr_nip,\n\t\t\t\t'leave_hr_approved_date' => $value->leave_hr_approved_date,\n\t\t\t);\n\t\t}\n $this->load->view('templates/header');\n $this->load->view('templates/nav');\n $this->load->view('employees/attendance/leave_manager', $data);\n $this->load->view('templates/footer');\n\t}", "public function show(Leave $leave)\n {\n //\n }", "public function getDebtRecoveryEvents()\n {\n if (isset($this->list['DebtRecovery'])) {\n return $this->list['DebtRecovery'];\n } else {\n return false;\n }\n }", "protected function getTransactionTypes()\n {\n $data = array();\n\n $transactionTypes = \\Genesis\\API\\Constants\\Transaction\\Types::getWPFTransactionTypes();\n $excludedTypes = array_map(\n function ($arr) {\n return $arr['value'];\n },\n (new EMerchantPay_Genesis_Model_Admin_Checkout_Options_Transaction_Recurring_Type())->toOptionArray()\n );\n // Exclude SDD Recurring\n array_push($excludedTypes, \\Genesis\\API\\Constants\\Transaction\\Types::SDD_INIT_RECURRING_SALE);\n\n // Exclude PPRO transaction. This is not standalone transaction type\n array_push($excludedTypes, \\Genesis\\API\\Constants\\Transaction\\Types::PPRO);\n\n // Exclude Transaction Types\n $transactionTypes = array_diff($transactionTypes, $excludedTypes);\n\n // Add PPRO types\n $pproTypes = array_map(\n function ($type) {\n return $type . EMerchantPay_Genesis_Helper_Data::PPRO_TRANSACTION_SUFFIX;\n },\n \\Genesis\\API\\Constants\\Payment\\Methods::getMethods()\n );\n $transactionTypes = array_merge($transactionTypes, $pproTypes);\n asort($transactionTypes);\n\n foreach ($transactionTypes as $type) {\n $name = \\Genesis\\API\\Constants\\Transaction\\Names::getName($type);\n if (!\\Genesis\\API\\Constants\\Transaction\\Types::isValidTransactionType($type)) {\n $name = strtoupper($type);\n }\n\n $data[$type] = $this->getLanguageEntry($name);\n }\n\n return $data;\n }", "public function getAllType()\n {\n $q=\"SELECT type_id FROM `status`\";\n $result = $this->fetchAll($q);\n return $result;\n }", "protected function getTypes() {}", "public function leaveAdmin(){\n\n $leaves = Leave::orderBy('id', 'desc')->get();\n\n $total_annual = Leave::where('hr_action', '=', '1')\n ->whereRaw('year(`created_at`) = ?', array(date('Y')))\n ->whereIn('leave_category', ['annual','casual'])->sum('no_days');\n\n $total_examination = Leave::where('hr_action', '=', '1')\n ->whereRaw('year(`created_at`) = ?', array(date('Y')))\n ->where('leave_category', '=', 'examination')->sum('no_days');\n\n $total_compassionate= Leave::where('hr_action', '=', '1')\n ->whereRaw('year(`created_at`) = ?', array(date('Y')))\n ->where('leave_category', '=', 'compassionate')->sum('no_days');\n\n $total_sick= Leave::where('hr_action', '=', '1')\n ->whereRaw('year(`created_at`) = ?', array(date('Y')))\n ->where('leave_category', '=', 'sick')->sum('no_days');\n\n\n // return view('leave.index', compact('leaves'))->with('users', User::all());\n\n\n return view('leave.admin')->with('users', User::all())->with('leaves', $leaves)\n ->with('total_annual', $total_annual)\n ->with('total_examination', $total_examination)\n ->with('total_compassionate', $total_compassionate)\n ->with('total_sick', $total_sick);\n\n\n\n }", "private function extract_events($r){\n $dejaVu = 0;\n static $events = array();\n\n if ($dejaVu != $r['lm_id']) $events = array();\n $dejaVu = $r['lm_id'];\n\n if (empty($events)){\n foreach(explode(',',$r['lm_status']) as $id){\n\tif (b_posix::is_int($id)){\n\t if (is_object($e = loader::getInstance_new('bForm_vm_Event',$id,'strict'))) $events[] = $e; \n\t}elseif(cnf_dev){\n\t // Should not happend...\n\t}\n }\n }\n return $events;\n }", "public function elevatorStatus(){\n foreach ($this->elevators_array as $key => $val){\n //List of availale elevators with capacity\n $available_elevators[] = [$key=>$val];\n }\n return $available_elevators;\n }", "public function getEnumValues()\n {\n return array(\n 'join_fail' => self::join_fail,\n 'join_enter' => self::join_enter,\n 'join_wait' => self::join_wait,\n );\n }", "public function branchemanagerLeaveStatusReject(Request $request){\n\n $settings = new Settings();\n $branch_id=$settings->get_login_branch_id();\n $rejectleave_application = DB::table('tb_leave_application')\n ->leftJoin('tb_employee','tb_leave_application.emp_id','=','tb_employee.id')\n ->leftJoin('tb_designations','tb_employee.emp_designation_id','=','tb_designations.id')\n ->leftJoin('tb_leave_type','tb_leave_application.leave_type_id','=','tb_leave_type.id')\n ->leftJoin('users','tb_leave_application.approved_by','=','users.id')\n ->select('tb_leave_application.id','tb_leave_application.unique_id','tb_employee.id as eid','tb_employee.employeeId',\n DB::raw(\"CONCAT(tb_employee.emp_first_name,' ',tb_employee.emp_lastName) as emp_name\"),\n 'tb_designations.designation_name','tb_leave_type.leave_type',\n DB::raw('MIN(tb_leave_application.leave_starting_date) as leave_starting_date'),\n DB::raw('MAX(tb_leave_application.leave_ending_date) as leave_ending_date'),\n DB::raw('SUM(actual_days) actual_days'),\n 'users.name as approve_by',\n 'tb_leave_application.status')\n ->groupBy('unique_id')\n ->where('tb_leave_application.status','=',2)\n ->where('tb_employee.branch_id',$branch_id)\n ->get();\n\n return response()->json(['rejectleave_application' =>$rejectleave_application], $this->successStatus);\n\n\n }", "public static function getStates()\n {\n /** @var Loyalty $module */\n $module = Module::getInstanceByName('loyalty');\n\n return [\n static::getDefaultId() => $module->getL('Awaiting validation'),\n static::getValidationId() => $module->getL('Available'),\n static::getCancelId() => $module->getL('Cancelled'),\n static::getConvertId() => $module->getL('Already converted'),\n ];\n }", "abstract protected function getTradeType();", "public function applyForLeave(User $user, $params)\n {\n $leave = $this->getLeaveForUser($user);\n if (!$leave) {\n throw new Exception(\"Could not create leave application\");\n }\n\n $app = $this->saveLeaveApplication($params);\n if ($app) {\n // get all the usernames who are either admins or power users\n $approvers = $this->getApprovers();\n if (count($approvers)) {\n // Notify of the application\n $msg = new TemplatedMessage('new-leave-application.php', array('model'=>$app));\n $this->notificationService->notifyUser('New Leave Application', $approvers, $msg);\n }\n }\n\n return $app;\n }", "public function get_all(){\n\t\t\t$query = $this->db->get_where('point_type', array('delete_flag' => 0));\n\n\t\t\t$table= $query->result();\t\t\n\t\t\treturn $table;\n\t\t}", "public function getCollectedDays()\n {\n $days = array();\n $this->addFutureDaysFromEventRecord($days);\n\n // event->getDays already contains all Exceptions of type \"Add\"\n // above we have added all exceptions of type \"Time\"\n // while generating the day array we have added all exceptions of type \"Info\"\n // so only exceptions of type \"Remove\" are missing\n $this->addFutureDaysFromRemovedEventExceptions($days);\n\n return $days;\n }", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public function gettimeoffpendingatstatus($sts,$leaveid){\n\tif($sts==3){\n\t\t\t\t\t\t$pendingapprover=$this->gettimeoffApproverPendingSts($leaveid,3);\n\t\t\t\t\t\t$pendingapp=$this->getEmployeeName($pendingapprover);\t\t\t\n\t\t\t\t\t\tif($pendingapp==\"\")\n\t\t\t\t\t\t\treturn \"Pending\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn \"Pending\";\n\t\t\t\t\t\t/* return \"Pending at $pendingapp\";// removing pending at condition as per discussion with badi ma'am */\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn $this->getleavetype($sts);\n\t\t\t\t\t}\n\t}", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "public function getLeave($id) {\n try {\n $objLeave = new Base_Model_ObtorLib_App_Core_Employee_Dao_Leave();\n $leave = $objLeave->getLeave($id);\n return $leave;\n } catch (Exception $e) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception($e);\n }\n }", "public function manger_action_leave()\n {\n\n if ($this->request->is('post')) {\n $this->loadModel('Leave');\n $data = $this->request->data;\n $data['leave_approve_date'] = date(\"Y-m-d\");\n $id = $this->request->data['leave_id'];\n $leavedate = $this->request->data['date'];\n $leaveDat = explode(\"-\", $leavedate);\n $Date1 = $leaveDat['0'];\n $Date2 = $leaveDat['1'];\n $leaveStart = strtotime($Date1);\n $strt = date('Y-m-d', $leaveStart);\n $leaveEnd = strtotime($Date2);\n $end = date('Y-m-d', $leaveEnd);\n $data['leave_start_date'] = $strt;\n $data['leave_end_date'] = $end;\n $status = $this->request->data['leave_status'];\n $approver_comment = $data['approver_comment'];\n $this->Leave->actionLeave($id, $data); \n $user_data = $this->Leave->userLeaveData($id);\n $leave_status = $user_data['Leave']['leave_status'];\n $subject = 'Leave Approved!';\n if ($leave_status != LEAVE_STATUS_APPROVE) {\n $subject = 'Leave Rejected!';\n }\n $action_by = $user_data['Leave']['leave_approve_by'];\n $user_name = $user_data['Leave']['apply_by'];\n $user_id = $user_data['Leave']['user_id'];\n $user_datas = $this->User->userData($user_id);\n $user_email = $user_datas['User']['email'];\n $dataArry = array('user_name'=>$user_name,\n 'action_by'=>$action_by,\n 'action_text'=>$approver_comment,\n 'status'=>$status\n );\n $headers = \"CC: [email protected]\";\n $Email = new Email();\n $status = $Email->sendEmail($user_email, $subject, 'leave_action', $dataArry, $headers);\n $LeaveData = $this->Leave->leaveList();\n $this->set('leave', $LeaveData);\n return $this->redirect(array(\n 'action' => 'managerList',\n ));\n }\n }", "public function getExciseTaxList($type ='Excise'){\n\t \n\t \t\t$this->db->select(\"TS.tax_id, TS.tax_per, TS.tax_type\");\n\t\t\t$this->db->from(\"tax_structure AS TS\");\n\t\t\t//$this->db->where(\"TS.tax_type\",'Active');\n\t\t\t$this->db->where('TS.tax_type', 'Excise');\n\t\t\t$this->db->where(\"TS.status\",'Active');\n\t\t\t$query_tax_array = $this->db->get();\n\t\t\t//echo $this->db->last_query();die;\n\t\t\tif($query_tax_array->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $query_tax_array->result_array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t \n\t }" ]
[ "0.7015487", "0.6967404", "0.61036795", "0.5900912", "0.56877154", "0.5634207", "0.5619556", "0.56008863", "0.5542771", "0.5446719", "0.54432833", "0.539795", "0.5340632", "0.5317936", "0.5301901", "0.5259336", "0.523336", "0.5229623", "0.5211691", "0.51794404", "0.5164349", "0.51579654", "0.5138063", "0.50863624", "0.50496364", "0.5040516", "0.5025525", "0.49942294", "0.49859077", "0.49614915", "0.49534565", "0.49471432", "0.49160302", "0.49159563", "0.49154776", "0.49035043", "0.48983958", "0.48830023", "0.48779124", "0.48704213", "0.4855696", "0.4850963", "0.48439673", "0.48350272", "0.4824719", "0.48072994", "0.48045754", "0.47897092", "0.4786287", "0.4766137", "0.4763055", "0.47586262", "0.47453567", "0.474226", "0.47378397", "0.47285727", "0.47264767", "0.47264504", "0.47137016", "0.47134995", "0.4700007", "0.46986035", "0.46938005", "0.46936503", "0.46936336", "0.46913928", "0.4688698", "0.46848875", "0.46781483", "0.46768665", "0.467407", "0.4672402", "0.46686342", "0.46684918", "0.46602246", "0.46560663", "0.4655931", "0.46557447", "0.46460608", "0.46345675", "0.4628627", "0.4626467", "0.46254933", "0.46246445", "0.4617993", "0.46171448", "0.46152726", "0.4602898", "0.45847985", "0.45777503", "0.45770368", "0.45700365", "0.45667714", "0.45466056", "0.45446265", "0.4524278", "0.45238224", "0.45193097", "0.45146534", "0.450783" ]
0.6223224
2
get all leave type
public function get_all_leave_type(){ $this->db->select('*'); $this->db->from('leave_type'); $query=$this->db->get(); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLeaveTypes()\n {\n $leaveTypes = [];\n $leaves = DB::table('dbo.LEAVE_TYPE')->lists('leave_type');\n $userGender = Employee::find(Auth::user()->Emp_id)->Emp_Gender;\n \n foreach ($leaves as $leaveType )\n {\n array_push($leaveTypes, $leaveType);\n }\n\n if($userGender == \"M\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Maternity\"));\n }\n\n if($userGender == \"F\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Paternity\"));\n }\n\n return $leaveTypes;\n }", "public function get_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \t$data=$query->result();\n $list = array('' => 'Select One...');\n \tif(!empty($data)){\n \t\tforeach ($data as $value) {\n \t\t\t$list[$value->leave_type_id]=$value->leave_type;\n \t\t}\n \t}\n \treturn $list;\n }", "public function index()\n {\n return LeaveTypeResource::collection($this->leaveType->all());\n }", "public function leaveType()\n {\n return $this->belongsTo(LeaveType::class, 'leave_type_id');\n }", "public function index()\n {\n $leave_types = LeaveType::orderBy('name')\n ->paginate();\n\n $data = [\n 'title' => 'All Leave Types',\n 'meta_desc' => 'All leave types',\n 'body_class' => null,\n 'user' => $this->user,\n 'menu' => 'hr',\n 'notifications' => notifications($this->user),\n 'new_notification' => countNewNotifications($this->user),\n 'crumbs' => [\n 'performance/leave' => 'Leave',\n 'active' => 'Leave types'\n ],\n 'leave_types' => $leave_types,\n ];\n return view('customer.performance.leave.leave-type.index', $data);\n }", "public function index()\n {\n\n $leave_types=LeaveType::orderBy('id','ASC')->get();\n return view('admin.leave.leave_types',['leave_types'=> $leave_types]);\n }", "public function get_leave_type_by_id($id){\n $this->db->where('leave_type_id',$id);\n $query = $this->db->get('leave_type');\n return $query->row();\n }", "public function getLeave()\n {\n return $this->get(self::_LEAVE);\n }", "public function getAllType()\n {\n $q=\"SELECT type_id FROM `status`\";\n $result = $this->fetchAll($q);\n return $result;\n }", "public function f_get_leaveAlloaction_table()\r\n {\r\n\r\n $sql = $this->db->query(\" SELECT * FROM td_leave_dtls WHERE trans_type = 'O'\r\n AND YEAR(trans_dt) = YEAR(CURDATE()) \");\r\n return $sql->result();\r\n\r\n }", "public function getRoomTypesList()\n {\n return RoomType::all()->pluck('name', 'id');\n }", "function GetLeaveMonthList($type = NULL) {\n $companyid = $this->companyID;\n //$emp_seqno = $this->empSeqNo;\n $emp_seqno = $_SESSION [\"user\"] [\"emp_seq_no\"];\n $_where = empty($type) ? \" and emp_seq_no = '$emp_seqno'\" : \"\";\n $sql_string = <<<_LeaveYearList_\n select distinct substrb(to_char(my_day,'YYYY-MM-DD'), 6,2) as month1,\n substrb(to_char(my_day,'YYYY-MM-DD'), 6,2) as month2\n from ehr_absence_v\n where company_id = '$companyid'\n $_where\n order by substrb(to_char(my_day,'YYYY-MM-DD'), 6,2) asc\n_LeaveYearList_;\n //print $sql_string;\n return $this->DBConn->GetArray($sql_string);\n }", "public function index()\n {\n $title = trans('staff_leave_type.staff_leave_types');\n return view('staff_leave_type.index', compact('title'));\n }", "public function getLeave()\n {\n return view('leave.list');\n }", "public function equipment_type(){\n\t\t\t$equip_type_qry = $this->db->prepare(\"SELECT * FROM truck_type WHERE status = '1'\");\n\t\t\t$equip_type_qry->execute();\n\t\t\t$fetch= array();\n\t\t\twhile($equip_type_row = $equip_type_qry->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$fetch[]=$equip_type_row;\n\t\t\t}\n\t\t\treturn $fetch;\n\t\t}", "public function get_all(){\n\t\t\t$query = $this->db->get_where('point_type', array('delete_flag' => 0));\n\n\t\t\t$table= $query->result();\t\t\n\t\t\treturn $table;\n\t\t}", "public function get_all_message_type()\n\t{\n\t\t$query = $this->db->get('message_type');\n\t\treturn $query;\n\t}", "public function getLeaveList()\n {\n $uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : 0;\n $query = $this->db->query(\"SELECT Id,`ApplyDate`, `LeaveFrom`, `LeaveTo`, LeaveValidDays, `LeaveReason`, `LeaveStatus`, `ApproverComment` FROM `EmployeeLeave` WHERE EmployeeId=? order by Id desc limit 30\",\n\t\tarray(\n $uid\n ));\n $res = array();\n\t\t\n foreach ($query->result() as $row) {\n $data = array();\n\t\t\t$data['leaveid'] = $row->Id;\n\t\t\t$todaydate=date(\"Y-m-d\");\n\t\t\t$data['withdrawlsts'] = true;\n\t\t\tif(strtotime($todaydate)>strtotime($row->LeaveFrom))\n\t\t\t\t$data['withdrawlsts'] = false;\n $data['date'] = date(\"dS M'y\", strtotime($row->ApplyDate));\n $data['from'] = date(\"dS M'y\", strtotime($row->LeaveFrom));\n $data['to'] = date(\"dS M'y\", strtotime($row->LeaveTo));\n $data['days'] = ' (' . $row->LeaveValidDays . ')';\n $data['status'] = $this->getpendingatstatus($row->LeaveStatus, $row->Id);// TODO dynamic with the status pending on which employee.\n $data['reason'] = $row->LeaveReason != '' || $row->LeaveReason != null ? $row->LeaveReason : '-';\n $data['comment'] = $row->ApproverComment != '' || $row->ApproverComment != null ? $row->ApproverComment : '-';\n //$data['comment']=$row->ApproverComment;\n $res[] = $data;\n }\n echo json_encode($res);\n }", "public function getAllTypes(){\n return $this->find()->asArray()->orderBy('typeDesc ASC')->all();\n }", "public function index()\n {\n $data['leaves'] = Leave::AllLeave();\n return view(\"leave.list\",$data);\n }", "public function index()\n {\n $business_id = request()->session()->get('user.business_id');\n $is_admin = $this->moduleUtil->is_admin(auth()->user(), $business_id);\n\n if (!(auth()->user()->can('superadmin') || $this->moduleUtil->hasThePermissionInSubscription($business_id, 'essentials_module')) && !$is_admin) {\n abort(403, 'Unauthorized action.');\n }\n\n if (request()->ajax()) {\n $leave_types = EssentialsLeaveType::where('business_id', $business_id)\n ->select(['leave_type', 'max_leave_count', 'id']);\n\n return Datatables::of($leave_types)\n ->addColumn(\n 'action',\n '<button data-href=\"{{action(\\'\\Modules\\Essentials\\Http\\Controllers\\EssentialsLeaveTypeController@edit\\', [$id])}}\" class=\"btn btn-xs btn-primary btn-modal\" data-container=\".view_modal\"><i class=\"glyphicon glyphicon-edit\"></i> @lang(\"messages.edit\")</button>'\n )\n ->removeColumn('id')\n ->rawColumns([2])\n ->make(false);\n }\n\n return view('essentials::leave_type.index');\n }", "public function leaves()\n {\n return $this->hasMany('App\\Models\\Absence', 'personnel_no', 'personnel_no')\n ->leavesOnly();\n }", "private function getEvents($type)\r\n {\r\n if ($type == Stat::TYPE_INQUIRY) {\r\n $inqs = $this->container->get('jcs.ds')->getGroup('inquiry');\r\n return !empty($inqs) ? $inqs : [];\r\n }\r\n elseif ($type == Stat::TYPE_FAMILY_HELP) {\r\n $events = $this->container->getParameter('stat_events');\r\n\r\n return isset($events[$type]) ? $events[$type] : [];\r\n }\r\n }", "public function getEventTypes()\n {\n return $this->event_types;\n }", "public function listAllType(){\n try {\n return $this->identityTypeGateway->getAllTypes();\n } catch (Exception $ex) {\n throw $ex;\n }catch (PDOException $e){\n throw $e;\n }\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function get_event_types()\n {\n return array(0 => 'miscellaneous', 1 => 'appointment', 2 => 'holiday'\n ,3 => 'birthday', 4 => 'personal', 5 => 'education'\n ,6 => 'travel', 7 => 'anniversary', 8 => 'not in office'\n ,9 => 'sick day', 10 => 'meeting', 11 => 'vacation'\n ,12 => 'phone call', 13 => 'business'\n ,14 => 'non-working hours', 50 => 'special occasion'\n );\n }", "public function save_leave_type($data = array()){\n \treturn $this->db->insert('leave_type', $data);\n }", "public function get_types()\n {\n }", "public function getLeaveForUser(User $user, $leaveType=\"Annual\")\n {\n $leave = $this->dbService->getByField(array('username'=>$user->getUsername(), 'leavetype'=>$leaveType), 'Leave');\n if (!$leave && $user) {\n // Need to create new\n $params = array('username'=>$user->getUsername(), 'days'=>0, 'leavetype'=>$leaveType);\n $leave = $this->dbService->saveObject($params, 'Leave');\n }\n\n if (!$leave) {\n throw new Exception(\"Could not retrieve Leave details for \".$user->getUsername());\n }\n\n return $leave;\n }", "public function lead_type_list()\n {\n \n $result = $this->db->query(\"call lead_type_list()\")->result();\n \n save_query_in_log();\n return $result;\n }", "public function index()\n {\n $leaves= Leave::all();\n $leavetypes= Leavetype::all();\n\n /* $mostleaves = Leave::\n \n where('status','ACTIVO')\n \n ->select('user_id', DB::raw('COUNT(id) as mostleaves'))\n ->groupBy('user_id')\n ->orderBy(DB::raw('COUNT(id)'), 'DESC')\n ->take(5)\n ->get(); */\n\n $mostleaves = DB::table('users as u')\n ->join('leaves as l','u.id','=','l.user_id')\n ->select('u.name','u.ap_paterno','u.ap_materno', DB::raw('COUNT(l.id) as mostleaves'))\n ->where('l.status','ACTIVO')\n ->whereMonth('l.created_at', Carbon::now()->format('m'))\n ->where('l.resp_status','AUTORIZADO')\n ->groupBy('name','ap_paterno','ap_materno')\n ->orderBy(DB::raw('COUNT(l.id)'), 'DESC')\n ->take(10)\n ->get();\n \n\n $leavesaut=Leave::where('resp_status','AUTORIZADO')\n ->where('user_id','auth'()->user()->id)\n ->where('status','ACTIVO')\n ->get();\n $leavesrec=Leave::where('resp_status','RECHAZADO')\n ->where('user_id','auth'()->user()->id)\n ->where('status','ACTIVO')\n ->get();\n $leavespen=Leave::where('resp_status','EN ESPERA')\n ->where('user_id','auth'()->user()->id)\n ->where('status','ACTIVO')\n ->get();\n\n //$max_leaves_for_user_for_offices = auth()->user()->office;\n /* $offices = Office::all();\n //return $users = auth()->user()->office->take(2)->get();\n foreach($offices as $office){\n \n foreach($office->users as $user){\n foreach( $user->leaves as $leave){\n\n return $leave;\n }\n }\n } */\n /* Select Top 1 IDCELULAR, COUNT(IDCELULAR) AS VENTAS \n from Venta \n Group by IdCelular \n Order by count(2) desc */\n /* dd($mostleaves ); */\n return view('home',compact('leaves','leavetypes','leavesaut','leavesrec','leavespen','mostleaves'));\n }", "public function employee_leave_status()\n\t{\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('accepted'=>'', 'accepted_count'=>'','pending'=>'', 'pending_count'=>'','rejected'=>'', 'rejected_count'=>'');\n\t\t\n\t\t//accepted\n\t\t$Return['accepted'] = $this->lang->line('xin_approved');\n\t\t$Return['accepted_count'] = accepted_leave_request();\n\t\t// pending\n\t\t$Return['pending'] = $this->lang->line('xin_pending');\n\t\t$Return['pending_count'] = pending_leave_request();\n\t\t// rejected\n\t\t$Return['rejected'] = $this->lang->line('xin_rejected');\n\t\t$Return['rejected_count'] = rejected_leave_request();\n\t\t$this->output($Return);\n\t\texit;\n\t}", "protected function getTypes() {}", "function getFilterType(){\n\t$data = M('event');\n\t$type_set = Array();\n\t$result = $data->group('type')->order('type asc')->select();\n\tforeach($result as $value)\n\t\tarray_push($type_set, $value['type']);\n\n\treturn $type_set;\n}", "public static function getAllEventsByType($type)\n {\n $db = new Database();\n // Create an admin DB connection to get data from Events_Details table\n $adminDB = $db->getAdminDBConnection();\n // Query database for eid and get all details\n $query = \"SELECT * FROM Event_Details WHERE Type='\" . $type . \"' AND status=1;\";\n // Prepare query statement\n $stmt = $adminDB->prepare($query);\n // Execute query\n $stmt->execute();\n // Fetch all rows as associative array\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "public function openmeetings_getRoomTypes() {\n\t\t//global $CFG;\n\n\t\t$a_name=array();\n\t\t$a_id=array();\n\t\t$a_roomTypes=array();\n\t\t$restService = new openmeetings_rest_service();\n\n\t\t$call = $this->getUrl().\"/services/RoomService/getRoomTypes?SID=\".$this->session_id;\n\t\t$result = $restService->call($call,\"\");\n\t\tif ($this->b_logWrite == true) $GLOBALS['ilLog']->write(__METHOD__.': call: '.$call);\n\t\tif ($restService->getError()) {\n\t\t\techo '<h2>Fault : Rest Service Error</h2><pre>'; print_r($result); echo '</pre>';\n\t\t} else {\n\t\t\t$err = $restService->getError();\n\t\t\tif ($err) {\n\t\t\t\techo '<h2>Error</h2><pre>' . $err . '</pre>';\n\t\t\t} else {\n\t\t\t\t$dom = $result;\n\t\t\t\t$returnNodeList = $dom->getElementsByTagName(\"name\");\n\t\t\t\tforeach ($returnNodeList as $returnNode) {\n\t\t\t\t\tif ($returnNode->nodeValue != \"conference_room_type\") array_push($a_name,$returnNode->nodeValue);\n\t\t\t\t}\n\t\t\t\t$returnNodeList = $dom->getElementsByTagName(\"roomtypes_id\");\n\t\t\t\tforeach ($returnNodeList as $returnNode) {\n\t\t\t\t\tarray_push($a_id,$returnNode->nodeValue);\n\t\t\t\t}\n\t\t\t\tfor($i=0;$i<count($a_id);$i++) {\n\t\t\t\t\t$a_roomTypes[$i]=array( (string)$a_id[$i] => (string)$a_name[$i] );\n\t\t\t\t}\n\t\t\t\treturn $a_roomTypes;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public function run()\n {\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'VL';\n $leave_type->leave_description = 'Vacation Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SL';\n $leave_type->leave_description = 'Sick Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'ML';\n $leave_type->leave_description = 'Maternity Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'BL';\n $leave_type->leave_description = 'Birthday Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'PL';\n $leave_type->leave_description = 'Paternity Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SIL';\n $leave_type->leave_description = 'Service Incentive Leave';\n $leave_type->save();\n\n $leave_type = new \\App\\LeaveType();\n $leave_type->leave_code = 'SPL';\n $leave_type->leave_description = 'Single Parent Leave';\n $leave_type->save();\n\n }", "public function getOfferTypes() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tAn array containing all the offer type keys and names\n\t\t##\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_offer_types.type,\n\t\t\t{$this->wpdb->prefix}topspin_offer_types.name,\n\t\t\t{$this->wpdb->prefix}topspin_offer_types.status\n\t\tFROM {$this->wpdb->prefix}topspin_offer_types\nEOD;\n\t\t$data = $this->wpdb->get_results($this->wpdb->prepare($sql),ARRAY_A);\n\t\t## Store as Class Property\n\t\t$this->offer_types['data'] = $data; ## Raw Data\n\t\tforeach($data as $row) { $this->offer_types['key'][$row['type']] = $row['name']; } ## Key Data\n\t\treturn $data;\n\t}", "public function getAllTypes() {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('t' => 'NEWAGENTTYPELOOKUP')\n );\n $allTypes = $this->fetchAll($select);\n $returnVal = array();\n foreach ($allTypes as $typeRow) {\n $returnVal[$typeRow->NEWAGENTTYPELOOKUPID] = $typeRow->LABEL;\n }\n\n return $returnVal;\n }", "public function get_types() {\n\n $q = $this->db->query('SELECT DISTINCT `rgl_type` , `vtr_type` \n FROM `t_reglements` \n LEFT JOIN `v_types_reglements` ON `vtr_id` = `rgl_type` ');\n if ($q->num_rows() > 0) {\n $resultat = $q->result();\n return $resultat;\n }\n else {\n return array();\n }\n }", "function monitor_list_activity_types() {\n $query = \"select distinct(`wf_type`) from `\".GALAXIA_TABLE_PREFIX.\"activities`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_type'];\n }\n return $ret; \n }", "public function getWarehouseTypes();", "public function getLeaveList(Request $request)\n {\n $offset = $request->input('start');\n $limit = $request->input('length');\n $keyword = $request->input('search');\n $keyword = strtolower($keyword['value']);\n $leave = DB::table('leaves');\n if (isset($keyword) && trim($keyword) != '') {\n $leave->where('leaves.leave_type', 'LIKE', '%' . $keyword . '%')\n ->orwhere('leaves.leave_total_duration', 'LIKE', '%' . $keyword . '%')\n ->orwhere('leaves.leave_description', 'LIKE', '%' . $keyword . '%');\n }\n\n $columns = $request->input('order');\n $columnIndex = $request->input('columns');\n $columnIndex = $columnIndex[$columns[0]['column']]['data'] == 'id' ? $columnIndex[1]['data'] : $columnIndex[$columns[0]['column']]['data'];\n $orderType = $columns[0]['dir'];\n $leaveCount = $leave->get()->count();\n $leaves = $leave->skip($offset)->take($limit)->orderBy($columnIndex, $orderType)->get();\n $data = [];\n $i = $offset > 0 ? ($offset + 1) : 1;\n foreach ($leaves as $leave) {\n $data[] = [\n 'id' => $i++,\n 'leave_type' => $leave->leave_type,\n 'leave_duration' => $leave->leave_total_duration,\n 'leave_description' => $leave->leave_description,\n 'action' => $leave = '<i class=\"fa fa-edit edit-leave pointer btn btn-sm btn-info\" id=\"' . $leave->id . '\"></i> <i class=\"fa fa-trash pointer delete-leave btn btn-sm btn-danger\" id=\"' . $leave->id . '\"></i>'\n ];\n }\n $count = [\n 'draw' => $request->input('draw') ?? 0,\n 'data' => $data,\n 'recordsTotal' => $leaveCount,\n 'recordsFiltered' => $leaveCount\n ];\n return response()->json($count);\n }", "public function getLeaveReasonAllowableValues()\n {\n return [\n self::LEAVE_REASON__NAME_LEFT_THE_MEETING,\n self::LEAVE_REASON__NAME_GOT_DISCONNECTED_FROM_THE_MEETING,\n self::LEAVE_REASON_HOST_ENDED_THE_MEETING,\n self::LEAVE_REASON_HOST_CLOSED_THE_MEETING,\n self::LEAVE_REASON_HOST_STARTED_A_NEW_MEETING,\n self::LEAVE_REASON_NETWORK_CONNECTION_ERROR,\n self::LEAVE_REASON_HOST_DID_NOT_JOIN,\n self::LEAVE_REASON_EXCEEDED_FREE_MEETING_MINUTES_LIMIT,\n self::LEAVE_REASON_REMOVED_BY_HOST,\n self::LEAVE_REASON_UNKNOWN_REASON,\n self::LEAVE_REASON_LEAVE_WAITING_ROOM,\n self::LEAVE_REASON_REMOVED_BY_HOST_FROM_WAITING_ROOM,\n ];\n }", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "public function getPointEventType()\n {\n return PointEventType::all();\n }", "private function _make_leave_event($data) {\n\n return array(\n \"title\" => $data->applicant_name,\n \"start\" => $data->start_date . \" \" . \"00:00:00\",\n \"end\" => $data->end_date . \" \" . \"23:59:59\", //show leave applications for the full day\n \"backgroundColor\" => $data->leave_type_color,\n \"borderColor\" => $data->leave_type_color,\n \"extendedProps\" => array(\n \"icon\" => \"log-out\",\n \"leave_id\" => $data->id, //to make is secure we'll use the encrypted id\n \"cycle\" => 0,\n \"event_type\" => \"leave\",\n )\n );\n }", "public function menuType()\n {\n return ProductType::all();\n }", "public function requestStatus()\n {\n\n //$leaves = LeaveType::with('history')->get();\n $request_status = RequestStatus::all();\n // dd($leave_type);\n return view('pages.requestStatus.request_status_list')->with('request_status', $request_status);\n }", "function getTypesMenu(){\n\t\t$sql=\"SELECT gd.TenGD, ctgd.MaCTGD, ctgd.TenCTGD FROM giaidoan gd, chitietgiaidoan ctgd WHERE gd.MaGD = ctgd.MaGD\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}", "public function getLeaveDetails($userid, $type, $status)\n {\n if($status == 'total')\n $where = \" AND status IN ('inprocess','refused', 'approved') \";\n else\n $where = \" AND status = '\".$status.\"' \";\n $query = \"select * FROM \".$this->_name.\" WHERE created_by = '\".$userid.\"' AND type = '\".$type.\"' $where\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "function get_all_types()\n {\n return $this->db->get('card_types')->result();\n }", "public function all()\n {\n return $this->type->all();\n }", "public function get_menu_type(){\n $this->db->where('user_role_id', 4);\n $menu_types = parent::get();\n return $menu_types;\n }", "public function list()\n {\n return $this->getResult($this->client->get('linode/types'));\n }", "public static function getAllEventTypes()\n {\n return [\n 'complete' => 'complete',\n 'fail' => 'fail'\n ];\n }", "public function getTypes(){\r\n \r\n $options[\"\"] = \"--Select--\";\r\n //Query all users(Lecturers) not assigned to other departments\r\n $types = $this->em->getRepository(\"\\Application\\Entity\\Assessmenttype\")->findBy(array(\"systemGenerated\"=>0));\r\n \r\n foreach($types as $type ){\r\n $options[$type->getPkAtid()] = $type->getTypeName();\r\n }\r\n \r\n return $options;\r\n }", "static public function getAllEngins()\n {\n $stmt=DB::connect()->prepare('SELECT * FROM type_vehicule');\n $stmt->execute();\n return $stmt->fetchAll();\n $stmt->closeCursor();\n $stmt=null;\n }", "public function get_all($type = 'App') \n {\n // Lowercase the type\n $type = strtolower($type);\n \n // Check if the variable exists\n if(isset($this->data[$type]))\n {\n return $this->data[$type];\n }\n return NULL;\n }", "public function getEventTypeAttribute() {\n return $this->eventType()->getResults();\n }", "public function all()\n {\n return IncomeTypes::all();\n }", "public static function getList($idle=null,$idEmployee=null) {\r\n $lvEarned = new EmployeeLeaveEarned();\r\n $crit=[];\r\n if ($idle!==null) {\r\n $crit[\"idle\"]=\"$idle\";\r\n }\r\n if($idEmployee){\r\n $crit[\"idEmployee\"]=$idEmployee;\r\n }\r\n $lvEarnedList = $lvEarned->getSqlElementsFromCriteria($crit);\r\n return $lvEarnedList;\r\n }", "public static function getTypes();", "public function get_available_days($type){\n $sql = \"SELECT DISTINCT `day` FROM wp_dcms_reservation_config\n WHERE `type`='{$type}' and qty > 0\";\n $result = $this->wpdb->get_results( $sql );\n\n error_log(print_r($result,true));\n\n $res = [];\n foreach ($result as $item){\n $res[] = $item->day;\n }\n\n return $res;\n }", "public function findAll() {\n $sql = \"select * from eventtype order by num_ET\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $entities = array();\n foreach ($result as $row) {\n $id = $row['num_ET'];\n $entities[$id] = $this->buildDomainObject($row);\n }\n return $entities;\n }", "function GetLeaveYearList($type = NULL) {\n $companyid = $this->companyID;\n $emp_seqno = $this->empSeqNo;\n $_where = empty($type) ? \" and emp_seq_no = '$emp_seqno'\" : \"\";\n $sql_string = <<<eof\n select distinct substrb(to_char(my_day,'YYYY-MM-DD'), 0,4) as year1,\n substrb(to_char(my_day,'YYYY-MM-DD'), 0,4) as year2\n from ehr_absence_v\n where company_id = '$companyid'\n $_where\n order by substrb(to_char(my_day, 'YYYY-MM-DD'), 0, 4) desc\neof;\n return $this->DBConn->GetArray($sql_string);\n }", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public function types() {\n return [\n self::TYPE_NONE => 'none',\n self::TYPE_WECHAT => 'wechat',\n self::TYPE_ALIPAY => 'alipay',\n self::TYPE_CASH => 'cash',\n ];\n }", "public function getTypeEvenement()\n {\n return $this->typeEvenement;\n }", "public function getAll () {\n return $this->curl->get('activityTypes')['data'];\n }", "function getTypes() {\n\t\treturn $this->types;\n\t}", "public static function getAll()\r\n {\r\n return self::$typeRegistry;\r\n }", "public function getAllMealTypes()\n {\n return MealFoodType::all();\n }", "public function model()\n {\n return LeaveRequest::class;\n }", "public function findByType($type){\r\n $stmt = $this->db->prepare(\"SELECT * FROM event WHERE type =?\");\r\n $stmt->execute(array($type));\r\n\r\n $events_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n $events = array();\r\n\r\n foreach($events_db as $event){\r\n array_push($events, new Event($event[\"id_event\"], $event[\"type\"], $event[\"name\"],$event[\"moment\"], $event[\"date\"],\r\n $event[\"guests\"], $event[\"children\"], $event[\"sweet_table\"], $event[\"observations\"],\r\n $event[\"restaurant\"], $event[\"phone\"],$event[\"price\"] ));\r\n }\r\n\r\n return $events;\r\n }", "function get_all_service_type()\n {\n $this->db->order_by('ID_SERVICE_TYPE', 'desc');\n return $this->db->get('SERVICE_TYPE')->result_array();\n }", "function grabTypes(){\n\t\t$d=$this->find('all',array('order'=>array('id ASC')));\n\t\treturn $d;\n\t}", "public function getAllTypes()\n {\n $this->db->select('*', FALSE);\n $this->db->from('item_type');\n $query = $this->db->get();\n return $query->result();\n }", "public static function types()\n {\n return [\n self::TYPE_PERSONAL => Yii::t('app', 'Personal'),\n self::TYPE_BUSINESS => Yii::t('app', 'Business'),\n self::TYPE_CUSTOM => Yii::t('app', Yii::$app->holidaySettings->customHolidayName)\n ];\n }", "public static function getLogs($type='_all_')\n\t{\n\t\tif($type == '_all_') return self::$_logs;\n\t}", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public function index()\n {\n $data['leaves']=LeaveEmployee::all();\n return view('leave.index',$data);\n }", "public static function getTypes()\n {\n $sql = 'SELECT * FROM location_type';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function getEnumTypes()\n {\n return $this->postRequest('GetEnumTypes');\n }", "public function viewleave(){\n\n\t\t $this->load->database();\n\t\t $this->load->model('Employee_leave');\n\t\t $leaves = $this->Employee_leave->get_all_data();\n\t\t $data = array(\n\t\t\t 'leaves' => $leaves,\n\t\t );\n\t\t $this->load->view('admin/base');\n\t\t $this->load->view('admin/viewleave', $data);\n\t }", "static public function get_restore_types() {\n return array(\n 'default' => get_string('default', 'grades'),\n 'ignore' => get_string('ignore', 'grades'),\n 'username' => get_string('username', 'moodle'),\n 'fullnameuser' => get_string('fullnameuser', 'moodle'), // User full name\n 'groupname' => get_string('groupname', 'group'),\n 'activityname' => get_string('basicltiname', 'lti'), // Moodle >= 2.2\n 'coursename' => get_string('coursename', 'grades'),\n );\n }", "public function Get_aTypeDrive() {\n\t\t// use count from 1! in smarty tlp check 0 and not set equal\n\t\treturn array(\n\t\t\t1 => Language::GetMessage('Привод на все колеса'),\n\t\t\t2 => Language::GetMessage('Привод на все колеса постоянный'),\n\t\t\t3 => Language::GetMessage('Привод на задние колеса'),\n\t\t\t4 => Language::GetMessage('Привод на передние колеса'),\n\t\t);\n\t}", "public function get_types()\n {\n return self::$TYPES;\n }", "public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Etat\");//type array\n\t}", "public function index()\n {\n //returning the leaves applied by an employess\n $leaves = Auth::user()->leave()->latest()->get();\n return view('employee/leave/index',compact('leaves'));\n }", "public function getLegPassengerTypes()\n {\n return $this->LegPassengerTypes;\n }", "public function get_pending($id, $leave_type){\r\n\t\r\n\t\t$id1 = ($id != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($id).\"'\":'NULL';\r\n\t\t\t$leav_type = ($leave_type != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($leave_type).\"'\":'NULL';\r\n\t\t$one = 1;\r\n\t$stat = ($one != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($one).\"'\":'NULL';\r\n\t$sql = $this->hrm_mysql_connect->query(\"SELECT status FROM leave_request_2018 WHERE user_id=$id1 AND status=$stat AND leave_type=$leav_type\");\r\n\tif($sql->num_rows==0){\r\n\t\treturn 0;\r\n\t\t}else {\r\n\t\t\treturn 1;\r\n\t\t\t}\r\n\t\r\n\t}", "public static function getAllFestivalTypes()\n\t{\n\t\t$database = DatabaseFactory::getFactory()->getConnection();\n\n\t\t$sql = \"SELECT * FROM fest_type\";\n\t\t$query = $database->query($sql);\n\n\t\t// fetchAll() is the PDO method that gets all result rows\n\t\treturn $query->fetchAll();\n\t}", "public static function getBottomMenu(){\n return ObjectDB::getAllOnField(self::$table, __CLASS__, \"type\", false,\"id\");\n\n }", "function list_revenue_type() \n\t\t{\n\t\t\t\n\t\t\t$this->db->order_by('revenue_type_value','ASC');\n\t\t\t\n\t\t\t$query\t\t\t\t\t=\t\t$this->db->get($this->table_name);\n\t\t\t\n\t\t\treturn $query->result();\n\t\t\t\n\t\t}", "static function getTypes(): array\n\t{\n return self::$types;\n }" ]
[ "0.75516534", "0.71069634", "0.66632444", "0.6558683", "0.62703604", "0.6269362", "0.6228708", "0.61700433", "0.5946417", "0.590239", "0.58780676", "0.57982624", "0.5764007", "0.57404125", "0.570456", "0.566397", "0.5626214", "0.55968493", "0.556556", "0.55309695", "0.5529872", "0.55267906", "0.55090743", "0.55090684", "0.5502596", "0.5499046", "0.5499046", "0.5499046", "0.5499046", "0.54967433", "0.5484204", "0.5482912", "0.5477162", "0.5476099", "0.5464208", "0.5453286", "0.5445711", "0.5445065", "0.5444146", "0.544303", "0.5440841", "0.54398924", "0.543359", "0.5432557", "0.5429458", "0.5429127", "0.542078", "0.5411518", "0.54095775", "0.53786445", "0.53627974", "0.53588617", "0.5358156", "0.5355441", "0.534821", "0.53137094", "0.5298041", "0.52929896", "0.5290256", "0.52897847", "0.52794045", "0.527773", "0.52758265", "0.5275429", "0.5251919", "0.525008", "0.5247746", "0.52462393", "0.5243665", "0.5242873", "0.5235866", "0.52354383", "0.52151173", "0.5211041", "0.5207747", "0.5205059", "0.5204559", "0.518977", "0.51872265", "0.518386", "0.51777345", "0.517615", "0.5157654", "0.5156568", "0.51534146", "0.5152193", "0.51494163", "0.514871", "0.5147342", "0.5144197", "0.5140551", "0.5135036", "0.5132331", "0.51253116", "0.51248664", "0.51243407", "0.51191384", "0.51129454", "0.51115906", "0.51074886" ]
0.801312
0
get leave type by leave type id
public function get_leave_type_by_id($id){ $this->db->where('leave_type_id',$id); $query = $this->db->get('leave_type'); return $query->row(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function leaveType()\n {\n return $this->belongsTo(LeaveType::class, 'leave_type_id');\n }", "public function get_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \t$data=$query->result();\n $list = array('' => 'Select One...');\n \tif(!empty($data)){\n \t\tforeach ($data as $value) {\n \t\t\t$list[$value->leave_type_id]=$value->leave_type;\n \t\t}\n \t}\n \treturn $list;\n }", "public function get_pending($id, $leave_type){\r\n\t\r\n\t\t$id1 = ($id != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($id).\"'\":'NULL';\r\n\t\t\t$leav_type = ($leave_type != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($leave_type).\"'\":'NULL';\r\n\t\t$one = 1;\r\n\t$stat = ($one != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($one).\"'\":'NULL';\r\n\t$sql = $this->hrm_mysql_connect->query(\"SELECT status FROM leave_request_2018 WHERE user_id=$id1 AND status=$stat AND leave_type=$leav_type\");\r\n\tif($sql->num_rows==0){\r\n\t\treturn 0;\r\n\t\t}else {\r\n\t\t\treturn 1;\r\n\t\t\t}\r\n\t\r\n\t}", "public function estateType($id)\n {\n return $this->where('estate_type_id', $id);\n }", "function lookupEventType($event_id){\n\t$data = M('event');\n\tif((int)$event_id>=1){\n\t\t$condition['id'] = (int)$event_id;\n\t\t$eventdate = $data->where($condition)->find();\n\t\treturn $eventdate['type'];\n\t}\n\telse return false;\n}", "public function findDevoirType($id,$type)\n\t{\n\t\t$qb = $this->_em->createQueryBuilder();\n\t\n\t\t$qb->select('d')\n\t\t->from('ProjetCoursBundle:Devoir', 'd')\n\t\t->where('d.enseignement = :id')\n\t\t->setParameter('id', $id)\n\t\t->join('d.type', 't')\n\t\t->andWhere('t.nom = :type')\n\t\t->setParameter('type', $type)\n\t\t;\n\t\n\t\n\t\treturn $qb->getQuery()\n\t\t->getResult();\n\t}", "public function edit($id)\n {\n $this->middleware('permission:leave-super-admin|leave-admin');\n\n $leave_type = LeaveType::findOrFail(hashDecode($id));\n\n $data = [\n 'title' => 'Edit Leave type',\n 'meta_desc' => 'Edit a leave type',\n 'body_class' => null,\n 'user' => $this->user,\n 'menu' => 'hr',\n 'notifications' => notifications($this->user),\n 'new_notification' => countNewNotifications($this->user),\n 'crumbs' => [\n 'performance/leave' => 'Leave',\n 'performance/leave/type' => 'Leave types',\n 'active' => 'Edit'\n ],\n 'leave_type' => $leave_type,\n ];\n return view('customer.performance.leave.leave-type.edit', $data);\n }", "public function get_all_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \treturn $query->result();\n }", "private function getType($id) {\n \n $this->loadTypes();\n \n foreach ($this->types as $type) {\n \n if ($type->getId() === $id) return $type;\n }\n \n return NULL;\n }", "public function getLeave($id) {\n try {\n $objLeave = new Base_Model_ObtorLib_App_Core_Employee_Dao_Leave();\n $leave = $objLeave->getLeave($id);\n return $leave;\n } catch (Exception $e) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception($e);\n }\n }", "public function find($id) {\n $sql = \"select * from eventtype where num_ET=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new \\Exception(\"No type matching id \" . $id);\n }", "public function getLeaveForUser(User $user, $leaveType=\"Annual\")\n {\n $leave = $this->dbService->getByField(array('username'=>$user->getUsername(), 'leavetype'=>$leaveType), 'Leave');\n if (!$leave && $user) {\n // Need to create new\n $params = array('username'=>$user->getUsername(), 'days'=>0, 'leavetype'=>$leaveType);\n $leave = $this->dbService->saveObject($params, 'Leave');\n }\n\n if (!$leave) {\n throw new Exception(\"Could not retrieve Leave details for \".$user->getUsername());\n }\n\n return $leave;\n }", "public function getById($id, $type) {\n switch ($type) {\n case 'nsf': $sql = ROLETYPE_GETBYID_NSF; break;\n case 'local': $sql = ROLETYPE_GETBYID_LOCAL; break;\n default: throw new Exception(\"Type must be 'nsf' or 'local'\"); break;\n }\n\n $list = $this->makeEntityArray('RoleType', $sql, array($id));\n return isset($list[0]) ? $list[0] : null;\n }", "public function edit($id)\n {\n $business_id = request()->session()->get('user.business_id');\n $is_admin = $this->moduleUtil->is_admin(auth()->user(), $business_id);\n\n if (!(auth()->user()->can('superadmin') || $this->moduleUtil->hasThePermissionInSubscription($business_id, 'essentials_module')) && !$is_admin) {\n abort(403, 'Unauthorized action.');\n }\n\n $leave_type = EssentialsLeaveType::where('business_id', $business_id)\n ->find($id);\n\n return view('essentials::leave_type.edit')->with(compact('leave_type'));\n }", "function getTipoMasa($id){\n\tif($id == 1) return \"delgada\";\n\tif($id == 2) return \"normal\";\n}", "public function get($typeId);", "public function lead_type_by_id($l_t_id)\n {\n \n $result = $this->db->query(\"call lead_type_by_id('\".$l_t_id.\"')\")->row();\n save_query_in_log();\n \n return $result;\n }", "function getLeaveTypes()\n {\n $leaveTypes = [];\n $leaves = DB::table('dbo.LEAVE_TYPE')->lists('leave_type');\n $userGender = Employee::find(Auth::user()->Emp_id)->Emp_Gender;\n \n foreach ($leaves as $leaveType )\n {\n array_push($leaveTypes, $leaveType);\n }\n\n if($userGender == \"M\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Maternity\"));\n }\n\n if($userGender == \"F\")\n {\n $leaveTypes = array_diff($leaveTypes , array(\"Paternity\"));\n }\n\n return $leaveTypes;\n }", "public function type() {\n return $this->hasOne(EventType::class, 'id', 'events_types_id');\n }", "public function getSingleRoomType($id)\n {\n $type = RoomType::find($id);\n if(!$type) {\n abort(404, 'Room type not found');\n }\n\n return $type;\n }", "public function get_type()\n {\n return self::$_id;\n }", "function project_type($id)\n{\n\t$name=mysql_fetch_array(mysql_query(\"select type_name from manage_property_type where ptype='$id'\"));\n\treturn $name['type_name'];\n\t}", "public function getLeaveDetails($userid, $type, $status)\n {\n if($status == 'total')\n $where = \" AND status IN ('inprocess','refused', 'approved') \";\n else\n $where = \" AND status = '\".$status.\"' \";\n $query = \"select * FROM \".$this->_name.\" WHERE created_by = '\".$userid.\"' AND type = '\".$type.\"' $where\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "public function delete_leave_type($id = null)\n\t{\n\t\t$this->db->where('leave_type_id',$id)\n\t\t\t->delete('leave_type');\n\n\t\tif ($this->db->affected_rows()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function get_individual_leave($individual_id)\n\t{\n\t\t//retrieve all users\n\t\t$this->db->from('leave_duration, leave_type');\n\t\t$this->db->select('leave_duration.*, leave_type.leave_type_name');\n\t\t$this->db->order_by('start_date', 'DESC');\n\t\t$this->db->where(array('leave_duration.individual_id' => $individual_id, 'leave_duration.leave_type_id' => 'leave_type.leave_type_id'));\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "public function type($id)\n {\n return $this->where('user_type_id', $id);\n }", "public function save_leave_type($data = array()){\n \treturn $this->db->insert('leave_type', $data);\n }", "function edit_revenue_type($id) \n\t\t{\n\t\t\t\n\t\t\t\t $this->db->where('revenue_id',$id);\n\t\t\t\t\t\t\n\t\t\t\t $query=$this->db->get($this->table_name);\n\t\t\t\n\t\t\t\t return $query->result();\n\t\t\t\t\t\t\t\n\t\t}", "public function getRealestateType()\n {\n return $this->hasOne(RealEstateType::className(), ['id' => 'realestate_type_id']);\n }", "public function get_message_type($id)\n\t{\n\t\t$sql=\"SELECT * FROM message_type ORDER BY (`message_type_id` = $id) DESC\";\n\t\t$query=$this->db->query($sql);\n\t\treturn $query->result_object();\n\n\t}", "protected function getTypeName($id) {\n\t\t$beerType = M('beer_type', 'ac_')->where(array('id' => $id))->find();\n\t\treturn $beerType;\n\t}", "function findItem($type, $id)\n {\n foreach ($this->getItems() as $item)\n if ($item->item_id == $id && $item->item_type == $type)\n return $item;\n return null;\n }", "function get($id) {\n foreach ($this->body as $node) {\n if ($node instanceof Type) {\n if ($node->getID() == $id) {\n return $node;\n }\n }\n }\n }", "function get_type($type,$lang_id = NULL)\n\t{\n\t\t$list = $this->cache_get($type);\n\n\t\t// Loc danh sach cat theo cat hien tai\n\t\tif ($lang_id == NULL)// neu truyen lang\n\t\t{\n\t\t\t$lang_id = lang_get_cur()->id;\n\t\t}\n\t\t//pr($lang_id);\n\t\t//pr($list);\n\t\t// Them ten cua cac the content vao de tien lay thong tin\n\t\tforeach ($list as $row)\n\t\t{\n\t\t\t// lay lang mac dinh\n\t\t\tif(isset($row->_content[$lang_id])) {\n\t\t\t\t$content = (array)$row->_content[$lang_id];\n\t\t\t\tforeach ($content as $k => $v)\n\t\t\t\t\t$row->$k = $v;\n\t\t\t}\n\t\t}\n\t\treturn $list;\n\t}", "public function getEntityTypeId();", "function getTypeName($id){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_id={$id}\", 'type_name');\n}", "function get_type($id,$config,$lang)\r\n\t{\r\n\t\tif($this->get_children($id,$config,$lang))\t{ \r\n\t\t\treturn 1; \r\n\t\t}\telse { \r\n\t\t\treturn 0; \r\n\t\t}\r\n\t}", "public function getLeave()\n {\n return $this->get(self::_LEAVE);\n }", "public function edit(Leave $leave)\n {\n //\n }", "public function edit(Leave $leave)\n {\n //\n }", "public function get_type();", "function get_type_name_by_id($type, $type_id = '', $field = 'name')\n {\n if ($type_id != '') {\n $l = $this->db->get_where($type, array(\n $type . '_id' => $type_id\n ));\n $n = $l->num_rows();\n if ($n > 0) {\n return $l->row()->$field;\n }\n }\n }", "function get_booktype($id)\n {\n return $this->db->get_where('booktypes',array('id'=>$id))->row_array();\n }", "protected function get_type_from_id($id)\n\t{\n\t\treturn $this->types->get($id);\n\t}", "public function index()\n {\n return LeaveTypeResource::collection($this->leaveType->all());\n }", "public function get_type_of_scope($eid){\n\t\t$this->db->select('st.name,st.description,es.id,es.scope_typeFK');\n\t\t$this->db->from('event_scope AS es');\n\t\t$this->db->join('scope_type AS st', 'st.id = es.scope_typeFK', 'INNER');\n\t\t$this->db->where(\"es.eventFK = $eid\");\n\t\t$this->db->order_by(\"es.scope_typeFK ASC\");\n\t\t$result = $this->db->get();\n return $result->result();\n\t}", "public function getTypeIdentifier();", "public function getLeaveNameById($absid){\n $sql = <<<eof\n select absence_name\n\t\t from hr_absence_type\n\t\t where seg_segment_no = :companyid\n\t\t and absence_type_id = :absid\neof;\n //$this->DBConn->debug = 1;\n return $this->DBConn->CacheGetOne(self::DATA_CACHE_SECONDS,$sql,array('companyid' => $this->companyID,'absid'=>$absid));\n }", "static private function _get($type, $id) {\n $objects = self::getStack($type);\n if (empty($objects)) {\n return FALSE;\n }\n if (isset($objects[$id])) {\n return self::convertToOriginalObject($objects[$id]);\n }\n return FALSE;\n }", "function backup_migrate_crud_get_item($type, $id) {\n if ($type = backup_migrate_crud_type_load($type)) {\n return $type->item($id);\n }\n}", "public function target_type($type){\n\t\tif($type == 'I'){\n\t\t\t$sub = 'Individual';\n\t\t}else{\t\n\t \t\t$sub = 'Team';\n\t\t}\n\t\treturn $sub;\n\t}", "public function edit(Leave $Leave)\n {\n //\n }", "function get_request_type($id_request_type){\n $this->db->where('id', $id_request_type);\n $query = $this->db->get('type_request');\n return($query->result());\n }", "function get_type_name_by_id_custom($type,$type_id='',$field='name')\n\t{\t$type1='comp_type'; //table field name\n\t\treturn\t$this->db->get_where($type,array($type1.'_id'=>$type_id))->row()->$field;\t\n\t}", "public function fetchFieldTypeFromID($id){\n\t\t\treturn Symphony::Database()->fetchVar('type', 0, \"SELECT `type` FROM `tbl_fields` WHERE `id` = '$id' LIMIT 1\");\n\t\t}", "function get_by_type( $type_id )\n {\n $this->db->where('type_id', $type_id);\n $this->db->limit(1);\n return $this->db->get('card_types')->row();\n }", "function get_type_name_by_id($type, $type_id = null, $field = 'name') {\n $this->db->where($type . '_id', $type_id);\n $query = $this->db->get($type);\n $result = $query->result_array();\n\n foreach ($result as $key => $row)\n return $row [$field];\n }", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getEarnedLeavesRecord($emp_id)\n\t{\n\t\treturn $this->getRow($this->tb3_name,'*','emp_id='.$emp_id.' and leave_type_id='.EARNED_TYPE,$is_active=1,$is_join=0,$showQuery=false) ;\n\t}", "public function update(PerformanceLeaveTypeRequest $request, $id)\n {\n $this->middleware('permission:leave-super-admin|leave-admin');\n\n $leave_type = LeaveType::findOrFail(hashDecode($id));\n $this->leaveTypeRepository->store($leave_type, $request);\n\n logUser(LogType::Update, $this->logDetail, $leave_type->id);\n\n return redirect('performance/leave/type')->with('theme-success', 'Leave type updated');\n }", "function getType() ;", "function getType() ;", "function getType() ;", "public static function get($id) {\n // Set the predefined list that can be mapped\n self::$types = [\n 0 => 'Légkondícionáló',\n 1 => 'WC',\n 2 => 'Napelem',\n 3 => 'Kert',\n ];\n\n return (isset(self::$types[$id])) ? self::$types[$id] : ' - ';\n }", "function getType($id)\n\t{\n\t\tif (empty($id)) //safe because we never use 0 as an id\n\t\t{\n\t\t\t$currentID = $this->getID();\n\t\t\tif (empty($currentID)) return false;\n\t\t\t$id = $currentID;\n\t\t}\n\t\t$result = $this->find('first', array(\n\t\t\t'conditions' => array('id' => $id),\n\t\t\t'fields' => array('ans_type')\n\t\t));\n\t\tif (empty($result)) return false;\n\t\treturn $result['Answer']['ans_type'];\n\t}", "public function setIdType(string $idType): static;", "public static function TotTypeEvents($type){\r\n $type = self::$conn->real_escape_string($type);\r\n $query = \"SELECT id FROM tipoevento WHERE nome='$type'\";\r\n $result = self::$conn->query($query);\r\n if($result->num_rows != 1)\r\n return -1;\r\n $row = $result->fetch_array(MYSQLI_NUM);\r\n $type = $row[0];\r\n $query = \"SELECT count(*) FROM evento WHERE tipo='$type' AND blocked=FALSE\";\r\n\t\t$result = self::$conn->query($query); \r\n if($result){\r\n $row = $result->fetch_array(MYSQLI_NUM);\r\n return (int)$row[0]; \r\n }\r\n return 0;\r\n }", "public function get_type(): string;", "function getRoomType($result){\n\t\t//get record corresponding to that id_vehicle\n\t\t\t\t\t//$data=$this->Common_model->select_fields_where($tbl, '*', array('id_vehicle'=>$result), true);\n\t\t$tbl=$this->session->userdata('prefix').'roomtypes';\n\t\t$where=array($tbl.'.id_room'=>$result);\n\t\t// get the db tables list\n\t\t$tableList=getTables(); // define in custom helper\n\t\t// check if the tbl exist in db \n\t\tif(in_array($tbl, $tableList)){\n\t\t\t$data=$this->Common_model->select_fields_where($tbl, '*', $where, true);\n\t\t\treturn $data;\n\t\t} \n\n\t}", "public function get_message_type_by_id($id)\n\t{\n\t\t$query = $this->db->get_where('message_type', array('message_type_id' => $id));\n\t\treturn $query;\n\t}", "public function getLoanType()\n\t\t{\n\t\t\t$loan_type_id = $this->getLoanTypeId();\n\t\t\t$ref_list = ECash::getFactory()->getReferenceList('LoanType');\n\t\t\treturn $ref_list[$loan_type_id];\n\t\t}", "Public function get_ididtypeexp()\n\t\t{\n\t\t\tReturn $this ->idtypeexp;\n\t\t}", "function getType();", "function getType();", "function getType();", "function getType();", "function getType();", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getTypeId()\n {\n return $this->type_id;\n }", "function get_type_name_by_id_custom1($type,$type_id='',$field='name')\n \t{ $type1='surgery'; //table field name\n \t return $this->db->get_where($type,array($type1.'_id'=>$type_id))->row()->$field; \n \t}", "public function get_job_type_by_id($id){\n\t\t$query = $this->db->get_where('xx_job_type', array('id' => $id));\n\t\treturn $result = $query->row_array();\n\t}", "public function index()\n {\n\n $leave_types=LeaveType::orderBy('id','ASC')->get();\n return view('admin.leave.leave_types',['leave_types'=> $leave_types]);\n }", "public function getClass($typeId);", "public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }", "public function show($id)\n {\n return $this->type->findOrFail($id);\n }", "public static function getTypeName($id){\n return Types::findOne($id);\n }", "public function user_type($id){\n\t\tglobal $con;\n\t\t$query=\"SELECT * FROM user_admin WHERE id='$id' LIMIT 1\";\n\t\t$result=array();\n\t\t$user_type='';\n\t\t$result=$this->select($con,$query);\n\t\tforeach ($result as $key => $value) {\n\t\t\t$user_type=$value['type'];\n\t\t}\n\t\treturn $user_type;\n\t}", "public function show(Leave $leave)\n {\n //\n }", "abstract protected function get_typeid();", "abstract protected function getTradeType();", "function get_type_name($type_name) {\nglobal $db;\n$query = 'SELECT * FROM types\n WHERE typeID = :type_id';\n$statement = $db->prepare($query);\n$statement->bindValue(':type_id', $type_id);\n$statement->execute();\n$type = $statement->fetch();\n$type_name = $type['vehicleTypes'];\n$statement->closeCursor();\nreturn $type_name;\n}", "public function find($id)\n {\n return IncomeTypes::find($id);\n }", "public function getAdType($id)\n {\n $query = \"SELECT ALL FROM adv_type WHERE id = $id\";\n return $this->getQueryData($query, $this->getConnection());\n }", "private function inflateType($identifier, $type = Scope::class)\n {\n if ($identifier === null) {\n return null;\n }\n\n return $this->entityManager->find($type, $identifier);\n }", "public function findDevoirTypeAutre($id)\n\t{\n\t\t$qb = $this->_em->createQueryBuilder();\n\t\n\t\t$qb->select('d')\n\t\t->from('ProjetCoursBundle:Devoir', 'd')\n\t\t->where('d.enseignement = :id')\n\t\t->setParameter('id', $id)\n\t\t->join('d.type', 't')\n\t\t->addSelect('t')\n\t\t->andWhere('t.nom <> :type')\n\t\t->setParameter('type', 'TP')\n\t\t->andWhere('t.nom <> :type1')\n\t\t->setParameter('type1', 'TD')\n\t\t->andWhere('t.nom <> :type2')\n\t\t->setParameter('type2', 'Projet')\n\t\t->andWhere('t.nom <> :type3')\n\t\t->setParameter('type3', 'Exercice')\n\t\t;\n\t\n\t\n\t\treturn $qb->getQuery()\n\t\t->getResult();\n\t}", "public function show(Leave $Leave)\n {\n //\n }", "function getUserType(){\r\n\t\t$select = \"SELECT user_types.type FROM user_types \r\n\t\t\tLEFT JOIN users ON user_types.id = users.type\r\n\t\t\tWHERE users.id = $this->user_id\";\r\n\r\n global $pdo;\r\n $stmt = $pdo->query($select);\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\t\treturn $row['type'];\r\n\t}", "private function get_type() {\n\n\t}", "public function get_page_type_idstring($id) {\n foreach ($this->types as $pagetype) {\n if ((int)$pagetype->typeid === (int)$id) {\n return $pagetype->idstring;\n }\n }\n return 'unknown';\n }" ]
[ "0.6812724", "0.62546927", "0.6137966", "0.6058944", "0.60555565", "0.60231405", "0.5924666", "0.5854124", "0.58376056", "0.5781426", "0.57241917", "0.56991005", "0.5622433", "0.55524373", "0.5545866", "0.5536764", "0.55139154", "0.549001", "0.54735565", "0.54720604", "0.5447745", "0.5425619", "0.5415671", "0.54099905", "0.5391776", "0.5378769", "0.53748924", "0.53349316", "0.5327084", "0.5316617", "0.5315397", "0.5290837", "0.5290127", "0.52420884", "0.52324545", "0.52187276", "0.5201782", "0.51958936", "0.51798296", "0.51798296", "0.51627207", "0.5144774", "0.51399463", "0.5113257", "0.51119083", "0.50978804", "0.5089359", "0.50829995", "0.50807273", "0.50471324", "0.50469035", "0.5032516", "0.50295514", "0.50216705", "0.5021661", "0.50185245", "0.5017767", "0.5009239", "0.5008198", "0.50060403", "0.50057936", "0.5005275", "0.5005038", "0.5003023", "0.4990448", "0.4974415", "0.49714652", "0.49637336", "0.49577105", "0.49547574", "0.49542046", "0.49454942", "0.49434844", "0.49434844", "0.49434844", "0.49434844", "0.49434844", "0.4940489", "0.4940489", "0.4940489", "0.49378508", "0.4937818", "0.49358246", "0.4934193", "0.4928679", "0.49215657", "0.4920079", "0.49200043", "0.4918129", "0.49109122", "0.49085575", "0.4901425", "0.48874375", "0.48867565", "0.48842412", "0.4882799", "0.48764363", "0.48759687", "0.48721394", "0.4869714" ]
0.8029744
0
delete leave type by id
public function delete_leave_type($id = null) { $this->db->where('leave_type_id',$id) ->delete('leave_type'); if ($this->db->affected_rows()) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_type($id)\n\t\t{\n\t\t\n\t\t$this->db->where('revenue_id',$id);\n\t\t\n\t\t$this->db->delete($this->table_name);\n\t\t\n\t\t}", "public function deleteByIdType($id, $type);", "public function delete($id) {\n // Delete the type\n $this->getDb()->delete('eventtype', array('num_ET' => $id));\n }", "function deleteType($id) {\n \t$sql = \"DELETE FROM type WHERE id=:id\";\n try {\n $db = getConnection(\"alcapp\");\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"id\", $id);\n $stmt->execute();\n $db = null;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n }", "public function delete_type_record($id){\n\t\t$this->db->where('training_type_id', $id);\n\t\t$this->db->delete('training_types');\n\t\t\n\t}", "public function delete($id){\n $this->autorender=false;\n if($this->Session->read('LOGEDTYPE')=='True') {\n if($id=='')\n { \n $this->Session->setFlash(' SECURITY ERROR ! ');\n $this->redirect(array('controller'=>'leaves','action'=>'index'));\n }\n else\n {\n $this->Leavetype->delete($id);\n $this->Session->setFlash(' Record deleted ');\n $this->redirect(array('controller'=>'leaves','action'=>'index'));\n }\n \n } \n }", "public function destroy($id)\n {\n $this->middleware('permission:leave-super-admin');\n\n $leave_type = LeaveType::findOrFail(hashDecode($id));\n logUser(LogType::Delete, $this->logDetail, $leave_type->id);\n $leave_type->delete();\n return 1;\n }", "public function actionDelete($id,$type)\n {\n if($type=='dept'){\n $model=$this->findModel($id);\n $model->setAttribute('dept_delete',1);\n $model->save(false);\n }else{\n $model=$this->findModel($id);\n $model->setAttribute('branch_delete',1);\n $model->save(false);\n }\n\n return $this->redirect(['index']);\n }", "function timetracking_type_delete(timetrackingType $type) {\n $type->delete();\n}", "public function delete($id, $type)\n {\n $stmt = $this->db()->prepare(\"DELETE FROM toys WHERE id=:id AND type=:type\");\n return $stmt->execute(array(':type' => $type, ':id' => $id));\n }", "protected static function deleteData($id, $type)\n\t{\n\t\t$id = intval($id);\n\n\t\t$res = HookData::getList(array(\n\t\t\t'select' => array(\n\t\t\t\t'ID'\n\t\t\t),\n\t\t\t'filter' => array(\n\t\t\t\t'ENTITY_ID' => $id,\n\t\t\t\t'=ENTITY_TYPE' => $type\n\t\t\t)\n\t\t));\n\t\twhile ($row = $res->fetch())\n\t\t{\n\t\t\tHookData::delete($row['ID']);\n\t\t}\n\t}", "function delete_booktype($id)\n {\n return $this->db->delete('booktypes',array('id'=>$id));\n }", "public function removeData($type, $id)\n { \n if($type == 'section'){\n Category_sections::destroy($id);\n }elseif($type == 'question'){\n Section_questions::destroy($id);\n }elseif($type == 'answer'){\n Question_answers::destroy($id);\n }\n \n return response()->json(['success' => 1]); \n \n }", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fanli_Service_Ptype::getType($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Fanli_Service_Ptype::deleteType($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function destroy($type=null,$item_id,$id)\n {\n //\n }", "public function remove($typeId);", "public function deleteroom($id)\n { \n\n DB::table(\"opos_ftype\")\n ->where(\"id\",$id)\n ->update([\n \"deleted_at\"=>Carbon::now()\n ]);\n return $id;\n }", "public function DeleteType($manager_id,$id){\n $type=$this->IsOwn($manager_id,$id);\n if($type)\n {\n /* determine if the type has children */\n if($type->parent_id)\n {\n $child=$this->where(['parent_id'=>$type->id,'manager_id'=>$manager_id])->first();\n if($child)\n {\n return false;\n }\n }\n\n /* determine if the type has good */\n $good=Good::where('type_id',$type->id)->first();\n if($good)\n {\n return false;\n }\n $type->delete();\n return true;\n\n }\n return false;\n }", "public function deleteType($id)\n {\n $this->db->select('COUNT(*) AS count');\n $this->db->from('items');\n $this->db->where('item_type_id', $id);\n $query = $this->db->get();\n\n $result = $query->result()[0];\n if($result->count > 0)\n {\n return 'FALSE';\n }\n else {\n $this->db->where('id', $id);\n $this->db->delete('item_type');\n return 'TRUE';\n }\n }", "function objDeleteType($dbh, $otid)\r\n{\r\n $dbh->Query(\"delete from app_object_types where id = '$otid' and f_system='f';\");\r\n return true;\r\n}", "function eliminarTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n mysql_query(\"DELETE FROM ca_tipo_matricula WHERE id = ? ;\");\n $sql = \"DELETE FROM ca_tipo_matricula WHERE id = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "public function delete($id)\n {\n $query=\"DELETE FROM label_alias_type WHERE id=\".$id;\n\n $this->executeQuery($query);\n }", "public function destroy($id)\n {\n $typeevent = TypeEvent::find($id);\n if($typeevent)\n $typeevent->delete();\n return redirect('/typeevent')->with(['success' => \"Type d'evenement Supprimé\"]);\n }", "function delete($id);", "public function del($id)\n {\n }", "public function removeFromIndexByTypeAndId($type, $id)\n {\n $this->elasticsearch->delete(\n [\n 'index' => $this->indexName,\n 'type' => $type,\n 'id' => $id,\n ]\n );\n }", "public function delRoomType(){\n\t\tif($this->input->post('roomId') and !empty($this->input->post('roomId'))){\n\t\t\t// delete row where vehicleid_vehicle match\n\t\t\t$tbl=$this->session->userdata('prefix').'roomtypes';\n\t\t\t$result=$this->Common_model->delete($tbl, array('id_room'=> $this->input->post('roomId')));\n\t\t\tif($result>0){ // in case when record successfully deleted\n\t\t\t\techo 'OK::Room Type has been deleted Successfully::success';\n\t\t\t} else {\n\t\t\t\techo 'OK::Room Type Not Deleted. Try again::error';\n\t\t\t}\n\t\t} // end of if\n\t}", "public function deleteType($typeId) {\n\t\tthrow new CmisNotImplementedException(\"deleteType\");\t\t\n\t}", "public function destroy($id)\n {\n DB::table('tblLeaves')->where('leaveNum', $id)->delete();\n return back()->with('success', 'Deleted');\n }", "function delete($id) {\n $this->db->where('id', $id);\n $this->db->delete('rit');\n }", "public function policy_delete($id){\n $this->autorender=false;\n if($this->Session->read('LOGEDTYPE')=='True') {\n if($id=='')\n { \n $this->Session->setFlash(' SECURITY ERROR ! ');\n $this->redirect(array('controller'=>'leaves','action'=>'leavePolicy'));\n }\n else\n {\n $this->Policyleave->delete($id);\n $this->Session->setFlash(' Record deleted ');\n $this->redirect(array('controller'=>'leaves','action'=>'leavePolicy'));\n }\n \n } \n }", "abstract public function delete($id);", "abstract public function delete($id);", "abstract public function delete($id);", "public function eliminarPorId($id)\n {\n }", "function delete($rowid='')\n {\n \tif (empty($rowid)) $rowid=$this->id;\n\n $sql = \"DELETE FROM \".MAIN_DB_PREFIX.\"adherent_type WHERE rowid = \".$rowid;\n\n $resql=$this->db->query($sql);\n if ($resql)\n {\n if ($this->db->affected_rows($resql))\n {\n return 1;\n }\n else\n\t\t\t{\n return 0;\n }\n }\n else\n {\n print \"Err : \".$this->db->error();\n return 0;\n }\n }", "function remove_id_type($id_type_id = '')\n\t{\n\t\t$this->db->where('id_type_id', $id_type_id);\n\t\t$this->db->delete('id_type');\n\n\t\t$this->session->set_flashdata('success', 'ID type has been deleted successfully.');\n\n\t\tredirect(base_url() . 'id_type_settings', 'refresh');\n\t}", "public function delete($id){\n\t\t\t$this->db->set('delete_flag', '1', FALSE);\n\t\t\t$this->db->where('point_type_id', $id);\n\t\t\t$delete = $this->db->update('point'); // gives UPDATE point_type SET delete_flag = 1 WHERE id = $id\n\n\t\t\tif($delete)\n\t\t\t{\n\t\t\t\t//delete point_type by id\n\t\t\t\t$this->db->set('delete_flag', '1', FALSE);\n\t\t\t\t$this->db->where('id', $id);\n\t\t\t\t$delete = $this->db->update('point_type'); // gives UPDATE point_type SET delete_flag = 1 WHERE id = $id\n\t\t\t}\n\n\t\t\treturn $delete ?true:false;\n\t\t}", "public function destroy($id)\n\t{\n\t\t$this->etype->find($id)->delete();\n\n\t\treturn Redirect::route('etypes.index');\n\t}", "public function delete($idAttrEam);", "function delete_user_type($user_type_id)\n\t\t{\n\t\t\t$eventlogbol = new eventlogbol();\n\t\t\t$old_values='';\n\t\t\t$new_values_arr = array();\n\t\t\t$new_values_arr['user_type_id'] = $user_type_id;\n\t\t\t$event_result = $eventlogbol->save_eventlog('Delete','tbl_user_type',$new_values_arr,$old_values);\n\t\t\tif($event_result)\n\t\t\t{\n\t\t\t\t$query=\"DELETE FROM tbl_user_type WHERE user_type_id=:user_type_id \";\t\t\n\t\t\t\t$result = execute_non_query($query, array(':user_type_id' => $user_type_id));\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}", "public function destroy($id)\n {\n Leave::where('id',$id)->delete();\n return redirect('/leave')->with('info','Leave Deleted Successfully');\n }", "public function delete($id){\r\n }", "public function destroy($id)\n\t{\n\t\t//dd($award_type);\n\t\t$award_type = AwardType::find($id);\n\t\t\n\t\t/*\tImportante!\n\t\t\tCuando se intenta borrar un tipo de premio que ya ha sido asignado\n\t\t\ta algún registro de la tabla awards, el sistema devuelve una excepción \n\t\t\tdebido a la clave externa type_id que vincula la tabla awards con la \n\t\t\ttabla award_types. \n\t\t\t\n\t\t\tEs necesario filtrar este caso.\n\t\t\t*/\n\t\t\n\t\t$award_type->delete();\n\t\t\n\t\treturn redirect('admin/awardtypes');\n\t}", "public function delete(int $id): void\n {\n try {\n //Suppression de l'article en fonction de son identifiant\n (new TypeDao())->delete($id);\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function deleteSlider($type, $id)\n {\n try{\n $slider = $this->model->where('type','=',$type)->where('uniqueId','=',$id)->first();\n\n $slider->delete();\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function destroy($id)\n {\n Type::find($id)->delete();\n return redirect()->route('types.index')\n ->with('success','Tipo di utente eliminato!');\n }", "public function delete_leave_category($id) {\n $where = array('leave_category_id' => $id);\n // check existing leave category into tbl_application_list\n $check_existing_ctgry = $this->settings_model->check_by($where, 'tbl_application_list');\n // check existing leave category into tbl_attendance\n $check_into_attendace = $this->settings_model->check_by($where, ' tbl_attendance');\n if (!empty($check_into_attendace) || !empty($check_existing_ctgry)) { // if not empty do not delete this else delete\n // messages for user\n $type = \"error\";\n $message = \"Leave Category Information Already Used!\";\n set_message($type, $message);\n } else {\n $this->settings_model->_table_name = \"tbl_leave_category\"; //table name \n $this->settings_model->_primary_key = \"leave_category_id\"; //id\n $this->settings_model->delete($id);\n $type = \"success\";\n $message = \"Leave Category Information Successfully Delete!\";\n set_message($type, $message);\n }\n redirect('admin/settings/leave_category'); //redirect page\n }", "public function destroy($id)\n { \n modelMst::where((new modelMst)->getKeyName(), $id)->update(['sys_status_aktif'=>'N']); \n }", "public function destroy($id)\n {\n Leave::findOrFail($id)->delete();\n return redirect()->back()->with('success','Leave deleted successfully !');\n }", "abstract public function deleteById($id);", "public function destroy($id)\n {\n $data = Leave::findOrFail($id);\n\n foreach(json_decode($data->date_leave) as $date){\n $datePermit = Carbon::parse($date);\n $getDays = Days::where('name_day', $datePermit->format('l'))->first();\n $getSchedule = Schedule::where('users_id', $data->users_id)->where('days_id', $getDays->id)->first();\n \n if($getSchedule){ // jika ada jadwalnya, maka create\n $dataAttend = Attendance::whereDate('start',$date)->where('user_id', $data->users_id)->first();\n if($dataAttend){\n $dataAttend->delete();\n }\n }\n }\n\n $data->delete();\n\n return redirect()->route('leave.index')->with('success','Data berhasil dihapus!');\n }", "public function destroy($id)\n\t{\n\t\tif(!Auth::user()->hasPermission('deleteType')){\n\t\t\treturn redirect()->route('admin.getHome')->with('flash_message_error', '403! Không thể Delete Type');\n\t\t}\n\t\t//\n\t\t$film_type = FilmType::findOrFail($id);\n\t\t$film_type->delete();\n\t\t//forget cache\n\t\tif(Cache::has('film_type')){\n\t\t\tCache::forget('film_type');\n\t\t}\n\t\treturn redirect()->route('admin.type.index')->with(['flash_message' => 'Thành công! Xóa Type id: '.$id]);\n\t}", "public function eliminar($id)\n {\n //\n }", "public function eliminar($id)\n {\n //\n }", "public function deleteById($id,$addressType=null){\n\t\t$where = $this->quoteInto('agency_id = ?', $id);\n\t\tif(!is_null($addressType)){\n\t\t\t$where .= $this->quoteInto(' AND address_type = ?', $addressType);\n\t\t}\n\t\t//die($where);\n\t\t$this->delete($where);\n \n\t}", "function del ($id) {\r\n // PARAM $id - user ID\r\n \r\n $sql = \"DELETE FROM `lffntitleblock` WHERE `id`=?\";\r\n try {\r\n $this->stmt = $this->pdo->prepare($sql);\r\n $this->stmt->execute([$id]);\r\n } catch (Exception $ex) {\r\n return false;\r\n }\r\n return true;\r\n }", "public function delete($id)\n {\n $activity_type = ActivityType::find($id);\n $activity_type->delete();\n return redirect('/activity-types')->with('status','Activity Type Deactivated');\n }", "public function delete($id) {\r\n\r\n }", "public function delete($id)\n {\n return IncomeTypes::find($id)->delete();\n }", "public abstract function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "protected function eliminar($id)\n {\n }", "public static function delById($id) \n { // se genera el metodo borra por ID, complementar\n $sql = \"delete from \".self::$tablename.\" where idnitHotel=$id\";\n }", "public function deleteVesti($id){\n\t\t\t$this->db->where('skolaId', $id);\n\t\t\t$this->db->delete('vesti');\n\t\t}", "function deleteMileageForVehicle(int $id);" ]
[ "0.74041224", "0.72852546", "0.72507405", "0.70398813", "0.6975743", "0.66140383", "0.65837365", "0.6570395", "0.6519953", "0.64907527", "0.6439085", "0.64206415", "0.64180046", "0.63894266", "0.6370687", "0.6369166", "0.629657", "0.6261063", "0.6260483", "0.62580913", "0.6250553", "0.62263", "0.62218", "0.6208952", "0.6207631", "0.6202492", "0.61949587", "0.615742", "0.6139313", "0.61274177", "0.61245114", "0.6104944", "0.6104944", "0.6104944", "0.6095611", "0.60888535", "0.60885775", "0.60881484", "0.60814923", "0.6075346", "0.60668135", "0.6059655", "0.6052016", "0.60382324", "0.6031997", "0.60297126", "0.602902", "0.602902", "0.602902", "0.602744", "0.60244226", "0.60235417", "0.6022451", "0.601888", "0.6013743", "0.6009991", "0.60067344", "0.60067344", "0.6005332", "0.6000284", "0.5996389", "0.5994362", "0.5986976", "0.5984286", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5984127", "0.5981839", "0.59801775", "0.5978604", "0.59770054" ]
0.7647829
0
Return the ItemPart entity for the supplied id or null if not found.
public function find($id) { // Reading from cache first if ($this->_cache->has($id)) { return $this->_cache->get($id); } $prepSql = "SELECT {$this->_columnNames} FROM `{$this->_tableName}` " . "WHERE `id` = ?"; $pstmt = $this->_prepare($prepSql); $bindings = [$id]; $pstmt->execute($bindings); $dbRecord = $pstmt->fetch(\PDO::FETCH_ASSOC); $pstmt->closeCursor(); $entity = $this->_toEntity($dbRecord); // Now that we have retrieved the Entity, let's add it to the cache $this->_cache->set($id, $entity); return $entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getById($id) {\n foreach ($this->items as $item) {\n if ($item->id() == $id) {\n return $item;\n }\n }\n \n return null;\n }", "public function getItem($id)\n {\n $this->loadItems();\n return isset($this->items[$id]) ? $this->items[$id] : null;\n }", "public function offsetGet($id)\n {\n foreach ($this->entities as $entity) {\n if ($entity->getId() === $id) {\n return $entity;\n }\n }\n\n return null;\n }", "public function getItem($id) {\n foreach($this->all as $item) {\n if ($id == $item->getId()) {\n return $item;\n }\n }\n }", "public function getItem(string $id)\n {\n try {\n return array_filter($this->items, fn ($item) => $item['id'] === $id)[0];\n } catch (Throwable $t) {\n return null;\n }\n }", "public function getItem($id)\n {\n return $this->where('id', $id)->first();\n }", "public function getItemById($id)\n {\n return $this->type->find($id);\n }", "public function getItem($id = null)\n\t{\n\t\tif (!isset($this->item))\n\t\t{\n\t\t\t$this->item = parent::getItem();\n\n\t\t\tif (empty($this->item))\n\t\t\t{\n\t\t\t\tJFactory::getApplication()->setError('Product type not found.');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->item->shapes = $this->getShapes();\n\t\t\t\t$this->item->materials = $this->getMaterials();\n\t\t\t\t$this->item->products = $this->getProducts();\n\t\t\t}\n\t\t}\n\n\t\treturn $this->item;\n\t}", "public function getChild($id){\n foreach ($this->children as $node){\n if($node->itemID === $id){\n return $node;\n }\n }\n return null;\n }", "public function findById($id)\n {\n $data = $this->adapter->select(array($this->entityIdColumnName => $id));\n\n if (isset($data[0])) {\n // Create new entity and populate data\n $entity = new $this->entityClass();\n $entity->setData($data[0]);\n\n // Return entity object\n return $entity;\n }\n\n return null;\n }", "function getItem( $id = null ){\r\n\t\tif( $id === null ){\r\n\t\t\t$id = rsgInstance::getInt( 'id', null );\r\n\r\n\t\t\tif( $id === null ){\r\n\t\t\t\t// there is no item set, return the first value from getItems()\r\n\t\t\t\t$items = $this->items();\r\n\r\n\t\t\t\treturn array_shift( $items );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$items = $this->items();\r\n\t\treturn $items[$id];\r\n\t}", "function findItem($type, $id)\n {\n foreach ($this->getItems() as $item)\n if ($item->item_id == $id && $item->item_type == $type)\n return $item;\n return null;\n }", "public function findEntityById($id)\n {\n if (isset($this->entities[$id])) {\n return $this->entities[$id];\n }\n }", "protected function getOrderItemObjectByIdOrUuid($id)\n {\n \n if ($this->orderItem == null) {\n \n if (preg_match('/^\\d{1,}$/', $id, $res)) {\n $orderItem = OrderItemPeer::retrieveById($id);\n }\n else {\n $orderItem = OrderItemPeer::retrieveByUuid($id);\n }\n \n $this->forward404Unless($orderItem);\n $this->forward404Unless($orderItem->getMemberId() == $this->getUser()->getUserId());\n $this->orderItem = $orderItem;\n }\n \n return $this->orderItem;\n }", "public function find(int $id)\n {\n try {\n $data = self::getObjectDataById(self::ENTRY, $id);\n } catch (\\UnexpectedValueException $e) {\n return null;\n }\n\n return $this->build($data);\n }", "public function getById(string $id): ?CartItem\n {\n return $this->items->get($id);\n }", "public function find($id)\n { \n $entity = $this->_find($id);\n return $entity;\n }", "public function getItem( $id );", "public function show($id)\n {\n $part=Part::findOrFail($id);\n\n return new PartResource($part);\n }", "public function retrieveItem($id) {\n return $this->itemsDB->retrieve($id);\n }", "public function get($id)\n {\n $item = Item::findOrFail($id);\n\n\n return $item;\n }", "public function getItem($id) {\n $item_url = $this->constructItemUrl($id);\n // Get the JSON object at the specified URL\n $json = $this->loadJSONUrl($item_url);\n if ($json) {\n return $json;\n }\n else {\n $migration = Migration::currentMigration();\n $message = t('Loading of !objecturl failed:', array('!objecturl' => $item_url));\n $migration->getMap()->saveMessage(\n array($id), $message, MigrationBase::MESSAGE_ERROR);\n return NULL;\n }\n }", "public function getItem ($id);", "public function GetById($id){\n\t\tif (array_key_exists($id, $this->BlockList)) return $this->BlockList[$id];\n\t\treturn null;\t\n\t}", "public function show(InternalPartOrder $internalPartOrder, $id)\n {\n $ipo = InternalPartOrder::find($id);\n return $ipo;\n }", "private function getCorrespondingItem($itemtype, $id) {\n\n if (array_key_exists($itemtype, $this->elements_mapping)\n && array_key_exists($id, $this->elements_mapping[$itemtype])) {\n // Element exists in mapping, get new element\n $mapping = $this->elements_mapping[$itemtype][$id];\n $id = $mapping['id'];\n $itemtype = $mapping['itemtype'];\n }\n\n if (!class_exists($itemtype)) {\n return null;\n }\n\n $item = new $itemtype();\n if (!$item->getFromDB($id)) {\n return null;\n }\n\n return $item;\n }", "public static function getById($id)\n {\n if ($query = parent::getById($id)) {\n return $query->first();\n }\n\n return null;\n }", "public function getItem( $id )\n\t{\n\t\treturn $this->controller->getItem( $id );\n\t}", "public function item($id)\n {\n foreach (static::$basket[$this->id] as $item) {\n if ($item->id == $id) return $item;\n }\n return false;\n }", "public function find($id)\n {\n if (is_callable($id)) {\n return $this->getCartItemCollection()->filter($id);\n }\n\n return $this->getCartItemCollection()->first(function ($item) use ($id) {\n return $item->id == $id;\n });\n }", "public function getById($id): ?IEntity;", "public function find($id)\n {\n /** @var SFModel $model */\n foreach ($this as $model) {\n if ($model->Id == $id) {\n return $model;\n }\n }\n\n return null;\n }", "public function findOne(int $id): ?Entity\n {\n return $this->findOneBy([\n 'id' => $id,\n ]);\n }", "public function getItemById($id)\n\t{\n\t\treturn $this->find((int) $id)->current();\n\t}", "public function getItemById($id)\n\t{\n\t\treturn $this->find((int) $id)->current();\n\t}", "public function find($id) {\n try {\n return $this->poll->getItem($id);\n } catch (\\Exception $e) {\n throw new QuestionDoesNotExistException(\"An question by this id doesn't exist\");\n }\n\t}", "function find($id, List8D_Model_Item $item) {\n\t\t$result = $this->getDbTable()->find($id);\n\t\tif (0 == count($result)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$row = $result->current();\n\t\t$item->setId($row->id)\n\t\t\t\t->setListId($row->list_id)\n\t\t\t\t->setClass($row->class)\n\t\t\t\t->setResourceId($row->resource_id)\n\t\t\t\t->setOrder($row->order)\n\t\t\t\t->setStart($row->start)\n\t\t\t\t->setEnd($row->end)\n\t\t\t\t->setCreated($row->created)\n\t\t\t\t->setUpdated($row->updated)\n\t\t\t\t->setAuthor($row->author);\n\t\t\t//fill with stuff from its item_data table.\n\t\t\t$item->getData();\n\n\t}", "public function getOneItem($id)\n {\n $item = Item::find($id);\n // dd($item);\n return $item;\n }", "protected function getEntityById($id)\n {\n return $this->getEntityByTypeAndId($this->getEntityName(), $id);\n }", "public function getItemById($it_id)\n\t{\n\t\treturn \\ORM::for_table($this->table)->where('it_id', $it_id)->find_one();\n\t}", "public function getConcreteProduct(int $id): ApiItemTransfer;", "public function find($id)\n {\n $params = [\n 'index' => $this->model->_index,\n 'type' => $this->model->_type\n ];\n if ($id) {\n $params['id'] = $id;\n return $this->generateModel($this->client->get($params));\n }\n return null;\n }", "public function find($id) {\n\t\t$sql = \"select * from t_packinglist where pl_id=?\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($id));\n\n\t\tif ($row)\n\t\t\treturn $this->buildDomainObject($row);\n\t\t\telse\n\t\t\t\tthrow new \\Exception(\"No PackingList matching id \" . $id);\n\t}", "public function getItem($id = null)\n\t{\n\t\tif ($this->item === null)\n\t\t{\n\t\t\t$this->item = false;\n\n\t\t\tif (empty($id))\n\t\t\t{\n\t\t\t\t$id = $this->getState($type . 'id');\n\t\t\t}\n\n\t\t\t// Get a level row instance.\n\t\t\t$table = JTable::getInstance($type, $prefix);\n\n\t\t\t// Attempt to load the row.\n\t\t\tif ($table->load($id))\n\t\t\t{\n\t\t\t\t// Check published state.\n\t\t\t\tif ($published = $this->getState('filter.published'))\n\t\t\t\t{\n\t\t\t\t\tif ($table->state != $published)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->item;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Convert the JTable to a clean object.\n\t\t\t\t$properties = $table->getProperties(1);\n\t\t\t\t$this->_item = JArrayHelper::toObject($properties);\n\t\t\t}\n\t\t\telseif ($error = $table->getError())\n\t\t\t{\n\t\t\t\t$this->setError($error);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->item;\n\t}", "public function getItem($id = null) {\n\t \n\t if (!$id) {\n\t $id = $this->getState($this->option.\".profile.user_id\");\n\t\t}\n\t\t\n\t\t$storedId = $this->getStoreId($id);\n\t\t\n\t\tif (!isset($this->item[$storedId])) {\n\n\t\t $db = JFactory::getDbo();\n\t\t $query = $db->getQuery(true);\n\t\t $query\n\t\t ->select(\"*\")\n\t\t ->from(\"#__itpsc_profiles\")\n\t\t ->where(\"id = \" . (int)$id);\n\n\t\t $db->setQuery($query, 0, 1);\n\t\t $result = $db->loadAssoc();\n \n\t\t\t// Check published state.\n\t\t\tif (empty($result)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$this->item[$storedId] = $result;\n\t\t\t\n\t\t}\n\n\t\treturn $this->item[$storedId];\n\t}", "public function &getData($id = null)\n {\n if ($this->_item === null) {\n\n $model = $this->getRelatedAdminModel('Request');\n\n $this->_item = $model->getItem($id);\n }\n\n return $this->_item;\n }", "private function getEntity($id) {\n // when the request uses the internal id the given id starts with an underscore\n if(substr($id, 0, 1) == '_') {\n // get entity via _internal_id\n return Entity::findOrFail(substr($id, 1));\n } else {\n // get entity via GIS id\n return Entity::where('id', $id)->firstOrFail();\n }\n }", "public function getItem($id) {\n\t\n $this->setStandardFilters();\n\t //$this->addFilter('command', 'find_video_by_id');\n\t //$this->addFilter('video_id', $id);\n return $this->getParsedData();\n\t}", "public function find($id)\n {\n if ($this->collection == null)\n $this->all();\n\n $object = $this->collection->firstWhere('id', $id);\n\n return $object;\n }", "public function find($itemId)\n {\n $item = parent::find($itemId);\n if ($item === null) {\n throw new NonExistingObjectException();\n }\n\n return $item;\n }", "public function getItem($id)\n {\n $this->locale = Configure::read('Config.language');\n\n $data = $this->read(array('id', 'name', 'url', 'parent_id'), $id);\n\n $this->i18dataLoad(&$data, $this->languages, array('name'));\n\n return isset($data) ? $data : false;\n }", "public function findEbookById($id): ?Ebook\n {\n return $this->createQueryBuilder('ebook') // searches the Ebook table // recherche dans la table Ebook\n ->andWhere('ebook.id = :id') // with the desired id\n ->setParameter('id', $id) // sets the parameter // attribue le paramètre\n ->getQuery() // executes the search // effectue la recherche\n ->getOneOrNullResult() // donne un seul résultat ou null\n ;\n }", "public static function getPostItemById($id)\n {\n $id = intval($id);\n\n if ($id) {\n $db = Db::getConnection();\n $result = $db->query('SELECT * FROM publication WHERE id_publ =' . $id);\n $result->setFetchMode(\\PDO::FETCH_ASSOC);\n $postItem = $result->fetch();\n\n return $postItem;\n }\n }", "public function findOneById($id)\n {\n $entity = $this->getRepository()->findOneBy([\n 'id' => $id,\n 'deleted' => false,\n ]);\n\n if (null === $entity) {\n throw new ZeniumException('Resource not found.', ZeniumStatusCode::RESOURCE_NOT_FOUND);\n }\n\n return $entity;\n }", "public function item($id)\n {\n $content = $this->itemRequest($id);\n return $this->apiResponse($content[0]);\n }", "public function find($id)\n {\n return $this->items->first(function($key, $value) use ($id){\n return $value[$this->id] == $id;\n });\n }", "public static function findById($id)\n\t{\n\t\t$DbTable = self::_getDbTable(self::$_dbTable);\n\t\t$select = $DbTable->select();\n\t\t$select->setIntegrityCheck(false);\n\n\t\t$select->from($DbTable, array('*'));\n\t \t$select->where('id = ?', $id);\n\n\t \t$result = $DbTable->fetchRow($select);\n\n\t \treturn self::_initItem($result);\n\t}", "protected function getChildById( $id ) {\r\n\t\tforeach( $this->getChildren() as $child ) {\r\n\t\t\tif( $child->getId() == $id ) {\r\n\t\t\t\treturn $child;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new Exception( \"ChildNotFoundException\" );\r\n\t}", "protected function findModel($id)\n {\n if (($model = Offer::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "public function getMediaItem($id);", "public function find($id)\n {\n return $this->getRepository()->find($id);\n }", "public function find($id)\n {\n return $this->getRepository()->find($id);\n }", "public function find($id)\n {\n return $this->getRepository()->find($id);\n }", "private function getField($id)\n {\n $filteredList = $this->fieldList->filter(\n function ($field) use ($id) {\n return $field->getId() === $id;\n }\n );\n\n return $filteredList->count() > 0\n ? $filteredList->first()\n : null;\n }", "protected function _loadStockItemById($id)\n {\n \n /* @var $stockItem Mage_CatalogInventory_Model_Stock_Item */\n $stockItem = Mage::getModel('bubble_stockmovements/stock_movement')->load($id); \n if (!$stockItem->getId()) {\n $this->_critical(self::RESOURCE_NOT_FOUND);\n }\n return $stockItem;\n }", "public function show($id)\n {\n $item = Item::findOrFail($id);\n\n\n return $item;\n }", "public function findById($id)\n {\n return $this->getEntityRepository()->find($id);\n }", "public function get($id = null) {\n\t\tif (empty($id)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$fields = [\n\t\t\t$this->alias . '.id',\n\t\t\t$this->alias . '.value',\n\t\t\t'DepartmentExtension.id',\n\t\t\t'DepartmentExtension.department_id',\n\t\t\t'DepartmentExtension.parent_id',\n\t\t\t'DepartmentExtension.lft',\n\t\t\t'DepartmentExtension.rght',\n\t\t\t'DepartmentExtension.name',\n\t\t];\n\t\t$blockExists = $this->hasField('block');\n\t\tif ($blockExists) {\n\t\t\t$fields[] = $this->alias . '.block';\n\t\t}\n\t\t$conditions = [\n\t\t\t$this->alias . '.id' => $id\n\t\t];\n\t\t$contain = [\n\t\t\t'DepartmentExtension'\n\t\t];\n\n\t\treturn $this->find('first', compact('fields', 'conditions', 'contain'));\n\t}", "protected function _getNode(mixed $id): EntityInterface\n {\n $config = $this->getConfig();\n [$parent, $left, $right] = [$config['parent'], $config['left'], $config['right']];\n $primaryKey = $this->_getPrimaryKey();\n $fields = [$parent, $left, $right];\n if ($config['level']) {\n $fields[] = $config['level'];\n }\n\n $node = $this->_scope($this->_table->find())\n ->select($fields)\n ->where([$this->_table->aliasField($primaryKey) => $id])\n ->first();\n\n if (!$node) {\n throw new RecordNotFoundException(sprintf('Node `%s` was not found in the tree.', $id));\n }\n\n return $node;\n }", "public function find($id)\n {\n return $this->mainRepository->find($id);\n }", "public function part()\n {\n return $this->belongsTo('App\\Part', 'id_part')->first();\n }", "function backup_migrate_crud_get_item($type, $id) {\n if ($type = backup_migrate_crud_type_load($type)) {\n return $type->item($id);\n }\n}", "protected function _toEntity($dbRecord)\n {\n if (empty($dbRecord)) {\n return null;\n }\n \n return new ItemPart(\n $dbRecord['id'], \n $dbRecord['item_id'], \n $dbRecord['name'], \n $dbRecord['type_item_part_id'],\n $dbRecord['is_need_mod'] == 1,\n $dbRecord['image']\n );\n }", "public function read($id)\n {\n return $this->getEntityManager()->find($this->getEntityClassName(), $id);\n }", "public function find(int $id)\n { // attention pour cette interpolation il faut des doubles guillemets.\n $query = $this->pdo->prepare(\"SELECT * FROM {$this->table} WHERE id = :id\");\n $query->execute(['id' => $id]);\n $entity = $query->fetch();\n return $entity;\n }", "public function find($id = null)\n {\n \n\n return parent::find($id);\n }", "public function getEntry($id) {\n\t\t$this->_initDbConnection();\n\t\t\n\t\t$stm = $this->_prepareStatement('entry', 'getByAtomId');\t\t\n\t\t$stm->execute(array(\n\t\t\t':id' => $id\n\t\t));\n\t\t\n\t\tif ($this->_checkPdoError($stm)) {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif ($entry = $stm->fetchObject()) {\n\t\t\t$entry = $this->_hydrateEntry($entry);\n\t\t\treturn $entry;\n\t\t}\t\n\t\treturn NULL;\n\t}", "public function loadEventForId($id)\n {\n // Build query\n $qb = $this->getEntityManager()->createQueryBuilder();\n\n $qb->addSelect('event');\n $qb->addSelect('field');\n $qb->addSelect('eventTeam');\n $qb->addSelect('team');\n $qb->addSelect('eventPerson');\n $qb->addSelect('person');\n\n $qb->from('ZaysoCoreBundle:Event', 'event');\n $qb->leftJoin('event.project', 'project');\n $qb->leftJoin('event.field', 'field');\n $qb->leftJoin('event.teams', 'eventTeam');\n $qb->leftJoin('eventTeam.team', 'team');\n $qb->leftJoin('event.persons', 'eventPerson');\n $qb->leftJoin('eventPerson.person','person');\n\n $qb->andWhere($qb->expr()->eq('event.id',$qb->expr()->literal($id)));\n \n $items = $qb->getQuery()->getResult();\n if (count($items) == 1) return $items[0];\n \n return null;\n }", "public function find($id){\n\n $query = $this->db->prepare('SELECT * FROM recipes WHERE id = ?');\n $query->bind_param(\"s\", $id);\n if(!$query->execute()){\n return NULL;\n }\n $result = $query->get_result();\n\n if(!$result || !$result->num_rows){\n return NULL;\n }\n $recipeRow = $result->fetch_assoc();\n $recipe = $this->recipeFactory->make($recipeRow);\n\n return $recipe;\n }", "public static function fetch(\\Scrivo\\Context $context, $id) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull,\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t));\n\t\ttry {\n\t\t\t// Try to retieve the list item definition from the cache ...\n\t\t\tif (isset($context->cache[$id])) {\n\t\t\t\t// ... get it from the cache and set the context.\n\t\t\t\t$listItemDefinition = $context->cache[$id];\n\t\t\t\t$listItemDefinition->context = $context;\n\t\t\t} else {\n\t\t\t\t// ... else retrieve it and set it in the cache.\n\t\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\t\"SELECT list_item_definition_id, sequence_no, application_definition_id,\n\t\t\t\t\tpage_definition_id, title, icon, php_key, title_width,\n\t\t\t\t\ttitle_label\n\t\t\t\t\tFROM list_item_definition\n\t\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t\t$context->connection->bindInstance($sth);\n\t\t\t\t$sth->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\n\t\t\t\t$sth->execute();\n\n\t\t\t\tif ($sth->rowCount() != 1) {\n\t\t\t\t\tthrow new \\Scrivo\\SystemException(\n\t\t\t\t\t\t\"Failed to load list item definition\");\n\t\t\t\t}\n\n\t\t\t\t$listItemDefinition = new \\Scrivo\\ListItemDefinition($context);\n\t\t\t\t$listItemDefinition->setFields(\n\t\t\t\t\t$context, $sth->fetch(\\PDO::FETCH_ASSOC));\n\n\t\t\t\t$context->cache[$id] = $listItemDefinition;\n\t\t\t}\n\n\t\t\treturn $listItemDefinition;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "private function load($id = null) {\n\n if (!is_null($id)) {\n\n return $this->search->getProduct($id);\n\n }\n\n return $this->search->getProducts($this->filters);\n\n }", "public function find($id)\n {\n return parent::find($id);\n }", "public function find($id)\n {\n return parent::find($id);\n }", "public function find($id)\n {\n return parent::find($id);\n }", "public function find($id)\n {\n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}` \"\n . 'WHERE `id` = ? ';\n $pstmt = $this->_prepare($prepSql);\n $bindings = [$id];\n\n $pstmt->execute($bindings);\n \n $dbRecord = $pstmt->fetch(\\PDO::FETCH_ASSOC);\n $pstmt->closeCursor();\n \n $entity = $this->_toEntity($dbRecord);\n \n return $entity;\n }", "public function get($id)\n\t{\n\t\t// iterate over the data until we find the one we want\n\t\tforeach ($this->data as $record)\n\t\t\tif ($record['code'] == $id)\n\t\t\t\treturn $record;\n\t\treturn null;\n\t}", "public function get_by_id($id)\r\n\t{\r\n\t\treturn $this->findByPoperty(array($this->id_field => $id));\r\n\t}", "public function find($id) {\n $sql = \"select * from t_article where art_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new \\Exception(\"No article matching id \" . $id);\n }", "public function show($id)\n {\n return Item::find($id);\n }", "public function find($id)\n {\n return $this->store->find($id);\n }", "public function find($id)\n {\n return $this->store->find($id);\n }", "protected function findVirtualElementById($id)\n {\n return isset($this->references[$id]) ? $this->references[$id] : null;\n }", "public function getItemById($id)\n {\n $dataProvider = new CActiveDataProvider('ARTICULOS', array(\n 'criteria' => array(\n 'condition' => 'id='.$id,\n ),\n ));\n $return = $dataProvider->getData();\n return $return[0];\n }", "public function item($id)\n {\n if (isset($this->stories[$id])) {\n return $this->stories[$id];\n }\n\n return false;\n }", "public function findByID($id)\n {\n return Content::find($id);\n }", "public function getById($id)\n\t{\n\t\tif($record = $this->record->findByPk($id))\n\t\t{\n\t\t return $this->model->populateModel($record);\n\t\t}\n\t\treturn null;\n\t}", "public static function getArticlesItemByID($id)\n {\n $id = intval($id);\n\n if ($id) {\n\n $db = Db::getConnection();\n $result = $db->query('SELECT * FROM articles WHERE id=' . $id);\n\n /*$result->setFetchMode(PDO::FETCH_NUM);*/\n $result->setFetchMode(PDO::FETCH_ASSOC);\n\n $newsItem = $result->fetch();\n\n return $newsItem;\n }\n\n }", "public function getById($id)\n {\n return $this->product->find($id);\n \n }", "public function load($id) {\n\t\t$this->logger->debug('[EntityManager]Loading Entity with id '.$id);\n\t\treturn $this->getRepository()\n\t\t->find($id);\n\t}", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }" ]
[ "0.69224507", "0.6558311", "0.6539314", "0.6478853", "0.6414613", "0.6334524", "0.6263007", "0.6234165", "0.62075704", "0.6183862", "0.6147584", "0.6089886", "0.6064883", "0.60409445", "0.6023105", "0.6016889", "0.5977106", "0.596379", "0.5944548", "0.594121", "0.59346604", "0.5928253", "0.584435", "0.58033305", "0.57854784", "0.5781727", "0.57702875", "0.576954", "0.57551765", "0.5753031", "0.5749695", "0.574629", "0.57438815", "0.5738987", "0.5738987", "0.5734451", "0.5726733", "0.57060605", "0.56821525", "0.5666058", "0.5632791", "0.56293666", "0.56247765", "0.5597071", "0.5587615", "0.55860996", "0.558264", "0.5568391", "0.55642277", "0.5563489", "0.55616367", "0.55501956", "0.5531109", "0.5512102", "0.5511258", "0.5496046", "0.5495264", "0.5490952", "0.548478", "0.54815733", "0.5475952", "0.5475952", "0.5475952", "0.5473793", "0.54735756", "0.544919", "0.5438715", "0.54374135", "0.54370934", "0.5431134", "0.54305434", "0.5425733", "0.54132676", "0.54061526", "0.5404419", "0.5403554", "0.54034585", "0.53997296", "0.539851", "0.53928715", "0.53889096", "0.5385356", "0.5385356", "0.5385356", "0.53751975", "0.5372524", "0.53601676", "0.53569734", "0.5350314", "0.534479", "0.534479", "0.53435814", "0.534186", "0.5335187", "0.53342617", "0.5333475", "0.53327274", "0.5332034", "0.53313893", "0.53298914" ]
0.5357453
87
Map an associative array DB record into a ItemPart Entity.
protected function _toEntity($dbRecord) { if (empty($dbRecord)) { return null; } return new ItemPart( $dbRecord['id'], $dbRecord['item_id'], $dbRecord['name'], $dbRecord['type_item_part_id'], $dbRecord['is_need_mod'] == 1, $dbRecord['image'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function createEntity(array $row);", "public function toEntity($array);", "public function toEntity($array);", "protected function _rowToEntity($row) {\r\n \t$id = $row->{$this->_getPrimary()};\r\n \t\r\n \tif($this->_hasIdentity($id)) {\r\n \t\t$entity = $this->_getIdentity($id);\r\n \t}\r\n \telse {\r\n \t\t$entity = $this->create();\r\n \t\r\n\t\t\tforeach($entity->getAttributes() as $name) {\r\n\t\t\t\tif($this->_isReference($name)) {\r\n\t\t\t\t\t$refId = $row->{$this->_getReferenceField($name)};\r\n\t \t\t\tif($this->_referenceMap[$name]['earlyLoad']) {\r\n\t \t\t\t\t$entity->{$name} = $this->getReferenceEntity($name, $refId);\r\n\t \t\t\t}\r\n\t \t\t\t// Register the id on the entity for lazy load\r\n\t \t\t\telse {\r\n\t \t\t\t\t$entity->addLazyReference($name, $refId);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\telseif($this->_isDependence($name)) {\r\n\t \t\t\tif($this->_dependenciesMap[$name]['earlyLoad']) {\r\n\t \t\t\t\t$entity->{$name} = $this->getDependentEntities($name, $id);\r\n\t \t\t\t}\r\n\t \t\t\telse {\r\n\t \t\t\t\t$entity->addLazyDependencies($name);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t$entity->{$name} = $row->{$name};\r\n\t \t\t}\r\n\t \t}\r\n\t \t$this->_setIdentity($id, $entity);\r\n \t}\r\n \t\r\n \treturn $entity;\r\n }", "abstract protected function mapRow(array $row);", "abstract protected function mapRow(array $row);", "public function mapData(array $params, $entity);", "public function convertItemArray() {}", "private function importCar(array &$dataMap, array $item)\n {\n $carId = StringUtility::getUniqueId('NEW');\n $dataMap[static::TABLE_NAME_CAR][$carId] = [\n // pid value has to be provided for new records only\n 'pid' => $this->page,\n 'vin' => $item['vin'],\n 'color' => $item['color'],\n 'brand' => $this->provideBrand(\n $dataMap,\n $item['brand']\n ),\n 'tires' => $this->provideTires(\n $dataMap,\n $item['tire-tread-depth'],\n $item['tire-pressure']\n ),\n ];\n }", "public function getItem($data) {\n $ret = array();\n $parties = array();\n $abstract = '';\n foreach ($data as $field_name => $value) {\n $value = trim($value);\n $value = (string) $value;\n\n if (mb_detect_encoding($value) != 'UTF-8') {\n $value = utf8_encode($value);\n }\n if (strpos($value, 'www.') === 0) {\n $value = 'http://' . $value;\n }\n\n $value = str_replace(['^a', '^b'], ['', ' '], $value);\n\n switch ($field_name) {\n case 'abstract':\n $abstract .= $value . PHP_EOL;\n continue;\n case 'party':\n $parties[] = $value;\n continue;\n case 'authorM':\n $field_name = 'authorA';\n break;\n case 'corpAuthorM':\n $field_name = 'corpAuthorA';\n break;\n case 'confDate':\n $dates = explode(\" - \", $value);\n foreach ($dates as &$date) {\n $date = date(\"Y-m-d\", strtotime($date));\n }\n $ret[$field_name] = $dates;\n continue;\n case 'dateOfText':\n case 'dateOfEntry':\n case 'dateOfModification':\n if (preg_match('/^\\d{4}$/', $value)) {\n $value = \"$value-01-01\";\n }\n break;\n }\n\n if (!empty($ret[$field_name])) {\n if (is_array($ret[$field_name])) {\n $ret[$field_name][] = $value;\n }\n else {\n $ret[$field_name] = array($ret[$field_name], $value);\n }\n }\n else {\n if ($field_name == 'titleOfText') {\n $ret['titleOfText_original'] = $value;\n }\n $ret[$field_name] = $value;\n }\n }\n $ret['abstract'] = $abstract;\n $ret['parties'] = $parties;\n $ret['obsolete'] = !empty($data->obsolete) && $data->obsolete == 'true';\n return $ret;\n }", "public function normalizeEntity($item): array\n {\n $data = [\n 'prid' => $item['prid'],\n 'enabled' => boolval(\n is_null($item['prstatus']) ? false : $item['prstatus']\n ),\n 'product_id' => $item['productnumber'],\n 'images' => [],\n 'options' => [],\n 'price' => $item['punitprice'] ? intval($item['punitprice'] * 100) : 0,\n 'name' => StringNormalizer::toTitle($item['productname']),\n 'sku' => $item['partnumber'],\n 'slug' => StringNormalizer::toSlug($item['seourl']),\n 'timestamp' => time(),\n 'weight' => $item['weight'],\n ];\n\n $data['description'] = $item['gendescription'] ?? null;\n $data['variant_description'] = $item['pdescription'] ?? null;\n\n $this->normalizeAttributes($data, $item);\n $this->normalizeCategories($data, $item);\n $this->normalizeDescription($data, $item);\n $this->normalizeDimensions($data, $item);\n $this->normalizeImages($data, $item);\n $this->normalizeMeta($data, $item);\n $this->normalizeOptions($data, $item);\n\n return $data;\n }", "Static function MapToRowInsert($item){\n $retval['id_entreprise']=$item->id_entreprise;\n $retval['id_collaborateur']=$item->id_collaborateur;\n return $retval;\n }", "abstract protected function map_reford_to_object( $record );", "private function getItemsToUpdate(){\n $itemsArray = array();\n \n // Iterate over each item from the submitted form\n if (isset($_POST['Parts']) && is_array($_POST['Parts'])) {\n foreach ($_POST['Parts'] as $a=>$item) {\n // If item id is available, read the record from database \n /*if (array_key_exists('id', $item) ){\n $items[] = MyModel::model()->findByPk($item['id']);\n }\n // Otherwise create a new record\n else {\n \n }*/\n if (empty($item['partDesc']) && empty($item['partCode']) && empty($item['partPrice']) && empty($item['partQuant'])){\n continue;\n }else{\n $itemsArray[] = new parts();\n }\n }\n }\n return $itemsArray;\n }", "abstract protected function prepareEntity(/*array*/ $entity_data);", "abstract protected function map_object_to_record($object, $record);", "public function fromArray($row) {\n $this->_preload();\n\n // clear out saved data\n $this->_magicProperties = array();\n\n // clear out cached relations\n $this->_related = array();\n\n\n $this->loaded= false;\n if (is_array($row) || is_object($row)) {\n foreach($row as $k => $v) {\n $this->$k = $v;\n }\n $this->loaded = true;\n }\n $this->_postload($this->loaded);\n return $this->loaded;\n }", "public function mapParagraphsType(&$entity, $field, $item_data) {\n $field_name = $field['id'];\n foreach ($field['paragraph_list'] as $para_type => $para_fields) {\n $paragraph = $this->entityTypeManager\n ->getStorage('paragraph')\n ->create(['type' => $para_type]);\n foreach ($para_fields['fields'] as $key => $para_field) {\n $this->resolveFieldTypeMapping($paragraph, $para_field, $item_data);\n }\n if(!empty($paragraph) && $entity->hasField($field_name)) {\n $entity->$field_name->appendItem($paragraph);\n }\n }\n }", "public function convertItem($item);", "public function mapResult(array &$result, array $map = [])\n {\n $reflection = new ReflectionClass($this->entityName);\n $entity = $reflection->newInstance();\n\n foreach ($result as $field => $value) {\n $setterName = sprintf('set%s', ucfirst($field));\n\n if (! $reflection->hasMethod($setterName)) {\n $setterName = sprintf('set%s', ucfirst($map[$field]));\n if (! $reflection->hasMethod($setterName)) {\n continue;\n }\n }\n\n $entity->{$setterName}($value);\n }\n\n $result = $entity;\n }", "protected function mapRow(array $row) : Quiz {\n\n try {\n $quiz = new Quiz();\n $quiz->setFromArray($row);\n return $quiz;\n } catch (\\InvalidArgumentException $e) {\n throw new DataManagerException($e);\n }\n }", "function nkf_base_rows_from_field_collection(&$vars, $field_array) {\n $vars['rows'] = array();\n foreach($vars['element']['#items'] as $key => $item) {\n $entity_id = $item['value'];\n $entity = field_collection_item_load($entity_id);\n $wrapper = entity_metadata_wrapper('field_collection_item', $entity);\n $row = array();\n foreach($field_array as $field) {\n $info = $wrapper->$field->info();\n $type = $info['type'];\n $field_value = $wrapper->$field->value();\n switch ($type) {\n case 'text_formatted':\n $value = $wrapper->$field->value->value();\n break;\n case 'field_item_image':\n if (isset($field_value)) {\n $build = array(\n '#theme' => 'image',\n '#path' => $field_value['uri'],\n '#url' => nkf_base_image_url($field_value['uri'], 'large'),\n '#alt' => $field_value['alt'],\n '#title' => $field_value['title'],\n //'#width' => $field_value['width'],\n //'#height' => $field_value['height'],\n );\n $value = $build;\n } else {\n $value = null;\n }\n break;\n default:\n $value = isset($field_value) ? $wrapper->$field->value() : null;\n\n }\n $row[$field] = $value;\n }\n $vars['rows'][] = $row;\n }\n}", "public function convertSaleItemsData();", "public static function mapArrayItem(array $row)\n {\n return $row[0];\n }", "private static function _objectify(DaoQuery $qry, array $row)\n {\n // Populate the focus object\n $fClass = $qry->getFocusClass();\n $newEntity = new $fClass;\n $newEntity->setId($row['id']);\n DaoMap::loadMap(strtolower($fClass));\n foreach (DaoMap::$map[strtolower($fClass)] as $field => $properties)\n {\n //ignore metadata\n if (trim($field) === '_')\n continue;\n //if it's just a private data for this entity class\n if (!isset($properties['rel']))\n $value = $row[$field];\n //if it's a relationship then we need to consider repopulate object(s)\n else if ($properties['rel'] === DaoMap::MANY_TO_ONE || ($properties['rel'] === DaoMap::ONE_TO_ONE))\n {\n //creates a empty object\n $id = $row[$field . 'Id'];\n $cls = DaoMap::$map[strtolower($fClass)][$field]['class'];\n $value = new $cls;\n $value->setId($id);\n $value->setProxyMode(true);\n }\n else if ($properties['rel'] === DaoMap::ONE_TO_MANY || ($properties['rel'] === DaoMap::MANY_TO_MANY))\n {\n $value = array(); //creates an empty array to stand out as an array\n }\n else\n continue;\n self::_setProperty($newEntity, $field, $value);\n }\n return $newEntity;\n }", "public function convertDBToApp ($row = array()) {\n $app_data = array(\n 'id_propertie' => $row['id_propertie'],\n 'client' => array(\n 'name' => $row['client_name'],\n 'email' => $row['client_email'],\n 'phone' => $row['client_phone'],\n 'hide' => ($row['hide_client']) ? true : false,\n ),\n 'realtors' => array(),\n 'images' => array(),\n 'propertie' => array(\n 'title' => $row['title'],\n 'description' => $row['description'],\n 'street' => $row['street'],\n 'number' => $row['number'],\n 'complement' => $row['complement'],\n 'neighborhood' => $row['neighborhood'],\n 'city' => $row['city'],\n 'state' => $row['state'],\n 'zipcode' => $row['zipcode'],\n 'format' => $this->getFormatSlugByID($row['format']),\n 'type' => $this->getTypeSlugByID($row['type']),\n 'm_util' => (float) $row['m_util'],\n 'm_total' => (float) $row['m_total'],\n 'bedrooms' => (int) $row['bedrooms'],\n 'rooms' => (int) $row['rooms'],\n 'kitchens' => (int) $row['kitchens'],\n 'bathrooms' => (int) $row['bathrooms'],\n 'suites' => (int) $row['suites'],\n 'vacancies' => (int) $row['vacancies'],\n 'washbasins' => (int) $row['washbasins'],\n 'services_areas' => (int) $row['services_areas'],\n 'housekeepers' => (int) $row['housekeepers'],\n 'offices' => (int) $row['offices'],\n 'grills' => (int) $row['grills'],\n 'backyards' => (int) $row['backyards'],\n 'closets' => (int) $row['closets'],\n 'furnitures' => (int) $row['furnitures'],\n 'edicules' => (int) $row['edicules'],\n ),\n 'values' => array(\n 'rental_value' => (float) $row['rental_value'],\n 'sale_value' => (float) $row['sale_value'],\n 'iptu_value' => (float) $row['iptu_value'],\n ),\n 'near' => array(\n 'subway' => ($row['subway']) ? true : false,\n 'schools' => ($row['schools']) ? true : false,\n 'bus_stations' => ($row['bus_stations']) ? true : false,\n 'hospitals' => ($row['hospitals']) ? true : false,\n 'markets' => ($row['markets']) ? true : false,\n 'backeries' => ($row['backeries']) ? true : false,\n 'airports' => ($row['airports']) ? true : false,\n 'roads' => ($row['roads']) ? true : false,\n 'shoppings' => ($row['shoppings']) ? true : false,\n ),\n 'condominium' => array(\n 'name' => $row['condominium_name'],\n 'recreation_area' => ($row['recreation_area']) ? true : false,\n 'party_room' => ($row['party_room']) ? true : false,\n 'sport_court' => ($row['sport_court']) ? true : false,\n 'gym' => ($row['gym']) ? true : false,\n 'concierge' => ($row['concierge']) ? true : false,\n 'steam_room' => ($row['steam_room']) ? true : false,\n 'garden' => ($row['garden']) ? true : false,\n 'laundry' => ($row['laundry']) ? true : false,\n 'balcony' => ($row['balcony']) ? true : false,\n 'pool' => ($row['pool']) ? true : false,\n 'gourmet' => ($row['gourmet']) ? true : false,\n 'cold_floor' => ($row['cold_floor']) ? true : false,\n 'laminate_floor' => ($row['laminate_floor']) ? true : false,\n 'porcelain_floor' => ($row['porcelain_floor']) ? true : false,\n 'wood_floor' => ($row['wood_floor']) ? true : false,\n 'large_airy' => ($row['large_airy']) ? true : false,\n 'great_location' => ($row['great_location']) ? true : false,\n 'big_comfy' => ($row['big_comfy']) ? true : false,\n 'new' => ($row['new']) ? true : false,\n 'good_lighting' => ($row['good_lighting']) ? true : false,\n ),\n 'publish' => array(\n 'imovelweb' => ($row['publish_imovelweb']) ? true : false,\n 'olx' => ($row['publish_olx']) ? true : false,\n 'zapimoveis' => ($row['publish_zapimoveis']) ? true : false,\n 'vivareal' => ($row['publish_vivareal']) ? true : false,\n ),\n );\n \n // realtors\n if ($row['realtors_ids']) {\n if (strstr($row['realtors_ids'], '|')) {\n $array_realtors = explode('|', $row['realtors_ids']);\n\n foreach ($array_realtors as $id_realtor) {\n if ($id_realtor) {\n $app_data['realtors'][$id_realtor] = true;\n }\n }\n }\n else {\n $app_data['realtors'][$row['realtors_ids']] = true;\n }\n }\n\n // images\n if ($row['images_ids']) {\n if (strstr($row['images_ids'], '|')) {\n $array_images = explode('|', $row['images_ids']);\n\n foreach ($array_images as $id_image) {\n if ($id_image) {\n $app_data['images'][] = $this->getImageByID($id_image);\n }\n }\n }\n else {\n $app_data['images'][] = $this->getImageByID($row['images_ids']);\n }\n }\n\n // echo '<pre>';\n // print_r($app_data);\n // var_dump($row['images_ids']);\n // echo '<br>';\n // echo '</pre>';\n\n // return app data\n return $app_data;\n }", "public function createItem( array $order_item ) : ItemInterface\n {\n $order_item = $this->getValidator()->validate($order_item);\n\n $item = $this->getItemFactory()->createItem( $order_item);\n\n foreach($order_item as $key => $value) {\n if (!$item->offsetExists($key)) {\n $item->offsetSet($key, $value);\n }\n }\n return $item;\n }", "public function mapTextTypeField(&$entity, $field, $item_data) {\n $field_name = $field['id'];\n $mapping_index = explode('.',$field['path']);\n // Loop for value.\n\n $field_value = $item_data['data'];\n for ($i = 0; $i < count($mapping_index); $i++) {\n if(isset($field_value[$mapping_index[$i]])) {\n $field_value = $field_value[$mapping_index[$i]];\n }\n }\n if(is_string($field_value) && $entity->hasField($field_name)) {\n $entity->$field_name->appendItem($field_value);\n }\n }", "abstract public function toEntity(array $data): ?EntityInterface;", "public function mapRow($row)\n {\n $object = new IntercomUser();\n $object->setId ( $row['id'] );\n $object->setIntercomAppId ( $row['intercom_app_id'] );\n $object->setItemId ( $row['item_id'] );\n $object->setItemUserId ( $row['item_user_id'] );\n $object->setEmail ( $row['email'] );\n $object->setOriginContent ( unserialize($row['origin_content']) );\n $object->setProperties ( unserialize($row['properties']) );\n $object->setCreatedAt ( strtotime($row['created_at']) );\n $object->setUpdatedAt ( strtotime($row['updated_at']) );\n return $object;\n }", "public static function _onCreate( connection $link, $arrProperties )\n\t{\n\t\t$set = static::$set_prefix . static::$set;\n\n\n\t\t// auto-assign ID to item unless properties include explicit ID\n\t\tif ( count( static::$id ) === 1 )\n\t\t{\n\t\t\t$idName = static::idName( 0 );\n\t\t\tif ( !array_key_exists( $idName, $arrProperties ) )\n\t\t\t\t$arrProperties[$idName] = $link->nextID( $set );\n\t\t}\n\n\n\t\t// validate and extract ID of item to create\n\t\t$item = array();\n\t\tforeach ( static::$id as $name )\n\t\t\tif ( array_key_exists( $name, $arrProperties ) )\n\t\t\t\t$item[$name] = $arrProperties[$name];\n\t\t\telse\n\t\t\t\tthrow new model_exception( 'missing properties of created item\\'s identifier' );\n\n\n\t\t// prepare SQL statement for inserting record on new item\n\t\t$columns = array_keys( $arrProperties );\n\t\t$values = array_values( $arrProperties );\n\t\t$marks = array_pad( array(), count( $arrProperties ), '?' );\n\n\t\t$columns = array_map( function( $n ) use ( $link ) { return $link->quoteName( $n ); }, $columns );\n\t\t$qSet = $link->qualifyDatasetName( $set );\n\n\t\t$columns = implode( ',', $columns );\n\t\t$marks = implode( ',', $marks );\n\n\n\t\t// query datasource for inserting record of new item\n\t\tif ( $link->test( \"INSERT INTO $qSet ($columns) VALUES ($marks)\", $values ) === false )\n\t\t\tthrow new datasource_exception( $link, 'failed to create item in datasource, model ' . $set );\n\n\n\t\treturn $item;\n\t}", "protected static function buildFromRow($row) {\n $class = get_called_class();\n $record = new $class();\n $record->id = array_cut($row, 'id');\n\n foreach ($row as $key => $val) {\n $record->$key = $val;\n }\n\n return $record;\n }", "function insert_item($metadata = array(), $elementTexts = array(), $fileMetadata = array())\n{\n $builder = new Builder_Item(get_db());\n $builder->setRecordMetadata($metadata);\n $builder->setElementTexts($elementTexts);\n $builder->setFileMetadata($fileMetadata);\n return $builder->build();\n}", "abstract public function createEntity(array $record): ?object;", "public static function arrayToEntity(OrmEntity $entity, $data) {\n\t\tforeach($entity->getFields() as $field) {\n\t\t\tif(isset($data[$field->getName()])) {\n\t\t\t\t$entity->set($field->getName(), $data[$field->getName()]);\n\t\t\t}\n\t\t}\n\t}", "public function map($item);", "public function load()\n\t{\n\t\tif ( !is_array( $this->_id ) )\n\t\t\tthrow new \\RuntimeException( 'item does not exist (anymore)' );\n\n\t\tif ( !is_array( $this->_record ) )\n\t\t{\n\t\t\tstatic::updateSchema( $this->_source );\n\n\t\t\t$query = $this->_source->createQuery( static::set() );\n\n\t\t\tforeach ( $this->_id as $name => $value )\n\t\t\t\t$query->addCondition( $this->_source->quoteName( $name ) . '=?', true, $value );\n\n\t\t\t$matches = $query->limit( 2 )->execute();\n\n\t\t\tif ( $matches->count() !== 1 )\n\t\t\t\tthrow new datasource_exception( $this->_source, 'item missing in datasource' );\n\n\t\t\t$this->_record = $matches->row();\n\t\t}\n\n\t\treturn $this->_record;\n\t}", "private function belongsTo($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\tif(!$this->isSelected)$this->selectOne();\n\t\t$forId = $this->columns[$forKey];\n\t\t$entity = new $model($forId);\n\t\treturn $entity;\n\t}", "abstract public function store(Entity $oMappedEntity);", "public function modifyFieldObject (\n\t\tarray $origRow,\n\t\tarray $row,\n\t\tarray $tableconf,\n\t\t$markerPrefix,\n\t\t$suffix,\n\t\tarray $fieldMarkerArray,\n\t\tarray $markerArray,\n\t\t&$theMarkerArray\n\t) {\n $templateService = GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\Service\\MarkerBasedTemplateService::class);\n $local_cObj = GeneralUtility::makeInstance(\\TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer::class);\n\n\t\t$newRow = [];\n\t\tforeach ($row as $field => $value) {\n\t\t\tif (isset($tableconf['field.'][$field . '.'])) {\n\t\t\t\tif (!empty($tableconf['field.'][$field . '.']['untouched'])) {\n\t\t\t\t\t$value = $origRow[$field];\n\t\t\t\t}\n\t\t\t\t$tableconf['field.'][$field . '.']['value'] = $value;\n\t\t\t\t$fieldContent = $local_cObj->cObjGetSingle(\n\t\t\t\t\t$tableconf['field.'][$field],\n\t\t\t\t\t$tableconf['field.'][$field . '.'],\n\t\t\t\t\tTT_PRODUCTS_EXT\n\t\t\t\t);\n\n\t\t\t\t$value =\n\t\t\t\t\t$templateService->substituteMarkerArray(\n\t\t\t\t\t\t$fieldContent,\n\t\t\t\t\t\t$fieldMarkerArray\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t$newRow[$field] = $value;\n\t\t\t$markerKey = $markerPrefix . strtoupper($field . $suffix);\n\n\t\t\tif (!isset($markerArray['###' . $markerKey . '###'])) {\n\n\t\t\t\t$theMarkerArray['###' . $markerKey . '###'] = $value;\n\t\t\t}\n\t\t}\n\t\t$marker = $this->getMarker();\n\n\t\tif (\n isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT][$marker]) &&\n is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT][$marker])\n ) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT][$marker] as $classRef) {\n\t\t\t\t$hookObj = GeneralUtility::makeInstance($classRef);\n\t\t\t\tif (method_exists($hookObj, 'modifyFieldObject')) {\n\t\t\t\t\t$hookObj->modifyFieldObject(\n\t\t\t\t\t\t$thts,\n\t\t\t\t\t\t$origRow,\n\t\t\t\t\t\t$row,\n\t\t\t\t\t\t$tableconf,\n\t\t\t\t\t\t$markerPrefix,\n\t\t\t\t\t\t$suffix,\n\t\t\t\t\t\t$fieldMarkerArray,\n\t\t\t\t\t\t$markerArray,\n\t\t\t\t\t\t$theMarkerArray,\n\t\t\t\t\t\t$newRow\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $newRow;\n\t}", "function _convert_to_table_data($entity)\n {\n $data = (array) $entity;\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n $data[$key] = $this->object->serialize($value);\n }\n }\n return $data;\n }", "abstract protected function transformItem($item);", "protected function populateItem($row) : \\yii\\rbac\\Item\n {\n $class = null;\n $userId = 1;\n switch ($row['type']){\n case Item::TYPE_PERMISSION;\n $class = Permission::className();\n break;\n case Item::TYPE_FEATURE;\n $class = Feature::className();\n\n break;\n case Item::TYPE_ROLE;\n $class = Role::className();\n break;\n }\n\n if (!isset($row['data']) || ($data = @unserialize($row['data'])) === false) {\n $data = null;\n }\n\n if(! isset($row['created_by'])){\n $row['created_by'] = $userId;\n }\n\n if(! isset($row['updated_by'])){\n $row['updated_by'] = $userId;\n }\n\n return new $class([\n 'name' => $row['name'],\n 'type' => $row['type'],\n 'description' => $row['description'],\n 'ruleName' => $row['rule_name'],\n 'data' => $data,\n 'createdAt' => date('Y-m-d', $row['created_at']),\n 'updatedAt' => date('Y-m-d',$row['updated_at']),\n 'createdBy' => $row['created_by'],\n 'updatedBy' => $row['updated_by'],\n ]);\n }", "private function addItemFromRow(&$row, &$itemMetadata, &$colNumToElementInfosMap, &$colNumMapsToTag, &$colNumMapsToFile) \n\t{\n // define the element texts for the item\n $itemElementTexts = array();\n \t \n\t // process each of the columns of the row\n\t $tags = array();\n\t $urlsForFiles = array();\n\t $colIndex = -1;\n\t for($colIndex = 0; $colIndex < count($row); $colIndex++) {\n\t \n\t $columnName = $row[$colIndex]['name'];\n\t $columnValue = $row[$colIndex]['value'];\n \n\t // process the elements\n\t if ( $colNumToElementInfosMap[$colIndex] !== null) {\n \t $elementInfos = $colNumToElementInfosMap[$colIndex];\n \t foreach($elementInfos as &$elementInfo) {\n\n \t // get the element name and element set name\n \t $elementName = $elementInfo['element_name'];\n \t $elementSetName = $elementInfo['element_set_name'];\n \t $elementTextIsHtml = (boolean) $elementInfo['element_text_is_html'];\n\n \t // make sure the element set exists\n \t if(!isset($itemElementTexts[$elementSetName])) {\n \t $itemElementTexts[$elementSetName] = array();\n \t }\n\n \t // make sure the element name exists\n \t if(!isset($itemElementTexts[$elementSetName][$elementName])) {\n \t $itemElementTexts[$elementSetName][$elementName] = array();\n \t }\n\n \t // add the element text from the column value\n \t $itemElementText = array('text' => $columnValue, 'html' => $elementTextIsHtml);\n \t array_push($itemElementTexts[$elementSetName][$elementName], $itemElementText);\n \t }\n\t }\n\t \n\t // process the tags\n\t if ($colNumMapsToTag[$colIndex]) {\n $rawTags = explode(',', $columnValue);\n foreach($rawTags as &$rawTag) {\n $tag = trim($rawTag);\n if (!in_array($tag, $tags)) {\n $tags[] = $tag;\n }\n }\n }\n \t \n\t // process the files\n\t if ($colNumMapsToFile[$colIndex]) {\n $urlForFile = trim($columnValue);\n if (!in_array($urlForFile, $urlsForFiles) && ($urlForFile != \"\")) {\n $urlsForFiles[] = $urlForFile;\n } \n } \n\t }\n\t \n\t // update the file metadata\n\t if (count($urlsForFiles) > 0) {\n\t $fileMetadata = array('file_transfer_type' => 'Url', 'files' => $urlsForFiles);\n\t } else {\n\t $fileMetadata = array();\n\t }\n\t \n\t // update the tags metadata\n\t if (count($tags) > 0) {\n \t $itemMetadata['tags'] = implode(',', $tags);\t \n\t }\n\t \n\t // insert the item\n\t $item = insert_item($itemMetadata, $itemElementTexts);\n\t \n\t // insert the files for the item, releasing the file from memory each time\n\t foreach($urlsForFiles as $urlForFile) {\n\t $url = array();\n\t $url[] = $urlForFile;\n \t try {\n \t $files = insert_files_for_item($item, $fileMetadata['file_transfer_type'], $url, array('ignore_invalid_files' => (!$this->stop_import_if_file_download_error)));\n \t } catch(Exception $e) {\n \t if (!($e instanceof Omeka_File_Ingest_InvalidException) || $this->stop_import_if_file_download_error) {\n \t $this->status = self::STATUS_IMPORT_ERROR_INVALID_FILE_DOWNLOAD;\n \t $this->error_details = $urlForFile . \"\\n\" . $e->getMessage();\n \t release_object($files);\n \t break;\n \t }\n \t }\n \t release_object($files);\n\t }\n\t \n\t // reset the tags metadata back to null for the next row\n\t $itemMetadata['tags'] = null;\n\t \n\t // record the imported item id so that you can uninstall the item later\n\t $this->recordImportedItemId($item->id);\n\t \n\t // return the inserted item\n\t return $item;\n\t}", "protected function map(array $record)\n {\n $mapping = $this->getMapping();\n\n if (count($mapping) > 0) {\n $result = [];\n\n foreach ($mapping as $columnId => $data) {\n if (!empty($data[0])) {\n if (!isset($result[$data[0]])) {\n $result[$data[0]] = [];\n }\n $result[$data[0]][$data[1]] = $record[$columnId];\n } else {\n $result[$data[1]] = $record[$columnId];\n }\n }\n\n return $result;\n } else {\n return $record;\n }\n }", "public function mapImageField(&$entity, $field, $item_data) {\n $field_name = $field['id'];\n $is_multiple = $field['multiple'];\n if(isset($item_data['data']['item']['associations'])) {\n $media_index = $item_data['data']['item']['associations'];\n foreach ($media_index as $index => $media) {\n if($media['type'] == 'picture') {\n $media_id = $media['altids']['itemid'];\n $media_data = $this->apNewsroomContent->getContentById($media_id);\n $file_data = $this->saveFile($media_data, $this->apNewsroomContent->getApNewsroomApi()->getApiKey());\n if(!empty($file_data) && $entity->hasField($field_name)) {\n $entity->$field_name->appendItem($file_data);\n if(!$is_multiple) {\n break;\n }\n }\n }\n }\n }\n }", "function registerFromDatabase($arr) {\n $this->DATA[$arr['property']] = $arr['value'];\n $this->DESC[$arr['property']] = $arr['description'];\n $this->TYPE[$arr['property']] = $arr['type'];\n }", "abstract protected function saveItems();", "public function upsertEntityFromArray(array $am_formData){\n\n $I_dog = NULL;\n if (isset($am_formData['id']) && \n is_numeric($am_formData['id']) && \n $am_formData['id'] > 0){\n $I_dog = $this->getEntity($am_formData['id']);\n }\n\n if (!($I_dog instanceof Dog)) {\n $I_dog = new Dog();\n }\n\n $I_dog->fillWith($am_formData);\n \n $this->I_entityManager->persist($I_dog);\n $this->I_entityManager->flush();\n \n return $I_dog;\n }", "function factory($id,$row) {\n\t\t$mapper=clone($this);\n\t\t$mapper->reset();\n\t\t$mapper->id=$id;\n\t\tforeach ($row as $field=>$val)\n\t\t\t$mapper->document[$field]=$val;\n\t\t$mapper->query=[clone($mapper)];\n\t\tif (isset($mapper->trigger['load']))\n\t\t\t\\Base::instance()->call($mapper->trigger['load'],$mapper);\n\t\treturn $mapper;\n\t}", "public static function fromAssociativeArr(array $record = array()): NewsArticle\n {\n $newsArticle = new NewsArticle();\n\n foreach ($record as $key => $value) {\n if ($key == \"publishedAt\") {\n if (isset($value[\"date\"])) $newsArticle->{$key} = new DateTime($value[\"date\"]);\n else $newsArticle->{$key} = new DateTime($value);\n } else if ($key == \"active\" && is_int($key)) {\n $newsArticle->{$key} = $key == 1;\n } else {\n $newsArticle->{$key} = $value;\n }\n }\n\n return $newsArticle;\n }", "abstract public function transform(array $item);", "protected function entityCreate(Array $data){\n // TODO: deal with errors\n // insert new items\n $inserted = $this->resourceService()->create($data);\n if(isset($inserted['message'])){\n \\Log::error(\"Error \".$inserted['status_code'].\": \".$inserted['message']);\n }\n // return item\n return new LaravelCollection($inserted['data']);\n }", "protected function _productFromArray($arr)\n\t{\n\t\tswitch ($this->_config['push_products_as'])\n\t\t{\n\t\t\tcase QUICKBOOKS_OBJECT_OTHERCHARGEITEM:\n\t\t\t\t\n\t\t\t\t$OtherChargeItem = new QuickBooks_Object_OtherChargeItem();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn $OtherChargeItem;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_INVENTORYITEM:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_NONINVENTORYITEM:\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_SERVICEITEM:\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t$ServiceItem = new QuickBooks_Object_ServiceItem();\n\n\t\t\t\t$map = array(\n\t\t\t\t\t'Name' => \t\t\t\t\tarray( 'setName', 'Name' ),\n\t\t\t\t\t'IsActive' => \t\t\t\tarray( 'setIsActive', 'IsActive' ), \n\t\t\t\t\t'ParentID' => \t\t\t\tarray( 'setParentApplicationID', 'ParentRef ' . QUICKBOOKS_API_APPLICATIONID, 'setParentListID' ),\n\t\t\t\t\t'ParentListID' => \t\t\tarray( 'setParentListID', 'ParentRef ListID' ),\n\t\t\t\t\t'ParentName' => \t\t\tarray( 'setParentName', 'ParentRef FullName' ),\n\t\t\t\t\t'SalesTaxCodeID' => \t\tarray( 'setSalesTaxCodeApplicationID', 'SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID, 'setSalesTaxCodeListID' ), \n\t\t\t\t\t'SalesTaxCodeListID' => \tarray( 'setSalesTaxCodeListID', 'SalesTaxCodeRef ListID' ),\n\t\t\t\t\t'SalesTaxCodeName' =>\t\tarray( 'setSalesTaxCodeName', 'SalesTaxCodeRef FullName' ), \n\t\t\t\t\t); \n\n\t\t\t\t\n\t\t\t\tif (!empty($arr['SalesAndPurchase_PurchaseCost']) and !empty($arr['SalesAndPurchase_SalesPrice']))\n\t\t\t\t{\n\t\t\t\t\t$map = array_merge($map, array(\n\t\t\t\t\t\t'SalesAndPurchase_SalesDesc' => array( 'setSalesDescription', 'SalesAndPurchase SalesDesc'), \n\t\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$map = array_merge($map, array(\n\t\t\t\t\t\t'SalesOrPurchase_Desc' => \t\t\tarray( 'setDescription', 'SalesOrPurchase Desc' ), \n\t\t\t\t\t\t'SalesOrPurchase_Price' => \t\t\tarray( 'setPrice', 'SalesOrPurchase Price' ),\n\t\t\t\t\t\t'SalesOrPurchase_AccountID' => \t\tarray( 'setAccountApplicationID', 'AccountRef ' . QUICKBOOKS_API_APPLICATIONID, 'setAccountListID' ),\n\t\t\t\t\t\t'SalesOrPurchase_AccountListID' => \tarray( 'setAccountListID', 'AccountRef ListID' ), \n\t\t\t\t\t\t'SalesOrPurchase_AccountName' => \tarray( 'setAccountName', 'AccountRef FullName' ), \n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_applyBaseMap($arr, $map, $ServiceItem, QUICKBOOKS_OBJECT_SERVICEITEM);\n\t\t\t\t\n\t\t\t\treturn $ServiceItem;\n\t\t}\n\t}", "public function hydrate($row){\n $this->INE=$row['INE']; \n $this->name=$row['name']; \n $this->firstname=$row['firstname']; \n $this->mail=$row['mail'];\n $this->tel=$row['tel']; \n $this->adresse=$row['adresse']; \n }", "protected function _orderItemFromArray($arr)\n\t{\n\t\tswitch ($this->_config['push_orders_as'])\n\t\t{\n\t\t\tcase QUICKBOOKS_OBJECT_SALESRECEIPT:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_SALESORDER:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_INVOICE:\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t$InvoiceLine = new QuickBooks_Object_Invoice_InvoiceLine();\n\t\t\t\t\n\t\t\t\t$map = array(\n\t\t\t\t\t'ProductID' => \tarray( 'setItemApplicationID', 'ItemRef ' . QUICKBOOKS_API_APPLICATIONID, 'setItemListID' ), \n\t\t\t\t\t'Desc' => \t\tarray( 'setDescription', 'Invoice InvoiceLine Desc' ), \n\t\t\t\t\t'Quantity' => \tarray( 'setQuantity', 'Invoice InvoiceLine Quantity' ), \n\t\t\t\t\t'Rate' => \t\tarray( 'setRate', 'Invoice InvoiceLine Rate' ),\n\t\t\t\t\t'ClassID' => \tarray( 'setClassApplicationID', 'ClassRef ' . QUICKBOOKS_API_APPLICATIONID, 'setClassListID' ), \n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$InvoiceLine = $this->_applyBaseMap($arr, $map, $InvoiceLine, 'Invoice InvoiceLine');\t\n\t\t\t\t\n\t\t\t\treturn $InvoiceLine;\n\t\t}\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_Item->DbValue = $row['Id_Item'];\n\t\t$this->codigo_item->DbValue = $row['codigo_item'];\n\t\t$this->nombre_item->DbValue = $row['nombre_item'];\n\t\t$this->und_item->DbValue = $row['und_item'];\n\t\t$this->precio_item->DbValue = $row['precio_item'];\n\t\t$this->costo_item->DbValue = $row['costo_item'];\n\t\t$this->tipo_item->DbValue = $row['tipo_item'];\n\t\t$this->marca_item->DbValue = $row['marca_item'];\n\t\t$this->cod_marca_item->DbValue = $row['cod_marca_item'];\n\t\t$this->detalle_item->DbValue = $row['detalle_item'];\n\t\t$this->saldo_item->DbValue = $row['saldo_item'];\n\t\t$this->activo_item->DbValue = $row['activo_item'];\n\t\t$this->maneja_serial_item->DbValue = $row['maneja_serial_item'];\n\t\t$this->asignado_item->DbValue = $row['asignado_item'];\n\t\t$this->si_no_item->DbValue = $row['si_no_item'];\n\t\t$this->precio_old_item->DbValue = $row['precio_old_item'];\n\t\t$this->costo_old_item->DbValue = $row['costo_old_item'];\n\t\t$this->registra_item->DbValue = $row['registra_item'];\n\t\t$this->fecha_registro_item->DbValue = $row['fecha_registro_item'];\n\t\t$this->empresa_item->DbValue = $row['empresa_item'];\n\t}", "private function createArrayEntity($extensionData): ArrayEntity\n {\n return new ArrayEntity($extensionData);\n }", "public static function from_parsed($arr)\n {\n $attachment = self::from_map($arr, self::parsed_map);\n return $attachment;\n }", "public static function read($conn, $item, $group = '', $group_id = 0)\n {\n $aliaData = [];\n foreach ($item as $alia) {\n if ($alia) {\n $data = ['group'=>$group, 'gid'=>$group_id, 'alia'=>$alia];\n $aliaData[] = $data;\n }\n }\n PersonAlia::on($conn)->insert($aliaData);\n }", "public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)\n {\n $keys = ArticleTableMap::getFieldNames($keyType);\n\n if (array_key_exists($keys[0], $arr)) {\n $this->setArticleId($arr[$keys[0]]);\n }\n if (array_key_exists($keys[1], $arr)) {\n $this->setDescription($arr[$keys[1]]);\n }\n if (array_key_exists($keys[2], $arr)) {\n $this->setPrice($arr[$keys[2]]);\n }\n if (array_key_exists($keys[3], $arr)) {\n $this->setCreation($arr[$keys[3]]);\n }\n if (array_key_exists($keys[4], $arr)) {\n $this->setVisible($arr[$keys[4]]);\n }\n if (array_key_exists($keys[5], $arr)) {\n $this->setShapeId($arr[$keys[5]]);\n }\n if (array_key_exists($keys[6], $arr)) {\n $this->setCakeTypeId($arr[$keys[6]]);\n }\n }", "function update_item($item, $metadata = array(), $elementTexts = array(), $fileMetadata = array())\n{\n $builder = new Builder_Item(get_db());\n $builder->setRecord($item);\n $builder->setRecordMetadata($metadata);\n $builder->setElementTexts($elementTexts);\n $builder->setFileMetadata($fileMetadata);\n return $builder->build();\n}", "public function withData(iterable $data): EntityInterface;", "public function createObject(array $row): Entity\n {\n\n $shift = new Shift( strtotime($row['date']),\n (int) $row['id_nurse'],\n (int) $row['id_shift']);\n\n return $shift;\n\n }", "public function withDataItem(string $identifier, $value): EntityInterface;", "public abstract function prepare_item($id, array $fields);", "public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)\n {\n $key = ItemTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);\n if (null !== ($obj = ItemTableMap::getInstanceFromPool($key))) {\n // We no longer rehydrate the object, since this can cause data loss.\n // See http://www.propelorm.org/ticket/509\n // $obj->hydrate($row, $offset, true); // rehydrate\n $col = $offset + ItemTableMap::NUM_HYDRATE_COLUMNS;\n } else {\n $cls = ItemTableMap::OM_CLASS;\n /** @var Item $obj */\n $obj = new $cls();\n $col = $obj->hydrate($row, $offset, false, $indexType);\n ItemTableMap::addInstanceToPool($obj, $key);\n }\n\n return array($obj, $col);\n }", "public static function convertIdToItem($numArray, $flag=false){\r\n\t\t\r\n\t\t//this form of foreach gives you the key and the value.\r\n\t\tforeach($numArray as $key => $num){\r\n\t\t//get db connection\r\n\t\t$dbh = Database::getDB();\r\n\t\t\r\n\t\t//prepare sql\r\n\t\t$getItem = $dbh->prepare(\"SELECT productName, price\r\n\t\t\t\t\t\t\t\t FROM inventory\r\n\t\t\t\t\t\t\t\t WHERE iid=:key\");\r\n\t\t\r\n\t\t//Bind parameters\r\n\t\t$getItem->bindParam ( ':key', $key, PDO::PARAM_INT );\r\n\t\t\r\n\t\t//Execute\r\n\t\t$getItem->execute();\r\n\t\t\r\n\t\t//Fetch the row to see if it exists\r\n\t\t$item = $getItem->fetch (PDO::FETCH_ASSOC);\r\n\t\t\r\n\t\t//check if exists now, if it does print name, else print Item not available\r\n\t\tif(isset($item['productName'])){\r\n\t\t\techo \"($num)\" . $item['productName'] . \" - $\" . $item['price']*$num;\r\n\t\t\tif($flag){\r\n\t\t\t\techo \"[ID=$key]\";\r\n\t\t\t}\r\n\t\t\techo \"\\n\\n\";\r\n\r\n\t\t}\r\n\t\telse{\r\n\t\t\techo \"Item Not Available\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t//Remove db connection\r\n\t\tDatabase::clearDB();\r\n\t\t\r\n\t\t}\r\n\t}", "function update($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\t\t// update the collection appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\tif (isset($this->_data[$key]))\n\t\t{\n\t\t\t$this->_data[$key] = $record;\n\t\t\t$this->store();\n\t\t}\n\t}", "public function fromArray(array $array){\n if(array_key_exists($this->idField, $array)){//verifica se possui id se sim seta o id;\n $this->{$this->idField} = $array[$this->idField];\n }\n $this->content = $array;\n }", "public function map() {\n\n $item = $this->item;\n $map = [];\n\n $map['id_inmueble'] = $item['id'];\n $map['referencia'] = $item['reference'];\n\n //Opcional Agency data\n $map['id_sucursal'] = ''; //site id?\n $map['propietario'] = '';\n $map['email_sucursal'] = '';\n $map['email_comercializadora'] = $this->config['email'];\n //Opcional\n\n $map['venta_01'] = $this->isSale() ? 1 : 0;\n $map['alquiler_01'] = $this->isRent() ? 1 : 0;\n $map['alquiler_opcion_venta_01'] = 0;\n $map['traspaso_01'] = $this->isTransfer() ? 1 : 0;\n $map['alquiler_temporada_01'] = 0;\n\n $map['precio_venta'] = $this->isSale() ? $item['price'] : 0;\n $map['precio_alquiler'] = $this->isRent() ? $item['price'] : 0;\n $map['precio_alquiler_opcion_compra'] = 0;\n $map['precio_traspaso'] = $this->isTransfer() ? $item['price'] : 0;\n $map['precio_alquiler_temporada'] = 0;\n\n list($tip_inm, $tipo, $tip_inm2, $subtipo) = $this->getTipos();\n $map['tipo'] = $tipo;\n $map['tip_inm'] = $tip_inm;\n $map['subtipo'] = $subtipo;\n $map['tip_inm2'] = $tip_inm2;\n\n list($provincia, $cod_prov) = $this->getProvincia();\n $map['provincia'] = $provincia;\n $map['cod_prov'] = $cod_prov;\n\n list($poblacion, $cod_pob) = $this->getPoblacion();\n $map['localidad'] = $poblacion;\n $map['cod_pob'] = $cod_pob;\n\n $map['ubicacion'] = $item['location']['address'];\n $map['cp'] = self::h($item['location']['zipcode']);\n\n list($zona, $cod_zona) = $this->getZone();\n $map['cod_zona'] = self::h($cod_zona);\n\n $map['banos'] = self::h($item['baths']);\n $map['aseos'] = self::h($item['toilettes']);\n $map['habitaciones'] = self::h($item['rooms']);\n\n $map['m2construidos'] = $item['size'] ? $this->convertSize($item['size']) : '';\n $map['m2utiles'] = $item['size_real'] ? $this->convertSize($item['size_real']) : '';\n $map['m2terraza'] = '';\n $map['m2jardin'] = '';\n $map['m2salon'] = '';\n\n $map['destacado'] = self::h($item['title'][$this->iso_lang]);\n $map['descripcion'] = self::h($item['description'][$this->iso_lang]);\n $map['calidades'] = '';\n $map['urbanizacion'] = '';\n $map['estadococina'] = '';\n $map['numeroplanta'] = '';\n $map['anoconstruccion'] = self::h($item['construction_year']);\n $map['gastoscomunidad'] = '';\n\n $map['garaje_01'] = self::b($item['features']['garage']);\n $map['terraza_01'] = self::b($item['features']['terrace']);\n $map['ascensor_01'] = self::b($item['features']['elevator']);\n $map['trastero_01'] = '';\n $map['piscina_01'] = self::b($item['features']['pool']);\n $map['buhardilla_01'] = '';\n $map['lavadero_01'] = '';\n $map['jardin_01'] = self::b($item['features']['garden']);\n $map['piscinacom_01'] = '';\n $map['eqdeportivos_01'] = '';\n $map['vistasalmar_01'] = '';\n $map['vistasalamontana_01'] = '';\n $map['vistasalaciudad_01'] = '';\n $map['cercatransportepub_01'] = '';\n $map['aireacondicionado_01'] = self::b($item['features']['air-conditioning']);\n $map['calefaccion_01'] = self::b($item['features']['heating']);\n $map['chimenea_01'] = '';\n $map['cocina_office'] = '';\n $map['despacho'] = '';\n $map['amueblado'] = self::b($item['features']['furnished']);\n $map['vigilancia'] = '';\n $map['escaparate'] = '';\n\n $map['m2_almacen'] = '';\n $map['m2_fachada'] = '';\n $map['centro_neg'] = '';\n $map['planta_diaf'] = '';\n $map['m2_terreno'] = $item['type'] == 'lot' ? $this->convertSize($item['size']) : '';\n $map['m2_industrial'] = $item['type'] == 'industrial' ? $this->convertSize($item['size']) : '';\n $map['m2_oficinas'] = '';\n $map['m_altura'] = '';\n $map['entrada_camion'] = '';\n $map['vestuarios'] = '';\n $map['edificable'] = '';\n $map['calif_energetica'] = self::h($item['ec']);\n $map['de_banco'] = '';\n\n $map['photos']['photo'] = $this->getImages();\n $map['videos'] = '';\n\n $map['videos_360']['video'] = $this->get_3d_url();\n\n $map['mapa']['latitud'] = self::h($item['location']['lat']);\n $map['mapa']['longitud'] = self::h($item['location']['lng']);\n $map['mapa']['zoom'] = 16; //14 15 16 17\n $map['mapa']['puntero'] = !empty($item['show_address']) && $item['show_address'] ? 1 : 0;\n\n $map['producto_premium'] = 0;\n $map['producto_destacado'] = 0;\n $map['producto_oportunidad'] = 0;\n\n return $map;\n }", "function getItem(Array $args = array())\n {\n $itemid = isset($args['itemid']) ? $args['itemid'] : $this->object->itemid;\n\n //Make sure we have a primary field\n if (empty($this->object->primary)) throw new Exception(xarML('The object #(1) has no primary key', $this->object->name));\n\n // Bail if the object has no properties\n if (count($this->object->properties) < 1) return;\n \n // Complete the dataquery\n $q = $this->object->dataquery;\n $fieldlist = $this->object->getFieldList();\n foreach ($fieldlist as $fieldname) {\n $field = $this->object->properties[$fieldname];\n \n if (empty($field->source)) {\n if (empty($field->initialization_refobject)) continue;\n $this->addqueryfields($q, $field->initialization_refobject);\n } else {\n $q->addfield($field->source . ' AS ' . $field->name);\n }\n }\n $primary = $this->object->properties[$this->object->primary]->source;\n $q->eq($primary, (int)$itemid);\n\n // Run it\n if (!$q->run()) throw new Exception(xarML('Query failed'));\n $result = $q->output();\n if (empty($result)) return;\n\n // Set the values of the valid properties\n $index = 0;\n foreach ($result as $row) {\n foreach ($fieldlist as $fieldname) {\n // Decrypt if required\n if (!empty($this->object->properties[$fieldname]->initialization_encrypt))\n $row[$fieldname] = $this->encryptor->decrypt($row[$fieldname]);\n\n // Subitem properties get special treatment\n if (in_array($this->object->properties[$fieldname]->type, self::$_subitems_types)) {\n $this->setItemValue($itemid, $row, $fieldname, $this->object);\n } elseif ($index < 1) {\n $this->setValue($row, $fieldname);\n }\n }\n $index++;\n } \n return $itemid;\n }", "protected function _extractMany($item, $associationModel, $field)\n\t{\n\t\t$value = [];\n\t\tforeach ($item[$associationModel] as $subItem) {\n\t\t\t$value[$subItem['id']] = $subItem[$field];\n\t\t}\n\n\t\treturn $value;\n\t}", "abstract public function setRecordEntity();", "public function copyFromDbRow($row) {\r\n $map = static::getDbMap();\r\n if ($map && (is_object($row) || is_array($row))) {\r\n\r\n $row = (object) $row;\r\n $primaryKey = $map[static::getDbPrimaryKey()];\r\n\r\n foreach($map as $property => $column) {\r\n if (property_exists($row, $column) && property_exists($this, $property)) {\r\n $this->$property = $row->$column;\r\n if ($column === $primaryKey) {\r\n $this->$property = (int) $this->$property;\r\n }\r\n }\r\n }\r\n }\r\n }", "private function fetchIt($item) {\n $book_id = $item->book_id;\n $book_title = $item->book_title;\n $book_author = $item->book_author === null ? \"\" : $item->book_author;\n $book_editor = $item->book_editor === null ? \"\" : $item->book_editor;\n $book_image = $item->book_image === null ? \"\" : $item->book_image;\n $book_state = $item->book_state;\n $cycle = $item->cycle;\n $classe = $item->classe;\n $book_unit_prise = $item->book_unit_prise;\n $book_stock_quantity = $item->book_stock_quantity;\n $b = new Book();\n return $b->setData($book_id, $book_title, $book_author, $book_editor, $book_image,\n $book_state, $cycle, $classe, $book_unit_prise, $book_stock_quantity);\n }", "function insert_item_type($metadata = array(), $elementInfos = array())\n{\n $builder = new Builder_ItemType(get_db());\n $builder->setRecordMetadata($metadata);\n $builder->setElements($elementInfos);\n return $builder->build();\n}", "function __processDocumentRelationalFieldArray($document, $field, $data) {\n\t\tforeach ($data as $item) {\n\t\t\tforeach($item as $n => $value) {\n\t\t\t\t$document->setMultiValue($field, intval($value), false);\n\t\t\t}\n\t\t}\n\t\treturn $document;\n\t}", "private\tfunction\t_fetch($row)\n\t\t{\n\t\t\t$record\t=\t$this->_database->getTable($this->_name);\n\t\t\t$record->fill(array_combine(\n\t\t\t\tarray_keys($this->_values),\n\t\t\t\tarray_splice($row, 0, sizeof($this->_values))\n\t\t\t));\n\t\t\tforeach($this->_relations as $relation) {\n\t\t\t\t$relation['record']->fill(array_combine(\n\t\t\t\t\tarray_keys($relation['record']->_values),\n\t\t\t\t\tarray_splice($row, 0, sizeof($relation['record']->_values))\n\t\t\t\t));\n\t\t\t}\n\t\t\treturn\t$record;\n\t\t}", "private\tfunction\t_fetch($row)\n\t\t{\n\t\t\t$record\t=\t$this->_database->getTable($this->_name);\n\t\t\t$record->fill(array_combine(\n\t\t\t\tarray_keys($this->_values),\n\t\t\t\tarray_splice($row, 0, sizeof($this->_values))\n\t\t\t));\n\t\t\tforeach($this->_relations as $relation) {\n\t\t\t\t$relation['record']->fill(array_combine(\n\t\t\t\t\tarray_keys($relation['record']->_values),\n\t\t\t\t\tarray_splice($row, 0, sizeof($relation['record']->_values))\n\t\t\t\t));\n\t\t\t}\n\t\t\treturn\t$record;\n\t\t}", "public function withAddedMetaData(iterable $data): EntityInterface;", "final public function UpdateActiveRecord($recArr)\n\t{\n\t $this->m_ActiveRecord = $recArr;\n $this->m_RecordRow->SetRecordArr($this->m_ActiveRecord); // needed ???\n\t}", "protected function processDataRow($row)\n {\n $item = array();\n foreach($this->record as $name => $params)\n {\n if (isset($params['default'])) $default = $params['default'];\n else $default = null;\n $item[$name] = $default; // Even if not found, item will get an entry\n }\n foreach($row as $index => $value)\n {\n if (isset($this->map[$index]))\n {\n $name = $this->map[$index];\n $item[$name] = trim($value); // If found always get something not null\n }\n }\n return $item;\n }", "protected function convertLink(array &$item) {\n $config = $this->configuration;\n\n // Override the link title.\n if (!empty($config['title'])) {\n $item['title'] = $config['title'];\n }\n\n // Match the uri against the entity canonical route, and grab the entity.\n if (preg_match('/^entity\\.(.*?)\\.canonical$/', $item['original_link']->getRouteName(), $match)) {\n $entity_type = $match[1];\n $entity_id = $item['original_link']->getRouteParameters()[$entity_type];\n\n // Should confirm whether the entity display is supported.\n if (!empty($config['view_modes'][$entity_type])) {\n $item['entity'] = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);\n $item['view_mode'] = $config['view_modes'][$entity_type];\n $build = $this->entityTypeManager->getViewBuilder($entity_type)->view($item['entity'], $item['view_mode']);\n $item['rendered_entity'] = render($build);\n }\n }\n }", "abstract protected function get_item_from_db($item_id);", "function createRecord($array){\n parent::createRecord($array);\n }", "public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)\n\t{\n\t\t$keys = PostPeer::getFieldNames($keyType);\n\n\t\tif (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);\n\t\tif (array_key_exists($keys[1], $arr)) $this->setPartieId($arr[$keys[1]]);\n\t\tif (array_key_exists($keys[2], $arr)) $this->setReplicaPostId($arr[$keys[2]]);\n\t\tif (array_key_exists($keys[3], $arr)) $this->setType($arr[$keys[3]]);\n\t\tif (array_key_exists($keys[4], $arr)) $this->setTitle($arr[$keys[4]]);\n\t\tif (array_key_exists($keys[5], $arr)) $this->setUrl($arr[$keys[5]]);\n\t\tif (array_key_exists($keys[6], $arr)) $this->setText($arr[$keys[6]]);\n\t\tif (array_key_exists($keys[7], $arr)) $this->setPhotoFile($arr[$keys[7]]);\n\t\tif (array_key_exists($keys[8], $arr)) $this->setPhotoUrl($arr[$keys[8]]);\n\t\tif (array_key_exists($keys[9], $arr)) $this->setQuote($arr[$keys[9]]);\n\t\tif (array_key_exists($keys[10], $arr)) $this->setQuoteAuthor($arr[$keys[10]]);\n\t\tif (array_key_exists($keys[11], $arr)) $this->setLinkTitle($arr[$keys[11]]);\n\t\tif (array_key_exists($keys[12], $arr)) $this->setLinkUrl($arr[$keys[12]]);\n\t\tif (array_key_exists($keys[13], $arr)) $this->setLinkImage($arr[$keys[13]]);\n\t\tif (array_key_exists($keys[14], $arr)) $this->setVideoUrl($arr[$keys[14]]);\n\t\tif (array_key_exists($keys[15], $arr)) $this->setTotalIndex($arr[$keys[15]]);\n\t\tif (array_key_exists($keys[16], $arr)) $this->setBestBadge1($arr[$keys[16]]);\n\t\tif (array_key_exists($keys[17], $arr)) $this->setBestBadge2($arr[$keys[17]]);\n\t\tif (array_key_exists($keys[18], $arr)) $this->setIsPublished($arr[$keys[18]]);\n\t\tif (array_key_exists($keys[19], $arr)) $this->setIsFeatured($arr[$keys[19]]);\n\t\tif (array_key_exists($keys[20], $arr)) $this->setCommentsCount($arr[$keys[20]]);\n\t\tif (array_key_exists($keys[21], $arr)) $this->setCreatedAt($arr[$keys[21]]);\n\t\tif (array_key_exists($keys[22], $arr)) $this->setUpdatedAt($arr[$keys[22]]);\n\t}", "public function withMetaData(iterable $data): EntityInterface;", "function _fromRow($row) {\n\t\t$monograph = parent::_fromRow($row);\n\n\t\t$monograph->setSeriesId($row['series_id']);\n\t\t$monograph->setSeriesPosition($row['series_position']);\n\t\t$monograph->setSeriesAbbrev(isset($row['series_abbrev'])?$row['series_abbrev']:null);\n\t\t$monograph->setWorkType($row['edited_volume']);\n\n\t\tHookRegistry::call('MonographDAO::_fromRow', array(&$monograph, &$row));\n\n\t\treturn $monograph;\n\t}", "public function hydrate($row, $startcol = 0, $rehydrate = false)\n\t{\n\t\ttry {\n\n\t\t\t$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;\n\t\t\t$this->partie_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;\n\t\t\t$this->replica_post_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;\n\t\t\t$this->type = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;\n\t\t\t$this->title = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;\n\t\t\t$this->url = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;\n\t\t\t$this->text = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;\n\t\t\t$this->photo_file = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;\n\t\t\t$this->photo_url = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;\n\t\t\t$this->quote = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;\n\t\t\t$this->quote_author = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;\n\t\t\t$this->link_title = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;\n\t\t\t$this->link_url = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;\n\t\t\t$this->link_image = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;\n\t\t\t$this->video_url = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;\n\t\t\t$this->total_index = ($row[$startcol + 15] !== null) ? (double) $row[$startcol + 15] : null;\n\t\t\t$this->best_badge_1 = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;\n\t\t\t$this->best_badge_2 = ($row[$startcol + 17] !== null) ? (int) $row[$startcol + 17] : null;\n\t\t\t$this->is_published = ($row[$startcol + 18] !== null) ? (boolean) $row[$startcol + 18] : null;\n\t\t\t$this->is_featured = ($row[$startcol + 19] !== null) ? (boolean) $row[$startcol + 19] : null;\n\t\t\t$this->comments_count = ($row[$startcol + 20] !== null) ? (int) $row[$startcol + 20] : null;\n\t\t\t$this->created_at = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null;\n\t\t\t$this->updated_at = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null;\n\t\t\t$this->resetModified();\n\n\t\t\t$this->setNew(false);\n\n\t\t\tif ($rehydrate) {\n\t\t\t\t$this->ensureConsistency();\n\t\t\t}\n\n\t\t\t// FIXME - using NUM_COLUMNS may be clearer.\n\t\t\treturn $startcol + 23; // 23 = PostPeer::NUM_COLUMNS - PostPeer::NUM_LAZY_LOAD_COLUMNS).\n\n\t\t} catch (Exception $e) {\n\t\t\tthrow new PropelException(\"Error populating Post object\", $e);\n\t\t}\n\t}", "public function convertEntityToStorage($in);", "public function remapListedDBRecords() {}", "private function mapSqlToObject($rs)\n {\n $temp_prod = new temp_prod();\n $temp_prod->_id = $rs[\"id\"];\n $temp_prod->_session_id = $rs[\"session_id\"];\n $temp_prod->_base64_image = $rs[\"base64_image\"];\n $temp_prod->_bonrepli = $rs[\"bonrepli\"];\n $temp_prod->_commentaire = $rs[\"commentaire\"];\n $temp_prod->_dimension = $rs[\"dimension\"];\n $temp_prod->_escargot = $rs[\"escargot\"];\n $temp_prod->_idn_key = $rs[\"idn_key\"];\n $temp_prod->_idmodelmetier = $rs[\"idmodelmetier\"];\n $temp_prod->_idproduit = $rs[\"idproduit\"];\n $temp_prod->_opt = $rs[\"opt\"];\n $temp_prod->_prix = $rs[\"prix\"];\n $temp_prod->_unitprix = $rs[\"unitprix\"];\n $temp_prod->_idsupport = $rs[\"idsupport\"];\n $temp_prod->_support = $rs[\"idsupport\"];\n $temp_prod->_qte = $rs[\"qte\"];\n $temp_prod->_title = $rs[\"title\"];\n $temp_prod->_data = ($rs[\"data\"]);\n $temp_prod->_random_str = json_decode($rs[\"random_str\"]);\n $temp_prod->_escargot_val = json_decode($rs[\"escargot_val\"]);\n $temp_prod->_contours = json_decode($rs[\"contours\"]);\n $temp_prod->_liserai = json_decode($rs[\"liserai\"]);\n $temp_prod->_id_dimension = $rs[\"id_dimension\"];\n $temp_prod->_id_qte = $rs[\"id_qte\"];\n return $temp_prod;\n }", "abstract protected function item($snapshotId, array $input);", "private function insertOrdemItem($item, $orderID) {\n $ordemItem = new OrderItem();\n $ordemItem->orderID = $orderID;\n $ordemItem->ISBN = $item['ISBN'];\n $ordemItem->qty = $item['quantity'];\n $ordemItem->price = $item['price'];\n $ordemItem->save();\n }", "public function convertStorageToEntity($in);", "public function prepare($item)\n {\n // Reset the fields for each item.\n $this->fields = [];\n\n $localizedItem = $item->in(Locale::default());\n\n $data = $localizedItem->data();\n\n if ($slug = @$localizedItem->slug()) {\n $data['slug'] = $slug;\n }\n\n foreach ($data as $fieldName => $value) {\n $field = new Field($item, $fieldName);\n\n // Determine whether the field should be translated, or skipped.\n if (!$fieldName || !$field->shouldBeTranslated()) {\n continue;\n }\n\n // Handle the various field types. They all store the actual\n // values in different ways, so we have to map them into a\n // common structure before exporting them.\n $this->handleFieldTypes($field, [\n 'original_value' => $value,\n 'localized_value' => $item->get($fieldName) ?: '',\n 'field_name' => $fieldName,\n 'field_type' => $field->type,\n ]);\n }\n\n return $this->fields;\n }", "function _fromRow(&$row) {\n\t\t$division = $this->newDataObject();\n\n\t\t$division->setId($row['division_id']);\n\t\t$division->setPressId($row['press_id']);\n\n\t\t$this->getDataObjectSettings('divisions_settings', 'division_id', $row['division_id'], $division);\n\n\t\tHookRegistry::call('DivisionDAO::_fromRow', array(&$division, &$row));\n\n\t\treturn $division;\n\t}", "function getFromDatabase($row) {\r\n\t\t//id\r\n\t\t$this->id = $row['id'];\r\n\t\t//eventDateTime\r\n\t\t$this->event_date_time = $row['eventDateTime'];\r\n\t\t//time before\r\n\t\t$this->time_before = $row['timeBefore'];\r\n\t\t//frequency\r\n\t\t$this->freq = $row['frequency'];\r\n\t\t//method\r\n\t\t$this->notif_method = $row['method'];\r\n\t}", "private function createEntityAlias($alias)\n {\n return array_map([$this, 'createEntityValue'], $alias);\n }" ]
[ "0.5647026", "0.5434827", "0.5434827", "0.5239059", "0.5164255", "0.5164255", "0.5086436", "0.50439537", "0.5034887", "0.5000173", "0.4992006", "0.4948551", "0.49406523", "0.49344933", "0.4924414", "0.49004805", "0.4889416", "0.48704693", "0.48445737", "0.4818561", "0.48134077", "0.48127255", "0.48068348", "0.47929695", "0.47768947", "0.4772774", "0.4754278", "0.4744407", "0.4739836", "0.4718525", "0.47168726", "0.47067246", "0.4703964", "0.46925938", "0.46731383", "0.46628857", "0.46595013", "0.46541563", "0.46421996", "0.46330836", "0.46329698", "0.46273154", "0.46145925", "0.46145034", "0.4608656", "0.4597897", "0.4594467", "0.45885566", "0.45855582", "0.4584998", "0.4578435", "0.45771632", "0.45704392", "0.45702338", "0.45673817", "0.4567239", "0.45670515", "0.45667806", "0.45625547", "0.45592645", "0.4555014", "0.45520544", "0.4550322", "0.45502093", "0.45440024", "0.4537583", "0.45332065", "0.45329082", "0.45326686", "0.45254368", "0.452179", "0.45193648", "0.45127776", "0.4483123", "0.44818118", "0.44791943", "0.44742197", "0.44720966", "0.44703755", "0.44703755", "0.44691908", "0.44591326", "0.44545108", "0.44507992", "0.44501013", "0.44403177", "0.4438159", "0.4433307", "0.4432807", "0.44303557", "0.44274467", "0.4427357", "0.44241324", "0.44237807", "0.44133475", "0.4412095", "0.44054937", "0.44039378", "0.4401148", "0.43943474" ]
0.63341534
0
Retrieve option array with empty value
public function getAllOptions() { $result = []; foreach (self::getOptionArray() as $index => $value) { $result[] = ['value' => $index, 'label' => $value]; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmptyValues();", "public function toOptionArray($emptyLabel = '') {\n if($emptyLabel !== false && !$emptyLabel)\n $emptyLabel = Mage::helper('core')->__('-- Please Select --');\n \n return parent::toOptionArray($emptyLabel);\n }", "public function getOptionValues()\n {\n $options = [];\n $options[''] = __('--Please Select--');\n foreach ($this->getOptionArray() as $key => $value) {\n $options[$key] = $value;\n }\n return $options;\n }", "public function getEmptyOption()\r\n\t{\r\n\t\treturn $this->_emptyOption;\r\n\t}", "protected function defaultEmptyChoice()\n {\n return [\n 'value' => '',\n 'label' => $this->translator()->translation('— None —')\n ];\n }", "public function getAllOptions()\n {\n $res = $this->getOptions();\n array_unshift($res, ['value' => '', 'label' => '']);\n return $res;\n }", "public function getNilExcessOption();", "protected static function get_non_ui_options() {\n\t\treturn array_filter(self::get_options(), function($option) {\n\t\t\treturn $option['type'] !== 'tab' &&\n\t\t\t $option['type'] !== 'title' &&\n\t\t\t $option['type'] !== 'description' &&\n\t\t\t $option['type'] !== 'code';\n\t\t});\n\t}", "public function addEmptyOption($options)\n {\n if (isset ($options[''])) {\n return $options;\n } else {\n return array('' => 'Select') + $options;\n }\n }", "public function getEmpty_values()\r\n {\r\n return $this->m_empty_values;\r\n }", "public function toOptionArray()\n {\n /*We are setting value to 'N/A' instead of '' or ' '\n that is because by the builtin method that saves data in the config table ; the '' is getting saved as null in\n the database. Now on retrieval that null causes problem. This is because if a config is null at a more specific\n scope like store then the logic looks for a value in the parent scope instead of stopping at that more specific\n scope/level.\n There are several ways to solve this. The shortest route that seemed to worked both in the database, dynamic\n scope control logic and integrating with DHL is this 'N/A' value.\n */\n return [\n ['value' => 'COURIER', 'label' => __('Courier')],\n ['value' => 'POST', 'label' => __('Post')],\n ['value' => 'N/A', 'label' => __('No Selection')]\n ];\n }", "public function toOptionArray()\n {\n if (!$this->_options) {\n $options = parent::toOptionArray();\n foreach ($options as $i => $option) {\n if ($option['type'] != Inx_Api_Recipient_Attribute::DATA_TYPE_DOUBLE && $option['value'] != '') {\n if (isset($options[$i])) unset($options[$i]);\n }\n }\n if (count($options) == 1 && isset($options[0])) {\n $options[0]['label'] = Mage::helper('dndinxmail_subscriber')->__('No column available');\n }\n $this->_options = $options;\n }\n\n return $this->_options;\n }", "public function getNonOptions()\n {\n return $this->nonOptions;\n }", "protected function getOptions() {\n\t\t$options = parent::getOptions();\n\n\t\tif($this->hasArgument('nullOption')) {\n\t\t\t$label = $this->arguments['nullOption'];\n\t\t\t$options = array('' => $label) + $options;\n\t\t}\n\t\treturn $options;\n\t}", "public static function getEmpty()\n {\n return array();\n }", "public function getArraySkipEmpty () {\n\n $values = array();\n\n foreach ($this->values as $key => $value) {\n\n if ($value !== null && (!is_string($value) || strlen($value) > 0)) {\n\n $values[$key] = $value;\n\n }\n\n }\n\n return $values;\n\n }", "public function getAllOptions($withEmpty = true)\r\n {\r\n $options = array();\r\n $options = $this->getAvailableTemplate();\r\n\r\n if ($withEmpty) {\r\n array_unshift($options, array(\r\n 'value' => '',\r\n 'label' => '-- Please Select --',\r\n ));\r\n }\r\n return $options;\r\n }", "public function isEmptyPicklistOptionAllowed()\n\t{\n\t\treturn false;\n\t}", "protected function filterDropdownFields(): array\n {\n return [];\n }", "public function settingsWithMissingOptionsWithDefault()\n {\n return array(\n array(\n array('-f', '--option2'),\n array('flag1' => true, 'option2' => 'some default value')\n ),\n array(\n array('--option2', '-f'),\n array('option2' => 'some default value', 'flag1' => true)\n )\n );\n }", "public function option()\n\t{\n\t\treturn [];\n\t}", "public function settingsWithMissingOptions()\n {\n return array(\n array(\n array('-f', '--option1'),\n array('flag1' => true, 'option1' => 'Error should be triggered')\n ),\n array(\n array('--option1', '-f'),\n array('option1' => 'Error should be triggered', 'flag1' => true)\n )\n );\n }", "public function sanitize_option($value) {\n $result = array();\n $defaults = array(\n \"name\" => \"\",\n \"desc\" => \"\",\n \"id\" => \"\",\n \"std\" => \"\",\n \"mod\" => \"\",\n \"type\" => \"\"\n );\n foreach ($defaults as $k => $v) {\n $result[$k] = isset($value[$k]) ? $value[$k] : $v;\n }\n\n foreach ($value as $k => $v) {\n if (!isset($result[$k])) {\n $result[$k] = $v;\n }\n }\n return $result;\n }", "public function optsValues() {\n return [];\n }", "public function toOptionArray()\n {\n $returnArray = array();\n $returnArray[] = array('value' => '', 'label' => Mage::helper('fooman_ordermanager')->__('Default'));\n foreach (Mage::getModel('sales/order_config')->getStatuses() as $status => $statusLabel) {\n $returnArray[] = array('value' => $status, 'label' => Mage::helper('sales')->__($statusLabel));\n }\n return $returnArray;\n }", "public function getEmpty();", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', 1)))->getField('id, name');\n }", "protected function getOptions() : array\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', -1)))->getField('id, name');\n }", "public function toOptionArray()\n {\n /** @var $orderConfig Mage_Sales_Model_Order_Config */\n $orderConfig = Mage::getSingleton('sales/order_config');\n if ($this->_stateStatuses) {\n $statuses = $orderConfig->getStateStatuses($this->_stateStatuses);\n }\n else {\n $statuses = $orderConfig->getStatuses();\n }\n $options = array();\n $options[] = array(\n 'value' => '',\n 'label' => Mage::helper('adminhtml')->__('-- Please Select --')\n );\n foreach ($statuses as $code=>$label) {\n $options[] = array(\n 'value' => $code,\n 'label' => $label\n );\n }\n return $options;\n }", "public function getDefaultOptions(): array|null\n {\n return [];\n }", "protected function getOptions() {\n return [];\n }", "protected function getOptions() {\n return [];\n }", "protected function getOptions(): array\n {\n return [];\n }", "protected function getOptions(): array\n {\n return [];\n }", "public function getOptionsList()\n\t{\n\t\t$options = array();\n\n\t\tforeach ($this->options as $opt)\n\t\t{\n\t\t\tif ($opt->getQuantity())\n\t\t\t{\n\t\t\t\t$options[] = $opt;\n\t\t\t}\n\t\t}\n\n\t\treturn $options;\n\t}", "public static function expandedIsEmptyWhenNoRealChoiceIsSelectedProvider()\n {\n // - multiple with placeholder\n // - required with placeholder\n return [\n 'Nothing submitted / single / not required / without a placeholder -> should be empty' => [true, null, false, false, null],\n 'Nothing submitted / single / not required / with a placeholder -> should not be empty' => [false, null, false, false, 'ccc'], // It falls back on the placeholder\n 'Nothing submitted / single / required / without a placeholder -> should be empty' => [true, null, false, true, null],\n 'Nothing submitted / single / required / with a placeholder -> should be empty' => [true, null, false, true, 'ccc'],\n 'Nothing submitted / multiple / not required / without a placeholder -> should be empty' => [true, null, true, false, null],\n 'Nothing submitted / multiple / required / without a placeholder -> should be empty' => [true, null, true, true, null],\n 'Placeholder submitted / single / not required / with a placeholder -> should not be empty' => [false, '', false, false, 'ccc'], // The placeholder is a selected value\n ];\n }", "public function toOptionArray()\n {\n if (!$this->options) {\n $this->options = Mage::getResourceModel('customer/group_collection')\n ->setRealGroupsFilter()\n ->loadData()->toOptionArray();\n array_unshift(\n $this->options,\n array(\n 'value' => 0,\n 'label' => Mage::helper('customer')->__('NOT LOGGED IN')\n )\n );\n }\n return $this->options;\n }", "public function toOptionArray()\n {\n return Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true);\n }", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "public function validate_option( $values ) {\n $out = array ();\n return $values;\n }", "protected function getOptionValueIds()\n {\n return array_unique($this->optionValueIds);\n }", "public function getAllOptions()\n {\n if ($this->_options === null) {\n $this->_options = [\n ['label' => __('All selected attributes will be required for approval'), 'value' => self::STATUS_REQUIRED],\n ['label' => __('All selected attributes will not be required for approval.'), 'value' => self::STATUS_NOT_REQUIRED],\n ];\n }\n return $this->_options;\n }", "protected function validate_options() {\n\t\tif ( empty( $this->field['fields']['options'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( count( $this->field['fields']['options']['value'] ) === 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( $this->field['fields']['options']['value'] as $key => $option_value ) {\n\t\t\tif ( empty( $key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ( empty( $option_value ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function emptyOptions()\n\t{\n\t\t$this->options = array();\n\n\t\treturn $this;\n\t}", "function OptionNull ($field)\r{\r\tif ($GLOBALS['feedback']) echo \"OptionNull($field)\\n\";\r\r\techo '<option value=\"\"';\r\tif (! $field) echo ' selected';\r\techo '>&nbsp;</option>';\r}", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "private function getExistingUserOptions() {\n\t\t$optionsNames = array();\n\t\t$sql = \"SELECT\toptionName\n\t\t\tFROM\twcf\".WCF_N.\"_user_option\n\t\t\tWHERE\toptionName NOT LIKE ?\";\n\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\t$statement->execute(array('option%'));\n\t\twhile ($row = $statement->fetchArray()) {\n\t\t\t$optionsNames[] = $row['optionName'];\n\t\t}\n\t\t\n\t\treturn $optionsNames;\n\t}", "function getOptions()\n\t{\n\t\t\n\t\treturn $this->getAssoc(Array('id','title')/*, $cond*/);\n\t}", "public function getOptions(): ?array\n {\n return $this->options;\n }", "private function getSelectOptions() {\n $result = \"\";\n if($this->pleaseSelectEnabled) {\n $result .= '<option value=\"null\"> -- Please Select --</option>';\n }\n foreach($this->itemList as $key => $val) {\n $selectedText = \"\";\n if(in_array($key, $this->selectedItems)) {\n $selectedText = 'selected=\"selected\"';\n }\n $result .= '<option value=\"'.$key.'\" '.$selectedText.'>'.$val.'</option>'.\"\\n \\t\";\n }\n return $result;\n }", "public function getArrayNullEmpty () {\n\n $values = array();\n\n foreach ($this->values as $key => $value) {\n\n if ($value !== null && is_string($value) && strlen($value) == 0) {\n\n $value = null;\n\n }\n\n $values[$key] = $value;\n\n }\n\n return $values;\n\n }", "public function cheapestOptions()\n {\n return (isset($this->quotes) && (is_array($this->quotes))) ? array_slice($this->quotes, 0, $this->totalCarriers) : [];\n }", "public function getOptions($please_select = false)\n {\n if ($please_select) {\n $options = array(null => '--Please Select--');\n }\n\n $carriers = Mage::getModel('temando/carrier')->getCollection();\n foreach ($carriers as $carrier) {\n\t if(!$carrier->getCarrierId())\n\t\tcontinue;\n\t \n $options[$carrier->getCarrierId()] = $carrier->getCompanyName();\n }\n\n return $options;\n }", "public function getOptions()\n {\n return $this->options ?: [];\n }", "public function getValueSelectOptions()\n {\n if (!$this->hasData('value_select_options')) {\n switch ($this->getAttribute()) {\n case 'country_id':\n $options = $this->_directoryCountry->toOptionArray(true);\n break;\n\n case 'region_id':\n $options = $this->_directoryAllregion->toOptionArray(true);\n break;\n\n default:\n $options = [];\n }\n $this->setData('value_select_options', $options);\n }\n\n return $this->getData('value_select_options');\n }", "private function validOptions()\n {\n return $this->isNumeric() ? $this->options : array_keys($this->options);\n }", "private function getEmptyData() {\n if (!$this -> empty_data) {\n $this -> empty_data = array();\n foreach ($this -> types as $key) {\n $this -> empty_data[$key] = \"\";\n }\n unset($this -> empty_data['user_type']); // the default value should never be set to \"\"\n unset($this -> empty_data['password']); // the default value should never be set to \"\"\n }\n return $this -> empty_data;\n }", "public function getOptionsArray($withEmpty = true)\n {\n $options = array();\n foreach ($this->getAllOptions($withEmpty) as $option) {\n $options[$option['value']] = $option['label'];\n }\n return $options;\n }", "public function getOptions() : array;", "public function getDefaultOptions()\n\t{\n\t\tswitch ($this->type) {\n\t\t\tcase self::TYPE_CHECKBOX:\n\t\t\tcase self::TYPE_LINKED_SELECT:\n\t\t\tcase self::TYPE_MULTI_SELECT:\n\t\t\tcase self::TYPE_RADIO:\n\t\t\tcase self::TYPE_SELECT:\n\t\t\t\t/** @noinspection PhpUndefinedMethodInspection */\n\t\t\t\treturn $this->getOptions()->filterByIsSelected();\n\t\t\tdefault:\n\t\t\t\treturn new kyResultSet(array(), 'kyCustomFieldOption');\n\t\t}\n\t}", "public function toOptionArray()\n {\n return $this->getOptions(array('isCod' => false));\n }", "public function getRequiredOptions();", "protected function getEmptyFilter()\n {\n return array('filters' => array());\n }", "public function stdWrap_ifEmptyDeterminesEmptyValuesDataProvider() {}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('value', null, InputOption::VALUE_REQUIRED, 'Setting value', null),\n\t\t);\n\t}", "public function toOptionArray($defaultValues = false, $withEmpty = false)\n {\n $options = $allowedSet = [];\n $sets = $this->attrSetCollection\n ->setEntityTypeFilter($this->productModal->getResource()->getTypeId())->load()->toOptionHash();\n if (!$defaultValues) {\n $allowedSet = $this->getAllowedSet($this->storeManage->getStore(null)->getId());\n }\n\n foreach ($sets as $value => $label) {\n if (!$defaultValues && !in_array($value, $allowedSet)) continue;\n\n $options[] = ['value' => $value, 'label' => $label];\n }\n\n if ($withEmpty) {\n array_unshift($options, ['label' => '', 'value' => '']);\n }\n\n return $options;\n }", "protected function _toOptionArray($valueField='id', $labelField='name', $additional=array())\n {\n $data = parent::_toOptionArray($valueField, $labelField, $additional);\n array_unshift($data, array('value' => '', 'label' => Mage::helper('core')->__('Please select')));\n return $data;\n }", "public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }", "public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }", "public function isEmpty()\n\t{\n\t\tif (!count($this->options))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tforeach ($this->options as $o)\n\t\t{\n\t\t\tif ($o->getQuantity() > 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function getOptions()\n {\n return $this->optionRequested->get();\n }", "private static function getOption()\n {\n return array_merge(\n array_flip(['application_id', 'api_key', 'index_name']),\n array_filter((array) get_option('algolia_index'))\n );\n }", "public function getAllOptions()\n {\n if ($this->_options === null) {\n $this->_options = [\n ['label' => __('Fixed value'), 'value' => self::TYPE_FIXED],\n [\n 'label' => __('Dropdown values'), \n 'value' => self::TYPE_OPTION\n ],\n ['label' => __('Custom value'), 'value' => self::TYPE_RANGE],\n ];\n }\n return $this->_options;\n }", "public function toNonEmptyArray(): array;", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }" ]
[ "0.7248526", "0.6974299", "0.6927566", "0.6826012", "0.66438353", "0.6536376", "0.6497448", "0.6496091", "0.6437268", "0.6363146", "0.6352075", "0.63439274", "0.6250747", "0.62452984", "0.6222028", "0.62102556", "0.62085295", "0.6189132", "0.6181418", "0.6176706", "0.61664903", "0.61522275", "0.6141624", "0.613198", "0.61120164", "0.610926", "0.61061114", "0.61041796", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.60622716", "0.60393184", "0.6034509", "0.5998542", "0.5998542", "0.5977008", "0.5977008", "0.5975501", "0.5959746", "0.59533066", "0.5943965", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.592322", "0.5916708", "0.58998305", "0.5899078", "0.5888956", "0.5882993", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5872468", "0.5867062", "0.5860432", "0.5844739", "0.584254", "0.58421624", "0.58219707", "0.58203083", "0.58186233", "0.58008343", "0.5799584", "0.5797499", "0.5794725", "0.57878226", "0.57754606", "0.57739913", "0.5765561", "0.5762928", "0.575643", "0.5741055", "0.5707347", "0.5701318", "0.5701318", "0.5696292", "0.56844336", "0.5683172", "0.56776154", "0.56755036", "0.5669886", "0.5669886" ]
0.5776547
84
Retrieve option text by option value
public function getOptionText($optionId) { $options = self::getOptionArray(); return isset($options[$optionId]) ? $options[$optionId] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionText($value) {\n $options = $this->getAllOptions();\n foreach ($options as $option) {\n if ($option['value'] == $value) {\n return $option['label'];\n }\n }\n return false;\n }", "public function getOptionText($value)\n {\n foreach ($this->getAllOptions() as $option) {\n if ($option['value'] == $value) {\n return $option['label'];\n }\n }\n\n return false;\n }", "function smartchoice_get_option_text($id) {\n global $DB;\n\n if ($result = $DB->get_record('smartchoice_options', array('id' => $id))) {\n return $result->text;\n } else {\n return get_string('notanswered', 'smartchoice');\n }\n}", "public function getOpt($option) {}", "function getOption($name);", "public function getOptionElement($value){\n\t\treturn $this->options[$value];\n\t}", "public function getOption($name);", "public function getOption($name);", "public function getOption($name);", "function get_option() {\n\t\t\tcheck_ajax_referer('ajax-nonce', 'nonce');\n\t\t\tif (!empty($_POST['option'])) {\n\t\t\t\tswitch ($_POST['option']) {\n\t\t\t\t\tcase 'blogname':\n\t\t\t\t\t\techo preg_replace_callback(\"/(&#[0-9]+;)/\", array($this, 'decode_entities'), html_entity_decode(get_bloginfo('name')));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blogdescription':\n\t\t\t\t\t\techo preg_replace_callback(\"/(&#[0-9]+;)/\", array($this, 'decode_entities'), html_entity_decode(get_bloginfo('description')));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\techo get_option($_POST['option']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'notfound';\n\t\t\t}\n\t\t\tdie;\n\t\t}", "public function getOption(string $name);", "public function getOption(string $name);", "function PclZipUtilOptionText($p_option)\n {\n\n $v_list = get_defined_constants();\n for (reset($v_list); $v_key = key($v_list); next($v_list)) {\n\t $v_prefix = substr($v_key, 0, 10);\n\t if (( ($v_prefix == 'PCLZIP_OPT')\n || ($v_prefix == 'PCLZIP_CB_')\n || ($v_prefix == 'PCLZIP_ATT'))\n\t && ($v_list[$v_key] == $p_option)) {\n return $v_key;\n\t }\n }\n\n $v_result = 'Unknown';\n\n return $v_result;\n }", "protected function get_option_name()\n {\n }", "public function get(string $option);", "public function get(string $option);", "private function getOptionValue($form_field_list, $field_name, $option_value){\r\n \t\t\r\n \t\tforeach ($form_field_list as $form_row){\r\n \t\t\t\r\n \t\t\tif ($form_row['name'] == $field_name){\r\n \t\t\t\t\r\n \t\t\t\t$options = explode('::', $form_row['options']);\r\n \t\t\t\tarray_unshift($options, 0);\r\n \t\t\t\tunset($options[0]);\r\n \t\t\t\t\r\n \t\t\t\tif (@$options[$option_value])\r\n \t\t\t\t\treturn $options[$option_value];\r\n \t\t\t}\r\n \t\t\t\r\n \t\t} // foreach ($form_field_list as $form_row){\r\n \t\t\r\n \t}", "public function getOption() {\n return $this->get(self::OPTION);\n }", "function it_option($option){\n\techo get_it_option($option);\n}", "private function selectCustomField(): string\n {\n $value = $this->getValue($this->index);\n foreach($this->options as &$option) {\n if($option['key'] == $value) {\n $option['selected'] = true;\n break;\n }\n }\n\n return Template::build($this->getTemplatePath('select.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'options' => $this->options,\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "public function getOption($key);", "public function getOption($key)\n {\n return array_key_exists($key, $this->optionsCollection) ? $this->optionsCollection[$key] : '';\n }", "function getOptionLabel($listFile,$selectedValue)\n{\n\t$f=fopen($listFile,\"r\");\n\twhile (!feof($f)){\n\t\t$d=fgets($f);\n\t\t$start=strpos($d,\"\\\"\")+1;\n\t\t$end=strrpos($d,\"\\\"\");\n\t\t$val=substr($d,$start,$end-$start);\n\t\t\n\t\tif ($val==$selectedValue){\n\t\t\n\t\t\t$lstart=strpos($d,\">\")+1;\n\t\t\t$lend=strrpos($d,\"<\");\n\t\t\t$Label=substr($d,$lstart,$lend-$lstart);\n\t\t\tbreak;\n\t\t}\n\n\t}\n\tfclose($f);\n\treturn $Label;\n}", "function get_option($name) {\n $setting = Setting::where('name', $name)->first();\n if(!$setting) {\n return \"\";\n }\n return $setting->value;\n}", "public function get() {\n\t\treturn $this->options->get( self::OPTION );\n\t}", "public function value()\n {\n return $this->app->input->get('option');\n }", "public function get( $option );", "public function getOption($option)\n {\n $option = strtoupper($option);\n if (array_key_exists($option, $this->options)) {\n return $this->options[$option];\n }\n \n return;\n }", "public function get_value() {\n return $this->get_selected_options();\n }", "function get_option( $option = false ) {\n\t\t\t\t// Get options from database\n\t\t\t\t$options = get_option( $this->option );\n\t\t\t\t// Check option is specified\n\t\t\t\t$value = ( $option ) ? $options[$option] : $options;\n\t\t\t\t// Return result\n\t\t\t\treturn ( is_array( $value ) ) ? array_filter( $value, 'esc_attr' ) : esc_attr( stripslashes( $value ) );\n\t\t\t}", "static function getOption($options, $selected) {\n $input = '';\n if ($options)\n foreach ($options as $key => $text) {\n $input .= '<option value=\"' . $key . '\"';\n if ($key == $selected) {\n $input .= ' selected';\n }\n $input .= '>' . $text . '</option>';\n }\n return $input;\n }", "public function option(string $option);", "public function getOption()\n {\n return $this->option;\n }", "public function getOption()\n {\n return $this->option;\n }", "function bb_print_mystique_option( $option ) {\r\n\techo bb_get_mystique_option( $option );\r\n}", "public function getValue() {\n\t\ttry {\n\t\t\t$value\t= parent::getValue();\n\t\t\tif (strlen($value) > 0) {\n\t\t\t\tif (!array_key_exists((string)$value, (array)$this->getOptions())) {\n\t\t\t\t\tthrow new LBoxExceptionFormControl(\"$value: \". LBoxExceptionFormControl::MSG_FORM_CONTROL_VALUE_NOT_OPTION, LBoxExceptionFormControl::CODE_FORM_CONTROL_VALUE_NOT_OPTION);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "function mc_option_selected( $field, $value, $type = 'checkbox' ) {\n\tswitch ( $type ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\t\t$result = ' checked=\"checked\"';\n\t\t\tbreak;\n\t\tcase 'option':\n\t\t\t$result = ' selected=\"selected\"';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result = '';\n\t\t\tbreak;\n\t}\n\tif ( $field == $value ) {\n\t\t$output = $result;\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "public function option($key)\n {\n return $this->options[$key];\n }", "function uds_pricing_render_product_options_text($key, $value)\n{\n\tglobal $uds_pricing_column_options;\n\t$field = $uds_pricing_column_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='{$key}[]' value='$value' class='text {$key}' />\n\t\t\t<span class='tooltip'>?</span>\n\t\t\t<div class='tooltip-content'>{$field['tooltip']}</div>\n\t\t\t<div class='clear'></div>\n\t\t</div>\n\t\";\n\t\n\treturn $out;\n}", "function option_helper($post, $value, $label) {\n $selected = $post->post_status == $value ? 'selected' : '';\n return \"<option value='{$value}' {$selected}>{$label}</option>\";\n }", "public function wp_get_info(string $option = 'siteurl'){\n\n\t $bdd = Bdd::getInstance();\n\n\t\t$req = $bdd->dbh->prepare('SELECT option_value FROM '.$this->_table_prefix.'options WHERE option_name = \"' . $option . '\";');\n\t\t$req->execute();\n\n\t\treturn $req->fetch();\n\t}", "public function getOptionText($optionId)\n {\n $options = self::getOptionArray();\n\n return isset($options[$optionId]) ? $options[$optionId] : null;\n }", "function the_option( $key ) {\n\n if ( ! $this->get_the_option( $key ) )\n return false;\n\n echo $this->get_the_option( $key );\n }", "private function getSurveyOptionValue($survey_id, $field_name, $option_value){\r\n \t\t\r\n \t\t/**\r\n \t\t * get survey data\r\n \t\t */\r\n \t\t$survey_data = $this->db_model->getSurveyData($survey_id);\r\n \t\t\r\n \t\tforeach ($survey_data as $row){\r\n \t\t\t\r\n \t\t\t$options = explode('::', $row['options']);\r\n \t\t\tarray_unshift($options, 0);\r\n \t\t\tunset($options[0]);\r\n \t\t\t\r\n \t\t\tif ($row['type'] == 'radio'){\r\n \t\t\t\t\r\n \t\t\t\tif (@$options[$option_value])\r\n \t\t\t\t\treturn $options[$option_value];\r\n \t\t\t\t\t\r\n \t\t\t}elseif ($row['type'] == 'checkbox'){\r\n \t\t\t\t\r\n \t\t\t\t$option_expl = explode('::', $option_value);\r\n \t\t\t\t\t\t\r\n\t\t \t\t$value = array();\r\n\t\t \t\tforeach ($option_expl as $row)\r\n\t\t \t\t\t$value[] = @$options[$row];\t\t\t\t\r\n \t\t\t\t\r\n\t\t \t\tif ($value)\r\n\t\t \t\t\treturn join(',', $value);\r\n\t\t \t\t\t\r\n \t\t\t} // if ($survey_data['type'] == 'radio'){\r\n \t\t\t\r\n \t\t} // foreach ($survey_data as $row){\r\n \t\t\r\n \t}", "function caldol_add_options_members_filter(){\n\techo '<option value=\"TomChoice\">doggie</option>';\n\t\t\n}", "function EV_get_option( $key = '' ) {\n\treturn cmb2_get_option( EV_admin()->key, $key );\n}", "public static function getSelect()\n {\n return Hash::combine(self::getConstants(), '{s}.value', '{s}.name');\n }", "function getFieldTitle($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_title');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_title');\n\t\t$tooltip = setToolTipNotification('title');\t\t\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('title') === 'title' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label></br><select name='title' id='title'><option value='Mr' \".($value == 'Mr'? 'selected': '').\">Mr</option><option value='Ms' \".($value == 'Ms'? 'selected': '').\">Ms</option><option value='Mrs' \".($value == 'Mrs'? 'selected': '').\">Mrs</option><option value='Others' \".($value == 'Others'? 'selected': '').\">Others</option></select></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "function okrs_related_to_select($value)\n{\n\n $selected = '';\n if($value == 'okrs'){\n $selected = 'selected';\n }\n echo \"<option value='okrs' \".$selected.\">\".\n _l('okrs').\"\n </option>\";\n\n}", "function cpo_get_option( $option_name = '', $option_array = 'ctct_settings' ) {\n\t//Determines whether to grab current language, or original language's option\n\t$option_list_name = $option_array;\n\t$option_list = get_option( $option_list_name, false );\n\tif ( $option_list && isset( $option_list[ $option_name ] ) ) {\n\t\t$option_value = $option_list[ $option_name ];\n\t} else {\n\t\t$option_value = false;\n\t}\n\n\treturn $option_value;\n}", "public function get_name_option() {\n\t\tforeach ( $this->component as $item ) {\n\t\t\tif ( is_array( $item ) AND isset( $item['name'] ) AND isset( $item['val'] ) ) {\n\t\t\t\tif (\n\t\t\t\t\t$item['name'] == 'Name'\n\t\t\t\t AND isset( $item['options'] )\n\t\t\t\t\t AND is_array( $item['options'] )\n\t\t\t\t\t\t AND count( $item['options'] )\n\t\t\t\t) {\n\t\t\t\t\treturn $item['options'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function get_attribute_options_name_by_option($options_id) {\n\t\tglobal $db;\n\t\t$query = 'SELECT opt.products_options_name ' .\n\t\t\t'FROM ' . TABLE_PRODUCTS_OPTIONS . ' AS opt ' .\n\t\t\t'WHERE opt.products_options_id = \\'' . (int)$options_id . '\\' ' .\n\t\t\t\t'AND opt.language_id = \\'' . (int)$_SESSION['languages_id'] . '\\' ' .\n\t\t\t'LIMIT 1';\n\n\t\tif($this->cache_time == 0) $queryResult = $db->Execute($query);\n\t\telse $queryResult = $db->Execute($query, false, true, $this->cache_time);\n\n\t\t$retval = array();\n\t\tif(!$queryResult->EOF) {\n\t\t\treturn $queryResult->fields['products_options_name'];\n\t\t}\n\t\treturn null;\n\t}", "function form_setting( $option_name ) {\n\t$options = $this->get_options();\n\tif ( isset( $options[$option_name] ) )\n\t\treturn esc_attr( $options[$option_name] );\n\telse\n\t\treturn '';\n}", "protected function getOptionValue(DOMElement $option)\n {\n if ($option->hasAttribute('value')) {\n return $option->getAttribute('value');\n }\n\n return $option->textContent;\n }", "function _options_option($option) {\n global $db ;\n $data = null ;\n $req = $db->prepare(\"SELECT `data` FROM `_options` WHERE `option` = :option \") ;\n $req->execute(array(\n \"option\" => $option\n )) ;\n $data = $req->fetch() ;\n return (isset($data['data'])) ? $data['data'] : false ;\n}", "public function getOptionName()\n {\n return $this->optionName;\n }", "function print_text_field($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\tif(isset($value['disabled']) && $value['disabled']=='disabled')\n\t\t\t$input_value = $value['std'];\n\t\techo '<input class=\"option-input\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"'.$value['type'].'\" value=\"'.$input_value.'\" '.((isset($value['disabled']) && $value['disabled']=='disabled')?'disabled=\"disabled\"':'').'/>';\n\t\t$this->close_option($value);\n\t}", "private function get_option($option) {\n\t\tif ( isset( $this->settings_section_options[$option] ) ) {\n\t\t\t$name = $this->settings_section.'-'.$this->settings_section_options[$option]['name'];\n\t\t\treturn esc_attr( get_option( $name ) );\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "public function getValue() {\n \n $_aParams = func_get_args(); \n return AdminPageFramework_WPUtility::getOption( \n $this->oProp->sOptionKey, \n $_aParams, \n null, // default\n $this->getSavedOptions() + $this->oProp->getDefaultOptions( $this->oForm->aFields ) // additional array to merge with the options\n );\n \n }", "function getOptionValues() {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookuptypevalue as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY optiontext \";\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "function olc_mod_select_option($select_array, $key_name, $key_value) {\n\treset($select_array);\n\twhile (list($key, $value) = each($select_array)) {\n\t\tif (is_int($key)) $key = $value;\n\t\t$string .= '<br/><input type=\"radio\" name=\"configuration[' . $key_name . ']\" value=\"' . $key . QUOTE;\n\t\tif ($key_value == $key) $string .= ' CHECKED';\n\t\t$string .= '> ' . $value;\n\t}\n\n\treturn $string;\n}", "function ARTEMIS_SWP_JPT_get_plugin_option($option)\r\n{\r\n\t$options = get_option('AC_plugin_options');\r\n\t\r\n\tif (isset($options[$option])) {\r\n\t\treturn $options[ $option ];\r\n\t}\r\n\t\r\n\treturn \"\";\r\n}", "public function getOptionTitle()\n {\n return $this->optionTitle;\n }", "public function get_value($option_key)\r\n {\r\n return get_option($option_key, '');\r\n }", "function bb_get_mystique_option( $option ) {\r\n\t$get_mystique_option = bb_get_mystique_options();\r\n\treturn $get_mystique_option[$option];\r\n}", "function PclZipUtilOptionText($p_option)\n {\n }", "function uds_pricing_render_general_options_text($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='uds-pricing-$key' value='$value' class='uds-pricing-$key' />\n\t\t</div>\n\t\";\n\treturn $out;\n}", "function getThemengebieteOption(){\n\t\t$strThemengebiete = '';\n\t\t$resThemengebiete = $GLOBALS['TYPO3_DB']-> exec_SELECTquery('*', 'tx_topic_detail', 'deleted=0 AND hidden=0');\n\t\tif(mysql_num_rows($resThemengebiete) > 0){\n\t\t\twhile($rowThemenge = mysql_fetch_array($resThemengebiete)){\n\t\t\t\t$strThemengebiete .= '<option value=\"' . $rowThemenge['uid'] . '\">' . $rowThemenge['title'] . '</option>';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $strThemengebiete;\n\t}", "function select_option()\r\n{}", "public function getOption( $key ) {\n\n\t\t\t$options = get_option( $this->optionsKey, array() );\n\t\t\t$value = isset( $options[$key] ) ? $options[$key] : '';\n\n\t\t\treturn $value;\n\t\t}", "function OptionBox($label, $value, $defaultvalue, $text)\n{\n $result = '';\n\tfor ($i=0; $i<count($label); $i++)\n\t{\n\t\t$result .= '<option label=\"'.$label[$i];\n\t\t$result .= '\" value=\"'.$value[$i].'\" ';\n\t\tif (isset($defaultvalue))\n\t\t{\n\t \tif ($value[$i]==$defaultvalue)\n\t \t\t{\n\t \t\t\t$result .= 'selected=\"selected\" ';\n\t \t\t}\n\t\t}\n\t \t$result .= '>'.$text[$i].'</option>';\n\t}\n\treturn $result;\n}", "function get_field_value($id){\n\t\treturn stripslashes(get_option( $id )); \n\t}", "function _get( $option_key ) {\n\t\treturn bf_get_option( $option_key, $this->option_panel_id );\n\t}", "function get_the_option( $key ) {\n return genesis_get_option( $key, GENESIS_SIMPLE_SETTINGS_FIELD );\n }", "function olc_cfg_select_option($select_array, $key_value, $key = '') {\n\tfor ($i = 0, $n = sizeof($select_array); $i < $n; $i++) {\n\t\t$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');\n\t\t$string .= '<br/><input type=\"radio\" name=\"' . $name . '\" value=\"' . $select_array[$i] . QUOTE;\n\t\tif ($key_value == $select_array[$i]) $string .= ' CHECKED';\n\t\t$string .= '> ' . $select_array[$i];\n\t}\n\treturn $string;\n}", "public function getOptions() {\n\t\tif ($this->row->options != '') {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t}\n\t\tif ($this->row->intoptions != '') {\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$options_map = array_combine($intoptions, $options);\n\t\t}\n\t\tif ($options) {\n\t\t\t$msg = \"Predefined Options:\\n\";\n\t\t\tif ($intoptions) {\n\t\t\t\tforeach ($options_map as $key => $label) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$key}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$label}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($options as $char) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$char}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$char}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $msg;\n\t}", "public function getLabelForOption($option)\n {\n if ( ! array_key_exists($option, $this->options)) {\n return null;\n }\n\n return $this->options[$option];\n }", "protected function getOptionsValue($index)\n {\n $index = trim((string)$index);\n if ($index === '') {\n return null;\n }\n if (!empty($this->options[$index])) {\n return $this->options[$index];\n }\n return null;\n }", "public function getSiteOption($optionName){\n\t\ttry{\t\t\n\t\t\t$stmt = $this->db->prepare(\"SELECT optionValue FROM site_options WHERE optionName = :optionName\");\n\t\t\t$stmt->execute(array(':optionName'=>$optionName));\n\t\t\t$val=$stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $val['optionValue'];\t\t\t\n\t\t} catch(PDOException $e) {\n echo $e->getMessage();\n } \n }", "function option($name)\n{\n $name = apply_filters(\"display_option_$name\", get_option($name));\n $name = html_escape($name);\n return $name;\n}", "public static function get_font_subset_option_elements() {\n\n\t\treturn '<option value=\"unknown\">' . esc_html__( 'Unknown', 'publisher' ) . '</option>';\n\t}", "public function onJSolrSearchOptionLookup($value)\n\t{\t\n\t\t$conf = JFactory::getConfig();\n\t\t$options = array(\n\t\t\t\t'defaultgroup' => 'plg_jsolrsearch_jreviews',\n\t\t\t\t'cachebase' => $conf->getValue('config.cache_path'),\n\t\t\t\t'lifetime' => $conf->getValue('config.cachetime') * 60, // minutes to seconds\n\t\t\t\t'language' => $conf->getValue('config.language'),\n\t\t\t\t'storage' => $conf->getValue('config.storage', 'file'));\n\t\t\n\t\t$cache = new JCache($options);\n\t\t$cache->setCaching(true);\n\t\t\n\t\tif (!$list = json_decode($cache->get('options', $options['defaultgroup']))) {\t\n\t\t\t$database = JFactory::getDbo(); \n\t\t\t\n\t\t\t$query = $database->getQuery(true);\n\t\t\t$query\n\t\t\t\t->select(array('text', 'value'))\n\t\t\t\t->from('#__jreviews_fieldoptions');\n\t\t\t\n\t\t\t$database->setQuery($query);\n\t\t\t\n\t\t\t$list = $database->loadObjectList();\n\t\t\t\n\t\t\t// cache these options so we don't need to keep loading from db.\n\t\t\t$cache->store(json_encode($list), $options['defaultgroup']);\n\t\t}\n\t\t\n\t\t$found = false;\n\t\t$text = \"\";\n\t\twhile (!$found && $item = current($list)) {\n\t\t\tif ($item->value == $value) {\n\t\t\t\t$found = true;\n\t\t\t\t$text = $item->text;\n\t\t\t}\n\t\t\t\n\t\t\tnext($list);\n\t\t}\n\t\t\n\t\treturn $text;\n\t}", "abstract protected function getOption(string $option, string $section = '');", "function get_it_option( $option ) {\n\t$options = get_option( 'chalmersit_options' );\n\tif ( isset( $options[$option] ) )\n\t\treturn $options[$option];\n\telse\n\t\treturn false;\n}", "public function getSelected(?int $type = null): bool|string\n {\n foreach ($this->arrOption as $option) {\n if ($option->selected) {\n return $type === self::SELECTED_BY_TEXT ? $option->text : $option->value;\n }\n }\n\n return false;\n }", "public function get( $option ) {\n\t\treturn $this->options->get( $option );\n\t}", "final protected function getOption($option) {\n return isset($this->valueOptions[$option]) ? $this->valueOptions[$option] : null;\n }", "function HERITAGE_get_theme_option($option_group, $option_name)\n{\n $options = get_option($option_group);\n\n if (isset($options[$option_name])) {\n return $options[$option_name];\n }\n\n return '';\n}", "function sel_get_text ( $ii ) {\n\t\treturn strval ( $this->pi1->stat['years'][$ii] );\n\t}", "public function text() {\n\tif( count($this->selectList) > 0 && isset($this->selectList[0])) return htmlspecialchars($this->selectList[0]->getCurrentHtml());\n\t return htmlspecialchars($this->getCurrentHtml());\n }", "public function get_field_option( $value ) {\n\t\treturn FrmField::get_option( $this->field, $value );\n\t}", "public function getLabelByValue($value = '')\n {\n $options = $this->toOptionArray();\n if (count($options)) {\n foreach ($options as $option) {\n if (isset($option['value']) && $option['value'] == $value) {\n $value = isset($option['label']) ? $option['label'] : $value;\n break;\n }\n }\n }\n return $value;\n }", "function isSelected($val,$option) {\r\n $cmp = strcmp($val,$option);\r\n if ($cmp == 0)\r\n return \" SELECTED\";\r\n else\r\n return \"\";\r\n}", "static function option( $value, $text, $attr = null )\n\t{\n\t return array(\n\t 'value' => $value,\n\t 'text' => $text,\n\t 'attributes' => $attr\n\t );\n\t}", "function getOptionSelect($option = array(), $selected = '')\n{\n $return = '';\n for ($a = 0; $a < count($option); $a++) {\n if ($selected != '' && $selected == $option[$a]) {\n $return .= '<option value=\"' . $option[$a] . '\" selected=\"selected\">' . $option[$a] . '</option>';\n } else {\n $return .= '<option value=\"' . $option[$a] . '\">' . $option[$a] . '</option>';\n }\n }\n return $return;\n}", "public function displayValue() {\n\t\tif ($this->row->intoptions != \"\") {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$intoptions2 = array_flip($intoptions);\n\t\t\t$key = $intoptions2[$this->row->value];\n\t\t\treturn \"<highlight>{$options[$key]}<end>\";\n\t\t} else {\n\t\t\treturn \"<highlight>\" . htmlspecialchars($this->row->value) . \"<end>\";\n\t\t}\n\t}", "protected function absenceLabel($option)\n {\n return $this->absenceLabelList[$option];\n }", "function getOption ( $key, $option )\n\t{\n\t\tif ( isset( $this->options[$option][$key] ) ) {\n\t\t\t$return = $this->options[$option][$key]; // From Admin Page\n\t\t} else {\n\t\t\t$return = $this->default_options[$option][$key]; // Default\n\t\t}\n\t\treturn ($return);\n\t}", "public function option(string $key)\n {\n return $this->input->getOption($key);\n }", "private function getYesNoOptionValue($yn_field_list, $field_name, $option_value){\r\n \t\t\r\n \t\tforeach ($yn_field_list as $yn_row){\r\n \t\t\t\r\n \t\t\tif ($yn_row['name'] == $field_name){\r\n \t\t\t\t\r\n \t\t\t\t$options = explode(';opt;', $yn_row['options']);\r\n \t\t\t\tarray_unshift($options, 0);\r\n \t\t\t\tunset($options[0]);\r\n \t\t\t\t\r\n \t\t\t\tif (@$options[$option_value])\r\n \t\t\t\t\treturn $options[$option_value];\r\n \t\t\t}\r\n \t\t\t\r\n \t\t} // foreach ($form_field_list as $form_row){\r\n \t\t\r\n \t}" ]
[ "0.7324542", "0.71233946", "0.6881275", "0.6819372", "0.6802792", "0.6715897", "0.6519207", "0.6519207", "0.6519207", "0.64764524", "0.6433878", "0.6433878", "0.62758607", "0.6243528", "0.6229604", "0.6229604", "0.61794233", "0.6166231", "0.614617", "0.6144168", "0.6141262", "0.6127802", "0.6091224", "0.6080055", "0.6066135", "0.6061155", "0.6058617", "0.6027696", "0.5994804", "0.59905356", "0.5980797", "0.5979691", "0.5972353", "0.5972353", "0.59559745", "0.5954574", "0.59436744", "0.59314233", "0.59167105", "0.59092426", "0.58941424", "0.58916384", "0.58909696", "0.5877804", "0.5875679", "0.5865473", "0.58591264", "0.58586967", "0.58557147", "0.584617", "0.5836063", "0.58359486", "0.5823725", "0.5823607", "0.582196", "0.58082926", "0.5805174", "0.5805094", "0.58017457", "0.57880044", "0.5786111", "0.5785492", "0.57763284", "0.5752807", "0.574205", "0.5737036", "0.57292426", "0.57264036", "0.56981426", "0.5688531", "0.5683586", "0.56821334", "0.56751466", "0.56718856", "0.56694394", "0.5664544", "0.5657945", "0.5654476", "0.56519526", "0.56329286", "0.5630991", "0.5629903", "0.56250244", "0.56227916", "0.5620476", "0.5620392", "0.56189924", "0.5595341", "0.5594482", "0.5585053", "0.55841", "0.5580674", "0.5575803", "0.5570655", "0.5558333", "0.5554733", "0.5551988", "0.55481184", "0.5540373", "0.55393726" ]
0.6071028
24
$mssql_ser= "192.168.1.59"; $mssql_db= "jest"; $mssql_user= "jestadmin"; $mssql_pass= "into99black"; mssql_connect($mssql_ser,$mssql_user,$mssql_pass) or die("Could not connect to MSSQL database"); mssql_select_db($mssql_db) or die("Table unavailable"); echo "START2";
function splitonspace($data) { $u_data=preg_split("/ +/",$data); $lname=array_pop($u_data); $fn=""; foreach ($u_data as $n => $v) { $fn=$v." "; } $dout=array(0=>$fn,1=>$lname); return $dout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function conect_ssql(){\n\n $conn = mssql_connect($this->servidor, $this->usuario, $this->senha);\n if($conn == FALSE) die(\"Couldn't connect\");\n\n if(mssql_select_db($this->dbname, $conn))\n $result = \"Selected {$this->dbname} ok<br />\";\n else\n die('Failed to select DB');\n }", "function connect(){\n $servername = \"LOBNA-PC\";\n // $username = \"username\";\n // $password = \"password\";\n \n try {\n\t\t\t//$con = new PDO(\"sqlsrvr:host=$servername;dbname=wages\" );\n\t\t\t$con = new PDO(\"sqlsrv:Server=$servername;Database=wages\");\n // set the PDO error mode to exception\n $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n //echo \"Connected successfully\"; \n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n\t\t }\n\t\t\n\t\t// $serverName = \"DESKTOP-B9U461U\"; //serverName\\instanceName\n\n\t\t// // Since UID and PWD are not specified in the $connectionInfo array,\n\t\t// // The connection will be attempted using Windows Authentication.\n\t\t// $connectionInfo = array( \"Database\"=>\"wages\");\n\t\t// $con = sqlsrv_connect( $serverName, $connectionInfo);\n\t\t\n\t\t// if( $con ) {\n\t\t// \t echo \"Connection established.<br />\";\n\t\t// }else{\n\t\t// \t echo \"Connection could not be established.<br />\";\n\t\t// \t die( print_r( sqlsrv_errors(), true));\n\t\t// }\n\n //----------------------------------------------- \n // Perform operations with connection. \n //----------------------------------------------- \n \n /* Close the connection. */ \n // sqlsrv_close( $conn); \n\t\t// $dsn = 'sqlserver:host=DESKTOP-B9U461U;dbname=wages';//data source name\n\t\t// $user= '';\n\t\t// $pass='';\n\t\t// $options = array (\n\t\t// \t\tPDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',\n\t\t// \t\t//PDO::ATTR_PERSISTENT => true\n\t\t// \t);\n\n\t\t// try{\n\t\t// \t//new connection to db\n\t\t// \t\tstatic $con;\n\t\t// \t if ($con == NULL){ \n\t\t// \t $con = new PDO($dsn, $user, $pass, $options);\n\t\t// \t\t\t$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n\t\t// }\n\t\t// \t// $con = new PDO($dsn, $user, $pass, $options);\n\t\t// \t// $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n\t\t// \t//QUERY\n\t\t// \t// $q = \"INSERT INTO test(name,phone)VALUES('لبنى','محمد')\";\n\t\t// \t// $con->exec($q);\n\t\t// \t//echo \"success\";\n\t\t// \t//print_r($con) ;\n\n\t\t// }\n\t\t// catch(PDOexception $e){\n\t\t// \techo \"failed\" . $e->getMessage();\n // }\n // print_r($con);\n\t\treturn $con;\n\t}", "public function connect() {\r\n\t\t//$\t\tconn = new PDO(\"sqlsrv:server=$this->serverName; Database = $this->dbName\", $userName, $userPassword);\r\n\t\t//$\t\tconn->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t// \t\t$sql_Connect_str = \"sqlsrv:server=$this->serverName; Database = $this->dbName\";\r\n\t\t// \t\t$dbConnection = new PDO($sql_Connect_str, $this->userName, $this->userPassword);\r\n\t\t//$\t\tdbConnection->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t// \t\t$dbConnection->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t//r\t\teturn $dbConnection;\r\n\t\t\r\n\t\t$mssql = new PDO('dblib:host=RPT00024;dbname=eqcas', 'sa', 'dsc2007!@');\r\n\t\t//$\t\tmssql->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);\r\n\t\t$mssql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\treturn $mssql;\r\n\t}", "function mssql_connect($servername = NULL, $username = NULL, $password = NULL, $new_link = false)\n{\n}", "function connect()\n{\n //db connection\n $server = 'CMT-CIMS\\CIMS';\n $connectionInfo = array( \"Database\"=>\"CMT\", \"UID\"=>\"CIMSADMIN\", \"PWD\"=>\"Hook2015\");\n return sqlsrv_connect($server, $connectionInfo);\n}", "function selectDB($db)\n\t{\n\n\t\tglobal $connections,$config;\n\n\t\tif (!isset($connections[$db]))\n\t\t\tdie('Core-Error: Invalid database in selectDB()');\n\n\t\tif ($connections[$db]===false)\n\t\t{\n\n\t\t\t$connections[$db]\t= @mssql_connect($config['db'][$db]['host'],$config['db'][$db]['user'],$config['db'][$db]['pass']);\n\n\t\t\tif ($connections[$db] === false)\n\t\t\t{\n\n\t\t\t\t$msg\t\t= mssql_get_last_message();\n\n\t\t\t\techo '<b>Core-Error</b>: Failed to connect to database!<br />';\n\n\t\t\t\tif (trim($msg)!='')\n\t\t\t\t\techo 'Error: '.htmlspecialchars($msg);\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\tif (trim(strtolower($config['db'][$db]['host'])) == '(local)')\n\t\t\t\t\t\t$config['db'][$db]['host']\t= 'localhost';\n\n\t\t\t\t\t// Lets see if we can establish a connection to the db-server\n\n\t\t\t\t\t$file = @fsockopen ($config['db'][$db]['host'], 80, $errno, $errstr, 10);\n\n\t\t\t\t\tif (!$file)\n\t\t\t\t\t\t$status = -1; // Site is down\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$status\t= 0;\n\t\t\t\t\t\tfclose($file);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($status == -1)\n\t\t\t\t\t\techo 'Error: #'.$errno.', '.htmlspecialchars($errstr).'';\n\t\t\t\t\telse\n\t\t\t\t\t\techo 'Error: Please check if MSSQL-service is running <b>and</b> reachable (firewall, etc.).';\n\n\t\t\t\t}\n\n\t\t\t\tif (DEBUG)\n\t\t\t\t{\n\t\t\t\t\techo '<br /><br />';\n\t\t\t\t\techo '<b>Connection-Details</b>:<br /><br />';\n\t\t\t\t\techo '<table width=\"400\">';\n\t\t\t\t\techo '<tr><td>Host:</td><td>'.htmlspecialchars($config['db'][$db]['host']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>User:</td><td>'.htmlspecialchars($config['db'][$db]['user']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>Password:</td><td>'.htmlspecialchars($config['db'][$db]['pass']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>Database:</td><td>'.htmlspecialchars($config['db'][$db]['db']).'</td></tr>';\n\t\t\t\t\techo '</table>';\n\t\t\t\t}\n\n\t\t\t\tdie('');\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ($connections[$db]!==false)\n\t\t\tmssql_select_db($config['db'][$db]['db']);\n\n\t}", "public function open_connection(){\n $srv=self::$db_host;\n $opc=array(\"Database\"=>$this->db_name, \"CharacterSet\"=>\"UTF-8\", \"UID\"=>self::$db_user, \"PWD\"=>self::$db_pass);\n $this->conn = sqlsrv_connect($srv,$opc) or die (print_r('Error al conectar con la Base de Datos SQLSRV !!! Favor de Informar a Sistemas!!!'));\n #(print_r(sqlsrv_errors(), true));\n }", "function dbConnect($serverName, $connectionInfo){\n\n\t//$serverName = \"RaviKumarJangra\";\n\t//$connectionInfo = array(\"Database\"=>\"joe\");\t\n\t$connection = sqlsrv_connect($serverName, $connectionInfo);\n\tif (!$connection) {\n\t\t\tdie(print_r(sqlsrv_errors(), true));\n\t\t\t//return die(\"Unable to Connect to the Server\");\n\t} else {\n\t\t\treturn $connection;\n\t}\n}", "public function get_test_sql_server()\n {\n }", "function ms_conect_casa(){\n\t\t\t$ms_connection = mssql_connect(SERVER_CASA,USER_CASA,PASS_CASA);\n\t\t\t$ms_SelectedDB = mssql_select_db(DB_CASA);\n\t\t\treturn $ms_connection;\n\t\t}", "public function connect()\r\n\t{\r\n\t\t$this->conn = mssql_connect( $this->host, $this->user, $this->pwd );\r\n\t\tif( !$this->conn )\r\n\t\t\ttrigger_error( $this->lastError(), E_USER_ERROR );\r\n\t\t\r\n\t\tmssql_select_db( $this->dbname, $this->conn );\r\n\t\treturn $this->conn;\r\n\t}", "public function connect(){\n\t//boi the phai dua no vao mang $this->_connection = sqlsrv_connect($this->_hostname,array($this->_user,$this->_pass) or die ('Không thể kết nối đến CSDL');\n\t// thi no bao k ket noi CSDL duoc\n\t//con neu chi chay $this->_connection = sqlsrv_connect($this->_hostname) or die ('Không thể kết nối đến CSDL'); thi no vo duoc,nhung thang sqlsrv nay no k co cau lenh select database(sqlsrv_seleect_db) nhu cua thang mysql_select_db va mssql_select_db boi the o khuc duoi phai lam sao hien tai mac dinh dang de la sqlsrv_query($this->_connection,$this->_database);\n\t\t$this->_connection = sqlsrv_connect($this->_hostname,$this->_params) or die ('Không thể kết nối đến CSDL');\n\t\t//$smst = sqlsrv_query($this->_connection,$this->_database);\n\t\t//câu lệnh cũ \n\t\t//$this->_connection = mysql_connect(\"$this->_hostname\",\"$this->_user\",\"$this->_pass\") or die ('Không thể kết nối đến CSDL');\n\t\t//mysql_select_db($this->_database,$this->_connection);\n\t}", "function check_db_connect($dsname, $username, $password){\n // isql -v dsn username pass\n $cflag = False;\n $error = \"\";\n exec(\"isql -v $dsname $username $password\", $result);\n foreach($result as $l){\n $pos = strpos($l,'Connected');\n $error .= \" \" . $l;\n if ($pos === false) {\n $cflag = $cflag ;\n }\n else {\n $cflag = True; \n }\n }\n if ($cflag) return \"OK\";\n else return $error;\n}", "function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }", "function conectar()\n\t\t{\n\t\t\t//$connectionInfo = array(\"Database\"=>$this->db, \"UID\"=>$this->user, \"PWD\"=>$this->pass);\n\n\t\t\t$connectionInfo = array(\"Database\"=>$this->db);\n\t\t\t$this->conexion = sqlsrv_connect($this->server,$connectionInfo);\n\t\t\tif(!$this->conexion)\n\t\t\t{\n\t\t\t\techo \"Error al Conectar\";\n\t\t\t\tdie( print_r( sqlsrv_errors(), true));\n\t\t\t}\n\t\t}", "function connectsql(){\n\t$mysqlhost=\"localhost\";\n\t$mysqluser=\"pool_insert\";\n\t$mysqlpwd=\"poolinsert\";\n\t$mysqldb=\"knappe\";\n\t\t// --- Write Data to DB ---\n\t\t$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or syslog(LOG_WARNING,\"** Keine Verbindung zum Server! **\". mysql_error());\n\t\tmysql_select_db($mysqldb, $connection) or syslog(LOG_WARNING,\"** kein Select zur DB! ** **\". mysql_error());\n\t\n\t\t//mit mysql_close wird die Verbindung geschlossen\n}", "function connectsql(){\n\t$mysqlhost=\"localhost\";\n\t$mysqluser=\"pool_insert\";\n\t$mysqlpwd=\"poolinsert\";\n\t$mysqldb=\"knappe\";\n\t// --- Write Data to DB ---\n\t$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or syslog(LOG_WARNING,\"** Keine Verbindung zum Server! **\". mysql_error());\n\tmysql_select_db($mysqldb, $connection) or syslog(LOG_WARNING,\"** kein Select zur DB! ** **\". mysql_error());\n\t//mit mysql_close wird die Verbindung geschlossen\n}", "function create_connection(){\n $conn = new MySqli(\"localhost\", \"shivam\", \"hesoyam26\", \"ctf\");\n if($conn->connect_error){\n echo(\"Failed to connect to sql server\");\n log_error($conn->connect_error);\n return null;\n }\n return $conn;\n}", "function SQLConnect()\n\t{\n\t\t$host = \"107.22.222.166\";\n\t\t$username = \"ctecadmin\";\n\t\t$password = \"ctec227*user\";\n\t\t$db = \"Bid-well\";\n\n\t\t$dbc = mysqli_connect($host, $username, $password, $db) OR die(\"<p>Could not connect to Database.</p>\");\n\t\tmysqli_set_charset($dbc, 'utf8');\n\n\t\treturn $dbc;\n\t}", "function createConnect()\r\n\t\t{\r\n\t\t$this->conn=mysql_pconnect($this->host,$this->user,$this->password);\r\n\t\tif(!is_resource($this->conn))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to connect to the SQL Server.\";\r\n\t\t\t}\r\n\t\t$d = mysql_select_db($this->dbname, $this->conn);\r\n\t\tif(!is_resource($d))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to Use database \".$this->dbname.\".\";\r\n\t\t\t}\r\n\t\t}", "function sql_select_db($db,&$dbh=NULL)\n {\n global $MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD, $MYSQL_DATABASE, $MYSQL_CONN, $MYSQL_HANDLER, $SQL_DBH;\n global $CONF;\n//echo '<hr />'.print_r($dbh,true).'<hr />';\n//exit;\n if ( !is_null($dbh) )\n {\n if ($dbh->exec(\"USE $db\") !== false)\n return 1;\n return 0;\n }\n\n try\n {\n $SQL_DBH = NULL;\n list($host,$port) = explode(\":\",$MYSQL_HOST);\n if (isset($port)) {\n $portnum = $port;\n $port = ';port='.trim($port);\n }\n else {\n $port = '';\n $portnum = '';\n }\n //$SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.trim($host).$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n //$SQL_DBH = sql_connect();\n switch ($MYSQL_HANDLER[1]) {\n case 'sybase':\n case 'dblib':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'mssql':\n if (is_numeric($portnum)) $port = ','.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'oci':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':dbname=//'.$host.$port.'/'.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'odbc':\n if (is_numeric($portnum)) $port = ';PORT='.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME='.$host.$port.';DATABASE='.$db.';PROTOCOL=TCPIP;UID='.$MYSQL_USER.';PWD='.$MYSQL_PASSWORD);\n break;\n case 'pgsql':\n if (is_numeric($portnum)) $port = ';port='.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'sqlite':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':'.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'sqlite2':\n trigger_error(\"Critical Error : sqlite2 driver is not suported. \", E_USER_ERROR);\n break;\n default:\n //mysql\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n }\n return 1;\n }\n catch (PDOException $e)\n {\n if ($CONF['debug'])\n $msg = '<p>a3 Error!: ' . $e->getMessage() . '</p>';\n else\n {\n $msg = '<p>a3 Error!: ';\n $pattern = '/(Access denied for user|Unknown database)/i';\n if (preg_match($pattern, $e->getMessage(), $m))\n $msg .= $m[1];\n $msg .= '</p>';\n }\n startUpError($msg, 'Connect Error');\n return 0;\n }\n }", "public function sellMSSQL($sql){\r\n //use mssql_XXX instead\r\n\r\n $tdsSever = Yii::app()->params['tds_SELL'];\r\n $tdsDB = Yii::app()->params['tds_dbname_BYDDATABASE'];\r\n $tdsUser = Yii::app()->params['tds_SELL_username'];\r\n $tdsPwd = Yii::app()->params['tds_SELL_password'];\r\n\r\n $mssql=mssql_connect($tdsSever, $tdsUser, $tdsPwd);\r\n if(empty($mssql)) {\r\n throw new Exception(\"cannot connet to sqlserver $tdsSever, $tdsUser \");\r\n }\r\n mssql_select_db($tdsDB ,$mssql);\r\n\r\n //query\r\n $result = mssql_query($sql);\r\n $datas = array();\r\n while($ret = mssql_fetch_assoc($result)){\r\n $datas[] = $ret;\r\n }\r\n //disconnect\r\n mssql_close($mssql);\r\n\r\n //convert to UTF-8\r\n foreach($datas as &$data){\r\n foreach($data as $key => $value){\r\n $data[$key] = iconv('GBK','UTF-8', $value);\r\n }\r\n }\r\n\r\n return $datas;\r\n }", "function sqlConnect()\n {\n $host = \"127.0.0.1\";\n $username=\"BXP_At_Home_Name\";\n $password=\"BXP_At_Home_Key\";\n return new mysqli($host, $username, $password);\n }", "function setup_connect ()\n{\n$server = \"cs1.ucc.ie\";\n$database = \"2021_awf1\";\n$username = \"awf1\";\n$password = \"Shochel2\";\n$connection = mysqli_connect ($server, $username, $password, $database);\nif ($connection)\n return ($connection);\nreturn (FALSE);\n}", "function conectaDb()\n{\n try {\n $db = new PDO(\"sqlsrv:Server=INFORMATICA09\\SQL2008 ; Database = BDDESA \", \"sa\", \"guillermo\");\n $db->setAttribute(PDO::SQLSRV_ATTR_DIRECT_QUERY, true);\n return($db);\n } catch (PDOException $e) {\n \t\tprint \"<p><b>Error : </b> No puede conectarse con la base de datos.</p>\\n\";\n exit();\n }\n}", "function getConn()\n{\n // Naam van server\n $hostname = 'host.docker.internal';\n // Naam van database\n $dbname = 'FLETNIX';\n // Hier je eigen gebruikersnaam\n $username = 'Groepje8';\n // Hier je eigen password.\n // Zet het wachtwoord in het echt nooit letterlijk in de broncode.\n $pw = 'helloworld';\n\n $dbh = new PDO(\n \"sqlsrv:Server=$hostname;Database=$dbname;ConnectionPooling=0\",\n $username,\n $pw\n );\n // Tijdens het ontwikkelen is het handig om meteen ook de foutmeldingen vanuit de database te kunnen lezen.\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $dbh;\n}", "function sql_attach() {\n $conn = mysqli_connect(\"localhost:3306\", \"root\", \"samsung\");\n if (!$conn)\n die (\"Connection failed: \" . mysqli_connect_error());\n echo \"Connected successfully\\n\";\n ?><br><br><?php\n return ($conn);\n }", "public function sql_pconnect() {}", "public function sql_pconnect() {}", "function mssqlnative_driver_ADOConnection()\n\t{\n\t\t$this->dbtype = 'mssqlnative';\n\t\t$this->dataProvider = 'mssqlnative';\n\t}", "function connectSql()\n{\n $host = '';\n $username = '';\n $password = '';\n $database = '';\n $link = connect($host, $username, $password, $database);\n return $link;\n}", "function SetupServer(){\n\n $servername = \"localhost\";\n $username = \"cs411friends_cs411team34\";\n $password = \"MT@W[YBTvquf\";\n $dbname = \"cs411friends_PETFRIEND\";\n $conn = new mysqli($servername, $username, $password, $dbname);\n\n if($conn->connect_error){\n die(\"Connection failed: \" . $conn->connect_error);\n }\n\n return $conn;\n}", "protected function connect() {\n if (!isset($this->connection)) {\n if (!extension_loaded('mssql')) {\n throw new Exception(t('You must configure the mssql extension in PHP.'));\n }\n\n if (isset($this->configuration['port'])) {\n $host = $this->configuration['servername'] . ':' . $this->configuration['port'];\n }\n else {\n $host = $this->configuration['servername'];\n }\n $this->connection = mssql_connect(\n $host,\n $this->configuration['username'],\n $this->configuration['password'],\n TRUE);\n if (isset($this->configuration['database'])) {\n return mssql_select_db($this->configuration['database'], $this->connection);\n }\n }\n }", "function initsql() {\r\n\tglobal $g_cfg,$msq;\r\n\tif ($msq != NULL) return;\r\n\tif (!($msq = mysqli_connect(\"p:\".$g_cfg[\"sql_serv\"],$g_cfg[\"sql_user\"],\r\n\t\t\t\t\turldecode($g_cfg[\"sql_pwd\"]), $g_cfg[\"sql_db\"] ))) {\r\n\t \tinternal_error(\"cannot connect to mysql.\");\r\n\t}\r\n\tmysqli_set_charset($msq, \"utf8\");\r\n\treturn true;\r\n}", "function DatabaseConnection2() \r\n {\r\n $host =\"host.docker.internal\";\r\n $username =\"root\";\r\n $password =\"password\";\r\n //$dbname =\"clean\";\r\n //$port = \"33066\";\r\n\r\n /*\r\n This line will lead to the connection being refused by the database and i am unsure why\r\n I have:\r\n Terminated all processes on port 33066 in terminal.\r\n Used localhost instead of an address.\r\n Manually put the host, username, password strings inline. \r\n Turned off firewall/antivirus in case of interference.\r\n re-downloaded tscan files.\r\n Used host.docker.internal in place of address. \r\n */ \r\n\r\n //Creates the database connection\r\n $dbConn = new mysqli($host, $username, $password);\r\n\r\n //Checks the database connection\r\n //If the database can not be connected to, will return an error message.\r\n if ($dbConn->connect_error) \r\n {\r\n echo \"<p>Connection Failed: \".$dbConn->connect_error.\"</p>\\n\";\r\n exit;\r\n }\r\n\r\n echo \"Connected Successfully\";\r\n }", "function connect_to_server_and_db()\r\n{\r\n\r\n\t// connect and select the db.\r\n\t$sybaseSrv = 'SYBLEOPARD';//\r\n\t$sybaseDb = 'lpr_pentech';\r\n\t$sybaseAcct = 'sa';\t//'sa';\t\t//'report'; //'sa'; \t\t//'sa'; \t//'report';\r\n\t$sybasePass = 'hcdtc0';\t\t//'hcdtc0';\t//'bitut2'; //'lady632!b'; \t//'hcdtc0'; //'bitut2';\r\n\t\r\n\t// this will suppress the stupid message: \"Warning: Sybase: Server message: Changed database context to 'master'.\r\n\t//(severity 10, procedure N/A) in /var/www/html/DBAdmins/phpSybaseAdmin/test.php on line 4\"\r\n\tsybase_min_client_severity(100);\r\n\tsybase_min_server_severity(100);\r\n\t\t\r\n\t// connect to the server..\r\n\t$lspkdb = sybase_connect($sybaseSrv, $sybaseAcct, $sybasePass);\r\n\tif ($lspkdb == FALSE)\r\n\t\tdie(\"problem: \" . $sybaseSrv . \" connection has failed! for acct: \" . $sybaseAcct . \" and pass: \" . $sybasePass);\r\n\telse\r\n\t{\t\r\n\t\t\r\n\t\techo \"Successfully connected to the \" . $sybaseSrv . \" server...<br>\";\r\n\t\t// select the db...\r\n\t\tif (sybase_select_db($sybaseDb, $lspkdb) == FALSE)\r\n\t\t\t die(\"problem: \" . $sybaseSrv . \" connection has failed! for acct: \" . $sybaseAcct . \" and pass: \" . $sybasePass);\r\n\t\telse\r\n\t\t\techo \"Successfully selected the \" . $sybaseDb . \" database...<br>\";\r\n\t}\r\n\t\r\n\techo \"<br>\";\r\n\t\r\n\t// return the db handle\r\n\treturn $lspkdb;\r\n\r\n}", "function PhpDbCommonFunction($sql, $successtext){\r\n\t\t$conn = new mysqli($servername, $username, $password, $dbname);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\tif ($conn->query($sql) === TRUE) {\r\n\t\t\techo $successtext;\r\n\t\t} else {\r\n\t\t\techo \"Error : \" . $conn->error;\r\n\t\t}\r\n\r\n\t\t$conn->close();\r\n\t}", "function constructS()\n{\n if(isset($_SESSION['DB'])){\n $conexionInfo = array(\"Database\" => $_SESSION['DB'], \"UID\" => S_DB_USER, \"PWD\" => S_DB_PASS);\n }else {\n $conexionInfo = array(\"Database\" => S_DB_NOMBRE, \"UID\" => S_DB_USER, \"PWD\" => S_DB_PASS);\n }\n\n $conn = sqlsrv_connect(S_DB_SERVER, $conexionInfo);\n if($conn){\n return $conn;\n }else{\n $result = \"\";\n $result = \"Conexion no establecida<br>\";\n $result .= die( print_r(sqlsrv_errors(), true));\n }\n}", "function connectMySqli(){\r\n\t//return new mysqli('213.171.200.50','kokoSQL', 'k0k0786SQL','ReaderDB');\r\n\t/*$conn = new mysqli('localhost:8080','root', '','dkfobooksapp');\r\n\tif($conn)\r\n\t{\r\n\t\techo \"DB Connected\";\r\n\t\tdie();z\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"DB not Connected\";\r\n\t\tdie();\r\n\t}*/\r\n//\t$conn = new mysqli('localhost','root', '','dkfobooksapp','3306');\r\n\t$conn = new mysqli('213.171.200.85','DBdkfoadmin', 'DKFO@dm!n123','FindoutDB');\r\n\tif ($conn->connect_errno) \r\n\t{\r\n\t\tprintf(\"Connect failed: %s\\n\", $conn->connect_error);\r\n\t\texit();\r\n\t}\r\n\treturn $conn;\r\n}", "public function open_connection() {\n\n $this->connection = mysqli_connect(\"sql7.freemysqlhosting.net\", \"sql7293366\", \"cgApy8fEvJ\") or die(\"Connection failed: \" . mysqli_connect_error());\n \n// $this->connection = mysqli_connect(Config::DB_HOST, Config::DB_USERNAME, Config::DB_PASSWORD) or die(\"Connection failed: \" . mysqli_connect_error());\n// var_dump($this->connection);\n //die :print message \n //mysqli_connect_error():returns the error description from the last connection error if there is no error return null\n// or die('Could not connect: ' . mysqli_error($this->connection));\n $this->select_database();\n }", "public function testRunASqlQuery2(){\r\n $sql = \"Select * from 123;\";//No table named 123\r\n $db = new database;\r\n $db->connectToDatabase();\r\n $success = $db->runASqlQuery($sql);\r\n $this->assertEquals(false,$success);\r\n }", "function db_connect(){\n @$result = new mysqli('101.200.85.218', 'root','7DYKdev123!@#','test');\n if (!$result){\n echo 'Could not connect to database server';\n return false;\n }else{\n\n return $result;\n }\n}", "function db_connect(){\n @$result = new mysqli('101.200.85.218', 'root','7DYKdev123!@#','test');\n if (!$result){\n echo 'Could not connect to database server';\n }else{\n\n return $result;\n }\n}", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}", "function sql(){\r\n\t\t$this->conn = mysql_connect($this->hostname, $this->username , $this->password);\r\n\t\tmysql_select_db($this->dbName, $this->conn);\r\n}", "function db_connect() {\n $result = new mysqli('localhost', 'wieseld', 'hetfield1994', 'wieseld_Your_Average_Joe');\n \n if(!$result) {\n throw new Exception('Could not connect to database server');\n } else {\n //sets autocommit to true\n $result->autocommit(TRUE);\n return $result;\n }\n }", "function dbconnect()\n {\n $link = mysql_pconnect(\"localhost\", \"root\", \"s3ns89ui\") or die(mysql_error());\n $db_selected = mysql_select_db(\"analytics\", $link) or die(mysql_error());\n }", "public function conectar()\n{\n// $host = 'localhost:c:\\Embebed21\\SOCIOS.FDB';\n$host='localhost:socioss';\n // $host = '192.168.10.201:base';\n $nombre_usuario='SYSDBA';\n $contrasenya='masterkey';\n $this->conexion = ibase_connect($host, $nombre_usuario, $contrasenya,'UTF-8') or die( ibase_errmsg() );\n}", "function filterTable($query)\n{\n $connect = mysqli_connect(\"testsf321.mysql.database.azure.com\", \"sf321group@testsf321\", \"Tae12345\", \"test\");\n $filter_Result = mysqli_query($connect, $query);\n return $filter_Result;\n}", "public function open()\n {\n $this->conexion= mysqli_connect(\"localhost:3306\",\"root\") or die (msql_error());\n mysqli_select_db($this->conexion, 'alsaplane') or die (msql_error());\n }", "function sqlConnect($database){\n global $defaultDatabase, $rawDepartment, $department, $con; // Connect to the default database if $database is not provided\n if ( $rawDepartment == \"\" ){\n $rawDepartment = $department;\n }\n \n if ( $database == null ){\n $database = $defaultDatabase;\n }\n \n $con = mysqli_connect(\"localhost\",\"svetlana\",\"vH8ymo=nhwM6\",$database);\n if (mysqli_connect_errno($con)){\n \techo \"Failed to connect to MySQL: \" . mysqli_connect_error($con);\n \texit;\n }\n if ( isset($_GET[\"test\"]) ){\n $testNumber = $_GET[\"test\"];\n }\n echo \"<style type='text/css'>.change:hover{text-decoration:underline;cursor:pointer;}</style>\";\n return $con;\n }", "function query($ssql)\n{\n try {\n global $msg;\n $connection = DbConnect();\n $result = $connection->query($ssql);\n if ($connection->errno != 0) {\n echo $connection->error;\n echo \"<br>\" . $connection . \"<br>\" . $ssql;\n exit();\n }\n\n if ($result->num_rows > 0) {\n $DbResult = $result->fetch_all();\n }\n\n $msg = getMessageFromOperationResultToDatabase($connection);\n $connection->close();\n return $DbResult;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n}", "public function connToDB(){\n $this->conn=new mysqli(\"localhost\",\"root\",\"SQLroot\",\"Dispensary\");\n if(($this->conn)->connect_error){\n return 0;\n }\n }", "public function sql_select_db() {}", "public function sql_select_db() {}", "function dbconnect()\n\t{\n\t\t$dbConnString = \"host=173.254.28.90 options='--client_encoding=UTF8' user=feedmati_user dbname=feedmati_system password=PZi0wuz9n+XX\";\n\t\t$dbConn = pg_connect($dbConnString ) or die(\"Problem with connection to PostgreSQL:\".pg_last_error());\n\t\treturn $dbConn;\n\t}", "function dbConections () {\r\n $conexion = null; \r\n \r\n // Se inicializa variable a nul\r\n $hostname = \"BRANDONANSWER\\SQLANSWER\"; \r\n \t// Nombre del Servidor SQL Server\\Instancia, puerto\r\n // $port = 1433; \r\n // no siempre lo usa\r\n $dbname = \"tutores_ut\"; \r\n \t // Nombre de la BD\r\n //$username = \"brand\"; \r\n \t // Usuario de la BD\r\n $pw = \"\"; \r\n try {\r\n $conexion = new PDO (\"sqlsrv:Server=\".$hostname.\";Database=\".$dbname.\";Encrypt=false\"); // Se ejecutan los parametros\r\n //$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n \t }\r\n \t \r\n \t \r\n catch(PDOException $e){\r\n $msgErrorSQL = \"<div style='display:table-cell; vertical-align:middle; text-align:center'>\";\r\n $msgErrorSQL .= \"<img src='images/DB-conexion-error.png'><br />\";\r\n $msgErrorSQL .= \"La Conexión SQL Server no se pudo establecer.<br />\";\r\n $msgErrorSQL .= \"Informe al Administrador del Sistema. <br />\";\r\n $msgErrorSQL .= \"Failed to get DB handle: \" . $e->getMessage() . \"\\n\";\r\n $msgErrorSQL .= \"</div></br>\";\r\n \techo $msgErrorSQL;\r\n exit; \r\n }\r\n return $conexion;\r\n \t}", "function connectSQL(){\n\n//MySQL default credentials\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n\n// Create connection\n $conn = new mysqli($servername, $username, $password);\n\n// Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n echo \"Connected successfully\";\n\n return $conn;\n}", "function dbConnect(){\n\t$host = \"localhost\"; // for uta.cloud server, \"localhost\" is the host name. Do not edit.\n\t$user = \"egsutacl_egs3925\"; // put your own user name here.\n\t$pwd = \"Es*2802*\"; // put your own database password here\n\t$database = \"egsutacl_4350\"; // put your database name here\n\t$port = \"3306\"; // server-specific. For uta.cloud, the port number is 3306 (the default port)\n\n\t/* Initiate a new mysqli object to connect to the Database. Store the mysqli object in a variable $conn. */\n\t$conn = new mysqli($host, $user, $pwd, $database, $port) or die(\"could not connect to server\");\n\n\t// return $conn to the fucntion call\n\treturn $conn;}", "function connection_test($con, $mysql_table, $pname)\n{\n\t$result = mysql_query(\"SELECT * FROM $mysql_table WHERE p_name = '$pname' \");\n\twhile($row = mysql_fetch_array($result))\n\tif ($row <= 0)\n\t\t{\n\t\techo \"1,Could not comunicate with database. Double check your settings and ask your web host for help.\";\n\t\t}\n\telse\n\t\t{\n\t\techo \"Connection test was OK!\";\n\t\t}\n}", "function koneksi() \n{\n $conn = mysqli_connect(\"localhost\", \"pw20153_pw203040153\", \"gP[](Fkl--3L\");\n mysqli_select_db($conn, \"pw20153_tubes_203040153\");\n\n return $conn;\n}", "function SendSQLCMD($db, $sql)\n {\n \t$result = $db->query($sql);\n if ($result==true) {\n //echo \"Command successfull<br>\";\n } else {\n echo \"Commnd fail: \" . $db->error.\"<br>\";\n exit;\n }\n return $result;\n }", "function db_connect() {\r\n $conn = new mysqli('localhost','shadow_admin', 'passwd', 'shadow');\r\n if (!$conn) {\r\n throw new Exception ('Could not connect to database server.');\r\n } else {\r\n $result = $conn->query(\"set names utf8\");\r\n\t\t\t$conn->autocommit(TRUE);\r\n return $conn;\r\n }\r\n }", "function connect()\r\n {\r\n $this->db = mysqli_connect(\"localhost\", \"root\", \"\", \"gtamasterserver\");\r\n\r\n if(!$this->db)\r\n {\r\n echo \"Failed to connect to database\";\r\n exit();\r\n }\r\n\t\t\r\n\t\theader(\"X-Powered-By: PHP/\" . phpversion() . \" & gtamasterserver/1.1\");\r\n }", "function db(){\n\t$sv = \"db425111171.db.1and1.com\";\n\t$un = \"dbo425111171\";\n\t$conn = new mysqli($sv, $un, \"PASSWORD\", \"db425111171\");\n\tif ($conn->connect_error) die(\"Could not connect to database: \" . $conn->connect_error);\n\treturn $conn;\n}", "function getVboxDBConnection()\n{\n $mysqlcon = new mysqli(VBOXLITEDB_SERVER,VBOXLITEDB_USER_NAME,VBOXLITEDB_USER_PASSWORD,VBOXLITEDB_NAME);\n\n if ($mysqlcon->connect_errno) {\n\n errorlog_withlevel(\"Failed to connect to MySQL: (\" . $mysqlcon->connect_errno . \") \" . $mysqlcon->connect_error,1);\n return false;\n }\n\n $mysqlcon->set_charset(\"utf8\");\n\n return $mysqlcon;\n}", "function connect_database() {\n // Basic settings\n $sql_engine = \"MySQL\";\n $sql_server = \"localhost\";\n $sql_user = \"temploggning\";\n $sql_passw = \"temploggning\";\n $sql_database = \"temploggning\";\n\n // Setup connection\n $connection = new mysqli($sql_server, $sql_user, $sql_passw, $sql_database);\n\n if ($connection->connect_errno > 0) {\n die('Unable to connect to database [' . $connection->connect_error . ']');\n }\n\n return $connection;\n}", "function db_connect()\n\t{\t\n\t\tini_set('display_errors', 'On');\n\t\t$hostname = 'oniddb.cws.oregonstate.edu'; \n\t\t$dbname = 'gonsalvj-db';\n\t\t$username = 'gonsalvj-db';\n\t\t$password = 'PAKum3uAIPOc0WJY';\n\t\n\t\t$mysqli = new mysqli($hostname,$dbname ,$password,$username);\n\t\tif($mysqli->connect_errno){\n\t\t\techo \"Connection error \" . $mysqli->connect_errno . \" \" . $mysqli->connect_error;\n\t\t}\t\n\t\treturn $mysqli;\n\t}", "function getDB(){\r\n $servername = DB_SERVER;\r\n $username = DB_USERNAME;\r\n $password = DB_PASSWORD;\r\n $dbname = DB_DATABASE;\r\n// Create connection\r\n$conn = new mysqli($servername, $username, $password,$dbname);\r\n// Check connection\r\nif ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n$conn->query(\"SET character_set_results=utf8\"); // สำหรับแปลงค่าภาษาไทยให้ db อ่านได้\r\n$conn->query(\"SET character_set_client=utf8\"); // สำหรับแปลงค่าภาษาไทยให้ db อ่านได้\r\n$conn->query(\"set names utf8\");\r\n//echo \"Connected successfully\";\r\nreturn $conn;\r\n}", "function sambung(){\r\n\t$con=mysql_connect(\"localhost\",\"rail\",\"\") or die(mysql_error());\r\n\tmysql_select_db(\"billing\",$con) or die(mysql_error());\r\n}", "public function connect()\n { try{\n\n //$this->conn = pg_connect(\"host=localhost dbname=postgres user=postgres password=siem\");\n $this->conn = pg_connect(\"host=db dbname=siem2013 user=siem2013 password=fabiofernando\");\n\n }catch(Exception $e){\n return false;\n } \n if (!$this->conn) {\n return false;\n }\n $query = \"set schema 'explicafeup';\";\n pg_exec($this->conn, $query);\n return true;\n }", "function f_sqlConnect($dbhost, $user, $pass, $db) {\r\n $link = mysqli_connect($dbhost, $user, $pass);\r\n if (mysqli_connect_errno()) {\r\n printf(\"Database connection failed: %s\\n\", mysqli_connect_error());\r\n exit();\r\n }\r\n $db_selected = mysqli_select_db($link, $db);\r\n if (!$db_selected) {\r\n die('Can\\'t use ' . $db . \": \" . mysqli_error());\r\n }\r\n return $link;\r\n}", "function connect() {\n\t\t$user = \"\";\n\t\t$password = \"\";\n\t\t$database = \"\";\n\t\tmysql_connect(localhost, $user, $password);\n\t\t@mysql_select_db($database) or die(\"Unable to select database\");\n\t\t$message .= \"Database OK\\n\";\n\t}", "function db_connect()\r\n\r\n\r\n\r\n{\r\n\r\n\r\n\r\n\t$conn = @new mysqli(HOSTNAME, MYSQLUSER, MYSQLPASS, MYSQLDB);\r\n\r\n\r\n\r\n\tif($conn -> connect_error) {\r\n\r\necho \"error\";\r\n\r\n\t\tdie('Connect Error: ' . $conn -> connect_error);\r\n\r\n\r\n\r\n\t}\r\n\r\n\r\n\r\n\treturn $conn;\r\n\r\n\r\n\r\n}", "function connect () {\n $this->link = mysql_connect(\"localhost\", \n \"homescape_test\", \n \"homescape_test\")\n or die(\"Could not connect : \" . mysql_error());\n\n // echo \"Connected successfully\";\n\n mysql_select_db(\"homescape_test\") \n or die(\"Could not select database\");\n }", "function connect_server()\n\t{\n\t\t// server : localhost\n\t\t// user name : root\n\t\t// password : mysql\n\t\t// database : inet_php45\n\t\t$link = mysqli_connect(\"localhost\", \"root\", \"mysql\", \"inet_php45\");\n\n\t\t// kiểm tra kết nối\n\t\tif (mysqli_connect_errno()) {\n\t\t\techo \"ket noi khong thanh cong\";\n\t\t\texit;\n\t\t}\n\n\t\treturn $link;\n\t}", "function connect() {\r\n $dbhost = 'localhost:3306';\r\n $dbuser = 'root';\r\n $dbpass = '';\r\n\r\n\r\n//connect to MySQL\r\n $link = mysqli_connect($dbhost, $dbuser, $dbpass);\r\n if (!$link) {\r\n die('Could not connect to MySQL:' . mysqli_errno($link));\r\n }\r\n\r\n\r\n//select MyEvents database\r\n $retval = mysqli_select_db($link, 'myevents');\r\n if (!$retval) {\r\n die('Could not select database:' . mysqli_errno($link));\r\n }\r\n\r\n\r\n return $link;\r\n}", "function koneksi() {\n $conn = mysqli_connect(\"localhost\", \"root\", \"\");\n mysqli_select_db($conn, \"pw_tubes_203040051\");\n\n return $conn;\n }", "function show_hotel_booking()\r\n\t{\t\r\n\t\t$dbhandle = $this->mssqldb_connect();\r\n\t\tif($dbhandle != false) {\r\n\t\t\t$myDB = \"PortalDB\";\r\n\t\t\t \r\n\t\t\t //select a database to work with\r\n\t\t\t$selected = mssql_select_db($myDB, $dbhandle)\r\n\t\t\t or die(\"Couldn't open database $myDB\"); \r\n\t\t\t$query = \"SELECT * FROM xlwp6_HS\";\r\n\t\t\t// $query = \"SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xlwp6_IT'\";\r\n\t\t\t$result = mssql_query($query,$dbhandle);\r\n\t\t\t$numRows = mssql_num_rows($result); \r\n\t\t\t var_dump(mssql_get_last_message());\r\n\t\t\techo \"<h1>\" . $numRows . \" Row\" . ($numRows == 1 ? \"\" : \"s\") . \" Returned </h1>\"; \r\n\t\t\t//display the results \r\n\t\t\twhile($row = mssql_fetch_array($result))\r\n\t\t\t{\r\n\t\t\t debug($row);\r\n\t\t\t}\r\n\t\t\tmssql_close($dbhandle);\r\n\t\t}\r\n\t}", "function connect(){\n \n $conn = oci_connect('pulse','CamLine4gdl','mestq'); \n if (!$conn) {\n $e = oci_error();\n trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);\n //trigger_error(htmlentities($e['message']), E_USER_ERROR);\n }\n return $conn;\n }", "function sql_connect($options = array()) {\n\t\n\tif( ($sql = var_get('sql/dbConnection')) !== null ){\n\t\treturn $sql;\n\t}\n\n\n\t$options = array_merge(array(\n\t\t'host' => '127.0.0.1',\n\t\t'db' => '',\n\t\t'user' => 'root',\n\t\t'pass' => '',\n\t\t'charset' => 'utf8'\n\t), $options);\n\n\t\n\ttry {\n\t\t$sql = new PDO('mysql:host='.$options['host'].';dbname='.$options['db'], $options['user'], $options['pass']);\n\t}catch (Exception $e){\n\t\treturn false;\n\t}\n\n\tvar_set('sql/options', $options);\n\tvar_set('sql/dbConnection', $sql);\n\t\n\tif( $options['charset'] == 'utf8'){\n\t\tsql_dump($query = 'SET NAMES ' . $options['charset'] . ';');\n\t\t$sql->exec($query);\n\t}\n\n\tsql_dump($query = 'SET CHARACTER SET ' . $options['charset'] . ';');\n\t$sql->exec($query);\n\n\tsql_dump($query = 'USE ' . $options['db'] . ';');\n\t$sql->exec($query);\n\n\t$sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t$sql->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\t\n\t$sql->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);\n\n\treturn $sql;\n}", "function connectToHostDb()\n {\n $this->setDb('host');\n $this->connect();\n if ($this->dbconnect)\n {\n return;\n }\n $this->setDb('postgres');\n $this->connect();\n if (!$this->dbconnect)\n {\n echo \"Error connecting to host postgres database.\\n\";\n echo \"Tried names 'host' and 'postgres'\\n\";\n }\n }", "function koneksi_db() {\n $conn = mysqli_connect (\"localhost\", \"root\", \"\");\n mysqli_select_db ($conn, \"pw_tubes_203040093\");\n\n return $conn;\n }", "public function openConnection(){\n\n $this->conn = null;\n\n // for non PDO Connection:\n $serverName = \"tcp:\" . $this->host . \",\" . $this->port;\n $connectionOptions = array(\"Database\"=>$this->db_name,\"Uid\"=>$this->username, \"PWD\"=>$this->password);\n\n // for PDO Connection:\n// $serverName = \"tcp:$this->host,$this->port\";\n $serverName = \"tcp:$this->host,$this->port\";\n $connectionString = \"sqlsrv:server=$serverName; Database=$this->db_name\";\n\n try{\n// $this->conn = sqlsrv_connect($serverName, $connectionOptions);\n $this->conn = new PDO( $connectionString, $this->username, $this->password);\n\n if($this->conn == false){\n die(FormatErrors(sqlsrv_errors()));\n }\n }catch(Exception $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return $this->conn;\n }", "public function benchConnectAndDisconnect(){\n $conn = SqlsrvUtil::connect();\n SqlsrvUtil::disconnect( $conn );\n }", "function connectToBase()\r\n\t{\r\n\t $link = mysqli_connect(APP_BDD_ADDRESSE, APP_BDD_USER, APP_BDD_PASSWORD); \r\n\t mysqli_select_db($link, APP_BDD_BASE) ;\r\n\t}", "function getDatabase() {\n \n /* PHP script runs local or remote. Database server remote */\n /* \n *********************************************************************************\n BE SURE TO CHANGE THIS TO USE YOUR OWN dbname, user name and password! \n \n dbname: se266_[firstname]\n DB_USER: se266_[firstname]\n\t DB_PASSWORD: studentidwithoutleadingzeroes\n \t\n ********************************************************************************* \n */\n $config = array(\n 'DB_DNS' => 'mysql:host=127.0.0.1;port=3306;dbname=se266_erick',\n 'DB_USER' => 'root',\n 'DB_PASSWORD' => ''\n );\n \n \n /* PHP script runs local. Database Server local */\n \n /*$config = array(\n 'DB_DNS' => 'mysql:host=127.0.0.1;port=3306;dbname=se266_erick;',\n 'DB_USER' => 'root',\n 'DB_PASSWORD' => ''\n );*/\n /* Create a Database connection and save it into the variable */\n \n try {\n $db = new PDO($config['DB_DNS'], $config['DB_USER'], $config['DB_PASSWORD']);\n $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (Exception $ex) {\n echo $ex->getMessage();\n $db = null;\n }\n \n return $db;\n}", "function connectDb()\n{\n //$connect_query = 'host=localhost user=zeng dbname=bookdb_1981117';\n $conn = pg_connect('host=localhost port=5432 dbname=bookdb_1981117 user=postgres password=angels');\n if ($error = pg_last_error($conn)) {\n\n print $error;\n };\n\n return $conn;\n}", "function conexion()\n{\n /*$con= mysql_connect(\"localhost\",\"root\",\"\");\n mysql_select_db(\"bd_conal_\",$con);*/\n $con=mysql_connect(\"conaldb.db.12058720.hostedresource.com\",\"conaldb\",\"nC15@ags\");\n mysql_select_db(\"conaldb\",$con);\n date_default_timezone_set(\"Mexico/General\");\n mysql_set_charset('utf8');\n if (!$con) {\n die('No pudo conectarse: ' . mysql_error());\n }\n}", "public function connect(){\n\t\t$this->conn=mysqli_connect($this->host,$this->user,$this->pass); //menghubungkan ke localhost\n\t\tmysqli_select_db($this->conn,$this->database); //menghubungkan ke database\n\t\tif(!$this->conn){ //menghubungkan ke database\n\t\t\treturn die('Maaf, koneksi belum tersambung: '.mysqli_connect_error()); //Maaf,koneksi belum tersambung\n\t\t}\n\t}", "public function connect()\n\t \t{\n\t \t$this->cnn = mysqli_connect($this->hostname,$this->username,$this->pass,$this->dbname);\n\n\n\t \t\tif(!$this->cnn)\n\t \t\t{\n\t \t\t\techo 'ket noi khong thanh cong';\n\t \t\t}\n\t \t\telse {\n\t \t\t\t\n\t \t\t}\n\n\t \t\t // echo '<script> alert(\"Connection success\");</script>';\n\t\t \t}", "public function connect()\n {\n $this->connection = new mysqli(\"localhost\", \"mid2\", \"mid2\", \"ds9\");\n if ($this->connection->connect_error) {\n die(\"Connection failed: \" . $this->connection->connect_error);\n }\n }", "function startDatabase() {\n $link = mysql_connect('mysql.hostinger.com.br','u187390300_root','u187390300');\n if (!$link) {\n die('Not connected to MySQL: ' . mysql_error());\n }\n \n // Seleciona, abre e entra no database correto\n $db_selected = mysql_select_db('u187390300_engli', $link);\n if (!$db_selected) {\n die ('Not connected to Englishware database: ' . mysql_error());\n }\n}", "public function connect()\n {\n $this->conn = mysqli_connect($this->host, $this->user , $this->password , $this->database);\n if (!$this->conn) {\n // die(\"<br> Connection failed: \" . mysqli_connect_error());\n } else {\n // echo \"<br> connected successfuly\";\n }\n\n }", "function connectToDatabase()\n{\n include('info.php');\n $conn = mysql_connect($dbhost, $dbuser, $dbpass);\n if(! $conn ) {\n die('Could not connect: ' . mysql_error());\n }\n \n mysql_select_db('dbms');\n //echo 'Connected successfully';\n return $conn;\n}", "function OpenCon() {\n $dbhost = \"\";\n $dbuser = \"\";\n $dbpass = \"\";\n if($_SERVER['SERVER_NAME'] == \"localhost\"){\n $dbhost = \"localhost\";\n $dbuser = \"root\";\n $dbpass = \"root\";\n }\n else{\n $dbhost = \"db.cs.dal.ca\";\n $dbuser = \"aio\";\n $dbpass = \"ge7ochooCae7\";\n }\n $db = \"aio\";\n $conn = new mysqli($dbhost, $dbuser, $dbpass, $db) or die(\"Connect failed: %s\\n\". $conn -> error);\n return $conn;\n }", "function MY_Help_helper(){\n\n $servername = \"mysql57\";\n $username = \"root\";\n $password = \"Ni5ssfrpZrZ7XRM5dCJkF3Yb898qKEU\";\n// Create connection\n $conn = mysqli_connect($servername, $username, $password);\n// Check connection\n if (!$conn) {\n     die(\"Connection failed: \" . mysqli_connect_error());\n }\n echo \"Connected successfully\";\n}", "public function ConectarBDD(){\r\n $this->conexion=pg_connect('dbname=sanjuanitas user=DBA password=12345678');\r\n if(!$this->conexion){\r\n echo json_encode(\"Error al intentar conectar la base de datos\");\r\n }\r\n }", "function dataBaseConnect(hostName,userName,password,dbName){\n $servername =hostName; // database hostname\n $username = userName; // database username\n $password = password; // database password\n $dbName = dbName; // database name\n\n // Create connection to database\n $connection = new mysqli($servername, $username, $password,$dbName);\n\n // Check database connection\n if ($connection->connect_error) {\n die(\"Connection failed: \" . $connection->connect_error);\n }", "function ConnectDB(){\n \n $link = mysqli_connect('localhost', 'admin', 'P@ssw0rd', 'travelexperts');\n if (!$link){\n print(\"There was an error connecting:\". mysqli_errno($link) . \" -- \" . mysqli_error($link));\n exit;\n }\n return $link;\n }", "function selectConnectionString(){\n define(\"sHOST\", \"HOST\");\n define(\"sUSER\", \"sUSER\");\n define(\"sPASS\", \"sPASS\");\n define(\"sDB\", \"sDB\");\n $connection = mysqli_connect(sHOST, sUSER, sPASS);\n if (!$connection) {\n trigger_error(\"Could not reach database!<br/>\");\n include(\"logs/logsMail-1dir.php\");\n exit();\n }\n $db_selected = mysqli_select_db($connection, sDB);\n if (!$db_selected) {\n trigger_error(\"Could not reach database!<br/>\");\n include(\"logs/logsMail-1dir.php\");\n exit();\n } \n return $connection;\n }" ]
[ "0.75274545", "0.6930887", "0.68080163", "0.67765397", "0.66802174", "0.6568066", "0.6501982", "0.6423329", "0.6401815", "0.6387465", "0.63523215", "0.63277173", "0.62218636", "0.61079603", "0.60929745", "0.60575247", "0.6050017", "0.6035848", "0.6013343", "0.6011767", "0.6002873", "0.5976991", "0.5953694", "0.5935371", "0.5920885", "0.59127295", "0.59112924", "0.5880402", "0.5880402", "0.5848777", "0.58412004", "0.5837918", "0.5787899", "0.5740729", "0.5732817", "0.57138926", "0.5701041", "0.56940264", "0.5689764", "0.5689426", "0.56745684", "0.56743675", "0.5672265", "0.56655943", "0.56585747", "0.5657362", "0.5653345", "0.5638791", "0.56234837", "0.5622973", "0.5620197", "0.56196654", "0.561032", "0.56022274", "0.5601906", "0.5588864", "0.5583688", "0.55795956", "0.5573705", "0.55705976", "0.55655545", "0.5563803", "0.5559229", "0.5552969", "0.5542817", "0.5540603", "0.5532095", "0.55214524", "0.5516767", "0.5514978", "0.55137336", "0.55101377", "0.5509433", "0.55068815", "0.5506576", "0.5480639", "0.54660875", "0.5461372", "0.54584575", "0.5458236", "0.54580694", "0.5451417", "0.54452807", "0.5441827", "0.54412776", "0.5438923", "0.5433526", "0.5430961", "0.5430375", "0.5430333", "0.5426155", "0.54197645", "0.54151547", "0.54118764", "0.54098713", "0.54057264", "0.5404019", "0.5397536", "0.5396606", "0.5394871", "0.5394778" ]
0.0
-1
Handles user login form. Uses PDO class to securely query database verifying if username and password exists.
public static function authenticate($user) { $db = DB::getInstance(); $resp = ""; try { $query = $db->prepare("SELECT * FROM `users` WHERE username=?"); $query->execute([$user['username']]); if ($row = $query->fetch(PDO::FETCH_ASSOC)) { $password = $row['password']; $ver = self::verifyPassword($user['password'], $password); $resp = ( $ver == TRUE ? json_encode($row) : json_encode($ver) ); } else { error_log("Problem with query"); } } catch (Exception $e) { $db->rollBack(); $resp = $e->getMessage(); } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function login(){\n\t\tif (empty($_POST['username'])) {\n\t\t\t$this->errors[] = \"Username field was empty.\";\n } elseif (empty($_POST['password'])) {\n $this->errors[] = \"Password field was empty.\";\n } elseif (!empty($_POST['username']) && !empty($_POST['password'])) { \n\t\t\t$this->username = filter_var($_POST['username'], FILTER_SANITIZE_STRING);\t\t\t\n \t\n\t\t\t//prepared statement to login user\n\t\t\t$sel = \"SELECT * FROM users WHERE username = ? OR email = ? \";\n \tif($stmt = $this->connection->prepare($sel)){\n \t\t$stmt->bind_param(\"ss\", $this->username, $this->username);\n \t\t$stmt->execute();\n \t\t//$stmt->bind_result();\n \t\t$res = $stmt->get_result();\n \t\t$user_info = $res->fetch_object();\n \t}\n\t\t\t\t\t\t\t\t\t\n\t\t\tif (password_verify($_POST['password'], $user_info->password)) {\n\t\t\t\t$_SESSION['username'] = $user_info->username;\n\t\t\t\t$_SESSION['email'] = $user_info->email;\n\t\t\t\t$_SESSION['user_login_status'] = 1;\n\t\t\t} else if(empty($user_info)){\n\t\t\t\t$this->errors[] = \"Wrong User name. Please try again\";\n\t\t\t} else {\n\t\t\t\t$this->errors[] = \"Wrong password. Please try again\";\n\t\t\t}\n\t\t}\n\t}", "function handle_login_form(){\n\t\t# whatever the form is going to do, you will always check that the login button was pressed first before continuing\n\t\t$login_btn_clicked = isset($_POST[\"login-btn\"]);\n\t\tif($login_btn_clicked != true){\n\t\t\treturn false;\n\t\t}\n\n\t\t# this code will only execute if the login button was clicked\n\t\t# since the login button was clicked we know that the username and password post variables are set\n\t\t# store the value of those post variables for convenience\n\t\t$username = $_POST['username'];\n\t\t$password = $_POST['password'];\n\n\t\t# attempt to login\n\t\t# if login is successful > store username, primary key in session \n\t\t# if login failed, indicate that to user\n\t\tif($db_id = login($username, $password)){\n\t\t\thandle_login_successful($db_id, $username);\n\t\t} else {\n\t\t\thandle_login_failure();\n\t\t}\n\t\treturn true;\n\t}", "private function processFormLogin(){\n\t\t$username = $_REQUEST[\"usuario\"];\n\t\t$password = $_REQUEST[\"password\"];\n\t\t$validar = $this->users->getProcessUser($username, $password);\n\t\tif($validar){\n\t\t\tif (Seguridad::getTipo() == \"0\")\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t\telse\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t} else {\n\t\t\t$data[\"informacion\"] = \"Nombre de usuario o contraseña incorrecta.\";\n\t\t\tView::show(\"user/login\", $data);\n\t\t}\n\t}", "public function validateLogin() {\n if (isset($_POST['submit'])) {\n $errors = array();\n\n $required_fields = array('username', 'password');\n $errors = array_merge($errors, checkRequiredFields($required_fields));\n\n $username = trim($_POST['username']);\n $password = trim($_POST['password']);\n\n if (empty($errors)) {\n $conn = CTSQLite::connect();\n\n\n //check database if user and password exist\n $query = \"SELECT id, username ,role \";\n $query .= \"FROM ic_user \";\n $query .= \"WHERE username = '{$username}' \";\n $query .= \"password = '{$password}' \";\n $query .= \"LIMIT 1\";\n\n $result = $conn->query($query);\n confirm_query($result);\n\n if (sqlite_num_rows($result) == 1) {\n $user = $result->fetchArray();\n $role = $user['role'];\n CT::user()->setRole($role);\n }\n } else {\n if (count($errors) == 1) {\n // 1 error ocurred\n $message = \"There was 1 error in the form\";\n } else {\n //more than 1 error occured\n $message = \"There were\" . count($errors) . \"errors in the form\";\n }\n }\n } else {\n //form has not been submitted\n }\n }", "public function handleLogin( ){\n\t\t// Filter allowed data\n\t\t$data = Request::only([ 'uid', 'password' ]);\n\n\t\t// Validate user input\n\t\t$validator = Validator::make(\n\t\t\t$data,\n\t\t\t[\n\t\t\t\t'uid' => 'required',\n\t\t\t\t'password' => 'required',\n\t\t\t]\n\t\t);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$data[$key] = $this->sanitizeLDAP( $value );\n\t\t}\n\n\t\tif($validator->fails()){\n\t\t\t// If validation fails, send back with errors\n\t\t\treturn Redirect::route('login')->withErrors( $validator )->withInput( );\n\t\t}\n\n\t\tif( Auth::attempt( [ 'uid' => $data['uid'], 'password' => $data['password']], true ) ){\n\t\t\t// If login is successful, send them to home\n\t\t\treturn Redirect::route( 'home' );\n\t\t} else {\n\t\t\t// Otherwise, tell them they're wrong\n\t\t\treturn Redirect::route( 'login' )\n\t\t\t\t\t\t ->withErrors([ \n\t\t\t\t\t\t\t\t'message' => 'I\\'m sorry, that username and password aren\\'t correct.' \n\t\t\t\t\t\t\t]);\n\t\t}\n\n\t\treturn Redirect::route( 'login' )->withInput( );\n\t}", "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 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 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 authenticate() {\n\t\t \n\t\t$db = db_connect();\n $query= \"SELECT * FROM users WHERE username=:username AND password=:password\";\n $statement=$db->prepare($query);\n $statement->execute(array(\n 'username' => $_POST['username'],'password' => $_POST['password']\n ));\n $count=$statement->rowCount();\n if($count>0){\n $_SESSION['username']=$_POST['username'];\n $_SESSION['is authenticated']= true;\n\t\t}\n }", "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 }", "function login(){\n\t\tif(isset($_POST['login'])){//if login button pressed\n\t\t\t$userTable= new Table('users');//new table created\n\t\t\t$user= $userTable->findInDatabase('user_username', $_POST['username']);//querying users table\n\t\t\tif($user->rowCount()>0){//if data available\n\t\t\t\t$data=$user->fetch();//fetch data\n\t\t\t\tif (password_verify($_POST['password'], $data['user_password'])){//if password matches\n\t\t\t\t\t$_SESSION['session_id']=$data['user_id'];//session variable is set\n\t\t\t\t\t$_SESSION['type']=$data['user_type'];//session variable is set\n\t\t\t\t\t$_SESSION['fullname']=$data['user_firstname'].\" \".$data['user_lastname'];//session variable is set\n\t\t\t\t\theader(\"Location:index.php\");//redirect to another page\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<script> alert(\"Password is incorrect\"); </script>';//js alert is shown\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo '<script> alert(\"Username is incorrect\"); </script>';//js alert for username incorrect\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 }", "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 }", "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 loginForm(){\n self::$loginEmail = $_POST['login-email'];\n self::$loginPassword = $_POST['login-password'];\n \n self::sanitize();\n $this->tryLogIn();\n }", "public function login()\n {\n if (isset($_POST['username']) && isset($_POST['password'])) {\n return $this->_check_login();\n }\n return $this->_login_form();\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 login()\n {\n $username = $this->getAttribute('username');\n\n $this->_user = $this->db->select(Db::TABLE_USER, array(\n 'username' => $username,\n 'password' => UserAuth::hash(\n $this->getAttribute('password')\n ),\n ));\n\n if(!empty($this->_user)) {\n\n $identity = new UserAuth();\n $identity->login($username);\n\n return true;\n } else {\n $this->addError('password','Incorrect username or password');\n }\n\n return false;\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 checkUser()\n {\n // Prepare ids used to avoid SQL injections(bad code)\n // we store them in the var $sql\n // we select the id and password from the table users where the username equals what was put it\n $sql = $this->db->prepare('SELECT id, password FROM admin WHERE username = ?');\n // Then we bind the parameters, its a string so we use 's', then we execute the statment\n $sql->bind_param('s', $_POST['username']);\n $sql->execute();\n // Now we store the results\n $sql->store_result();\n\n //if the returned rows are greater then 0\n // we bind the results the variblesand then fetch them \n if ($sql->num_rows > 0) {\n $sql->bind_result($id, $password);\n $sql->fetch();\n // If the rows are more then 0 we know the account name exist, now lets check the password!\n // we werify our hashed password if user name and password are right we create a new session\n // Note: remember to use password_hash in your registration file to store the hashed passwords.\n if (password_verify($_POST['password'], $password)) {\n // new session created with a var for being loged in set to true\n //the name is equal to the name from the field\n // and the id is equal to the users id\n session_regenerate_id();\n $_SESSION['loggedin'] = TRUE;\n $_SESSION['person'] = $_POST['username'];\n $_SESSION['id'] = $id;\n } else {\n // Incorrect password\n echo 'Wrong username or password';\n }\n } else {\n // wrong credentials\n echo 'Wrong username or password';\n }\n//we close the prepared statment\n $sql->close();\n }", "public function login_user()\n\t{\n\t\t$form_filled = true;\n\n\t\t//a way to set default values\n\t\tif (isset($_POST['username']) && $_POST['username'] != \"\") \n\t\t{\n\t\t\t$username = $_POST[\"username\"];\n\t\t} else\n\t\t{\n\t\t\t$username = \"\";\n\t\t\t$form_filled = false;\n\t\t}\n\t\tif (isset($_POST['password']) && $_POST['password'] != \"\") \n\t\t{\n\t\t\t$password = $_POST[\"password\"];\n\t\t} else\n\t\t{\n\t\t\t$password = \"\";\n\t\t\t$form_filled = false;\n\t\t}\n\n\t\tif ($form_filled)\n\t\t{\n\t\t\t$table = $this->getTableFormat(\"users\");\n\t\t\t$results = DB::query(\"SELECT id, username, password FROM $table\");\n\t\t\tforeach ($results as $row) {\n\t\t\t\tif ($row['username'] == $username)\n\t\t\t\t{\n\t\t\t\t\tif (password_verify($password, $row['password']))\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo \"Login Correct\";\n\t\t\t\t\t\t$logged_in = true;\n\t\t\t\t\t\t//$_SESSION['user'] = $row['id'];\n\n\t\t\t\t\t\t/*Add login to logins table*/\n\t\t\t\t\t\t$userid = $row['id'];\n\t\t\t\t\t\t$userip = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t\t\t\t\t$userip2 = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$userip2 = $userip;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$current_time = time();\n\t\t\t\t\t\t$table = $this->getTableFormat(\"logins\");\n\t\t\t\t\t\tDB::insert($table, array(\n\t\t\t\t\t\t 'userid' => $userid,\n\t\t\t\t\t\t 'user_ip' => $userip,\n\t\t\t\t\t\t 'user_ip_2' => $userip2,\n\t\t\t\t\t\t 'last_action' => $current_time\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\t//now, lets get the id of the session, hash it, and save it in the session variable\n\t\t\t\t\t\t$login_results = DB::query(\"Select * FROM $table\");\n\t\t\t\t\t\tforeach ($login_results as $i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($i['userid'] == $userid && $i['user_ip'] == $userip && $i['user_ip_2'] == $userip2 && $i['last_action'] == $current_time) {\n\t\t\t\t\t\t\t\t//echo \"found the record\";\n\t\t\t\t\t\t\t\t$_SESSION['user'] = hash('ripemd160', $i['id']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t//echo \"Username or Password not correct\";\n\t\t\t\t\t$logged_in = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function handleLogin(){\n $username = htmlentities(trim($_POST['username']));\n $password = htmlentities(trim($_POST['password']));\n $loginSebagai = htmlentities(trim($_POST['login_sebagai']));\n\n $loginResult = WebDb::handleLogin($username,$password, $loginSebagai);\n\n if(!$loginResult) {\n Session::set(\"login_gagal\",\"Username atau password salah\");\n header(\"Location: /it-a\");\n die();\n }\n Session::set(\"user_id\",$username);\n Session::set(\"login_sebagai\",$loginSebagai);\n header(\"Location: /it-a/dashboard\");\n }", "public function login() {\n $this->FormHandler->setRequired('employeeCode');\n $this->FormHandler->setRequired('employeePassword');\n\n\n if ($this->FormHandler->run() === true) {\n $employeeCode = $this->FormHandler->getPostValue('employeeCode');\n $employePassword = $this->FormHandler->getPostValue('employeePassword');\n if ($this->User->checkLoginCredentials($employeeCode, $employePassword) === true) {\n // Log them in and redirect\n $this->User->loginClient($_SESSION, $employeeCode);\n redirect('employee/dashboard');\n }\n }\n else if ($this->User->checkIfClientIsLoggedIn($_SESSION) === true) {\n redirect('employee/dashboard');\n }\n\n loadHeader();\n include APP_PATH . '/view/user/login.php';\n loadFooter();\n }", "function memberLoginHandler() {\n global $inputs;\n\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'select * from `member` where name = ? and password = ?';\n $res = getOne($sql, [$username, $password]);\n\n if (!$res) {\n formatOutput(false, 'username or password error');\n } else {\n setMemberLogin($res['id']);\n formatOutput(true, 'login success', $res);\n }\n}", "function processLogin($username = '', $password = '')\n{\n\t// globals\n\tglobal $db;\n\n\t// if either input is false, stop\n\tif (empty($username)\n\t\t|| empty($password)\n\t){\n\t\treturn false;\n\n\t} // end if (empty($username) || empty($password))\n\n\t// get user\n\t$user = $db->fetch(\"select * from `employees` where `email`='\" . $db->escape($username) . \"' limit 1;\", 'row');\n\n\t// if we have a user continue\n\tif (!empty($user))\n\t{\n\t\t// build and compare passwords\n\t\t$nonce = strtolower($user['first_name'].$user['last_name']);\n\n\t\t// generate password hash\n\t\t$passwordHash = generatePasswordHash($password, $nonce);\n\n\t\t// compare\n\t\tif ($user['password'] === $passwordHash)\n\t\t{\n\t\t\t// user is valid\n\t\t\tsetLoginCookies($user['id']);\n\n\t\t\t// reload\n\t\t\theader(\"Location: /\");\n\n\t\t} // end if ($user['password'] === $passwordHash)\n\n\t} // end if (!empty($user))\n\n}", "public function logUser()\n {\n $naam = !empty($_POST['naam']) ? trim($_POST['naam']) : null;\n $wachtwoord= !empty($_POST['wachtwoord']) ? trim($_POST['wachtwoord']) : null;\n\n //De database gegevens (tables en colums) worden aan een variable toegevoegd\n $sql = \"SELECT user_id, naam, wachtwoord FROM users WHERE naam=:naam\";\n\n //De connectie met de database wordt aan een variable toegevoegd.\n $stmt = DB::get()->prepare($sql);\n\n //De ingevulde value worden gebruikt om de username te controleren in de volgende if statement.\n $stmt->bindValue(':naam', $naam);\n $stmt->execute();\n\n //Haalt de bijbehorende username op\n $user = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //Controleert of de ingevulde username en wachtwoord overeenkomen met degene uit de database\n if($user === false)\n {\n header(\"Location: login.php?wrongcombination\");\n exit();\n } else\n {\n //Voeg de ingevulde value toe aan de variable $validPassword\n $validPassword = password_verify($wachtwoord, $user['wachtwoord']);\n\n //Controleert of de ingevulde wachtwoord overeenkomt met de hash in de database.\n if($validPassword)\n {\n $_SESSION['id'] = $user['user_id'];\n $_SESSION['logged_in'] = time();\n\n header(\"Location: userpage.php?login=success\");\n exit();\n }\n }\n }", "public function login(){\n\t\t\trequire_once(MODEL.\"ProcessAccount.php\");\n\t\t\t$this->model = new ProcessAccount();\n\t\t\t//Make sure username and password not empty\n\t\t\tif(!empty($_POST[\"username\"]) && !empty($_POST[\"password\"])){\n\t\t\t\t//Check exist account\n\t\t\t\tif($this->model->checkAccount($_POST['username'],$_POST['password'])){\n\t\t\t\t\t//Make seesion to account \n\t\t\t\t\t$this->model->getInfo($_POST['username'],$_POST['password']);\n\t\t\t\t}else{\n\t\t\t\t\t$error = \"Wrong username or password\";\n\t\t\t\t\t$this->view->render('admin/login.php',$error);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function authUser()\n {\n //я не знаю почему, что эти функции возвращают пустые строки...\n //$login = mysql_real_escape_string($_POST['login']);\n //$password = mysql_real_escape_string($_POST['password']);\n $login = $_POST['login'];\n $password = $_POST['password'];\n if(DBunit::checkLoginPassword($login, $password)){\n DBunit::createUserSession(DBunit::getUser($login, $password));\n return true;\n }\n else {\n return false;\n }\n }", "function Login(){\r\n if(empty($_POST['UuserName'])){\r\n $this->HandleError(\"UserName is empty!\");\r\n return false;\r\n }\r\n \r\n if(empty($_POST['UPswd'])){\r\n $this->HandleError(\"Password is empty!\");\r\n return false;\r\n }\r\n \r\n $username = trim($_POST['UuserName']);\r\n $password = trim($_POST['UPswd']);\r\n \r\n if(!isset($_SESSION)){ session_start(); }\r\n\t\t\r\n if(!$this->CheckSessionInDB($username, $password)){\r\n return false;\r\n }\r\n \r\n $_SESSION[$this->GetLoginSessionVar()] = $username;\r\n \r\n return true;\r\n }", "public function authUser(){\n\t\t\t\n\t\tif($this->view->userTryLogin()){\n\t\t\t\n\t\t \t// UC 1 3: user provides username and password\n\t\t\t$inpName = $this->view->getInputName(false);\n\t\t\t\n\t\t\tif($inpName == null){\n\t\t\t\t$this->view->storeMessage(\"Användarnamn saknas\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t}\n\t\t\t\n\t\t\t$inpPass = $this->view->getInputPassword(false);\n\n\t\t\tif($inpPass == null){\n\t\t\t\t$this->view->storeMessage(\"Lösenord saknas\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t}\n\t\t\t\t\t\n\t\t\t// UC 1 3a: user wants system to keep user credentials for easier login\n\t\t\t$keepCreds = $this->view->keepCredentials();\n\t\t\t\n\t\t\t// UC 1 4: authenticate user...\n\t\t\t$answer = $this->model->loginUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\t\n\t\t\t// UC 1 4a: user could not be authenticated\n\t\t\tif($answer === false){\n\t\t\t\t\n\t\t\t\t// 1. System presents an error message\n\t\t\t\t// 2. Step 2 in main scenario\n\t\t\t\t$this->view->storeUserInput($inpName);\n\t\t\t\t$this->view->storeMessage(\"Felaktigt användarnamn och/eller lösenord\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif($keepCreds){\n\t\t\t\t\t\n\t\t\t\t\t// UC 1 3a-1: ...system presents that...the user credentials were saved\n\t\t\t\t\t$this->view->storeCredentials($inpName, $inpPass);\n\t\t\t\t\t$this->model->storeCookieTime($inpName);\n\t\t\t\t\t$this->view->storeMessage(\"Inloggning lyckades och vi kommer ihåg dig nästa gång\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t// ...and present success message\n\t\t\t\t\t$this->view->storeMessage(\"Inloggningen lyckades\");\n\t\t\t\t}\t\n\t\t\t\treturn $this->view->showLogin(true);\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t// UC 1 1: user wants to authenticate\n\t\t \t// UC 1 2: system asks for username, password and if system should save the user credentials\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\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}", "private function dologinWithPostData()\n {\n global $db;\n\n // check login form contents\n if (empty($_POST['user_email'])) {\n $this->errors[] = \"Email field was empty.\";\n } elseif (empty($_POST['user_password'])) {\n $this->errors[] = \"Password field was empty.\";\n } else {\n\n // Get user with same email\n $cols = array(\"email\", \"password\", \"confirmed\");\n $result = $db->where(\"email\", $_POST['user_email'])->getOne(\"users\", null, $cols);\n\n if ($result['confirmed']) {\n\n // if this user exists\n if ($result) {\n\n // using PHP 5.5's password_verify() function to check if the provided password fits\n // the hash of that user's password\n if (password_verify($_POST['user_password'], $result['password'])) {\n $this->updateSession($result['email'], $result['id']);\n } else {\n $this->errors[] = \"Wrong password. Try again.\";\n }\n } else {\n $this->errors[] = \"This user does not exist.\";\n }\n } else {\n $this->errors[] = \"Please confirm your email before logging in.\";\n }\n }\n }", "function authenticate(){\n global $db;\n if(isset($_POST['my_login']) && ($_POST['my_login']==\"logged_in\")){\n $query = \"SELECT `u_name`, `pass`\n FROM users\n WHERE `u_name` = \\\"{$_POST['u_name']}\\\" AND\n `pass` = \\\"{$_POST['pass']}\\\"\";\n if((mysqli_num_rows(mysqli_query($db,$query))) == 1){\n \n $_SESSION['u_name'] = $_POST['u_name'];\n $_SESSION['logged_in'] = true;\n header('Location: index.php');\n exit;\n }\n else {\n echo \"Username or Password is incorrect!\";\n }\n }\n }", "public function processLogin()\n {\n $user = $this->post['user'];\n\n // Run the form validation\n $errors = $this->validateLogin($user);\n\n // If the form is valid, check the login credentials and\n // if valid log the user in otherwise display the form again.\n if (empty($errors)) {\n if ($this->authentication->login($user['email'], $user['password'])) {\n header('location: /admin/');\n return http_response_code();\n } else {\n $errors[] = 'Invalid login credentials';\n return $this->loginForm($errors);\n }\n } else {\n return $this->loginForm($errors);\n }\n }", "public function validate_login() {\n\t\t$userid=$_POST['user_id'];\n\t\t$password=$_POST['password'];\n\t\t$compid=$_POST['company_id'];\n\t\t\n\n\t\t$sql=\"SELECT u.id, u.user_name FROM users u, hmz_cust_info ci where ci.id=u.cust_id\n\t\t\tand u.user_id='$userid' and u.password='$password' and ci.cust_id='$compid';\";\n\t\t$result=$this->runQuery(\"getAll\",$sql);\n\t\tif(count($result)>0) {\n\t\t\t$_SESSION['user_id']=$result[0];\n\t\t\t$_SESSION['user_name']=$result[1];\n\t\t\theader('location: ?a=P&b=dashboard');\n\t\t}\n\t\telse\n\t\t\theader('location: ?a=login&b=f');\n\n\t}", "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 }", "public static function handle_login() {\n $params = $_POST;\n $player = Player::authenticate($params['username'], $params['password']);\n if(!$player) {\n View::make('player/login.html', array('error' => 'Väärä käyttäjätunnus tai salasana.', 'username' => $params['username']));\n } else {\n $_SESSION['user'] = $player->id;\n\n Redirect::to('/', array('message' => 'Kirjautunut käyttäjänä ' . $player->username));\n }\n }", "function login_user(){\n\tif(isset($_POST['submit'])){\n\t\t//create variables and assign values from the username and password fields in the login form\n\t\t$username= escape_string($_POST['username']);\n\t\t$password= hash('sha256', $_POST['password']);\n\t\t//check them against the values held in the database\n\t\t$query= query(\"SELECT*FROM users WHERE username = '{$username}' AND password = '{$password}'\");\n\t\tconfirm($query);\n\t\t//use the num_rows function to work out whether there is a match - or not\n\t\tif(mysqli_num_rows($query) == 0){\n\t\t\tset_message(\"Your username or password is incorrect. Please try again.\");\n\t\t\tredirect(\"login.php\");\n\t\t}else{\n\t\t$_SESSION['username'] = $username;\n\t\tredirect(\"index.php\");\n\t\t}\n\t}\n}", "function comprobarLogin ($dbh, $usuario,$password){\n $data = array(\"usuario\" => $usuario,\n \"password\" => $password);\n $stmt = $dbh->prepare(\"SELECT nomUsuario,password FROM Usuario Where nomUsuario = :usuario AND password = :password\");\n $stmt->setFetchMode(PDO::FETCH_OBJ);\n $stmt->execute($data);\n $row = $stmt->fetch();\n if($row == null){\n $isLoginIncorrecto = true;\n header(\"Location: ../html/login.php\");\n }\n else {\n $isLoginIncorrecto = false;\n $tipo = \"user\";\n require_once \"../html/index.php\";\n session_start();\n $_SESSION['registro'] = $usuario;\n }\n}", "function login() {\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n try {\n $db = getConnection();\n\n\t$sql = \"SELECT userId FROM users WHERE username=:username\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bindParam(\"username\", $username);\n\t$stmt->execute();\n\t$username_test = $stmt->fetchObject();\n\tif(empty($username_test)) {\n\t\techo \"error_username_doesnt_exists\";\n\t\treturn;\n\t}\n\n\t$sql = \"SELECT password FROM users WHERE username=:username\";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $storedPassword = $stmt->fetchObject()->password;\n\n if(empty($storedPassword)) {\n echo \"null\";\n } else if(strcmp($password, $storedPassword) == 0) {\n\t\t $query = \"SELECT userId FROM users WHERE username=:username\";\n\t\t $stmt2 = $db->prepare($query);\n\t\t $stmt2->bindParam(\"username\", $username);\n\t\t $stmt2->execute();\n \t echo '{\"Username\": \"' . $username . '\", \"ID\": ' . $stmt2->fetchObject()->userId . '}'; \n } else {\n\t\techo \"null\";\n\t}\n\n $db = null;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}", "public function validateLogin(){\n // store fieldnames inside the $fieldnames variable\n $fieldnames = ['email', 'password'];\n\n // initialize $error variable and set it as FALSE\n $error = FALSE;\n\n // for each $fieldname, check if its set or empty, if the fieldname is not set or empty then set $error as TRUE\n foreach($fieldnames as $fieldname){\n if(!isset($_POST[$fieldname]) || empty($_POST[$fieldname])){\n $error = TRUE;\n }\n }\n\n // if $error is FALSE\n if(!$error){\n // create variables with $_POST data\n $email = $_POST[\"email\"];\n $wachtwoord = $_POST[\"password\"];\n\n // create new db connection \n $db = new Db('localhost', 'root', '', 'project1', 'utf8');\n\n // login the user\n $db->login($email, $wachtwoord);\n } else{\n // if $error is equal to TRUE then echo Verkeerd wachtwoord of username\n echo '<label>Verkeerd wachtwoord of username</label>';\n }\n }", "function login()\r\n{\r\n append_content(\"<h2>Login</h2>\");\r\n\r\n // var_dump($_POST);\r\n\r\n if (!empty($_POST['Submit']) && ($_POST['Submit']==\"Login\"))\r\n {\r\n //authenticate User\r\n if (empty($_POST['username']) || empty($_POST['password']))\r\n {\r\n append_content(\"<h3 id='error'> Empty Username or Password </h3>\");\r\n append_content(DisplayLoginForm());\r\n }\r\n else\r\n {\r\n $username = Security::Sanitize_Text($_POST['username']);\r\n $password = Security::Sanitize_Text($_POST['password']);\r\n // echo $username.\" \".$password;\r\n $user = new User($username,$password);\r\n\r\n\r\n $uid = $user->GetUserID();\r\n\r\n\r\n if ($uid)\r\n {\r\n $_SESSION['userid'] = $uid;\r\n $_SESSION['username'] = $username;\r\n URL::Redirect('home');\r\n }\r\n else\r\n {\r\n append_content(\"<h3 id='error'> Login Failed! </h3>\");\r\n append_content(DisplayLoginForm());\r\n }\r\n }\r\n }\r\n else\r\n {\r\n append_content(DisplayLoginForm());\r\n }\r\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 authenticate(){\n if( !empty($_POST) ){\n //Validate the login\n $flash['user_name'] = $this->validate($_POST['user_name'], $output, \"user_name\", 17, 17, \"/^[a-zA-Z0-9_]{1,10}$/\");\n\n //Validate the password\n $flash['password'] = $this->validate($_POST['password'], $output, \"password\", 18, 18, \"/^[a-zA-Z0-9\\S]{6,32}$/\");\n\n $flash_is_empty = true;\n \n foreach ($flash as $key => $value) {\n if( !empty($flash[$key]) ) {\n $flash_is_empty = false;\n }\n }\n\n if( $flash_is_empty ){\n $this->model = new UserAuth();\n $user = $this->model->attemptLogin($output['user_name'], hash(\"sha256\", $output['password']));\n if( !empty($user) ) {\n $this->model->authorizeUser($user[0]);\n $this->redirect(\"home/home\");\n } else {\n $flash['no_match'] = new Flash($this->flashArray[16], \"error\");\n $this->loadPage($this->user, \"login_user\", false, $flash);\n }\n } else {\n $this->loadPage($this->user, \"login_user\", false, $flash);\n }\n }\n }", "function logInOrOut( $pdo, $usersTable) {\n setUpSession();\n \n $action = \"none\";\n if ( isset( $_POST['formid']) && $_POST['formid'] == 'login') {\n $stmt = $pdo->prepare(\"SELECT * FROM `$usersTable` WHERE user=? AND password=?\");\n $stmt->execute( array( $_POST['username'], $_POST['password']));\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ( count( $rows) == 1) {\n $_SESSION['user'] = $rows[0]['user'];\n $_SESSION['role'] = $rows[0]['role'];\n $action = \"login success\";\n } else if ( count( $rows) == 0) {\n $action = \"login failure\";\n $_SESSION['user'] = \"anonymous\";\n $_SESSION['role'] = \"anonymous\";\n } else {\n die( \"System error: \".count( $rows).\" rows in database for user \".$_POST['username']);\n }\n } else if ( isset( $_REQUEST['logout'])) {\n $_SESSION['user'] = \"anonymous\";\n $_SESSION['role'] = \"anonymous\";\n $action = \"logout\";\n }\n\n return $action;\n}", "public function login(){\r\n if(IS_POST){\r\n //判断用户名,密码是否正确\r\n $managerinfo=D('User')->where(array('username'=>$_POST['username'],'pwd'=>md5($_POST['pwd'])))->find();\r\n if($managerinfo!==null){\r\n //持久化用户信息\r\n session('admin_id',$managerinfo['id']);\r\n session('admin_name', $managerinfo['username']);\r\n $this->getpri($managerinfo['roleid']);\r\n //登录成功页面跳到后台\r\n $this->redirect('Index/index');\r\n }else{\r\n $this->error('用户名或密码错误',U('Login/login'),1);\r\n }\r\n return;\r\n }\r\n $this->display();\r\n }", "function login_check($pdo) {\n\n // First check for all variable sessions being set.\n if (isset($_SESSION['user_id'], $_SESSION['username'], $_SESSION['login_string'])) {\n $user_id = $_SESSION['user_id'];\n $username = $_SESSION['username'];\n $login_string = $_SESSION['login_string'];\n\n // Get string of browser.\n $user_browser = $_SERVER['HTTP_USER_AGENT'];\n\n $sqlLogin = \"SELECT user_id, login_id, password\n FROM user\n WHERE user_id = \" . $user_id . \";\";\n\n $loginList = $pdo->query($sqlLogin);\n\n // Check if result is returned.\n while ($loginRow = $loginList->fetch()) {\n $login_check = hash('sha512', $loginRow['password'] . $user_browser);\n\n // If match, then credentials are valid. User is logged in.\n if (hash_equals($login_check, $login_string)) {\n return true;\n } else {\n return false;\n }\n }\n } else {\n return false;\n }\n\n }", "function loginUser()\n {\n if (!empty($_POST['user']) && !empty($_POST['password'])) {\n $user = $_POST['user'];\n $password = $_POST['password'];\n $user_db = $this->model->getUser($user);\n if ($user_db && password_verify($password, $user_db->password)) {\n //chequeamos que la password ingresada sea correcta y el usuario exista\n session_start();\n $_SESSION['user'] = $user;\n header(\"Location: \" . BASE_URL . '../show-parking');\n } else {\n //muestro el login con mensaje de error por usuario o pass incorrectos\n $this->view->showLogin('Usuario o contraseña incorrectos');\n }\n } else {\n //muestro el login con mensaje de error por falta de datos\n $this->view->showLogin('Faltan datos obligatorios');\n }\n }", "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\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}", "function user_login($username, $password) {\n $db = connectDB();\n $stmt = $db->prepare('\n SELECT\n user_id,\n password_hash\n FROM\n users\n WHERE\n username = :username\n LIMIT\n 1\n ;\n ');\n $stmt->execute([':username' => $username]);\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if (empty($rows)) {\n return \"No such user.\";\n }\n $password_hash = $rows[0]['password_hash'];\n if (!password_verify($password, $password_hash)) {\n return \"Incorrect password.\";\n }\n $_SESSION['logged_in'] = TRUE;\n $_SESSION['user_id'] = $rows[0]['user_id'];\n $_SESSION['username'] = $username;\n return TRUE;\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}", "function loginUser() {\n\tsession_start();\n\trequire_once(\"sql/dbQueries.php\");\n\n\t// Fetching user data from login data\n\t$userData = getUserFromLogin($_POST['vms_email'], $_POST['userPassword']);\n\n\tif($userData == False) {\n\t\tprintLoginPage(\"The login information supplied is not valid.\");\n\t\treturn;\n\t} else {\n\t\t// Saving the user's info in a session variable\n\t\t$_SESSION['auth'] = TRUE;\n\t\t$_SESSION['auth_info'] = $userData[0];\n\n\t\t// Fetching the DID for the user's default DID.\n\t\t$activeDID = getDIDFromID($userData[0]['didID_default']);\n\t\tif($activeDID != false) {\n\t\t\t$_SESSION['auth_info']['activeDID'] = $activeDID['did'];\n\t\t} else {\n\t\t\t$_SESSION['auth_info']['activeDID'] = null;\n\t\t}\n\t\t//print_r($_SESSION);\n\n\t\t// Head back home\n\t\theader(\"Location: index.php\");\n\t\treturn;\n\t}\n}", "function login_check($pdo) {\n\t // Check if all session variables are set\n\t if(isset($_SESSION['user_id'], $_SESSION['username'], $_SESSION['login_string'])) {\n\t $user_id = $_SESSION['user_id'];\n\t $login_string = $_SESSION['login_string'];\n\t $username = $_SESSION['username'];\n\t \n\t $user_browser = $_SERVER['HTTP_USER_AGENT']; // Get the user-agent string of the user.\n\t \n\t if ($stmt = $pdo->prepare(\"SELECT u_password FROM App_User WHERE u_id = ? LIMIT 1\")) { \n\t $stmt->bindParam(1, $user_id, PDO::PARAM_INT); // Bind \"$user_id\" to parameter.\n\t $stmt->execute(); // Execute the prepared query.\n\t //$stmt->store_result();\n\t \n\t if($stmt->rowCount() == 1) { // If the user exists\n\t $result = $stmt->fetch(PDO::FETCH_OBJ);\n\t \t\t$password = $result->u_password;\n\n\t // $stmt->bind_result($password); // get variables from result.\n\t // $stmt->fetch();\n\t $login_check = hash('sha512', $password.$user_browser);\n\t if($login_check == $login_string) {\n\t // Logged In!!!!\n\t return true;\n\t } else {\n\t // Not logged in\n\t return false;\n\t }\n\t } else {\n\t // Not logged in\n\t return false;\n\t }\n\t } else {\n\t // Not logged in\n\t return false;\n\t }\n\t } else {\n\t // Not logged in\n\t return false;\n\t }\n\t}", "function login(){\n\tif(isset($_POST['submit'])){\n\t\t//create variables and assign values from the username and password fields in the login form\n\t\t$username= escape_string($_POST['username']);\n\t\t$password= hash('sha256', $_POST['password']);\n\t\t//check them against the values held in the database\n\t\t$query= query(\"SELECT*FROM users WHERE username = '{$username}' AND password = '{$password}'\");\n\t\tconfirm($query);\n\t\t//use the num_rows function to work out whether there is a match - or not\n\t\tif(mysqli_num_rows($query) == 0){\n\t\t\tset_message(\"Your username or password is incorrect. Please try again.\");\n\t\t\tredirect(\"login.php\");\n\t\t}else{\n\t\t$_SESSION['username'] = $username;\n\t\tredirect(\"index.php\");\n\t\t}\n\t}\n}", "public function postLogin() //Debo tener también para post porque es el método del formulario y aquí es donde se llenará y enviará.\n {\n \n global $pdo;\n\n $errors = [];\n\n $validator = new Validator();\n $validator->add('name', 'required');\n $validator->add('password', 'required');\n\n if ($validator->validate($_POST)) { //Para verificar que cumpla con las validaciones.\n $sql = 'SELECT * FROM users WHERE name = :name';\n $query = $pdo->prepare($sql);\n $query->execute(['name' => $_POST['name']]);\n\n $user = $query->fetch(PDO::FETCH_OBJ); //Para convertir la consulta en un objeto con nombres de propiedades que se corresponden a los nombres de las columnas.\n if ($user) { //Si existe el usuario\n if (password_verify($_POST['password'], $user->password)) { //Si la contraseña es correcta. El password_verify() es para descifrar la contraseña ingresada con el método password_hash() de encriptación usado.\n $_SESSION['userID'] = $user->id; //Guardo el id del usuario en una variable de sesión para poder identificar si hay una sesión iniciada, además así la puedo usar en el RolController.\n header('Location:' . BASE_URL . 'rol'); //Redireccionar a la ruta para identificar el tipo de rol del usuario.\n return null;\n }\n }\n\n $validator->addMessage('name', 'Nombre de usuario y/o contraseña incorrectos.'); //Si no se encuentra el usuario, se deja la duda en el mensaje de si estuvo mal la contraseña o el nombre para mayor seguridad.\n }\n\n $errors = $validator->getMessages();\n\n //Vista a la que se quiere acceder\n return render('../views/login.php', ['errors' => $errors]);\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 loginUser($emailusername, $passwd) {\n\n $sql = \"SELECT * FROM users WHERE username=? OR email=?\";\n $stmt = $this->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$emailusername, $emailusername]);\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if ($result) {\n $passCheck = password_verify($passwd, $result['passwd']);\n\n // Error check against password in the database\n if ($passCheck == false) {\n return [ \"status\" => 403, \"message\" => 'Invalid credentials' ];\n }\n else if ($passCheck == true) {\n\n // Create session\n $_SESSION['id'] = $result['id'];\n $_SESSION['username'] = $result['username'];\n $_SESSION['email'] = $result['email'];\n\n // Force a refresh on login.\n header('Location: index.php');\n exit();\n }\n }\n else {\n return [ \"status\" => 403, \"message\" => 'Invalid credentials' ];\n }\n }\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 }", "function LoginCheck($username, $password) //check if user is login\n{\n global $connect;\n $query = \"SELECT * FROM User WHERE Username = :username AND Password = :password\";\n try {\n $statement = $connect->prepare($query);\n $statement->bindValue(':username', $username, PDO::PARAM_STR);\n $statement->bindValue(':password', $password, PDO::PARAM_STR);\n $statement->execute();\n $count = $statement->rowCount();\n if ($count > 0) {\n $result = $statement->fetch();\n return $result;\n } else return false;\n } catch (PDOException $e) {\n }\n}", "function handle_login()\n{\n\tif( isset($_POST['submit']) )\n\t{\n\t//setup connection\n\trequire 'pgsql.conf';\n\t$conn = pg_connect(\"host=$db_host dbname=$db_name user=$db_user password=$db_pass\");\n\tif (!$conn) \n\t{\n\t echo \"<br/>An error occurred with the connection to the server.<br/>\";\n\t die();\n\t}\n\t\t\n\t\t//Run variables against dB\n\t\t$query = \"SELECT salt, hashpass, userType FROM DB_1.customer WHERE username =$1\" ;\n\t\t$stmt = pg_prepare($conn, \"check\", $query) or die( \"ERROR:\". pg_last_error() );\n\t\t$result = pg_execute($conn, \"check\" ,array(htmlspecialchars($_POST['username']))) or die( \"ERROR:\". pg_last_error() );\n\t\t$row = pg_fetch_assoc($result);\n\t\t$salt = $row['salt'];\n\t\t$salty = sha1($salt);\n\t\t$salty = trim($salt);\n\t\t$password = htmlspecialchars($_POST['password']);\n\t\t$localHash = sha1($salty.$password);\n\n\t\tfor ($i=0; $i<10000; $i++) //Slow Hashing\n\t\t{\n\t\t\t$localHash = sha1($localHash);\n\t\t}\n\t\tif ($localHash === $row['hashpass'] ) //if user exists then\n\t\t{\n\t\t\t//Condition handling:\n\t\t\tif ($row['usertype'] == \"admin\"){\n\t\t\t\t$_SESSION['admin_loggedin'] = htmlspecialchars($_POST['username']);\n\t\t\t\theader(\"Location: https://babbage.cs.missouri.edu/~cs3380s14grp10/admin.php\");\n\t\t\t\texit;\n\t\t\t}\n\t\t\t\n\t\t\tif ($_SESSION['prevPage'] === 'cart'){\n\t\t\t\t$_SESSION['loggedin'] = htmlspecialchars($_POST['username']);\n\t\t\t\theader(\"Location: http://babbage.cs.missouri.edu/~cs3380s14grp10/ShoppingCart/index.php\");\n\t\t\t\texit;\n\t\t\t} \n\t\t\telse if ($_SESSION['prevPage'] === 'FA'){\n\t\t\t\t$_SESSION['loggedin'] = htmlspecialchars($_POST['username']);\n\t\t\t\theader(\"Location: http://babbage.cs.missouri.edu/~cs3380s14grp10/Tournaments/fa_registration.php\");\n\t\t\t\texit;\n\t\t\t} \n\t\t\telse if ($_SESSION['prevPage'] === 'TEAM'){\n\t\t\t\t$_SESSION['loggedin'] = htmlspecialchars($_POST['username']);\n\t\t\t\theader(\"Location: http://babbage.cs.missouri.edu/~cs3380s14grp10/Tournaments/team_registration.php\");\n\t\t\t\texit;\n\t\t\t} \n\t\t\telse {\t\n\t\t\t\t$_SESSION['loggedin'] = htmlspecialchars($_POST['username']);\n\t\t\t\theader(\"Location: http://babbage.cs.missouri.edu/~cs3380s14grp10/Home/home.php\");\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Check to see if login user exists, if not do nothing\n\t\t\tif(pg_num_rows($result) == 0)\n\t\t\t{\n\t\t\techo \"\\n<div class ='alert alert-danger alert-dismissable'>\";\n\t\t\techo \"\\n\\t<center>User does not exist please register by clicking Register link below</center>\"; \n\t\t\techo \"\\n</div>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"\\n<div class ='alert alert-danger alert-dismissable'>\";\n\t\t\t\techo\"\\n\\t<center>Incorrect Password</center>\";\n\t\t\t\techo \"\\n</div>\";\n\t\t\t}\n\t\t}\n\t}\n}", "public function checkLoggedIn()\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t \n\t\t\t\t$query = $this->_db->prepare( \"SELECT username FROM login WHERE username=:username\" );\n \n \n\t\t\t\t$query->bindParam( \":username\", $_SESSION[ 'username' ], PDO::PARAM_STR );\n\n\t\t\t\t$query->execute();\n\t\t\t\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\n\t\t\t$row = $query->fetch();\n\t\t\t\n \n\t\t\t$loggedInUser = $row[ 'username' ];\n \n //if the user is not logged in\n\t\t\tif( !isset( $loggedInUser ) )\n\t\t\t{\n //head to the log in page\n\t\t\t\theader( 'Location: login.php' );\n\n\t\t\t}\n\t\t\t\n\t\t}", "public function doLogin()\n\t{\n $userData = array(\n 'username' => \\Input::get('username'),\n 'password' => \\Input::get('password'),\n );\n\t\t\n\t\t$rememberMe = \\Input::get('remember-me');\n\t\t\n // Declare the rules for the form validation.\n $rules = array(\n 'username' => 'Required',\n 'password' => 'Required'\n );\n\n // Validate the inputs.\n $validator = \\Validator::make($userData, $rules);\n\n // Check if the form validates with success.\n if ($validator->passes())\n {\n // Try to log the user in.\n if (\\Auth::attempt($userData, (bool)$rememberMe))\n {\n // Redirect to dashboard\n\t\t\t\treturn \\Redirect::intended(route('dashboard'));\n }\n else\n {\n // Redirect to the login page.\n return \\Redirect::route('login')->withErrors(array('password' => \\Lang::get('site.password-incorrect')))->withInput(\\Input::except('password'));\n }\n }\n\n // Something went wrong.\n return \\Redirect::route('login')->withErrors($validator)->withInput(\\Input::except('password'));\n\t}", "public function login($userName, $password){\r\n\r\n\r\n try{\r\n $stmt = $this->query(\"SELECT `user_id`, firstname, lastname, email, `password` FROM users WHERE username=:username\");\r\n $stmt->execute(array(':username'=>$userName));\r\n if($stmt->rowCount() == 1){\r\n $userRow = $stmt->fetch(PDO::FETCH_ASSOC);\r\n if (password_verify($password, $userRow['password'])){\r\n $_SESSION['user_session'] = $userRow['username'];\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n }\r\n catch(PDOException $exception){\r\n echo(\"login ERROR: \" . $exception->getMessage());\r\n }\r\n }", "public function user_login() {\n global $db;\n\n //Use path to det user\n if (isset($_POST['login'])) {\n $username = \"\";\n $log_col = $_POST['liwth'];\n $user = $_POST['uname'];\n $pwd = sha1($_POST['pwd']);\n $login = $_POST['lias'];\n\n//Chosing the col of table where to login fron\n switch ($log_col) {\n case \"user\":\n $username = \"uname\";\n break;\n case \"cuser\":\n $username = \"cuname\";\n break;\n case \"employee\":\n $username = \"employee_no\";\n break;\n case\"job_seeker\":\n $username = \"natid\";\n break;\n default :\n echo 'ERROR DETERMINING USER CATEGORY!!!';\n }\n\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n// $query = \"SELECT fname $username, pwd FROM $login WHERE $username='$user' AND pwd='$pwd' \";\n $query = \"SELECT $username, fname, pwd FROM $login WHERE $username = ? AND pwd = ?\";\n $type_array = array('s', 's');\n $data_array = array($user, $pwd);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n foreach ($res as $row) {\n $_SESSION[$username] = $row[$username];\n $empno = $_SESSION[$username];\n $_SESSION['fname'] = $row['fname'];\n echo 'Login success';\n echo 'SESSION NAME' . $_SESSION['fname'];\n Redirect::to(\"index.php?rdr=1\");\n }\n } else {\n $query = \"SELECT fname $username, pwd FROM $login WHERE $username = ?\";\n $type_array = array('s');\n $data_array = array($user);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n echo 'Wrong password for ' . $user;\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n } else {\n echo 'The username does not exist';\n }\n }\n }\n }", "function process_login ( $ls_user_name, $ls_user_password ) {\n\n\t\t// Connect to MySQL database.\n\n\t\techo \"I'm in model::process_login()\";\n\n\t\t$link = $this->connect_db();\n\n\t\tif ( $this->username_in_db( $ls_user_name, $link ) ) {\n\n\t\t\techo \"username $ls_user_name was in database, try checking password<br>\";\n\n\t\t\tif ( $this->password_matches_username( $ls_user_name, $ls_user_password, $link ) ) {\n\n\t\t\t\tmysqli_close( $link );\n\n\t\t\t\treturn true; // LOG USER IN!!!\n\n\t\t\t} else {\n\n\t\t\t\t$errors[ 'process_login' ] = 'error: invalid password';\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t$errors[ 'process_login' ] = 'error: invalid username';\n\n\t\t}\n\n\t\tmysqli_close( $link );\n\n\t\treturn false;\n\n\t}", "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 }", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\t}", "abstract protected function doLogin();", "public function dologin() {\n $password=$this->model->getpassword($_POST['username']);\n if (!empty($_POST['password']) && !empty($password) && $password[0]['userpasswd']==$_POST['password']) {\n $_SESSION['username']=$_POST['username'];\n $id=$this->model->getid($_POST['username']);\n $_SESSION['userid']=$id[0]['userid'];\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->set('errormessage', \"Błędny login lub hasło!\");\n $this->view->set('redirectto', \"?v=user&a=login\");\n $this->view->render('error_view');\n }\n }", "private function loginWithPostData() {\n \n $this->user_name = $this->connection->real_escape_string($_POST['user_name']); \n $checklogin = $this->connection->query(\"SELECT user_name, user_email, user_password_hash FROM users WHERE user_name = '\".$this->user_name.\"';\");\n \n if($checklogin->num_rows == 1) {\n \n $result_row = $checklogin->fetch_object();\n \n if (crypt($_POST['user_password'], $result_row->user_password_hash) == $result_row->user_password_hash) {\n \n /**\n * write user data into PHP SESSION [a file on your server]\n */\n $_SESSION['user_name'] = $result_row->user_name;\n $_SESSION['user_email'] = $result_row->user_email;\n $_SESSION['user_logged_in'] = 1;\n $_SESSION['user_name'] = $result_row->user_name;\n \n\t\t\t\t\t// session security\n $_SESSION['agent'] = $_SERVER['HTTP_USER_AGENT'] ;\n\t\t\t\t\t$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t$_SESSION['count'] = 0; \n\t\t\t\t\t\t\t\t\t\t \n /**\n * write user data into COOKIE [a file in user's browser]\n */\n setcookie(\"user_name\", $result_row->user_name, time() + (3600*24*100));\n setcookie(\"user_email\", $result_row->user_email, time() + (3600*24*100));\n $this->user_is_logged_in = true;\n return true; \n \n } else {\n $this->errors[] = \"Wrong password or username. Try again.\";\n $this->login_delay();\n return false; \n } \n \n } else {\n $this->errors[] = \"Wrong password or username. Try again.\";\n $this->login_delay();\n return false;\n } \n }", "function validation($userName, $password){\r\n // $query .=\" WHERE userName = '\" . $userName .\"' AND password = '\" . $password . \"'\";\r\n\r\n if(empty($userName) && empty($password)){\r\n $emptyfield = \"Field cannot be empty</br>\";\r\n echo $emptyfield;\r\n echo \"Redirecting to login screen...\";\r\n header( \"Refresh:1; url=index.php\", true, 303);\r\n }\r\n\r\n // $query = \"SELECT * FROM user\";\r\n // $query .=\" WHERE userName = '\" . $userName .\"'\";\r\n\r\n // $result = $connection ->prepare($query);\r\n // $result->execute();\r\n // $result = $result->fetchAll();\r\n\r\n // if(count($result) > 0){\r\n // echo \"Username already exist\";\r\n // //sleep(3);\r\n // header( \"Refresh:1; url=index.php\", true, 303);\r\n // } else {\r\n // inDatabase();\r\n // }\r\n // die;\r\n}", "function login()\n{\n global $db;\n\n // Validate input\n $email = InputValidator::email($_POST['email']);\n $password = InputValidator::password($_POST['password']);\n\n if (is_null($email) || is_null($password)) {\n $_SESSION['errors']['login'] = 'Invalid email/password combination';\n return false;\n }\n // Get account/user with email specified by the user\n $user_sql = \"SELECT * FROM account JOIN user WHERE user.email = ? AND user.id = account.id\";\n $stmt = $db->prepare($user_sql);\n $exec = $stmt->execute([$email]);\n\n if (!$exec) return false;\n\n // Fetch the user and compare the stored hashed password with the one sent by the user\n $user = $stmt->fetch();\n $passwordhash = hash('sha256', $password);\n\n if ($user == null || $passwordhash != $user['passwordhash']) {\n $_SESSION['errors']['login'] = 'Invalid email/password combination';\n return false;\n }\n\n // set the session to the current user\n $_SESSION['user'] = fetchUser($user['id']);\n $_SESSION['errors'] = array(\"error\" => \"invalid date\");\n return true;\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 userLogin(){\n\t\t\tif (isset($_POST['user_name']) && isset($_POST['password'])){\n\t\t\t\t$response = $this->model->getUser(\"*\", \"user_name = \".\"'\".$_POST['user_name'].\"'\");\n\t\t\t\t$response = $response[0];\n\t\t\t\t$user_rol = null;\n\t\t\t\t//The user is valid\n\t\t\t\tif ($response['password']==$_POST['password']) {\n\t\t\t\t\t//Verify the roles\n\t\t\t\t\t$response_role = $this->model->getRoles(\"user_id = '\".$response['_id'].\"'\");\n\t\t\t\t\tif (count($response_role)>1) {\n\t\t\t\t\t\t//Multipage user\n\t\t\t\t\t\t$user_rol = array();\n\t\t\t\t\t\tforeach ($response_role as $value) {\n\t\t\t\t\t\t\tarray_push($user_rol, $value['role']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (in_array('ADMIN', $user_rol)) { \n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n \t\t\t\t\t$_SERVER['AUTH_TYPE'] = \"Basic Auth\"; \n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$user_rol = $response_role[0]['role'];\n\t\t\t\t\t\tif ($user_rol == 'ADMIN') {\n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->createSession($response['user_name'], $user_rol);\n\t\t\t\t\techo 1;\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t}", "function loginHandler($inputs = []) {\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'SELECT * FROM `admin` WHERE `name` = ? AND password = ?';\n $res = getOne($sql, [$username, $password]);\n if (!$res) {\n formatOutput(false, 'username or password error');\n }\n else{\n $buildingRes = getOne(\"SELECT * FROM `admin_building` WHERE admin_id =?\", [$res['id']]);\n $bid = isset($buildingRes['building_id']) ? $buildingRes['building_id'] : '0';\n setLogin($res['id'],$bid);\n formatOutput(true, 'login success', $res);\n }\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 }", "function au_login() {\n\n\tglobal $aulis;\n\t\n\t// Error messages!\n\t$errormsg = array();\n\t\n\t// Are we currently attempting to login?\n\tif(isset($_POST['au_login'])) {\n\t\n\t\t// Did we provide our username?\n\t\tif(empty($_POST['au_username']))\n\t\t\t$errormsg[] = LOGIN_NO_USERNAME;\n\t\t\t\n\t\t// What about our password?\n\t\tif(empty($_POST['au_password']))\n\t\t\t$errormsg[] = LOGIN_NO_PASSWORD;\n\t\t\t\n\t\t// Create variables that are easier to type\n\t\t$login['username'] = $_POST['au_username'];\n\t\t$login['password'] = $_POST['au_password'];\n\t\t\t\n\t\t// Usernames don't contain HTML\n\t\tif($login['username'] != htmlspecialchars($login['username'], ENT_NOQUOTES, 'UTF-8', false))\n\t\t\t$errormsg[] = LOGIN_USERNAME_NO_HTML;\n\t\t\t\n\t\t// We don't want to mess up the database\n\t\t$login['username'] = mysqli_real_escape_string($aulis['connection'], $login['username']);\n\t\t\n\t\t// Hash the password\n\t\t$login['password'] = au_hash($login['password']);\n\t\t\n\t\t// Okay. Now check if the database has any record of the user\n\t\t$result = au_query(\"\n\t\t\tSELECT user_id, user_username, user_password\n\t\t\t\tFROM users\n\t\t\t\tWHERE user_username = '\" . $login['username'] . \"'\n\t\t\");\n\t\t\n\t\t\t// This is only run if the user exists\n\t\t\tforeach($result as $userlogin) {\n\t\t\t\n\t\t\t\t// Get the user id\n\t\t\t\t$userid = $userlogin['user_id'];\n\t\t\t\n\t\t\t\t// Does the password match?\n\t\t\t\tif($userlogin['user_password'] == $login['password'])\n\t\t\t\t\t$correctpass = true;\n\t\t\t\telse\n\t\t\t\t\t$errormsg[] = LOGIN_PASSWORD_FAIL;\n\t\t\t}\n\t\t\t\n\t\t// Can we login?\n\t\tif(!empty($correctpass)) {\n\t\t\n\t\t\t// The user agent\n\t\t\t$login['user_agent'] = mysqli_real_escape_string($aulis['connection'], $_SERVER['HTTP_USER_AGENT']);\n\t\t\t\n\t\t\t// The IP address\n\t\t\t$login['user_ip'] = addslashes($_SERVER['REMOTE_ADDR']);\n\t\t\n\t\t\t// How long should we keep the session active?\n\t\t\t$sessionlength = (!empty($_POST['au_forever']) ? '0' : '60');\n\t\t\n\t\t\t// Set the session\n\t\t\t$_SESSION[$setting['session_name']] = array(\n\t\t\t\t'user' => $userid,\n\t\t\t\t'agent' => $login['user_agent'],\n\t\t\t\t'ip' => $login['user_ip'],\n\t\t\t\t'sessionlength' => $sessionlength\n\t\t\t);\n\t\t\t\n\t\t\t// Show a nice information page\n\t\t\ttemplate_info(\n\t\t\t\t'login_success',\n\t\t\t\t'login_success_title',\n\t\t\t\t'user_green.png',\n\t\t\t\t$basefilenq,\n\t\t\t\t'login_link'\n\t\t\t);\n\t\t}\n\t}\n\t\n\t// This array is used in the login template\n\t$logindata = array(\n\t\t'errors' => (empty($_POST['au_login']) ? 0 : 1),\n\t\t'error_message' => $errormsg,\n\t\t'username' => (!empty($login['username']) ? $login['username'] : ''),\n\t);\n\n\t// Okay, load this app's template\n\tau_load_template('login', false);\n\t\n\t// Show the registration template\n\tau_template_login((!empty($login_complete) ? true : false));\n}", "public function connectUser () {\n\n if (!empty($_POST)) {\n // Suppresion du isset et mis du 2eme if en else if\n if (empty($_POST['login'])) {\n $_SESSION['errors']['login'] = \"Veuillez indiquez votre login ou votre adresse mail pour vous connecter.\";\n } else if (UsersClass::checkLogin($_POST['login'], true) === false) {\n $_SESSION['errors']['login'] = \"Le login ou l'adresse e-mail indiqué n'existe pas. Il se peut aussi qu'il n'est pas encore activé.\";\n } else if (empty($_POST['password'])) {\n $_SESSION['errors']['password'] = \"Veuillez indiquez votre mot de passe pour vous connecter.\";\n } else if ($this->checkPassword($_POST['password'], $_POST['login']) === false) {\n $_SESSION['errors']['password'] = \"Le mot de passe indiqué est éronné, veuillez entrer le bon mot de passe pour vous connecter.\";\n } else {\n $login = htmlentities($_POST['login']);\n $sql = \"SELECT * FROM users WHERE :login = username OR :login = email AND activated = 1\";\n $query = $this->bdd->prepare($sql);\n $query->bindParam(':login', $_POST['login']);\n $query->execute();\n $result = $query->fetch();\n\n $_SESSION['auth']['id_user'] = $result['id_user'];\n header('Location: ' . URL . '/pages/users/profil.php');\n }\n }\n }", "public function authenticate() {\n //If username and password is set in POST, start Login method\n if ($this->logout) {\n $this->logout();\n }\n\n if ($this->auth_username && $this->auth_password) {\n $this->login();\n }\n\n //Otherwise check if still logged in\n else {\n if (!$this->check_session()) {\n if ($this->require_login) {\n $this->login_form();\n }\n }\n }\n }", "function loginHandler($username, $password) {\n if ($username == '' || $password == '') {\n $feedback = 'Vänligen fyll i båda fält.';\n header(\"Location: ../../../index.php?loginError=$feedback\");\n exit();\n }\n\n $result = validateUser($username, $password);\n\n // If the entered text didn't match with any of the registred users\n if (!$result) {\n $feedback = 'Vänligen kontollera att du fyllt i rätt information.';\n header(\"Location: ../../../index.php?loginError=$feedback\");\n exit();\n } else {\n $_SESSION[\"user_ID\"] = $result[\"id\"];\n $_SESSION[\"isLoggedIn\"] = true;\n $_SESSION[\"username\"] = $result[\"username\"];\n header('Location: ../../page_php/main.php#dialogue');\n exit();\n }\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 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 fpr 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 db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \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('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "function login_check($pdo)\n{\n if (isset($_SESSION['user_id'], $_SESSION['username'], $_SESSION['login_string'])) {\n $user_id = $_SESSION['user_id'];\n $login_string = $_SESSION['login_string'];\n $username = $_SESSION['username'];\n $user_browser = $_SERVER['HTTP_USER_AGENT']; // reperisce la stringa 'user-agent' dell'utente.\n if ($stmt = $pdo->prepare('SELECT password FROM members WHERE id = ? LIMIT 1')) {\n $stmt->execute([$user_id]); // esegue il bind del parametro '$user_id'.\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $count = $stmt->rowCount();\n if ($count == 1) {\n $password = $row['password'];\n $login_check = hash('sha512', $password.$user_browser);\n if ($login_check == $login_string) {\n // Login eseguito!!!!\n return true;\n } else {\n error_log(\"Wrong login string for $username\");\n\n return false;\n }\n } else {\n error_log(\"Couldnt find $username\");\n\n return false;\n }\n } else {\n error_log(\"Couldnt select pass $username\");\n\n return false;\n }\n } else {\n error_log(\"Vars not set 4 $username\");\n\n return false;\n }\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 actionLogin() {\n $this->layout = 'column2';\n\n $user_login = $this->user_login;\n\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'login-form') {\n echo CActiveForm::validate($user_login);\n Yii::app()->end();\n }\n\n\n if (isset($_POST['LoginForm'])) {\n $user_login->attributes = $_POST['LoginForm'];\n\n if ($user_login->validate() && $user_login->login() === \"done\") {\n echo \"done\";\n } else {\n if ($user_login->login() === 3) {\n echo \"Invalid username or password\";\n } else if ($user_login->login() === 7) {\n echo \"Your account has been deactivated.\";\n }\n }\n }\n }", "public function login(){\n\t\t\tValidator::validateOrRedirect($_POST,\n\t\t\t\t\t[\n\t\t\t\t\t\t\t\"required\" => [\"txt-input\", \"password\",\"action\"],\n\t\t\t\t\t\t\t\"email\" => \"txt-input\",\n\t\t\t\t\t],\n\t\t\t\t\t\"/login\");\n\t\t\t$this->resetMessage();\n\t $username=$_POST[\"txt-input\"];\n\t $password=$_POST[\"password\"];\n\t $action=$_POST[\"action\"];\n\t\t\t$userList =[];\n\t\t\t$column_value=array('email'=>$username,'password'=>$password);\n\t\t\t$uss=new User();\n\t\t\t$login=$uss->getBy($column_value);\n\t\t\tif (is_array($login)) {\n\t\t\t\tif (count($login)>0) {\n\t\t\t\t\tforeach ($login as $user)\n\t\t\t {\n\t\t\t\t\t\t$userList[]= array(\n\t\t\t 'user' =>$user['user_name'],\n\t\t\t 'email' =>$user['email'],\n\t\t\t 'password' =>$user['password']);\n\t\t\t\t\t}\n\n\t\t\t\t\t$user=$userList[0][\"email\"];\n\t\t $pass=$userList[0][\"password\"];\n\t\t Redirect::to(\"/products\")->with([\n\t\t 'name'=>$userList[0][\"email\"],\n\t\t 'check'=>\"true\",\n\t\t ])->do();\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\tRedirect::to(\"/login\")->with([\n\t\t \"message\" => \"Ha ocurrido un error: usuario o contraseña incorrectos.</br> Revise por favor\",\n\t\t \"type\" => \"danger\",\n\t\t ])\n\t\t ->do();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\tRedirect::to(\"/login\")->with([\n\t \"message\" => $login,\n\t \"type\" => \"danger\",\n\t ])\n\t ->do();\n\t\t\t}\n\t }", "public function login() {\n\t\t//see if the user exists in the config.\r\n\t\tif (empty ( $_SESSION['uid'] ) && !isset($_POST['user'])) {\n\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Login required.</message></reply>';\n\t\t\tsession_destroy();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isset($_POST['user'])){\n\t\t\t$xmlUser = $this->getUser ( $_POST ['user'] );\n\t\t}\n\t\t\n\t\t//Validate the user\n\t\tif ( isset ( $xmlUser ) && (empty($xmlUser ['password']) || (isset($_POST ['password']) && $xmlUser ['password'] == crypt($_POST ['password'],$xmlUser['password'])))) {\n\t\t\t//if a session exists, restrict login to only that user.\n\t\t\tif (! isset ( $this->session ) || ($this->session ['name'] == $xmlUser ['name'] && $this->session ['ip'] == $_SERVER ['REMOTE_ADDR'])) {\n\t\t\t\t//Login OK\r\n\t\t\t\t$this->isLoggedin = true;\n\t\t\t\t$this->name = $xmlUser ['name'];\n\t\t\t\t$this->group = $xmlUser ['group'];\n\t\t\t\t$this->session ['uid'] = session_id ();\n\t\t\t\t$this->session ['name'] = ( string ) $xmlUser ['name'];\n\t\t\t\t$this->session ['ip'] = $_SERVER ['REMOTE_ADDR'];\n\t\t\t\tsession_register('uid');\n\t\t\t\tsession_register('group');\n\t\t\t\t$_SESSION['uid'] = (string) $xmlUser['name'];\n\t\t\t\t$_SESSION['group'] = (string)$xmlUser['group'];\n\t\t\t\t$this->updateSession ();\n\t\t\t\t\n\t\t\t\tLogger::getRootLogger ()->info ( \"User {$xmlUser['name']} is logged in.\" );\n\t\t\t\techo '<reply action=\"login-ok\"><message>logged in.</message></reply>';\n\t\t\t} else {\n\t\t\t\t//Another user is logged in\r\n\t\t\t\tLogger::getRootLogger ()->info ( \"Could not login user {$_POST['user']}. Another user is already logged in.\" );\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Error logging in. Another user is already logged in.</message></reply>';\n\t\t\t}\n\t\t} else {\n\t\t\tif(isset($_POST['password'])){\n\t\t\t\t//Wrong user and/or pass\n\t\t\t\tsession_destroy();\r\n\t\t\t\tLogger::getRootLogger ()->info ( \"Could not login user {$_POST['user']}. Wrong username and/or password.\" );\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Error logging in. Username and or password is incorrect.</message></reply>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsession_destroy();\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Your session has expired</message></reply>';\n\t\t\t}\n\t\t}\n\t}", "public function login(){\n if (!empty($_SESSION['user_id']))\n redirects('pages/index');\n // Check for POST\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n // Process form\n // Sanitize POST data\n // $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n \n // Init data\n $data =[\n 'username' => trim($_POST['username']),\n 'password' => trim($_POST['password']),\n 'username_error' => '',\n 'password_error' => '' \n ];\n\n //valid username\n if (preg_match('/\\s/',$data['username']) || !ctype_alnum($data['username']))\n $data['username_error'] = 'Please enter a valid username';\n\n // Validate Password\n if(empty($data['password'])){\n $data['password_error'] = 'Please enter password';\n }\n\n // Make sure errors are empty\n if(empty($data['username_error']) && empty($data['password_error'])){\n // Check if username and password correct and exists\n $loggedInUser = $this->userModel->login($data['username'], $data['password']);\n if ($loggedInUser){\n // check if the account is verified\n if ($this->userModel->isVerified($loggedInUser->email))\n {\n $this->createUserSession($loggedInUser);\n }\n else {\n $data['email_verification'] = 'alert alert-danger';\n $this->view('users/login', $data);\n }\n } else {\n $data['email_verification'] = 'class=\"alert alert-danger';\n $this->view('users/login', $data);\n }\n } else {\n // Load view with errors\n $this->view('users/login', $data);\n }\n\n\n } else {\n // Init data\n $data =[ \n 'username' => '',\n 'password' => '',\n 'username_error' => '',\n 'password_error' => '' \n ];\n\n // Load view\n $this->view('users/login', $data);\n }\n }", "public function action_simpleauth() {\n\t$data = array();\n\n\t// If so, you pressed the submit button. let's go over the steps\n\tif (Input::post()) {\n\t // first of all, let's get a auth object\n\t $auth = Auth::instance();\n\n\t // check the credentials. This assumes that you have the previous table created and\n\t // you have used the table definition and configuration as mentioned above.\n\t if ($auth->login()) {\n\t\tif ($auth->get_profile_fields(\"verified\", false) == false) {\n\t\t\t Response::redirect('selectionscreen/index');\n\t\t // Session::set_flash(\"error\", \"You have not verified your e-mail address yet!\");\n\t\t} else {\n\t\t // credentials ok, go right in\n\t\t Response::redirect('/') and die();\n\t\t}\n\t } else {\n\t\t// Oops, no soup for you. try to login again. Set some values to\n\t\t// repopulate the username field and give some error text back to the view\n\t\t//$data['username'] = Input::post('username');\n\t\tSession::set_flash(\"error\", \"User name or password incorrect.\");\n\t\t//$data['login_error'] = 'Wrong username/password combo. Try again';\n\t }\n\t}\n\n\t// Show the login form\n\t$this->template->content = View::forge('account/simpleauth', $data);\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 $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{\n// See if we have values already stored in the session\nif ($this->session->get('login_hash')) {\n$this->confirmAuth();\nreturn;\n}\n// If this is a fresh login, check $_POST variables\nif (!isset($_POST[USER_LOGIN_VAR]) ||\n!isset($_POST[USER_PASSW_VAR])) {\n$this->redirect();\n}\nif ($this->md5) {\n $password = md5($_POST[USER_PASSW_VAR]);\n} else {\n$password = $_POST[USER_PASSW_VAR];\n}\n// Escape the variables for the query\n$login = mysql_escape_string($_POST[USER_LOGIN_VAR]);\n$password = mysql_escape_string($password);\n// Query to count number of users with this combination\n$sql = \"SELECT COUNT(*) AS usuarios\nFROM \" . USER_TABLE . \"\nWHERE\n\" . USER_TABLE_LOGIN . \"='$login' AND\n\" . USER_TABLE_PASSW . \"='$password'\";\n$result = $this->db->query($sql);\n$row = $result->fetch();\n// If there isn't is exactly one entry, redirect\nif ($row['num_users'] != 1) {\n$this->redirect();\n// Else is a valid user; set the session variables\n} else {\n$this->storeAuth($login, $password);\n}\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 }", "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 }", "function userAuthentication($name, $password)\n{\n global $db;\n $query = getAllUsers(); //Query for getting all users from the database\n $existingUsers = db_select($db, $query); //Array of all the users in the database\n //check if username exists and if password is matching\n foreach ($existingUsers as $value) {\n if ($value['username'] == $name) {\n //if input password matching with database password\n if (password_verify($password, $value['password'])) {\n //Create a new session (login user)\n $_SESSION['userId'] = $name;\n return true;\n } else {\n //password is not valid\n return false;\n }\n }\n }\n //username is not existing in the database\n return false;\n}", "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 login() {\n\n if(isset($_POST['login'])) {\n\n $username = escape_string($_POST['username']);\n $psw = escape_string($_POST['psw']);\n\n $query = query(\"SELECT * FROM utenti WHERE username = '{$username}' LIMIT 1\");\n confirm($query);\n\n $row = fetch_array($query);\n\n if(mysqli_num_rows($query) == 0 || password_verify($psw, $row['password']) === false) {\n set_message(\"La tua password o il tuo username sono sbagliati\", \"alert-danger\");\n redirect(\"login.php\");\n }\n else {\n $_SESSION['user'] = $row['username'];\n redirect(\"admin/\");\n }\n\n }\n\n}", "public function userbase_logincheck($h, $vars)\n {\n // if the traditional form has been submitted, return false and \n // use the traditional login/password authentication:\n if ($h->cage->post->testPage('page') == 'login') { return false; }\n \n $username = $vars[0];\n \n $sql = \"SELECT user_id, user_hybridauth_id FROM \" . TABLE_USERS . \" WHERE user_username = %s\";\n $results = $h->db->get_row($h->db->prepare($h->db->prepare($sql, $username)));\n \n if (!$results) { return false; }\n \n if ($results->user_id && $results->user_hybridauth_id) { \n return true;\n } else {\n return false;\n }\n\n }", "public function authenticate($username, $password) {\n\t\ttry {\n\t\t\t$db=db_connect();\n\t\t\t$statement=$db->prepare(\"select * from users\n WHERE name=: name;\n\t\t\t\");\n $statement->bindValue(':name', $username);\n\t\t\t$statement->execute();\n\t\t\t$rows=$statement->fetch(PDO:: FETCH_ASSOC);\n\t\t\tif (password_verify($password, $rows['password'])) {\n\t\t\t\t$_SESSION['auth']=1;\n\t\t\t\tunset($_SESSION['failedAuth']);\n\t\t\t\theader('Location: /home');\n\t\t\t\tdie;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(isset($_SESSION['failedAuth'])) {\n\t\t\t\t\t$_SESSION['failedAuth'] ++; //increment\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$_SESSION['failedAuth']=1;\n\t\t\t\t}\n\t\t\t\theader('Location: /login');\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\techo\"Error!: \" . $e->getMessage() .\"<br/>\";\n\t\t\tdie();\n\t\t}\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 }" ]
[ "0.75218815", "0.7398707", "0.7253535", "0.716421", "0.71003133", "0.70955014", "0.7075609", "0.7041077", "0.7002006", "0.69728905", "0.6959259", "0.6936361", "0.6924928", "0.6921282", "0.6879245", "0.6859193", "0.68561876", "0.6855071", "0.6836097", "0.67767394", "0.67748934", "0.676886", "0.6768549", "0.67523295", "0.6750465", "0.6708122", "0.6707216", "0.66871953", "0.6680037", "0.667918", "0.6658042", "0.6654623", "0.6648188", "0.6645343", "0.66351223", "0.66288525", "0.6628511", "0.6613586", "0.6611445", "0.66031945", "0.6602217", "0.6600332", "0.6582264", "0.65810096", "0.65708244", "0.65631574", "0.656", "0.6557579", "0.6557223", "0.6555241", "0.6540294", "0.65398335", "0.65390605", "0.6523371", "0.65208673", "0.6519328", "0.6516268", "0.65088207", "0.6504983", "0.6501181", "0.64905727", "0.6477441", "0.6477083", "0.6473271", "0.64696914", "0.64682585", "0.64580315", "0.6457502", "0.64551234", "0.64527726", "0.6451153", "0.644512", "0.6434157", "0.6422136", "0.6421613", "0.6416015", "0.64156824", "0.6413159", "0.6406764", "0.6399577", "0.6397605", "0.63971937", "0.6393479", "0.6391386", "0.63899916", "0.6382961", "0.63663137", "0.635952", "0.6328567", "0.6328187", "0.6315491", "0.63090366", "0.6306486", "0.6302198", "0.6297672", "0.62847185", "0.6277567", "0.6276586", "0.6273686", "0.6268804", "0.62650496" ]
0.0
-1
Simple email script that's triggered if a decision aid user wants to send an email to the study administrator
public static function sendAnxietyEmail($email) { $to = ADMIN_EMAIL; $subject = "Decision aid user requested contact"; $mssg = "A breast cancer decision aid user has requested that someone "; $mssg .= "contact her about support options. Her email address is:\r\n\r\n"; $mssg .= $email; $header = "From: " . ADMIN_EMAIL . "\r\n"; $header .= "Bcc: [email protected]"; mail($to, $subject, $mssg, $header); return "Email has been sent"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "function notify_request_client($email) {\n\t$link = SITE_URL.'requests.php';\n\n\t$text = \"Hello,\\n\";\n\t$text .= \"\\nYou requested an appointment. You can manage your appointment below:\\n\";\n\t$text .= \"\\n<a href='$link'>Manage</a>\\n\";\n\t$text .= \"\\nThanks,\\n\";\n\t$text .= \"The Ma-Maria team\";\n\n\tif(MAIL_ENABLED) {\n\t\tmail($email, 'Ma-Maria - Request', $text);\n\t}\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 }", "function sendVotesEmail($registrant, $jlist)\n{\n $contest = $_SESSION['contest'];\n $name = $_SESSION['ctst_name'];\n $subject = $name . \" vote for judges.\";\n $mailContent = $registrant['givenName'] . ' ' . $registrant['familyName'] .\n ' IAC member number ' . $registrant['iacID'] .\n ' voted as follows for judges at the ' . $name . \"\\n\\n\" . $jlist . \"\\n\\n\";\n $mailContent .= automatedMessage($name);\n $headers = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n $headers .= \"CC: \" . $registrant['email'] . \"\\r\\n\";\n do_email($contest['voteEmail'], $subject, $mailContent, $headers);\n}", "function sendPracticeReservationEmail($registrant, $slot)\n{\n $name = $_SESSION['ctst_name'];\n $subject = $name . \" practice slot.\";\n $mailContent = $registrant['givenName'] . ' ' . $registrant['familyName'] .\n \" has practice slot(s):\\n\\n\" . $slot . \"\\n\\nat the \" . $name . \".\\n\\n\";\n $mailContent .= automatedMessage($name);\n $headers = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($registrant['email'], $subject, $mailContent, $headers);\n}", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "function alertAdmin($subj,$msg) {\n global $cfg;\n $to=$cfg?$cfg->getAdminEmail():ADMIN_EMAIL;\n $from=$cfg?$cfg->getAlertEmail():ADMIN_EMAIL;\n //Send alert to admin.\n Misc::sendmail($to,$subj,$msg,$from); \n }", "protected function sendTestMail() {}", "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}", "abstract protected function _sendMail ( );", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "function emailforsurveyCourse($guid, $id, $email, $name, $form, $mentor) {\n\n global $wpdb;\n\n $slug = PAGE_SLUG;\n $btn_url = site_url() . '/' . $slug . '?survey=' . $id . '&guid=' . $guid;\n $btn_url = \"http://www.google.com\";\n\n $date = date(\"Y-m-d H:i:s\");\n $site_name = TR_SITE_NAME;\n $admin_email = get_option('admin_email');\n $headers = 'From: ' . $admin_email . \"\\r\\n\" .\n 'Reply-To: ' . $admin_email . \"\\r\\n\" .\n 'MIME-Version: 1.0' . \"\\r\\n\" .\n 'Content-type: text/html; charset=utf-8' . '\\r\\n' .\n 'X-Mailer: PHP/' . phpversion();\n\n $template = tt_get_template(\"survey_send_course\");\n $subj = $template->subject;\n $subj = str_replace(\"{{course_name}}\", $mentor, $subj);\n $msg = $template->content;\n $msg = str_replace(array('{{username}}', '{{course_name}}', '{{url}}', '{{site_name}}'), array($name, $mentor, $btn_url, $site_name), $msg);\n custom_mail($email, $subj, $msg, EMAIL_TYPE, \"\");\n}", "function emailforsurveyresult($survey) {\n\n global $wpdb;\n $id = $survey->id;\n $user_id = $survey->user_id;\n $user = get_user_by('id', $user_id);\n\n $mentor_id = $survey->mentor_id;\n $mentor = get_user_by('id', $mentor_id);\n\n\n $form = $wpdb->get_row\n (\n $wpdb->prepare\n (\n \"SELECT * FROM \" . survey_forms() . \" \"\n . \"WHERE id = %d\", $survey->survey_id\n )\n );\n\n $slug = PAGE_SLUG;\n $url = site_url() . \"/$slug?survey=\" . $id . \"&guid=\" . $survey->guid;\n $btnaccept = \"<a href='\" . $url . \"'>Click Here To Check Your Survey</a> <br/><br/>\";\n\n $date = date(\"Y-m-d H:i:s\");\n $site_name = TR_SITE_NAME;\n $admin_email = get_option('admin_email');\n $headers = 'From: ' . $admin_email . \"\\r\\n\" .\n 'Reply-To: ' . $admin_email . \"\\r\\n\" .\n 'MIME-Version: 1.0' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n /* for user */\n\n $template = tt_get_template(\"survey_result_user\");\n $subj = $template->subject;\n\n $msg = $template->content;\n $msg = str_replace(array('{{username}}', '{{survey_title}}', '{{mentor_name}}', '{{url}}', '{{site_name}}'), array($user->data->display_name, $form->title, $mentor->data->display_nam, $url, $site_name), $msg);\n\n custom_mail($user->data->user_email, $subj, $msg, EMAIL_TYPE, \"\");\n\n\n /* for mentor */\n\n $url = site_url() . \"/wp-admin/admin.php?page=survey_result&survey_id=\" . $id;\n\n $template = tt_get_template(\"survey_result_mentor\");\n $subj = $template->subject;\n\n $msg = $template->content;\n $msg = str_replace(array('{{username}}', '{{survey_user}}', '{{survey_title}}', '{{url}}', '{{site_name}}'), array($mentor->data->display_name, $user->data->display_name, $form->title, $url, $site_name), $msg);\n\n custom_mail($mentor->data->user_email, $subj, $msg, EMAIL_TYPE, \"\");\n}", "function mail_un_routine($conn, $email, $un){\n check_email(\"students\",$conn, $email);\n check_email(\"teachers\", $conn, $email);\n check_username(\"students\", $conn, $un);\n check_username(\"teachers\", $conn, $un);\n }", "function sendUpdateEmail($email, $registrant)\n{\n $name = $_SESSION['ctst_name'];\n $subject = $name . \" registration information updated.\";\n $mailContent = $registrant['givenName'] . ' ' . $registrant['familyName'];\n $mailContent .= \":\\n\\n\";\n $mailContent .= \"Your information for the \" . $name . \" has been updated.\\n\";\n $mailContent .= \"\\nIf you did not edit your registration information, \" .\n \"please write to the administrator:\\n\";\n $mailContent .= \"mailto:\" . ADMIN_EMAIL . \"?subject=account%20compromised\\n\";\n $mailContent .= \"\\nright away, or simply reply to this note.\\n\";\n $mailContent .= automatedMessage($name);\n $headers = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($email, $subject, $mailContent, $headers);\n}", "function emailtocoachnotify($to_id, $from_id, $status, $course, $exercise, $links, $files, $type, $url) {\n\n global $wpdb;\n /* coach */\n $coach_details = get_userdata($to_id);\n $coach_name = $coach_details->display_name;\n $coach_email = /* $coach_details->user_email; */\"[email protected]\";\n /* student */\n $student_details = get_userdata($from_id);\n $student_name = strtoupper($student_details->display_name); /* student_name */\n $student_email = $student_details->user_email; /* student email */\n\n $date = date(\"Y-m-d H:i:s\");\n $site_name = TR_SITE_NAME;\n $headers = 'From: ' . $student_email . \"\\r\\n\" .\n 'Reply-To: ' . $student_email . \"\\r\\n\" .\n 'MIME-Version: 1.0' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n $template = tt_get_template(\"project_submission\");\n $subj = $template->subject;\n $subj = str_replace(\"{{mentor_name}}\", $coach_name, $subj);\n\n $msg = $template->content;\n\n /* sending mail in case of project submission */\n \n if($coach_email==get_option('admin_email') && $type==\"Project\"){\n\n //if ($coach_email == \"[email protected]\" && $type == \"Project\") {\n\n\n if (empty($files)) {\n $msg = str_replace(array('{{mentor_name}}', '{{student_name}}', '{{student_email}}', '{{status}}', '{{exercise_name}}', '{{course_name}}', '{{work_files}}', '{{site_name}}'), array($coach_name, $student_name, $student_email, $status . \" work , below you can find work details\" . \"<br/>\", $exercise, $course, \"<br/>Submitted Work <br/> Links are: \" . $links . \"<br/><br/>For more information , please go to this link<br/>\" . $url . \"<br/><br/>*Note : You have recieved this mail because user has no mentor assigned yet.\", $site_name), $msg);\n } else {\n $msg = str_replace(array('{{mentor_name}}', '{{student_name}}', '{{student_email}}', '{{status}}', '{{exercise_name}}', '{{course_name}}', '{{work_files}}', '{{site_name}}'), array($coach_name, $student_name, $student_email, $status . \" work , below you can find work details\" . \"<br/>\", $exercise, $course, \"<br/>Submitted Work <br/>Links are : \" . $links . \"<br/>Files are :\" . $files . \"<br/><br/>For more information , please go to this link<br/>\" . $url . \"<br/><br/>*Note : You have recieved this mail because user has no mentor assigned yet.\", $site_name), $msg);\n }\n } else if ($type == \"Project\") {\n if (empty($files)) {\n $msg = str_replace(array('{{mentor_name}}', '{{student_name}}', '{{student_email}}', '{{status}}', '{{exercise_name}}', '{{course_name}}', '{{work_files}}', '{{site_name}}'), array($coach_name, $student_name, $student_email, $status . \" work , below you can find work details.<br/>\", $exercise . \"<br/>\", $course, \"<br/>Submitted Work <br/> Links are :\" . $links . \"<br/><br/>For more information , please go to this link<br/>\" . $url, $site_name), $msg);\n } else {\n $msg = str_replace(array('{{mentor_name}}', '{{student_name}}', '{{student_email}}', '{{status}}', '{{exercise_name}}', '{{course_name}}', '{{work_files}}', '{{site_name}}'), array($coach_name, $student_name, $student_email, $status . \" work , below you can find work details .<br/>\", $exercise, $course, \"<br/>Submitted Work <br/>Links are :\" . $links . \"<br/>Files are : \" . $files . \"<br/><br/>For more information , please go to this link<br/>\" . $url, $site_name), $msg);\n }\n } else if ($coach_email == get_option('admin_email') && $type == \"Marked\") {\n\n $msg = str_replace(array('{{mentor_name}}', '{{student_name}}', '{{student_email}}', '{{status}}', '{{exercise_name}}', '{{course_name}}', '{{work_files}}', '{{site_name}}'), array($coach_name, $student_name, $student_email, $status . \" work , below you can find work details .<br/>\", $exercise, $course, \"<br/><br/>For more information , please go to this link<br/>\" . $url, $site_name), $msg);\n } else if ($type == \"Marked\") {\n\n $msg = str_replace(array('{{mentor_name}}', '{{student_name}}', '{{student_email}}', '{{status}}', '{{exercise_name}}', '{{course_name}}', '{{work_files}}', '{{site_name}}'), array($coach_name, $student_name, $student_email, $status . \" work , below you can find work details .<br/>\", $exercise, $course, \"<br/><br/>For more information , please go to this link<br/>\" . $url, $site_name), $msg);\n }\n\n\n custom_mail($coach_email, $subj, $msg, EMAIL_TYPE, \"\");\n}", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "public function email_approver()\n {\n \n $this->db->select('EMAIL');\n $this->db->from('APPROVERS');\n $this->db->where('UNIT',$_SESSION['div']);\n $query = $this->db->get();\n $out = $query->result_array();\n\n if ($out) {\n\n \n foreach ($out as $recipient){\n \n //mail to approver\n $this->load->library('email');\n $htmlContent = '<h1>Title change requested in FREE System.</h1>';\n $htmlContent .= '<p>Please review the <a href=\"' . base_url() . '/admin\">Approval Control Panel</a> to review the request.</p>';\n \n $this->email->clear();\n\n $config['mailtype'] = 'html';\n $this->email->initialize($config);\n $this->email->to($recipient);\n $this->email->from('[email protected]', 'FREE System');\n $this->email->subject('Title Change Requested');\n $this->email->message($htmlContent);\n $this->email->send();\n }\n }\n }", "public function sendEmailWithApplyLink(){\n\t}", "public function sendEmailVerificationNotification();", "function send_reminders_to_supervisors($courseid){\n\n global $DB, $CFG;\n $numsheets = count_unsigned_timesheets($courseid);\n $numalerts = count_outstanding_alerts($courseid);\n\n if($numsheets == 0 && $numalerts == 0) return 0;\n\n $coursecon = get_context_instance(CONTEXT_COURSE, $courseid); \n $teachers = get_enrolled_users($coursecon, 'mod/assignment:grade');\n\n $course = $DB->get_record('course', array('id'=>$courseid));\n\n $subj = '['.$course->shortname.'] Notice: '.\n ($numsheets + $numalerts).' item(s) need your attention';\n\n $from = generate_email_supportuser();\n\n $msg = 'Hello!<br /><br />This is a reminder that you have '.\n ($numsheets+$numalerts).' item(s) that require your attention. <br /><br />'.\n '<ul>';\n \n if($numsheets > 0){\n $msg .=\n '<li>'.$numsheets.' timesheet(s). To inspect these timesheets, '.\n 'visit <a href=\"'. $CFG->wwwroot.'/blocks/timetracker/supervisorsig.php?id='.\n $courseid.'\">this link</a>.</li>';\n }\n\n if($numalerts > 0){\n $msg .=\n '<li>'.$numalerts.' alert(s). To inspect these alerts, '.\n 'visit <a href=\"'. $CFG->wwwroot.'/blocks/timetracker/managealerts.php?id='.\n $courseid.'\">this link</a>. As a reminder, <span style=\"font-weight: bold\">'.\n 'workers cannot sign their timesheets if there are outstanding alerts.</span></li>';\n } \n $msg .=\n '</ul><br /><br />'.\n 'We, and your workers, '.\n 'appreciate your prompt attention to this matter.<br />'.\n '<br />Thanks,<br /><br />'.\n '<br />The TimeTracker Development Team';\n \n $count = 0;\n foreach($teachers as $teacher){\n $ok = email_to_user($teacher, $from, $subj, \n format_text_email($msg, FORMAT_HTML), $msg, '', '', false);\n if(!$ok){\n error_log('Error sending timesheet reminder email to: '.\n $teacher->firstname.' '.$teacher->lastname);\n } else {\n $count++;\n }\n }\n return $count;\n}", "public function trainingVideoReminderMail() \n {\n $data = $this->BusinessOwner->find('all',array(\n 'conditions'=>array('BusinessOwner.group_role' => array('leader', 'co-leader'),'BusinessOwner.is_unlocked'=> 0),\n 'fields' => array('BusinessOwner.email','BusinessOwner.fname','BusinessOwner.lname','BusinessOwner.group_role')\n ));\n if(!empty($data)) {\n foreach($data as $row) { \n $emailLib = new Email();\n $subject = \"FoxHopr: Watch Training Video\";\n $template = \"training_video_reminder\";\n $format = \"both\";\n $to=$row['BusinessOwner']['email'];\n $emailLib->sendEmail($to,$subject,array('username'=>$row['BusinessOwner']['fname'].' '.$row['BusinessOwner']['lname']),$template,$format);\n }\n }\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 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 }", "function emailconfirmation(){\n\t\t\trequire( dirname(__FILE__) . '/email-confirmation.php' );\n\t\t}", "function email_admin($common,$db_object,$user_id,$post_var,$error_msg,$default)\n \t{\n\n \twhile(list($kk,$vv)=@each($post_var))\n\t\t{\n\n\t\t$$kk=$vv;\n\t\n\t\t}\n\t\n\t\t\n\t$empl_id = $user_id_all;\n\n//codings for sending email to the system owner....\n\t\n\t$config=$common->prefix_table(\"config\");\n\t$appraisal_table=$common->prefix_table(\"appraisal\");\n \t$user=$common->prefix_table(\"user_table\");\n\t\n\t\n\t$mysql=\"select tasubject,tamessage from $config\";\n\t$rslt_arr=$db_object->get_a_line($mysql);\n\n\n\n\t$tasubject=$rslt_arr[\"tasubject\"];\n\t$tamessage=$rslt_arr[\"tamessage\"];\n\n\n\tpreg_match(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$tamessage,$match);\n\t\n\t$newmatch = $match[1];\n\t$str = \"\";\n\tfor($i=0;$i<count($empl_id);$i++)\n\t{\n\t\t$subqry2=\"select username,email from $user where user_id='$empl_id[$i]'\";\n\n\t\t$user_name=$db_object->get_a_line($subqry2);\n\t\t//$to=$user_name[\"username\"].\"[email protected]\";\n\t\t$to=$user_name[\"email\"];\n\n\t\t$subqry2=\"select email from $user where user_id='1'\";\n\n\t\t$sys_email=$db_object->get_a_line($subqry2);\n\t\t$from=$sys_email[\"email\"];\n\t\t\n\t\t$mysql = \"select test_mode,test_type from $appraisal_table where user_id='$empl_id[$i]'\";\n\n\t\t$testdetails_arr = $db_object->get_rsltset($mysql);\n\n\t\tfor($j=0;$j<count($testdetails_arr);$j++)\n\t\t{\n\t\t\t$test_mode = $testdetails_arr[$j][\"test_mode\"];\n\t\t\t$test_type = $testdetails_arr[$j][\"test_type\"];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($test_mode == \"Test\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"Test Mode\";\n\t\t\t}\n\t\t\telseif($test_mode == \"360\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"360 Mode\";\n\t\t\t}\n\t\t\tif($test_type == \"t\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Technical\";\n\t\t\t}\n\t\t\telseif($test_type == \"i\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Inter Personal\";\n\t\t\t}\n\t\t\n\t$str .= preg_replace(\"/<{(.*?)}>/e\",\"$$1\",$newmatch);\n\n\n\t\t\n\t\t}\n\n\n\n$tamessage = preg_replace(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$str,$tamessage);\n\n\n$values[\"username\"]\t\t=$user_name[\"username\"];\n$values[\"login_username\"] \t= $user_name[\"username\"];\n\n$values[\"url\"]=$common->http_path.\"/index.php\";\n\n$tamessage1=$common->direct_replace($db_object,$tamessage,$values);\n\n\n//echo \"to $to<br> sub $tasubject<br> mess $tamessage1<br> from $from<br><br>\";\n\n$sent=$common->send_mail($to,$tasubject,$tamessage1,$from);\n\n\t}\n\tif($sent)\n\t\t{\n\t\t\n\t\t\techo $error_msg[\"cAppraisalMail_sent\"];\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $error_msg[\"cAppraisalMail_fail\"];\n\t\t}\n\n}", "function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}", "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 emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }", "public function email() {\n\t\trequire( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/email.php' );\n\t}", "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}", "static function send_request_for_approval_to($email,$name,$date_from,$date_to,$reason,$approve_link,$reject_link){\n $message = \"<p> Dear supervisor, <br> Employee {$name} requested for some time off, starting on {$date_from} and ending on {$date_to}, stating the reason: {$reason}.<br> Click on one of the below links to approve or reject the application: <a href={$approve_link}> approve </a> - <a href={$reject_link}> reject </a> </p>\";\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n \t$success = mail($email, 'A request in pending you approval', $message, $headers);\n if (!$success) {\n echo $errorMessage = error_get_last()['message'];\n }\n }", "function NewSendEmail($SrcType,$SrcId,$to,$sub,&$letter,&$attachments=0,&$embeded=0,$from='') { \n global $FESTSYS,$CONF;\n \n// echo \"Debug: \" .( UserGetPref('EmailDebug')?2:0) . \"<p>\";\n $Send = 1;\n if (@ $CONF['testing']){\n if (strstr($CONF['testing'],'@')) { \n $to = $CONF['testing'];\n } else { \n echo \"<p>Would send email to \" . Pretty_Print_To($to);\n if ($from) echo \"From: \" . Pretty_Print_To($from);\n echo \" with subject: $sub<p>Content:<p>$letter<p>\\n\";\n \n echo \"Text: \" . ConvertHtmlToText($letter);\n if ($attachments) {\n if (is_array($attachments)) {\n foreach ($attachments as $i=>$att) {\n if (is_array($att)) {\n if (isset($att[0])) {\n echo \"Would attach \" . $att[0] . \" as \" . $att[1] . \"<p>\";\n } else {\n echo \"Would attach \" . $att['AttFileName'] . \"<p>\"; \n }\n } else {\n echo \"Would Attach \" . $att . \"<p>\";\n }\n } \n } else {\n echo \"Would attach $attachments<p>\"; \n }\n }\n if ($embeded) {\n if (is_array($embeded)) {\n foreach ($embeded as $i=>$att) {\n if (is_array($att)) {\n if (isset($att[0])) {\n echo \"Would embed \" . $att[0] . \" as \" . $att[1] . \"<p>\";\n } else {\n echo \"Would embed \" . $att['AttFileName'] . \"<p>\";\n }\n } else {\n echo \"Would embed \" . $att . \"<p>\"; \n }\n } \n } else {\n echo \"Would embed $embeded<p>\"; \n }\n }\n $Send = 0;\n// exit; // Uncomment to test in depth\n// return; // Under test this will then log, and not send\n }\n }\n $From = $FESTSYS['SMTPuser'];\n $Atts = [];\n \n $email = new PhpMailer(true);\n try {\n $email->SMTPDebug = ((Access('SysAdmin') && UserGetPref('EmailDebug'))?2:0); // 2 general testing, 4 problems...\n $email->isSMTP();\n $mailserv = $FESTSYS['HostURL'];\n if (Feature('SMTPsubdomain')) $mailserv = Feature('SMTPsubdomain') . \".\" . $mailserv;\n $email->Host = $mailserv;\n $email->SMTPAuth = true;\n $email->AuthType = 'LOGIN';\n $email->From = $email->Username = $FESTSYS['SMTPuser'] . \"@\" . $FESTSYS['HostURL'];\n $email->FromName = $FESTSYS['FestName'];\n $email->Password = $FESTSYS['SMTPpwd'];\n $email->SMTPSecure = 'tls';\n $email->Port = 587;\n $email->SMTPOptions = ['ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true]];\n \n if ($from) {\n if (is_array($from)) {\n $email->setFrom($from[0],$from[1]);\n } else {\n $email->setFrom($from);\n }\n }\n \n if (is_array($to)) {\n if (is_array($to[0])) {\n foreach ($to as $i=>$too) {\n if (!isset($too[0])) continue;\n $a = $too[1];\n $n = (isset($too[2])?$too[2]:'');\n switch ($too[0]) {\n case 'to':\n $email->addAddress($a,$n);\n $To = \"$n <$a>\";\n break;\n case 'cc':\n $email->addCC($a,$n);\n break;\n case 'bcc':\n $email->addBCC($a,$n);\n break;\n case 'replyto':\n $email->addReplyTo($a,$n);\n break;\n case 'from':\n $email->setFrom($a,$n);\n $From = \"$n <$a>\";\n break;\n } \n }\n } else {\n $email->addAddress($to[0],(isset($to[1])?$to[1]:''));\n $To = $to[0]; \n }\n } else {\n $email->addAddress($to);\n }\n $email->Subject = $sub;\n $email->isHTML(true);\n $email->Body = $letter; // HTML format\n $email->AltBody = ConvertHtmlToText($letter); // Text format\n\n if ($attachments) {\n if (is_array($attachments)) {\n foreach ($attachments as $i=>$att) {\n if (is_array($att)) {\n if (isset($att[0])) {\n $email->addAttachment($att[0],$att[1]);\n $Atts[] = [$att[0],$att[1],0];\n } else {\n $email->addAttachment($att['AttFileName']);\n $Atts[] = [\"\",$att['AttFileName'],0];\n }\n } else { \n $email->addAttachment($att);\n $Atts[] = [\"\",$att,0];\n }\n } \n } else {\n $email->addAttachment($attachments);\n $Atts[] = [\"\",$attachments,0];\n }\n }\n if ($embeded) {\n if (is_array($embeded)) {\n foreach ($embeded as $i=>$att) { \n if (is_array($att)) {\n if (isset($att[0])) {\n $email->addEmbeddedImage($att[0],$att[1]);\n $Atts[] = [$att[0],$att[1],1];\n } else {\n $email->addEmbeddedImage($att['AttFileName']);\n $Atts[] = [\"\",$att['AttFileName'],1];\n }\n } else {\n $email->addEmbeddedImage($att);\n $Atts[] = [\"\",$att,1];\n }\n }\n } else {\n $email->addEmbeddedImage($embeded,0); \n $Atts[] = [\"\",$embeded,1];\n }\n }\n\n if ($Send) $email->Send();\n \n } catch (Exception $e) {\n echo 'Message could not be sent. Mailer Error: ', $email->ErrorInfo;\n }\n\n $EmLog = ['Type'=>$SrcType,'TypeId'=>$SrcId,'Subject'=>$sub,'FromAddr'=>json_encode($From),'ToAddr'=>json_encode($to), 'TextBody'=>$letter,'Date'=>time()];\n $logid = Insert_db('EmailLog', $EmLog);\n if ($Atts && $logid) {\n foreach ($Atts as $at) {\n $atc = ['EmailId'=>$logid,'AttName'=>$at[0],'AttFileName'=>$at[1],'AttType'=>$at[2]];\n Insert_db('EmailAttachments',$atc);\n }\n }\n}", "public function email()\n\t{\n\t\t$email = trim($this->input->post('email'));\n\t\t$title = trim($this->input->post('subject'));\n\t\t$message = trim($this->input->post('message'));\n\n\t\t$this->load->helper('email_helper');\n\n\t\t$to = $email;\n\t\t$subject = 'Interview Message | OnJob Portal';\n\t\t$message = '<p>Subject: '.$title.'</p>\n\t\t<p>Message: '.$message.'</p>' ;\n\n\t\t$email = sendEmail($to, $subject, $message, $file = '' , $cc = '');\n\t\t\n\t\tif(trim($email)=='success'){\n\t\t\techo 'Email has been sent successfully';\n\t\t}else {\n\t\t\techo 'There is a problem while sending email';\n\t\t}\n\t}", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function sendAction() {\n __mail::send('[email protected]', '[email protected]', 'title', 'me', 'hello world');\n\n return false;\n }", "public function send() {\n $to = Yii::app()->params['adminEmail'];\n $subject = $this->subject;\n $message = $this->body;\n @mail($to, $subject, $message);\n }", "private function sendSubmissionConfirmationEmail() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ResearcherNotification.php');\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted successfully', $this->trackingFormId);\r\n $emailBody = sprintf('Your tracking form was submitted successfully. It has been assigned a Tracking ID of %s.\r\n\r\nApprovals may still be required from your Dean, Ethics, and the Office of Research Services depending on the details provided. To see details of these approvals, you can login to the MRU research website and go to My Tracking Forms.\r\n\r\nIf you have any question, then please contact MRU\\'s Grants Facilitator, Jerri-Lynne Cameron at 403-440-5081 or [email protected].\r\n\r\nRegards,\r\nOffice of Research Services\r\n\r\n', $this->trackingFormId);\r\n\r\n $confirmationEmail = new ResearcherNotification($subject, $emailBody, $this->submitter);\r\n try {\r\n $confirmationEmail->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send confirmation notification to researcher : '. $e);\r\n }\r\n }", "public function email($approverid,$days)\n {\n Configure::write('debug',0);\n $approvermail = $this->Common->staff_name($approverid);\n $usernname = $this->Session->read('USERNAME');\n $emailcontent=\"A leave request applied by '\".ucfirst($usernname).\"' for '\".$days.\"'\";\n $to = \"[email protected]\"; \n $email = new CakeEmail('myConfig');\n $email->template('invoice', false);\n $email->emailFormat('html');\n $email->to($to);\n $email->from('[email protected]');\n $email->subject('Leave Apply');\n $email->viewVars(\n array\n (\n 'product'=>$orderproduct\n ));\n $email->send();\n \n\n $to = array('[email protected]','[email protected]');\n foreach($to as $emailto)\n { \n $email = new CakeEmail('smtp');\n $email->template('invoice_admin', false);\n $email->emailFormat('html');\n $email->to($emailto);\n $email->from('[email protected]');\n $email->subject('Payment Detail');\n $email->viewVars(\n array\n (\n 'product'=>$orderproduct\n ));\n $email->send();\n\n } \n }", "public function issueAssessmentAndSendEmail($followup_trigger_id,$sql,$email_stationary,$email_subject) {\n\t\tif($result = $this->db->query($sql)) {\n\t\t\twhile($row = $result->fetch_object()) {\n\t\t\t\tif(isset($row->client_id) && !$this->hasBeenTriggered($followup_trigger_id, $row->client_id, $row->client_checklist_id)) {\n\t\t\t\t \n\t\t\t\t //Issue the new assessment\n\t\t\t\t $row->issued_client_checklist_id = $this->clientChecklist->autoIssueChecklist($row->checklist_id, $row->client_id);\n\t\t\t\t \n\t\t\t\t //Send the email to the client\n\t\t\t\t\t$this->clientEmail->send(\n\t\t\t\t\t\t$row->client_id,\n\t\t\t\t\t\t$email_subject,\n\t\t\t\t\t\t$email_stationary,\n\t\t\t\t\t\t$row,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t//set the admin-crm to mark the job as complete\n\t\t\t\t\t$this->reportFollowup($row->client_id,$followup_trigger_id, $row->client_checklist_id);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result->close();\n\t\t}\n\t\treturn;\n\t}", "private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }", "function mailreport()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlerObject = atkErrorHandlerBase::get('mail', array('mailto'=>atkconfig('mailreport')));\n\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n}", "static function send_request_response($email,$status,$created_at){\n $message = \"<p>Dear employee, <br> Your supervisor has {$status} your application submitted on {$created_at}.</p>\";\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n \n \t$success = mail($email,\"Your request has been {$status}\", $message, $headers);\n if (!$success) {\n echo $errorMessage = error_get_last()['message'];\n }\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "function mail()\n {\n\n\n }", "function send_email()\r\n{\r\n global $REQUEST_URI, $HTTP_REFERER, $REMOTE_ADDR;\r\n\r\n $reportlevel = pnConfigGetVar('reportlevel');\r\n $adminmail = pnConfigGetVar('adminmail');\r\n $notify_from = pnConfigGetVar('notify_from');\r\n \r\n $errortime = date(\"m/j/Y at g:i a\" );\r\n $message .= \"\"._ERR404.\"\\n\\n\"._ERRMAIL404.\" $REMOTE_ADDR\";\r\n $message .= \"\"._ERRMAILON.\" $errortime.\\n\\n\";\r\n $message .= \"\"._ERRMAILURI.\" \\n\" . pnGetBaseURL(). \"$REQUEST_URI\\n\\n\";\r\n $message .= \"\"._ERRMAILREF.\"\\n$HTTP_REFERER\\n\\n\";\r\n\r\n # Send the mail message. This assumes mail() will work on your system!\r\n// 11-09-01 eugeniobaldi not compliant with PHP < 4.0.5\r\n// pnMail($adminmail, _ERR404REP, $message, \"From: $notify_from\");\r\n pnMail($adminmail, _ERR404REP, $message);\r\n}", "public function sendRestoreEmail();", "function emailTrigger ( $subject, $to ) {\n\t$to = '[email protected]' ;\n\t$subject = \"HTML email\";\n\n\t$message = \"\n<html>\n<head>\n<title>HTML email</title>\n</head>\n<body>\";\n\t$message .=\"</body>\n</html>\n\";\n\t$headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n\t$headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\n\tmail($to,$subject,$message,$headers);\n}", "function send_normal_email($sender, $recipient,$subject, $priority, $message)\n{\n\t\t$pres = new presence;\n\t\n\t\t$body = $pres->GetTemplate('presencemail_Sample');\n\t\t$body = $pres->ProcessTemplateFromData($body);\n\t\t$cmsmailer = new \\cms_mailer();\n\t\t$cmsmailer->reset();\n\t//\t$cmsmailer->SetFrom($sender);//$this->GetPreference('admin_email'));\n\t\t$cmsmailer->AddAddress($recipient,$name='');\n\t\t$cmsmailer->IsHTML(true);\n\t\t$cmsmailer->SetPriority($priority);\n\t\t\n\t\t$cmsmailer->SetBody($message);\n\t\t$cmsmailer->SetSubject($subject);\n\t\t$cmsmailer->Send();\n if( !$cmsmailer->Send() ) \n\t\t{\t\t\t\n \treturn false;\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 }", "private function _sendNewStatusUpdateEmailToAdministrators()\n {\n // Get a reference to the Joomla! mailer object\n $mailer = \\JFactory::getMailer();\n\t\t\t\n\t\t\t$config = \\JFactory::getConfig();\n\t\t\t$sender = array( \n\t\t\t $config->get( 'mailfrom' ),\n\t\t\t $config->get( 'fromname' ) \n\t\t\t);\n \n\t\t\t$mailer->setSender($sender);\n\n // Load the category and set the recipient to this category's email address\n\t\t\t// $category = $this->category;\n\t\t\t// $emails = explode(',', $category->email);\n\t\t\t$user = \\JFactory::getUser('admin');\n\t\t\t$mailer->addRecipient($user->email);\n \n // Set the subject\n $subject = \\JFactory::getConfig()->get('sitename') . \": New Status Update ...\";\n\t\t\t$mailer->setSubject($subject);\n\t\t\t$projectId = $this->recordData['hshrndreview_fk_project_id'];\n\t\t\t\n\t\t\t$db = \\JFactory::getDbo();\n\t\t\t//this is just to know whether we are in the user is in the reviewer group or not\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select($db->quoteName(array('name', 'owner')));\n\t\t\t$query->from($db->quoteName('#__hshrndreview_projects'));\n\t\t\t$query->where($db->quoteName('hshrndreview_project_id').\" = \". $projectId);\n\t\t\t$db->setQuery($query);\n\t\t\t$project = $db->loadRow();\n\t\t\t\n\t\t\t$owner = $project['1'];\n\t\t\t//this is just to know whether we are in the user is in the reviewer group or not\n\t\t\t$query2 = $db->getQuery(true);\n\t\t\t$query2->select('title');\n\t\t\t$query2->from($db->quoteName('#__usergroups'));\n\t\t\t$query2->where($db->quoteName('id').\" = \". $owner);\n\t\t\t$db->setQuery($query2)->loadObject();\n\t\t\t$ownerName = $db->loadResult();\n\t\t\t$ownerName = ltrim($ownerName, \"hsgrp_\");\t\t\n\t\t\t\n\t\t\t$submitter = \\JFactory::getUser();\n\t\t\t$submitterName = $submitter->name;\n\t\t\t\n\t\t\t//$ownerName = ltrim($ownerName, \"hsgrp_\");\n\t\t\t\n\t\t\t$body = \"A new status update for project named: \\\"\" . $project['0'] . \"\\\" has been submitted by \" . $submitterName . \"@\" . $ownerName . \" to the HSH project database!\\n\\n Have a nice day - your friendly HSH RnD Review automailer...\";\n\t\t\t$mailer->setBody($body);\n // Send the email\n\t\t\t$send = $mailer->Send();\n\t\t\tif ( $send !== true ) {\n\t\t\t echo 'Error sending email: ' . $send->__toString();\n\t\t\t} else {\n\t\t\t echo 'Mail sent';\n\t\t\t}\n }", "function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "public function sendsupportmail(){\r\n $mail_to = \"\";\r\n $fromaddress = \"[email protected]\";//\"[email protected]\"; \r\n $receipient_email = $_POST[\"receipient_email\"];\r\n $receipient_message = $_POST[\"receipient_message\"];\r\n $subject = $_POST[\"subject\"];\r\n $mail_to = (isset($_POST[\"mail_to\"]))?$_POST[\"mail_to\"]:\"\";\r\n\r\n if($mail_to ==\"acads\"){\r\n $subject = $_POST[\"subject\"].' --- '.$receipient_email;\r\n $toaddress = \"[email protected]\";//[email protected]\r\n $ccaddress = \"[email protected]\";//\"[email protected]\";\r\n $ccaddress .= \",[email protected]\";//\"[email protected]\";\r\n }else{\r\n $toaddress = \"[email protected]\";\r\n $ccaddress = \"\";//\"[email protected]\";\r\n }\r\n $mail_response = $this->sendemails($fromaddress,$toaddress,$receipient_email,$receipient_message,$subject,$ccaddress);\r\n echo $mail_response;\r\n }", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "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 emailBasedAction()\n {\n $signoffEmail = $this->em->getRepository('Fisdap\\Entity\\SignoffEmail')->findOneBy(array('email_key' => $this->_getParam('key')));\n \n // Determine what the message should be...\n // We have 4 or so states.\n // State 1 - No signoffEmail was found.\n if ($signoffEmail == null) {\n $message = \"I'm sorry, we could not find a matching shift for the provided code. Please contact customer support.\";\n // State 2 - Email has expired\n } elseif ($signoffEmail->expire_time != null && $signoffEmail->expire_time->format('U') <= time()) {\n $message = \"I'm sorry, the deadline to fill out the form for this shift has passed.\";\n // State 3 - Shift has already been signed off on\n } elseif ($signoffEmail->has_signed_off) {\n $message = \"We're sorry. It looks like someone already signed off on this shift on \" . $signoffEmail->signoff_time->format('F jS, Y \\a\\t Hi') . \".\";\n } else {\n $signoffEmail->has_signed_off = true;\n $signoffEmail->signoff_time = new \\DateTime();\n $signoffEmail->save();\n \n $message = \"Thank you, you have successfully signed off on this shift.\";\n }\n \n $this->view->message = $message;\n }", "function createInterimEmailContact($interimId){\r\n\r\n // get student id\r\n $query = \"select `StudentID` from `interims` where `ID`='$interimId'\";\r\n $result = mysql_query($query);\r\n\t\t$value = mysql_fetch_assoc($result);\r\n if(!isset($value['StudentID'])) return false;\r\n $studentId = $value['StudentID'];\r\n\r\n // submit special contact showing that an email has been sent for the given interim\r\n $description = \"Email sent to student concerning interim \".$interimId;\r\n $this->updateSpecialHistory($studentId,$description,0);\r\n }", "function send_ach_fatal_email($parameters) \n\t{\n\t\t//ECash_Documents_AutoEmail::Queue_For_Send($parameters->application_id, 'RETURN_LETTER_1_SPECIFIC_REASON', $parameters->status->fail_set[0]->transaction_register_id);\n\t\tECash_Documents_AutoEmail::Queue_For_Send($parameters->application_id, 'PAYMENT_FAILED', $parameters->status->fail_set[0]->transaction_register_id);\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "private function emailAtLogin() {}", "public static function sendEmail($user,$RDV) : bool {\n\n $user = parent::findBy($user->getEmail(), 'email');\n\n $to = $user->getEmail();\n $from = \"<[email protected]>\";\n $subject = 'CHUO NEWSLETTER : Reclamation';\n $message = '\n <html>\n <head>\n <style>\n .banner-color {\n background-color: #eb681f;\n }\n .title-color {\n color: #0066cc;\n }\n .button-color {\n background-color: #0066cc;\n }\n @media screen and (min-width: 500px) {\n .banner-color {\n background-color: #0066cc;\n }\n .title-color {\n color: #eb681f;\n }\n .button-color {\n background-color: #eb681f;\n }\n }\n </style>\n </head>\n <body>\n <div style=\"background-color:#ececec;padding:0;margin:0 auto;font-weight:200;width:100%!important\">\n <table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout:fixed;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\">\n <center style=\"width:100%\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:0 auto;max-width:512px;font-weight:200;width:inherit;font-family:Helvetica,Arial,sans-serif\" width=\"512\">\n <tbody>\n <tr>\n <td bgcolor=\"#F3F3F3\" width=\"100%\" style=\"background-color:#f3f3f3;padding:12px;border-bottom:1px solid #ececec\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;width:100%!important;font-family:Helvetica,Arial,sans-serif;min-width:100%!important\" width=\"100%\">\n <tbody>\n <tr>\n <td valign=\"middle\" width=\"50%\" align=\"right\" style=\"padding:0 0 0 10px\"><span style=\"margin:0;color:#4c4c4c;white-space:normal;display:inline-block;text-decoration:none;font-size:12px;line-height:20px\">'.date(\"Y-m-d\").'</span></td>\n <td width=\"1\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#8BC34A\" style=\"padding:20px 48px;color:#ffffff\" class=\"banner-color\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <img src=\"../img/logo-accueil.png\" alt=\"Centre Hospitalier Universitaire Mohammed VI OUJDA\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" style=\"padding:20px 0 10px 0\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\" style=\"padding: 0 15px;text-align: justify;color: rgb(76, 76, 76);font-size: 12px;line-height: 18px;\">\n <h3 style=\"font-weight: 600; padding: 0px; margin: 0px; font-size: 16px; line-height: 24px; text-align: center;\" class=\"title-color\">Bonjour '.$user->getNom().',</h3>\n <p style=\"margin: 20px 0 30px 0;font-size: 15px;text-align: center;\">L\\'Etat du votre Rendez-vous que vous avez reservé pour '.$RDV->getDateRdv().' a été changer!</p>\n <div style=\"font-weight: 200; text-align: center; margin: 25px;\"><a style=\"padding:0.6em 1em;border-radius:600px;color:#ffffff;font-size:14px;text-decoration:none;font-weight:bold\" class=\"button-color\">Consulter votre compte pour plus de détails</a></div>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0 24px;color:#999999;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"middle\" width=\"100%\" style=\"border-top:1px solid #d9d9d9;padding:12px 0px 20px 0px;text-align:center;color:#4c4c4c;font-weight:200;font-size:12px;line-height:18px\">Regards,\n <br><b>The CHUO Team</b>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"padding:0 0 8px 0\" width=\"100%\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </center>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </body>\n </html>';\n\n //from w3schools\n $headers = 'From: ' . $from . \"\\r\\n\".\n \"MIME-Version: 1.0\" . \"\\r\\n\" .\n \"Content-type: text/html; charset=UTF-8\" . \"\\r\\n\";\n\n if(mail($to, $subject, $message, $headers))\n //Email Sended\n return true;\n else\n return false;\n\n }", "function main() {\n\n // Make sure we have at least one receipient.\n $to = \\Drupal::config('ebms_core.settings')->get('pubmed_missing_article_report_recips');\n if (empty($to)) {\n $to = \\Drupal::config('ebms_core.settings')->get('dev_notif_addr');\n }\n if (empty($to)) {\n \\Drupal::logger('ebms_report')->error('No recipients for dropped articles report.');\n }\n else {\n send_report($to);\n }\n}", "function sendemail($collegeid,$username){\r\n\t\t$to = ''.$collegeid.'@kristujayanti.com';\r\n\t\t//$to = '[email protected]';\t\t\r\n\t\t$from = '[email protected]';\r\n\t\t$subject = 'Password for the Placement Signup';\r\n\t\t//calling the function buildBody() that returns a string value..\r\n\t\t$message = buildBodysendemail($collegeid,$username,$from);\r\n\t\t$header = 'From: '.$from.'\r\n\t\tto: '.$to.'\r\n\t\tSubject: '.$subject.'\r\n\t\tContent-type: '.\"text/html\".'\r\n\t\tcharset: '.\"utf-8\".'';\r\n\t\tif(mail($to,$subject,$message,$header)){\r\n\t\t\techo 'true';\r\n\t\t\t?>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t\telse{\r\n\t\t\techo 'false';\r\n\t\t\t?>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t\t\r\n\t}", "function new_user_email_admin_notice()\n {\n }", "public function sendConfEmail() {\r\n\t\t$to = array($this->email => $this->fname . \" \" . $this->lname);\r\n\t\t$emailObj = new mandrillApi($to, \"Welcome to Tackster.com\");\r\n\t\t$htmlString = <<<EOF\r\n<h3>Welcome to Tackster.com</h3>\r\n<p>You have now registered with <a href=\"http://www.tackster.com\">Tackster.com</a>.\r\nWe figure we should keep the greeting short and get you started right away!</p>\r\nLet's go to the site by <a href=\"http://www.tackster.com\"><b>Visting Tackster.com</b></a>!\r\nEOF;\r\n\t\t$emailObj->createEmail($htmlString);\r\n\t\t$emailObj->sendEmail();\r\n\t}", "function email_settings()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\t// PM_REMINDER: First byte = Email PM when received new\r\n\t\t\t// \t\t\tSecond byte= Show pop-up when new PM received\r\n\r\n\t\t\t$info = array();\r\n\r\n\t\t\tforeach (array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->member[$k]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$info[$k] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$info['key'] = $this->md5_check;\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.email\", ['Profile' => $info]);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "function sendMailForDomainPublishUnPublish()\n\t\t{\n\t\t\tglobal $CFG;\n \t $sel_id \t = $_POST['checkedvaluesarr'];\n\t\t\t$tablename \t\t = $_POST['tablename'];\n\t\t\t$filedname \t\t = $_POST['fieldname'];\n\t\t\t$changestatusval = $_POST['changestatusval'];\n\t\t\t$upid \t\t\t = $_POST['whereField'];\n\t\t\t$from_name = $CFG['site']['adminname'];\n\t\t\t$from_email = $CFG['site']['adminemail'];\n\t\t\t\n\t\t\tif( isset($sel_id) && is_array($sel_id) ) {\n\t\t foreach($sel_id as $x => $value){\n\t\t \t$sel_del = \"UPDATE \".$tablename.\" SET \".$filedname.\" = '\".$this->filterInput($changestatusval).\"' WHERE \".$upid.\" = '\".$this->filterInput($value).\"'\";\n\t \t$res_del = mysql_query($sel_del) or die($this->mysql_error($sel_del));\n\t \tif($res_del)\n\t \t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t \t$mail_content = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailToAllDomainUser.tpl\");\n\t\t\t\t\t $mail_content = str_replace('{SITE_TITLE}',$CFG['site']['sitename'],$mail_content);\n\t\t\t\t\t $mail_content = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_content);\n\t\t\t\t\t \n\t\t\t\t\t if($changestatusval == 'publish')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t$to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t \t\t$mailsubject = $CFG['site']['sitename'].\" Your New Domain Published\";\n\t\t\t\t\t\t\t\t\t$name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t$domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t$mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Published By Us.Lets Enjoy With Your New Domain.',$mail_content);\n\t\t\t\t \t\t$mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'unpublish')\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \t $to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t\t \t $mailsubject = $CFG['site']['sitename'].\" Your New Domain Un Published\";\n\t\t\t\t\t\t\t\t\t $name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Published By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t \t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'pointed')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Pointed .Lets Enjoy With Your New Point Domain.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t \t else\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Un Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Pointed By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t $mail_content = str_replace('{ADMINNAME}',$CFG['site']['adminname'],$mail_content);\n\t\t\t\t\t\t\t//echo $mail_content;die();\n\t\t\t\t\t\t\t$ok=$this->sendMail($from_name,$from_email,$to_email,$mailsubject,$mail_content);\n\t\t\t\t\t\t}\n\t\t \n\t\t \t}\n\t\t echo 'success';exit;\n\t\t }\t\t\n\t\t\t\n\t\t}", "public function agent_email_appln()\n {\n $this->load->model('admin/admin_model');\n $booking_id = $this->input->post(\"booking_id\",true);\n\n $booking_details = $this->admin_model->get_tour_booking_details($booking_id);\n foreach ($booking_details as $bd) { }\n $mail_body = $this->input->post(\"mail_body\",true);\n $subject = $this->input->post(\"subject\",true);\n\n $agent_email = $this->input->post(\"agent_email\",true); //agent email id\n $mail_body = $this->input->post(\"mail_body\",true);\n $from_name = \"Dubai Private Tour\";\n $from_email = \"[email protected]\";\n \n if(!empty($agent_email)){\n send_mail($agent_email, $from_name, \"New Booking Confirmation- Ref: \".$subject, $mail_body, $from_email); //send to agent\n } \n // ====== Send email notification =========\n sf('success_message','Email has been sent to agent successfully!');\n redirect('admin/tour-booking');\n }", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "private function _sendNewStatusUpdateEmailToUser()\n {\n // Get a reference to the Joomla! mailer object\n $mailer = \\JFactory::getMailer();\n\t\t\t\n\t\t\t$config = \\JFactory::getConfig();\n\t\t\t$sender = array( \n\t\t\t $config->get( 'mailfrom' ),\n\t\t\t $config->get( 'fromname' ) \n\t\t\t);\n \n\t\t\t$mailer->setSender($sender);\n\n\t\t\t$user = \\JFactory::getUser();\n\t\t\t$mailer->addRecipient($user->email);\n \n // Set the subject\n $subject = \\JFactory::getConfig()->get('sitename') . \": New Status Update...\";\n\t\t\t$mailer->setSubject($subject);\n\t\t\t$projectId = $this->recordData['hshrndreview_fk_project_id'];\n\t\t\t\n\t\t\t$db = \\JFactory::getDbo();\n\t\t\t//this is just to know whether we are in the user is in the reviewer group or not\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select($db->quoteName(array('name', 'owner')));\n\t\t\t$query->from($db->quoteName('#__hshrndreview_projects'));\n\t\t\t$query->where($db->quoteName('hshrndreview_project_id').\" = \". $projectId);\n\t\t\t$db->setQuery($query);\n\t\t\t$project = $db->loadRow();\n\t\t\t\n\t\t\t$body = \"Thank you for submitting a new status update for project named: \\\"\" . $project['0'] . \"\\\". It has been added to the HSH project database!\\n\\n Have a nice day - your friendly HSH RnD Review automailer...\";\n\t\t\t$mailer->setBody($body);\n // Send the email\n\t\t\t$send = $mailer->Send();\n\t\t\tif ( $send !== true ) {\n\t\t\t echo 'Error sending email: ' . $send->__toString();\n\t\t\t} else {\n\t\t\t echo 'Mail sent';\n\t\t\t}\n }", "function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}", "function mailUser($transcript, $phoneNumber, $CallSid)\n{\n\t $inCallEmployeeId = getOne(\"select user_id from schedule where ph_id = (select ph_id from phone_numbers where phone_number like '%\".trim($phoneNumber).\"') and is_active=1\");\n\t$inCallEmployeeMail = getOne(\"select user_email from users where user_id = '\".$inCallEmployeeId.\"'\");\n\t$voiceURL = getOne(\"select recording_url from incomming_calls where call_sid = '\".$CallSid.\"'\");\n\t\n\t\n\tif(trim($inCallEmployeeMail) != \"\")\n\t{\n\t\t$message = \"\n\t\t\t<h3> New Call for you..!!</h3>\n\t\t\t<br />\n\t\t\tYou have a new message.<br />\n\t\t\tTranscription: \".$transcript.\"<br />\n\t\t\tVoice Url: \".$voiceURL.\"<br /><br />\n\t\t\tLog in to VBX scheduler for more details.<br />\n\t\t\tThanks.\t\t\n\t\t\";\n\t\tmailEmployee($inCallEmployeeMail, $message);\n\t}\n}", "public function sendemail( $id_projet , $status);", "function send_announcement_email($user_list, $course_code, $_course, $mail_title, $mail_content) {\n\t\tforeach ( $user_list as $this_user ) {\n\t\t\t$mail_subject = get_lang ( 'professorMessage' ) . ' - ' . $_course ['official_code'] . ' - ' . $mail_title;\n\t\t\t\n\t\t\t$mail_body = '[' . $_course ['official_code'] . '] - [' . $_course ['name'] . \"]\\n\";\n\t\t\t$mail_body .= $this_user ['lastname'] . ' ' . $this_user ['firstname'] . ' <' . $this_user [\"email\"] . \"> \\n\\n\" . stripslashes ( $mail_title ) . \"\\n\\n\" . trim ( \n\t\t\t\t\tstripslashes ( html_entity_decode ( strip_tags ( str_replace ( array ('<p>', '</p>', '<br />' ), array ('', \"\\n\", \"\\n\" ), $mail_content ) ) ) ) ) . \" \\n\\n-- \\n\";\n\t\t\t$mail_body .= $_user ['firstName'] . ' ' . $_user ['lastName'] . ' ';\n\t\t\t$mail_body .= '<' . $_user ['mail'] . \">\\n\";\n\t\t\t$mail_body .= $_course ['official_code'] . ' ' . $_course ['name'];\n\t\t\t\n\t\t\t//set the charset and use it for the encoding of the email - small fix, not really clean (should check the content encoding origin first)\n\t\t\t//here we use the encoding used for the webpage where the text is encoded (ISO-8859-1 in this case)\n\t\t\t// hgz 20070612\n\t\t\t//if(empty($charset)){$charset='ISO-8859-1';}\n\t\t\t$encoding = 'Content-Type: text/plain; charset=' . SYSTEM_CHARSET;\n\t\t\t$newmail = api_mail ( $this_user ['lastname'] . ' ' . $this_user ['firstname'], $this_user ['email'], $mail_subject, $mail_body, $_SESSION ['_user'] ['lastName'] . ' ' . $_SESSION ['_user'] ['firstName'], $_SESSION ['_user'] ['mail'], $encoding );\n\t\t}\n\t}", "function notify_request_provider($email, $number) {\n\t$link = SITE_URL.'requests.php';\n\n\t$text = \"Hello,\\n\";\n\t$text .= \"\\nYou received an appointment request. You can manage your appointments below:\\n\";\n\t$text .= \"\\n<a href='$link'>Manage</a>\\n\";\n\t$text .= \"\\nThanks,\\n\";\n\t$text .= \"The Ma-Maria team\";\n\n\tif(MAIL_ENABLED) {\n\t\tmail($email, 'Ma-Maria - Request', $text);\n\t}\n\t\n\tif(TWILIO_ENABLED) {\n\t\tsend_sms($number, $text);\n\t}\n}", "function email_cron() {\n return true;\n}", "function sendMail_dis($to_email,$extraMsg)\n{\n //$to_email \t=\"[email protected]\";\n $from \t=\"[email protected]\";\n\t$subject\t=\"List of cancelled transaction in last 1 week\";\n $msgTxt\t\t=\"Hi, <br><br>\n\t \tPlease find the list of usernames whose transaction has been cancelled in last 1 week (From: $last_7day - $dateEnd).<br><br>\";\n\n $msgTxt \t.=$extraMsg.\"<br><br>\";\n $msgTxt \t.=\"Thanks,<br>Team Jeevansathi<br>\";\n send_email($to_email,$msgTxt,$subject,$from);\n}", "public function sendWithViewAction() {\n __mail::init('example/view/mail/example', array(\n 'name' => 'Foo'\n ));\n\n __mail::send('[email protected]', '[email protected]', 'title', 'me');\n\n return false;\n }", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "public function step_5( )\n\t{\n\t\t$DbSubcriber \t= \\tify_db_get( 'emailing_subscriber' );\n\t\t$DbMailQueue \t= \\tify_db_get( 'emailing_queue' );\n\n\t\t$defaults = array(\n\t\t\t'test_email' \t=> wp_get_current_user()->user_email,\n\t\t);\n\t\t$this->item->campaign_send_options = wp_parse_args( $this->item->campaign_send_options, $defaults );\n\n\t\t$total = 0;\n\t\tif( isset( $this->item->campaign_recipients['wystify_subscriber'] ) )\n\t\t\tforeach( $this->item->campaign_recipients['wystify_subscriber'] as $subscriber_id )\n\t\t\t\tif( $DbSubcriber->select()->cell_by_id( $subscriber_id, 'status' ) === 'registred' )\n\t\t\t\t\t$total++;\n\t\tif( isset( $this->item->campaign_recipients['wystify_mailing_list'] ) )\n\t\t\tforeach( $this->item->campaign_recipients['wystify_mailing_list'] as $list_id )\n\t\t\t\t$total += $DbSubcriber->select()->count( array( 'list_id' => $list_id, 'status' => 'registred' ) );\n\t\t\t\n\t\t$set_send_active = $DbMailQueue->select()->has( 'campaign_id', $this->item->campaign_id );\t\n\t?>\n\t\t<div class=\"tifybox\">\n\t\t\t<h3><?php _e( 'Tester la campagne', 'tify' );?></h3>\n\t\t\t<div class=\"inside\">\n\t\t\t\t<div id=\"send-test\">\t\t\n\t\t\t\t\t<div id=\"send-test-submit\">\n\t\t\t\t\t\t<span id=\"send-test-ok\"></span>\n\t\t\t\t\t\t<input type=\"text\" id=\"send-test-email\" name=\"campaign_send_options[test_email]\" value=\"<?php echo $this->item->campaign_send_options['test_email'];?>\" size=\"80\" autocomplete=\"off\"/>\n\t\t\t\t\t\t<button class=\"button-secondary\"><i class=\"fa fa-paper-plane\"></i><div class=\"tify_spinner\"></div></button>\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<em style=\"margin-top:5px;display:block;color:#999;font-size:0.9em;\"><?php _e( 'La visualisation en ligne et le lien de désinscription resteront actifs pendant 60 minutes après l\\'expédition de ce mail.<br />La désinscription n\\'affectera pas les abonnements relatifs à l\\'email d\\'expédition de test, le système procède à une désinscription pour un compte de service fictif.', 'tify');?></em>\n\t\t\t\t</div>\t\n\t\t\t</div>\t\n\t\t</div>\n\t\t\n\t\t<div id=\"prepare\" class=\"tifybox\">\n\t\t\t<h3><?php _e( 'Préparation de la campagne', 'tify' );?></h3>\n\t\t\t<div class=\"inside\">\n\t\t\t\t<div id=\"logs\">\n\t\t\t\t \t<div class=\"duplicates\">\n\t\t\t\t\t\t<h5><?php _e( 'Doublons supprimés', 'tify' );?> (<span class=\"total\"></span>)</h5>\n\t\t\t\t\t\t<ul></ul>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"invalids\">\n\t\t\t\t\t\t<h5><?php _e( 'Emails invalides', 'tify' );?> (<span class=\"total\"></span>)</h5>\n\t\t\t\t\t\t<ul></ul>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"not_found\">\n\t\t\t\t\t\t<h5><?php _e( 'Correspondances introuvables', 'tify' );?> (<span class=\"total\"></span>)</h5>\n\t\t\t\t\t\t<ul></ul>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t<div id=\"actions\">\t\t\n\t\t\t\t\t<a href=\"#\" id=\"campaign-prepare\"><?php _e( 'Préparer la campagne', 'tify' );?></a>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div id=\"totals\">\n\t\t\t\t\t<h5><?php _e( 'Totaux', 'tify' );?> : </h5>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li class=\"expected\"><?php _e( 'Attendus', 'tify' );?> : <span class=\"value\"><?php echo $total;?></span></li>\n\t\t\t\t\t\t<li class=\"processed\"><?php _e( 'Mis en file', 'tify' );?> : <span class=\"value\"><?php echo $DbMailQueue->select()->count( array( 'campaign_id' => $this->item->campaign_id ) );?></span></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div> \n\t\t\t</div>\t\n\t\t</div>\t\t\n\t\t\t\t\t\n\t\t<?php \n\t\t\t\\tify_control_progress( \n\t\t\t\tarray(\n\t\t\t\t\t'id'\t\t=> 'CampaignPrepareProgress'\n\t\t\t\t)\n\t\t\t);\n\t\t?>\n\t<?php\t\n\t}", "function sendEmailToAdministrators($subject, $body){\n\t\t$headers = \"From: quota_store\\r\\n\";\n\t\t//$headers .= \"Reply-To: \" . strip_tags($_POST['req-email']) . \"\\r\\n\";\n\t\t//$headers .= \"CC: [email protected]\\r\\n\";\n\t\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\t\n\t\t$admin = user_array(eF_executeQuery(\"select * from users where login='admin'\")); //is fixed, the below lines must be removed.\n\n\t\t// This is just a temporary fix.\n\t\t\t$content = '<html>';\n\t\t\t$content .='\t<body>';\n\t\t\t\n\t\t\t$salutation = '<p>Dear '.$admin['name'].' '.$admin['surname'].'</p>';\n\t\t\t\n\t\t\t$footer = '<p><em>This is an automated message by the Quota Store.</em></p>';\n\t\t \t \n\t\t\t$content .= $salutation . $body . $footer;\n\t\t\t\n\t\t\t$content .='\t</body>';\n\t\t\t$content .='</html>';\n\t\n\t\t\t$myEmail = '[email protected]';\n\n /*\n echo \"about to send email to Dr. Sadjadi: \" . $myEmail . PHP_EOL;\n echo \"subject: \" .PHP_EOL;\n var_dump($subject);\n echo \"content: \".PHP_EOL;\n var_dump($content);\n echo \"headers: \".PHP_EOL;\n var_dump($headers);\n\t\t\tmail($myEmail, $subject, $content, $headers);\n\t */\n\n\t\t// TODO This fucntion does not return any admins. It needs to be fixed.\n\t\t$admins = db_getAdministrators_new();\n\t\t\n\t\tforeach ($admins as $admin){\n\t\t\t\n\t\t\t$content = '<html>';\n\t\t\t$content .='\t<body>';\n\t\t\t\n\t\t\t$salutation = '<p>Dear '.$admin['name'].' '.$admin['surname'].'</p>';\n\t\t\t\n\t\t\t$footer = '<p><em>This is an automated message by the Quota Store.</em></p>';\n\t\t \t \n\t\t\t$content .= $salutation . $body . $footer;\n\t\t\t\n\t\t\t$content .='\t</body>';\n\t\t\t$content .='</html>';\n\n /*\n echo \"about to send email to admin: \" . $admin['email'] .PHP_EOL;\n echo \"subject: \" .PHP_EOL;\n var_dump($subject);\n echo \"content: \".PHP_EOL;\n var_dump($content);\n echo \"headers: \".PHP_EOL;\n var_dump($headers);\n */\n\n\t\t\tmail($admin['email'], $subject, $content, $headers);\n\t\t}\n\t\n\t}", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "function emailHTML($QuoteID, $fields, $course, $students, $days, $days_old, $estimate, $students_old, $name, $logo, $logoW, $logoH, $phone, $fax, $url) {\r\n\t\tif($students_old > 0) {\r\n\t\t\tif($students_old = 1) {\r\n\t\t\t\t$students_old = \"You specified \" . $students_old . \" student.\";\r\n\t\t\t} else {\r\n\t\t\t\t$students_old = \"You specified \" . $students_old . \" students.\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$students_old = \"\";\r\n\t\t}\r\n\t\tif($days > 1) {\r\n\t\t\tif($days_old = 1) {\r\n\t\t\t\t$days_old = \"You specified \" . $days_old . \" day.\";\r\n\t\t\t} else {\r\n\t\t\t\t$days_old = \"You specified \" . $days_old . \" days.\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$days_old = \"\";\r\n\t\t}\r\n $body = \"<html lang='en'>\r\n<head>\r\n\t<meta charset='utf-8' />\r\n\t<title></title>\r\n</head>\r\n<body>\r\n\t\t<table style='width:600px;'>\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<td style='width:300px;'>\r\n\t\t\t\t\t<img src='\" . $url . \"img/\" . $logo . \"' style='margin-left:85px;' width='\" . $logoW . \"' height='\" . $logoH . \"' alt='\" . $name . \" - Safety Training | Certification Classes for OSHA, MSHA, DOT, EPA & Marcellus Shale' />\r\n\t\t\t\t</td>\r\n\t\t\t\t<td style='vertical-align:top;'>\r\n\t\t\t\t\t<b>Your \" . $name . \" Online Quote:</b><br>\r\n\t\t\t\t\tQuote ID: \" . $QuoteID . \"\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td style='vertical-align:top;'>\r\n\t\t\t\t\t<b>Attn:</b> \" . $fields['name'] . \"<br>\r\n\t\t\t\t\t<b>Phone:</b> \" . $fields['phone'] . \"<br>\r\n\t\t\t\t\t<b>Email:</b> <a href='mailto:\" . $fields['email'] . \"'>\" . $fields['email'] . \"</a><br>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td style='vertical-align:top;'>\r\n\t\t\t\t\t<b>Date:</b> \" . DATE(\"m/d/Y\") . \"\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tfoot>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='2' style='text-align:justify;padding-top:15px;font-size:12px;'>\r\n\t\t\t\t\t<b>NOTICE:</b> Price is valid for day of quote only. Confirmation must be received on the same day \r\n\t\t\t\t\tthat the quote is generated. Quoted cost shall include all travel, labor, course materials and \r\n\t\t\t\t\tcertificates of completion. Additional students will be charged at $135/student/day.\r\n\t\t\t\t\t<br><br>\r\n\t\t\t\t\tWhen your authorized company representative affixes their signature to this proposal, the proposal \r\n\t\t\t\t\tbecomes a binding contract between \" . $name . \", Inc. and your firm for schedule and delivery of service. \r\n\t\t\t\t\tIf you have any questions, please feel free to contact \" . $name . \" at \" . $phone . \". Please fax proposal \r\n\t\t\t\t\tto \" . $name . \" at \" . $fax . \".\r\n\t\t\t\t\t<br><br>\r\n\t\t\t\t\tPayment is due prior to delivery of services.\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='2'>\r\n\t\t\t\t\t<td style='min-height: 40px;height: 40px;'>&nbsp;</td>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<div style='width: 300px;font-size: 11px;text-align: right;margin: 0 75px 20px auto;border-top: 1px solid #000;'>Authorized Company Representative</div>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<div style='width: 150px;font-size: 11px;text-align: right;margin: 0 75px 20px auto;border-top: 1px solid #000;'>Date</div>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tfoot>\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='2' style='padding-top:15px;'>\r\n\t\t\t\t\t<table style='border:1px solid #000;border-collapse:collapse;width:95%;margin:10px auto;'>\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<tr style='background-color:#3399FF;'>\r\n\t\t\t\t\t\t\t\t<th style='border:1px solid #000;padding:3px;width:40%;'>Product</th>\r\n\t\t\t\t\t\t\t\t<th style='border:1px solid #000;padding:3px;width:15%;'>Course No.</th>\r\n\t\t\t\t\t\t\t\t<th style='border:1px solid #000;padding:3px;width:10%;'>Days</th>\r\n\t\t\t\t\t\t\t\t<th style='border:1px solid #000;padding:3px;width:20%;'>Student Qty.</th>\r\n\t\t\t\t\t\t\t\t<th style='border:1px solid #000;padding:3px;width:15%;'>Location</th>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'>\" . $course . \"</td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;text-align:center;'>\" . $fields['class_title'] . \"</td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;text-align:center;'>\" . $days . \"</td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;text-align:center;'>\" . $fields['students'] . \"</td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;text-align:center;'>\" . $fields['location'] . \"</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'><br></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'><br></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;'></td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;text-align:right;'>Total:</td>\r\n\t\t\t\t\t\t\t\t<td style='border:1px solid #000;padding:3px;text-align:center;'>$\" . $estimate . \"</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\";\r\n\t\tif($students) {\r\n\t\t\t$body .= \"\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='2' style='color:#ff0000;text-align:justify;padding-top:15px;font-style:italic;font-weight:bold;font-size:12px;'>\r\n\t\t\t\t\tPlease Note: \" . $students_old . \" The minimum number of students required for \r\n\t\t\t\t\tthis class is \" . MINIMUMSTUDENTS . \". An adjustment has been made to increase the number of students attending this class \r\n\t\t\t\t\tto meet the minimum requirement.\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\";\r\n\t\t}\r\n\t\tif($days > 1) {\r\n\t\t\t$body .= \"<tr>\r\n\t\t\t\t<td colspan='2' style='color:#ff0000;text-align:justify;padding-top:15px;font-style:italic;font-weight:bold;font-size:12px;'>\r\n\t\t\t\t\tPlease Note: \" . $days_old . \" The number of days required for this class as set \r\n\t\t\t\t\tby OSHA is \" . $days . \" days. An adjustment has been made to the number of days you have chosen to comply with the standard.\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\";\r\n\t\t}\r\n\t\t$body .= \"\r\n\t\t</tbody>\r\n\t</table>\r\n</body>\r\n</html>\";\r\n\r\n return $body;\r\n }", "function notifyReg($uName,$eMail) { //notify a new user registration\r\n\tglobal $ax, $set, $today;\r\n\t\t\r\n\t//compose email message\r\n\t$subject = \"{$ax['log_new_reg']}: {$uName}\";\r\n\t$msgBody = \"\r\n<p>{$ax['log_new_reg']}:</p><br>\r\n<table>\r\n\t<tr><td>{$ax['log_un']}:</td><td>{$uName}</td></tr>\r\n\t<tr><td>{$ax['log_em']}:</td><td>{$eMail}</td></tr>\r\n\t<tr><td>{$ax['log_date_time']}:</td><td>\".IDtoDD($today).\" {$ax['at_time']} \".ITtoDT(date(\"H:i\")).\"</td></tr>\r\n</table>\r\n\";\r\n\t//send email\r\n\t$result = sendEml($subject,$msgBody,$set['calendarEmail'],1,0,0);\r\n\treturn $result;\r\n}", "function offerEmail() {\n\t\t$this->set('title_for_layout', 'Advertiser Offer Email');\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll());\n\t}", "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 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}", "function SendMail($email_title,$email_body,$reboot)\n{\n\tif($email_title == \"\" || $email_body == \"\" || $email_title == null || $email_body == null)\n\t{\n\t\tfile_put_contents(\"result.txt\",\"email body or title is null\\n\",FILE_APPEND);\n\t\texit(\"email内容为空或者email标题为空\\n\");\t\t\n\t}\n\n\t//load basic class: SMTPMailer\n\trequire(\"SMTPMailer.php\");\n\n\tif($reboot == \"start\"){//说明第一次启动程序\n\t\tfile_put_contents(\"result.txt\",\"\");\t\t\n\t\t//链接到数据库并获得要发送的邮件地址\n\t\t$connection = mysql_connect(\"localhost\", \"mydonor\", \"MYDONOR@))(\") or die (\"Unable toconnect!\");\n\t\tmysql_select_db(\"mydonor\") or die (\"Unable to select database!\"); \n\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t$query = \"SELECT distinct email_addr FROM if_donor_email WHERE priority >= 0 and deleted = 0 ORDER BY id\"; \n\t\t$result = mysql_query($query) or die (\"Error in query: $query. \" . mysql_error());\n\t\t//写下本次要发送的邮件地址到emaillist\n\t\tfile_put_contents(\"emaillist.txt\",\"\");\n\t\t$i = 0;\n\t\twhile($email = mysql_fetch_row($result)){\n\t\t\tfile_put_contents(\"emaillist.txt\",$i.\" \".$email[0].\"\\n\",FILE_APPEND);\t\n\t\t\t$i ++;\n\t\t}\n\t\t//计算本次要发送的邮件数目\n\t\t$email_num = mysql_num_rows($result);\n\t\tif($i !== $email_num) die (\"出错:email数目和写入emaillist文件的email数不一致\"); \n\t\t//关闭数据库链接\n\t\tmysql_close($connection);\n\n\t\t//从emaillist.txt中读入本次待发送的邮件列表\n\t\t$file= \"emaillist.txt\";\n\t\t$emaillist=file($file,FILE_IGNORE_NEW_LINES);\n\t\tif($email_num !== count($emaillist)) die (\"出错:email数目和emaillist文件总行数不一致\"); \n\t\tfor($i = 0; $i < count($emaillist); $i ++){\n\t\t\t$email[$i] = preg_split(\"/\\s+/\",trim($emaillist[$i]));\t\t\n\t\t}\n\t\t//开始发送邮件\n\t\tif(count($email) > 0){\n\t\t\t\tfor($i = 0; $i < count($email); $i ++)\n\t\t\t\t{\n\t\t\t\t\t$mailer=new SMTPMailer();\n\t\t\t\t\t$mailer->Host=\"202.38.64.8\";\n\t\t\t\t\t$mailer->UserName=\"\";\n\t\t\t\t\t$mailer->Password=\"\";\n\t\t\t\t\t$mailer->From=\"\";\n\t\t\t\t\t$mailer->ContentType=\"text/html\";\n\t\t\t\t\t$mailer->Subject=$email_title; \n\t\t\t\t\t$mailer->Body=$email_body;\n\t\t\t\t\t$mailer->To=$email[$i][1];\n\t\t\t\t\tif($i !== intval($email[$i][0])) exit(\"当前发送email地址的id和emaillist.txt中的记录行号id不一致\\n\");\n\t\t\t\t\tif($mailer->Send()){\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" 成功\\n\",FILE_APPEND);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" \".$mailer->Error.\"\\n\",FILE_APPEND);\n/*\t\t\t\t\t\tif(strstr($mailer->Error,\"Recipient\") !== false){\n\t\t\t\t\t\t\t$connection = mysql_connect(\"localhost\", \"mydonor\", \"MYDONOR@))(\") or die (\"Unable toconnect!\");\n\t\t\t\t\t\t\tmysql_select_db(\"mydonor\") or die (\"Unable to select database!\"); \n\t\t\t\t\t\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t\t\t\t\t\t$query = \"update if_donor_email set priority = -1 where email_addr = '\".$email[0].\"'\"; \n\t\t\t\t\t\t\t$setResult = mysql_query($query);\n\t\t\t\t\t\t\t$error = mysql_error();\n\t\t\t\t\t\t}*/\n\t\t\t\t\t}\n\t\t\t\t\tfile_put_contents(\"currpos.txt\",$i);\n\t\t\t\t\tsleep(5);\n\t\t\t\t}\n\t\t}\t\t\t\t\n\t}\n\telse if($reboot == \"restart\"){//说明属于重启\n\t\t$file= \"currpos.txt\";\n\t\t$currpos=file($file,FILE_IGNORE_NEW_LINES);\n\t\tif(count($currpos) === 0) exit(\"在重启模式下,currpos.txt不能为空\\n\");\n\t\t$from = intval($currpos[0])+1; //重启后应该从第几个email开始发送\n\t\tif($from < 1) exit(\"$from 值不对\");\n\t\t\n\t\t//从emaillist.txt中读入本次待发送的邮件列表\n\t\t$file= \"emaillist.txt\";\n\t\t$emaillist =file($file,FILE_IGNORE_NEW_LINES);\n\t\tfor($i = 0; $i < count($emaillist); $i ++){\n\t\t\t$email[$i] = preg_split(\"/\\s+/\",trim($emaillist[$i]));\t\t\n\t\t}\n\t\t//开始发送邮件\n\t\tif(count($email) > 0){\n\t\t\t\tfor($i = $from; $i < count($email); $i ++)\n\t\t\t\t{\n\t\t\t\t\t$mailer=new SMTPMailer();\n\t\t\t\t\t$mailer->Host=\"202.38.64.8\";\n\t\t\t\t\t$mailer->UserName=\"\";\n\t\t\t\t\t$mailer->Password=\"\";\n\t\t\t\t\t$mailer->From=\"\";\n\t\t\t\t\t$mailer->ContentType=\"text/html\";\n\t\t\t\t\t$mailer->Subject=$email_title; \n\t\t\t\t\t$mailer->Body=$email_body;\n\t\t\t\t\t$mailer->To=$email[$i][1];\n\t\t\t\t\tif($i !== intval($email[$i][0])) exit(\"当前发送email地址的id和emaillist.txt中的记录id不一致\\n\");\n\t\t\t\t\tif($mailer->Send()){\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" 成功\\n\",FILE_APPEND);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfile_put_contents(\"result.txt\",$i.\" \".$email[$i][1].\" \".$mailer->Error.\"\\n\",FILE_APPEND);\n/*\t\t\t\t\t\tif(strstr($mailer->Error,\"Recipient\") !== false){\n\t\t\t\t\t\t\t$connection = mysql_connect(\"localhost\", \"mydonor\", \"MYDONOR@))(\") or die (\"Unable toconnect!\");\n\t\t\t\t\t\t\tmysql_select_db(\"mydonor\") or die (\"Unable to select database!\"); \n\t\t\t\t\t\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t\t\t\t\t\t$query = \"update if_donor_email set priority = -1 where email_addr = '\".$email[0].\"'\"; \n\t\t\t\t\t\t\t$setResult = mysql_query($query);\n\t\t\t\t\t\t\t$error = mysql_error();\n\t\t\t\t\t\t}*/\n\t\t\t\t\t}\n\t\t\t\t\tfile_put_contents(\"currpos.txt\",$i);\n\t\t\t\t\tsleep(5);\n\t\t\t\t}\n\t\t}\t\t\t\n\t\t\t\t\t\n\t}else{//既不属于第一次启动,也不属于重启,说明有问题\n\t\texit(\"出错:/既不属于第一次启动,也不属于重启,说明有问题\"); \t\n\t}\t\n}", "function getEmailSubject() { return 'JS BUILDER'; }", "function sendNewMessageNotification($to_user_id,$to_name,$subject,$fromEmail,$replyEmail)\n{\n #check if the user enabled this option\n $query=\"select message_email,email from users where user_id ='$to_user_id' and access_level NOT IN ('ebulkuser','eremote') limit 1\";\n $email_option=getDBRecords($query); \n\n if($email_option[0]['message_email'] == \"Y\")\n { \n $email = $email_option[0]['email'];\n $html=\"<p><font size=\\\"2\\\" face=\\\"Verdana, Arial, Helvetica, sans-serif\\\">Dear \".$to_name.\",<br><br>\n You have been sent a message via the online \".DBS.\" system regarding <b>\".$subject.\"</b>, please login to your secure online account to read the message.\n\t\t\t <br><br>Thank You</font></p>\";\n\n\n\t\t$text=\"Dear \".$to_name.\",\n \n\t\t\t You have been sent a message via the online \".DBS.\" system regarding \".$subject.\", please login to your secure online account to read the message.\n\t\t\t \n\t\t\t Thank You\";\n\n\t\t \n\t\t$from = $fromEmail;\n\t\t$mail = new htmlMimeMail();\n\t\t$mail->setHtml($html, $text);\n\t\t$mail->setReturnPath($replyEmail);\n $mail->setFrom($from);\n $mail->setSubject(\"Important Message\");\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n\n if(!empty($email))\n\t {\n $result = $mail->send(array($email), 'smtp');\t\n\t\t}\n } \t\n}", "function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}", "function eddc_email_alert( $user_id, $commission_amount, $rate, $download_id, $commission_id ) {\n\tif ( edd_get_option( 'edd_commissions_disable_sale_alerts', false ) ) {\n\t\treturn;\n\t}\n\n\tif ( get_user_meta( $user_id, 'eddc_disable_user_sale_alerts', true ) ) {\n\t\treturn;\n\t}\n\n\t/* send an email alert of the sale */\n\t$user = get_userdata( $user_id );\n\t$email = $user->user_email; // set address here\n\t$subject = edd_get_option( 'edd_commissions_email_subject', __( 'New Sale!', 'eddc' ) );\n\t$message = edd_get_option( 'edd_commissions_email_message', eddc_get_email_default_body() );\n\n\t// Parse template tags\n\t$message = eddc_parse_template_tags( $message, $download_id, $commission_id, $commission_amount, $rate );\n\t$message = apply_filters( 'eddc_sale_alert_email', $message, $user_id, $commission_amount, $rate, $download_id, $commission_id );\n\n\tif ( class_exists( 'EDD_Emails' ) ) {\n\t\tEDD()->emails->__set( 'heading', $subject );\n\t\tEDD()->emails->send( $email, $subject, $message );\n\t} else {\n\t\t$from_name = apply_filters( 'eddc_email_from_name', $from_name, $user_id, $commission_amount, $rate, $download_id );\n\n\t\t$from_email = edd_get_option( 'from_email', get_option( 'admin_email' ) );\n\t\t$from_email = apply_filters( 'eddc_email_from_email', $from_email, $user_id, $commission_amount, $rate, $download_id );\n\n\t\t$headers = \"From: \" . stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) . \" <$from_email>\\r\\n\";\n\n\t\twp_mail( $email, $subject, $message, $headers );\n\t}\n}", "function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function sendemail($email){\n\t\t$hash_email = encrypt_decrypt('encrypt', $email);\n\t\t$link = 'http://localhost/carpool/edit_info.php?id='.urlencode($hash_email);\n\t\t$mail = new PHPMailer;\n\t\t$mail->isSMTP(); // Set mailer to use SMTP\n\t\t$mail->Host = 'smtp.mail.yahoo.com'; // Specify main and backup SMTP servers\n\t\t$mail->Port = 465; \n\t\t$mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t$mail->Username = 'xxx'; // SMTP username\n\t\t$mail->Password = 'xxx'; // SMTP password\n\t\t$mail->SMTPSecure = 'ssl'; // Enable encryption, 'ssl' also accepted\n\t\t$mail->isHTML(true);\n\n\t\t$mail->From = 'xxx';\n\t\t$mail->FromName = 'Carpool Services';\t\t\n\t\t$mail->addAddress($email); // Add a recipient\n\t\t$mail->Subject = 'Modify your info';\n\t\t$mail->Body = 'Thank you for using Carpool. Please use the link below to edit your information. <br />'.$link;\t\t\n\t\t$mail->SMTPDebug = 1;\n\t\tif(!$mail->send()) {\n\t\t\t\treturn false;\n\t\t} else {\n\t\t\t\treturn true;\n}\n\t}", "function sendActivationEmail($emailid, $activationcode) {\n\t// send activation email\n\t// require ('emailcode.php');\n\t$link = \"http://s336355547.onlinehome.us/peach/service/index.php?method=get&module=activate&emailid=$emailid&activationcode=$activationcode\";\n\t$STR_EMAIL_STRING =\"<br/>Hi,<br/><br/>Please click on below link to activate your account.<br/><br/>$link <br/><br/>Regards <br/>Peach Health <br/>\";\n\tSEND_MAIL($emailid, \"Activation link of peach health\", $STR_EMAIL_STRING, \"[email protected]\");\n}", "function wpsp_send_tour_design() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, true );//confirm to operator\n\twpsp_email_notify( $inquiry_info, false, true ); //confirm to traveller\n\t\n\tdie();\n}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }" ]
[ "0.7360788", "0.6819686", "0.6604754", "0.6542428", "0.65334666", "0.6513322", "0.65036994", "0.64904356", "0.646865", "0.64024365", "0.6377022", "0.6365306", "0.6353499", "0.63419515", "0.6322707", "0.6319457", "0.6318369", "0.63136584", "0.6313477", "0.63003933", "0.6283735", "0.626568", "0.62450314", "0.6237323", "0.62298", "0.62228686", "0.621295", "0.6201867", "0.6192161", "0.6189179", "0.61875224", "0.6184541", "0.61832553", "0.61550283", "0.6149264", "0.6146053", "0.6144182", "0.6132971", "0.6127757", "0.6126131", "0.6124252", "0.6123386", "0.61039084", "0.6098511", "0.6087929", "0.60580915", "0.6047449", "0.6047312", "0.60348976", "0.60200846", "0.60185784", "0.6011498", "0.6008431", "0.60012734", "0.60011625", "0.5999832", "0.59994984", "0.59978795", "0.59954965", "0.59902614", "0.5988872", "0.5987555", "0.5986538", "0.597558", "0.597237", "0.5963276", "0.59602827", "0.5949214", "0.5928868", "0.59273094", "0.59224147", "0.591694", "0.5912419", "0.59098953", "0.59025574", "0.5895393", "0.58909255", "0.5886653", "0.5884911", "0.58841735", "0.5880604", "0.5874189", "0.58739877", "0.5873928", "0.58728594", "0.586982", "0.5862719", "0.5856804", "0.5844927", "0.58408093", "0.5838091", "0.58314925", "0.5828951", "0.582769", "0.5826791", "0.5826419", "0.58220184", "0.5816224", "0.5813064", "0.58077693" ]
0.63886374
10
Obtains list of all decision aid users in database
public static function getUserList() { $db = DB::getInstance(); $resp = ""; try { $query = $db->query("SELECT id, first_name, last_name, username, lump, admin FROM `users` ORDER BY last_name ASC", PDO::FETCH_ASSOC); $rows = $query->fetchAll(); $resp = json_encode($rows); } catch (Exception $e) { $db->rollBack(); $resp = $e->getMessage(); } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLTIUsers();", "public function getAllActiveUsers()\n {\n $connection = Db::getConnection();\n\n $userDataRecords = $connection->fetchAll(\n \"SELECT id, name, email \n FROM {$this->tableName} \n WHERE active = ?\", \n [1]\n );\n \n $userObjects = [];\n \n foreach($userDataRecords as $userData) {\n $userObjects[] = $this->initializeObject($userData);\n }\n\n return $userObjects;\n }", "public function listUsers(){\n $sql=\"SELECT id_people,dni,first_name,last_name,adress,email,is_active FROM people WHERE is_user=3\";\n $rs=$this->con->prepare($sql);\n $rs->execute();\n return $rs->fetchAll(PDO::FETCH_OBJ);\n }", "function _getAllexcutivesIds($userId) {\n\n $this->db->select('id');\n $this->db->from(TBL_USER);\n $this->db->where('approver_user_id', $userId);\n $query = $this->db->get();\n // echo $this->db->last_query(); die;\n $users = $query->result();\n $usersIDs = array();\n if($users) {\n foreach($users as $user) {\n $usersIDs[] = $user->id;\n }\n }\n return $usersIDs;\n }", "public function listUsersAdmin(){\n $sql=\"SELECT id_people,dni,first_name,last_name,adress,email,is_active FROM people WHERE is_user=1\";\n $rs=$this->con->prepare($sql);\n $rs->execute();\n return $rs->fetchAll(PDO::FETCH_OBJ);\n }", "function getAllUserIDs() \n {\n //This returns all userids that have rating>0\n $query = \"SELECT users.id FROM users WHERE users.rating > 0\";\n //$query = \"SELECT ratings.model_id FROM ratings WHERE ratings.model='User'\";\n $results = $this->query($query); \n $userIDs = Set::extract($results, '{n}.users.id');\n return $userIDs;\n }", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "public function getUserListAttribute()\n {\n return $this->users->pluck('id')->all();\n }", "public function selectAllUsersIds(){\r\n $stmt = self::$con->prepare(\"SELECT id,name,email FROM users\");\r\n $stmt->execute();\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n return $results;\r\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function selectAllUsers()\r\n\t{\r\n\t\t\r\n\t\t$userIds = array();\r\n\t\t//select user IDs for all users\r\n\t\t//array_push user IDs in a while loop\r\n\t\t//return $userIds;\r\n\t}", "private function listUsers()\n {\n $users = get_users();\n $user_ids = array();\n\n foreach ($users as $u) {\n $user_ids[] = $u['id'];\n }\n\n if (count($this->ids) != 0) {\n return array_intersect($this->ids, $user_ids);\n } else {\n return $user_ids;\n }\n }", "function get_all_users()\n{\n\t$db = open_database_connection();\n\t$stmt = $db->prepare(\"SELECT userID, name as title, name, roleID FROM user ORDER BY roleID\");\n\t$stmt->execute();\n\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t$users = array();\n\tforeach ($rows as $row) {\n\t\t$users[] = $row;\n\t}\n close_database_connection($db);\n return $users;\n}", "public function allupgraders(){\n // SQL statement\n $sql = \"SELECT * FROM user WHERE special = 1 AND (role = 'account' OR role = 'administrator') \";\n $result = $this->con->query($sql);\n\n // check if there is a user\n $count = $result->num_rows;\n if ($count != 0) {\n while ($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n return $array;\n }\n }", "public function get_active_list() {\n\n $sql = \" SELECT userId, concat(firstName, ' ', surname) AS `name`, initials\n FROM time_user\n WHERE active = 1\n ORDER BY firstname, surname\";\n return $this->db->query( $sql )->result_array();\n }", "public static function getUsers(){\n return self::find()->all();\n }", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function allForUser($userId);", "public function allForUser($userId);", "public function findUsers(): iterable;", "public function assigned_user_lists()\n {\n $result = common_select_values('user_id, name, role_id', 'users', ' status=0', 'result');\n return $result; \n\n }", "function getUsers($conn){\n\n\t$sql = \"SELECT Username, UserId, Email, AccessLevel FROM user\";\n\n\t$sth = $conn->prepare($sql);\n\t$sth->execute();\n\t\n\t$rows = array();\n\t\n\twhile($r = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $r;\n\t}\n\treturn $rows;\n}", "public function findUsers();", "public function findUsers();", "public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }", "public function getUserList()\n {\n return $this->userDao->getUserList();\n }", "function monitor_list_users() {\n $query = \"select distinct(`wf_user`) from `\".GALAXIA_TABLE_PREFIX.\"instance_activities`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_user'];\n }\n return $ret;\n }", "function user_list()\n\t{\n\t\t$this->db->where('is_active','1');\n\t\t\n\t\t$result = $this->db->get('user');\n\t\treturn $result->result_array();\n\t}", "public function users()\n {\n $sql = \"SELECT *\n FROM user\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }", "public function getUsers(){\n\t\t\n\t\t$ar = array();\n\t\t\n\t\t$result = $this->adapter->query(\"select * from vemplist 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 getUsers()\n {\n $stmt = $this->DB->prepare(\"select user, hash from users\");\n $stmt->execute();\n // fetchall returns all records in the set as an array\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function fetchAllUsers()\n {\n return UserAuthorityModel::leftjoin('users', 'user_authorities.users__id', '=', 'users._id')\n ->where('user_authorities.user_roles__id', '!=', 1)\n ->select(\n __nestedKeyValues([\n 'users' => [\n '_id',\n 'status',\n ],\n 'user_authorities' => [\n 'user_roles__id',\n ]\n ])\n )\n ->get();\n }", "public function allUsers()\n {\n // $sql = 'SELECT * FROM '.$db_name;\n return $this->queryAll();\n }", "public function users_to_query()\n\t{\n\t\treturn array($this->get_data('from_user_id'));\n\t}", "public function usersLogged(){\n $repository = $this->doctrine->getRepository('AppBundle:User');\n $users = $repository->getActive();\n \n return $users;\n }", "function getUsersWithUserRights() {\n\n $userRightsUsers = array();\n $allUsers = REDCap::getUsers();\n foreach($allUsers as $cnt => $user) {\n $rights = REDCap::getUserRights($user);\n if ($rights[$user][\"user_rights\"] == 1) {\n $userRightsUsers[] = $user;\n }\n }\n\n return $userRightsUsers;\n\n}", "public function getAllUsers()\n {\n $sql = \"SELECT `user_id`, `user_fname`, `user_lname`, `user_password_hash`, `user_email`, `user_role` FROM users\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "public function allUser(){\n\n\t\t\t$data=$this->all('oops');\n\t\t\treturn $data;\n\t\t}", "public function getUsers(){\n $sql=\"SELECT * FROM users\";\n $select=parent::connect_db()->prepare($sql);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }", "public function getAccessibleUserIDs()\n {\n if (!WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList')) {\n // user must have the permission to view the user online list\n return array();\n }\n\n $userIDs = array();\n\n foreach ($this->userIDs as $userID => $canViewOnlineStatus) {\n if ($canViewOnlineStatus === '0' ||\n $userID === WCF::getUser()->userID ||\n WCF::getSession()->getPermission('admin.user.canViewInvisible')\n ) {\n $userIDs[] = $userID;\n } elseif (WCF::getUser()->userID) {\n if ($canViewOnlineStatus === '1') {\n $userIDs[] = $userID;\n } elseif (UserProfileHandler::getInstance()->isFollowing($userID)) {\n $userIDs[] = $userID;\n }\n }\n }\n\n return $userIDs;\n }", "public function getOrgUsers(){\n $return_array = array();\n $current_campaign=Yii::app()->session->get('current_campaign');\n $campaign = Definition::model()->findByPk($current_campaign);\n if($campaign){\n $users = Users::model()->findAllByAttributes(array('fk_org_id'=>$campaign->fk_org_id));\n foreach($users as $user){\n $return_array[$user->id] = $user->username;\n }\n }\n \n return $return_array;\n }", "function getUsers() {\r\n\t\t\t$sql = \"SELECT users.user_id, users.email, users.student_id, 'Click to change password', users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id\";\r\n\t\t\t$result = $this->query($sql);\r\n\t\t\tif (mysql_num_rows($result) == 0) return false;\r\n\t\t\twhile ($row = mysql_fetch_object($result)) $rows[] = array($row->user_id, $row->email, $row->student_id, \"Click to change\", str_replace(array(1, 0), array(\"Yes\", \"No\"), $row->active), $row->society_name);\r\n\t\t\treturn $rows;\r\n\t\t}", "function user_details() {\r\n\t\t\t$query = $this->pdo->prepare(\"select * from user_account\");\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}", "public function memberIdList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "public static function getPersonsUsers(){\n return self::getPersonsByRole();\n }", "public function getSufficient()\n\t{\n\t\t$ans = array();\n\t\t$users = User::model()->findAll();\n\t\tforeach($users as $auser)\n\t\t{\t\n\t\t\tif($this->cid == $auser->bestClient())\n\t\t\t{\n\t\t\t\tarray_push($ans,$auser->uid);\n\t\t\t}\n\t\t}\n\t\treturn $ans;\n\t}", "public function getAllWithUsers()\n {\n $sql = \"SELECT \n a.id as 'adid',\n a.userid as 'userid',\n a.title as 'adtitle',\n u.name as 'username'\n from advertisements a \n left join users u ON a.userid = u.id;\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "public function users(){\n\t\t$user = $this->ion_auth->user()->row();\n\n\t\t$query = $this->db->select()\n\t\t\t\t\t\t\t\t\t\t\t ->from('users')\n\t\t\t\t\t\t\t\t\t\t\t ->where('admin_id',$user->id)\n\t\t\t\t\t\t\t\t\t\t\t ->order_by('id', 'asc')\n\t\t\t\t\t\t\t\t\t\t\t ->get();\n\t\t\treturn $query;\n\t}", "public function userChoices()\n {\n return R::findAll('choice');\n }", "public function getUsersListAttribute()\n {\n return User::orderBy('name')->get();\n }", "public static function getInactives() {\n\t\treturn BaseQuery::create(\"User\")->filterById(0, Criteria::GREATER_THAN)->filterByActive(0)->find();\n\t}", "public function getUsers()\n\t{\n\t\t$sql = 'SELECT * FROM admins WHERE deleted = 0';\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute();\n\t\treturn $query->fetchAll(PDO::FETCH_OBJ);\n\t}", "function user_accounts() {\n $mysqli = $this->mysqli;\n $sql = \"SELECT `users`.`user_id`, `users`.`email_id`,`users`.`emp_id`, `employee`.`emp_name`,`employee`.`emp_type`,`employee`.`emp_cntct`,`employee`.`doj` FROM employee INNER JOIN users on `employee`.`emp_id`=`users`.`emp_id`\";\n $val = $mysqli->query($sql);\n return $val;\n }", "public static function userdept(){\n $rolelist = [];\n $db = Db::getInstance(); \t \n $req = $db->query('SELECT * FROM user_department'); \n foreach($req->fetchAll() as $row) {\n $rolelist[] = $row;\n }\n return $rolelist;\n \n }", "public function getUsers()\n {\n $users = [];\n $request = $this->_db->query('SELECT * FROM user');\n while ($data = $request->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new User($data);\n }\n return $users;\n }", "public function getUsers()\n {\n return Security::getUserList();\n }", "private function get_all() {\n $result = $this->dbh->query($this->query_array['get_all'], array())->fetchAll();\n $users = [];\n foreach ($result as $row) {\n $user = new User($row['id'], $row['username']);\n $users[] = $user->to_array();\n }\n return $users;\n }", "public function getMyNoticesUsers()\n {\n\t\t// Get my related departments\n\t\t$related_departments = [];\n\n $c_related = $this->getRelatedDepartments();\n\n if (!$c_related) return [];\n\n foreach ($c_related as $rel){\n\t\t\t$related_departments [] = $rel->id;\n\t\t}\n\n\n\t\t/*\n\t\t *\tGet related Departamental users from my related departments\n\t\t *\n\t\t * Conditions:\n\t\t * - agent ticketit_department in related_departments\n\t\t * - agent person in related_departments\n\t\t*/\n\t\t$related_users = \\PanicHDMember::where('id','!=',$this->id)\n\t\t\t->whereIn('ticketit_department', $related_departments);\n\n\t\t// Get users that are visible by all departments\n\t\t$all_dept_users = \\PanicHDMember::where('ticketit_department','0');\n\n\t\tif (version_compare(app()->version(), '5.3.0', '>=')) {\n\t\t\t$related_users = $related_users->pluck('id')->toArray();\n\t\t\t$related_users = array_unique(array_merge($related_users, $all_dept_users->pluck('id')->toArray()));\n\t\t}else{\n\t\t\t$related_users = $related_users->lists('id')->toArray();\n\t\t\t$related_users = array_unique(array_merge($related_users, $all_dept_users->lists('id')->toArray()));\n\t\t}\n\n\t\treturn $related_users;\n\t}", "public function getCandidatesNamesForUsers()\n {\n $db = Zend_Db_Table::getDefaultAdapter();\n $query = \"select c.id,c.candidate_name,c.emailid from main_candidatedetails c \n where c.isactive = 1 and c.cand_status = 'Selected' and c.backgroundchk_status in ('Yet to start','Completed') and c.id not in (select rccandidatename from main_users \n where isactive = 1 and rccandidatename is not null)\";\n $result = $db->query($query);\n $data = array();\n while($row = $result->fetch())\n {\n \n $data[$row['id']] = $row['candidate_name'];\n \n }\n return $data;\n }", "function get_user_list(){\n\t\treturn array();\n\t}", "public function listUsers() {\n $db = CTSQLite::connect();\n $query = 'SELECT * FROM ic_user';\n $stmt = $db->prepare($query);\n $result = $stmt->execute();\n if (!$result) {\n return false;\n } else {\n // $id = $result->fetchArray();\n // return $id['id'];\n $row = $result->fetchArray();\n return $row;\n }\n $db->close();\n unset($db);\n }", "public static function listOnlineUsers() \n\t{\n\t\t$array = array(); \n\n\t\t$rst = \\Main\\DB::select(\"accounts_online\", \"user\");\n\t\twhile($row = $rst->fetch_object())\n\t\t{\n\t\t\t$accId = $row->user; \n\t\t\t$array[$accId] = self::getUserData($accId); \n\t\t}\n\t\t\n\t\treturn $array; \n\t}", "public function getAllUsers() {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->getAllUsers();\n }", "function d4os_io_db_070_os_user_get_all_uid() {\n $list = array();\n $result = db_query(\"SELECT * FROM {d4os_ui_users}\");\n while ($user = db_fetch_object($result)) {\n $list[] = $user;\n }\n return $list;\n}", "public function getUserslistToInvite()\n\t{\n\t\t//get current login user session\n\t\t$results = array();\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options = array('course'=>$course_name,'section'=>$sections_list,'userName !='=>$user);\n\t\t$results = $this->PleUser->find('all',array('conditions'=>$options,'fields'=>array('userName','name'),'order' => array('PleUser.name ASC')));\n\t\tif ($results) {\n\t\t\treturn $results;\n\t\t}\n\t\treturn $results;\n\t}", "public function getAwardedBountyUsers();", "public function get_user_list() {\n\n $sql = \" SELECT userId, concat(firstName, ' ', surname) AS `name`\n FROM time_user\"; \n return $this->db->query( $sql );\n }", "private function get_user_data()\n {\n $sql_query = \"select * from users\";\n $users = DB::select($sql_query);\n return $users;\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM users WHERE role_id = 2;\";\n $stm = App::$db->prepare($sql);\n $stm->setFetchMode(\\PDO::FETCH_OBJ);\n $stm->execute();\n return $stm->fetchAll();\n }", "public function getUsers()\n {\n return User::where('user_status', 1)->get();\n }", "function fetchUsers()\r\n {\r\n $users = $this->DB->database_select('users', array('username', 'uid'));\r\n return $users;\r\n }", "Public Function getAllActiveUsers()\n\t{\n\t\t$Sql = \"SELECT \n\t\t\t\t\tbevomedia_user.*\n\t\t\t\tFROM \n\t\t\t\t\tbevomedia_user,\n\t\t\t\t\tbevomedia_tracker_clicks\n\t\t\t\tWHERE \n\t\t\t\t\t(deleted = 0) AND\n\t\t\t\t\t(bevomedia_tracker_clicks.user__id = bevomedia_user.id)\n\t\t\t\tGROUP BY\n\t\t\t\t\tbevomedia_tracker_clicks.user__id\n\t\t\t\t\";\n\t\t\n\t\t$Output = array();\n\t\t$Users = $this->_db->fetchAll($Sql);\n\t\tforeach($Users as $User)\n\t\t\t$Output[] = new User($User->id);\n\t\t\t\n\t\treturn $Output;\n\t}", "public function list(): array\n {\n return User::all()->toArray();\n }", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "public static function findAll()\n {\n $db = Base::getConnection();\n\n $stmt = $db->prepare(\"SELECT * FROM users;\");\n $stmt->execute();\n\n\n $tab = array();\n foreach ($stmt->fetchALL() as $us) {\n $u = new User();\n $u->id = $us['id'];\n $u->username = $us['username'];\n $u->password = $us['password'];\n $u->email = $us['email'];\n $u->setIsVisitor(false);\n\n $tab[$us['id']] = $u;\n }\n $stmt->closeCursor();\n return $tab;\n }", "public static function getUsersToImpersonate()\n {\n $userProfileTable = UserProfile::tableName();\n $userTable = User::tableName();\n $query = new Query();\n $query->select([\"CONCAT(\" . $userProfileTable . \".nome, ' ', \" . $userProfileTable . \".cognome, ' - userId: ', \" . $userProfileTable . \".user_id, ' - userProfileId: ', \" . $userProfileTable . \".id) AS userNameSurname\"]);\n $query->from($userTable);\n $query->innerJoin($userProfileTable, $userProfileTable . '.user_id = ' . $userTable . '.id');\n $query->andWhere([$userTable . '.deleted_at' => null]);\n $query->andWhere([$userProfileTable . '.deleted_at' => null]);\n $query->andWhere([$userTable . '.status' => User::STATUS_ACTIVE]);\n $query->andWhere([$userProfileTable . '.attivo' => UserProfile::STATUS_ACTIVE]);\n $query->andWhere(['not like', 'email', '#deleted_']);\n $query->andWhere(['<>', $userTable . '.id', \\Yii::$app->user->id]);\n $query->indexBy('id');\n $usersToImpersonate = $query->column();\n return $usersToImpersonate;\n }", "public function getUsersFromLog()\n\t{\n\t\t$select = parent::select()->from($this,array('username'=>'username'))\n\t\t->distinct()->order(array(\"username asc\"));\n\t\t$results = self::fetchAll($select)->toArray();\n\t\t$res = array();\n\t\t\n\t\treturn $results;\n\t}", "public function listUsers()\n {\n $query = new Query();\n\n $rows = $query->select(['id', 'name'])\n ->from('users')\n ->orderBy(['date_add' => SORT_DESC])\n ->all();\n\n return $rows;\n }", "public function get_users() {\n\n\t\t\t$query = $this->db->prepare(\"SELECT * FROM `users` ORDER BY `user_id`\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\t$query->execute();\n\t\t\t}catch(PDOException $e){\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\n\n\t\t\treturn $query->fetchAll();\n\n\t\t}", "public function getUsersList($employer_id)\n {\n $em = $this->getEntityManager();\n\n\t\t$recs = $em->createQuery(\"SELECT DISTINCT ec.userId, CONCAT(u.firstname,' ',u.surname) AS username\n\t\t\tFROM AppBundle:ExtraChecks ec \n\t\t\tLEFT JOIN AppBundle:Users u WITH ec.userId = u.id\n\t\t\tWHERE ec.employerId = :eid AND ec.checkType NOT LIKE 'DBS%'\n\t\t\tORDER BY u.firstname,u.surname\")\n\t\t\t->setParameters(array(\"eid\"=>$employer_id))\n\t\t\t->getResult();\n\t\t$output = array('0'=>array('userId'=>0, 'username'=>'All'));\n\t\t$output = array_merge($output,$recs);\n\t\t//print \"<pre>\"; var_dump($output); die;\n\t\treturn $output;\n\t}", "public function getList() {\n //Retourne la liste de tous les users\n $users = [];\n $requsers = $this->db->query('SELECT * FROM user');\n\n while ($data = $requsers->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new user($data);\n }\n\n return $users;\n }", "function &getInvitedUsers()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result_array = array();\n\t\t$result = $ilDB->queryF(\"SELECT user_fi FROM svy_inv_usr WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tarray_push($result_array, $row[\"user_fi\"]);\n\t\t}\n\t\treturn $result_array;\n\t}", "public function getUsersList()\n {\n }", "public function getAllUsers() {\n $sql = \"SELECT `pk_users`, `name_users`, `password_users`, `mail_users`, `symbol_users`, `first_name_users`, `last_name_users` FROM `users`\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function get_all_user($koneksi){\n\t\t$query = \"SELECT * FROM v_user\";\n\n\t\t$statement = $koneksi->prepare($query);\n\t\t$statement->execute();\n\t\t$result = $statement->fetchAll();\n\n\t\treturn $result;\n\t}", "public function getUsers()\n {\n $request = \"SELECT user.*, rank.name as rank_name FROM `user` join rank on user.rank = rank.id order by rank.id\";\n $request = $this->connexion->query($request);\n $newsList = $request->fetchAll(PDO::FETCH_ASSOC);\n // var_dump($newsList);\n return $newsList;\n }", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "public static function selectAllMember()\n {\n global $dbh;\n $sql = $dbh->prepare(\"SELECT id, username FROM memeber\");\n $sql->execute();\n $data = null;\n while($fetch = $sql->fetch(PDO::FETCH_ASSOC))\n {\n $data[] = $fetch;\n }\n return $data;\n }", "public function getUsers()\n {\n $st = $this->execute('SELECT * FROM '. self::$prefix .'user ORDER BY `userid`;');\n\n $rs = $st->fetchAll(PDO::FETCH_ASSOC);\n\n $users = array();\n foreach($rs AS $row) {\n $user = new sspmod_janus_User($this->_config->getValue('store'));\n $user->setUid($row['uid']);\n $user->load();\n $users[] = $user;\n }\n \n return $users;\n }", "public function index()\n {\n return $this->user->all();\n }", "public function get_users()\n\t{\n\t\t$sql=\"SELECT * FROM waf_users WHERE 1=1\";\n\t\t$result=$this->db->LIST_Q($sql);\n\t\treturn $result;\n\t}", "public function getAllUsers() {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n }", "function get_users()\n {\n //Unimplemented\n }", "public function get_all_accessible_users() {\n global $remotedb, $USER, $CFG;\n $usertable = \"<table style=\\\"float:left;\\\" class=\\\"userstable\\\" id=\\\"userstable\\\">\n <thead>\n <tr class=\\\"tableheader\\\">\n <th class=\\\"tblname\\\">Name</th><th class=\\\"tblrelationship\\\">Relationship</th>\n </tr>\n </thead>\n <tbody>\";\n $myusers = array();\n $admin_mods = array();\n $tutor_mods = array();\n //get all the users in the course you are programme admin for\n if ($mods = enrol_get_users_courses($USER->id, $onlyactive = TRUE)) {\n //get_user_capability_course('report/myfeedback:progadmin', $userid = null, $doanything = false)) {\n foreach ($mods as $mod) {\n if ($mod->visible) {\n $con = context_course::instance($mod->id);\n if (has_capability('report/myfeedback:progadmin', $con, $USER->id, $doanything = false)) {\n $admin_mods[] = $mod->id;\n }\n if (has_capability('moodle/course:changeshortname', $con, $USER->id, $doanything = false)) {\n $tutor_mods[] = $mod->id;\n }\n }\n }\n\n foreach ($admin_mods as $value) {\n $context = context_course::instance($value);\n $query = 'select u.id as id, firstname, lastname, email from mdl_role_assignments as a, '\n . 'mdl_user as u where contextid=' . $context->id . ' and roleid=5 and a.userid=u.id;';\n $users = $remotedb->get_recordset_sql($query);\n foreach ($users as $a) {\n $myusers[$a->id][0] = \"<a href=\\\"\" . $CFG->wwwroot . \"/report/myfeedback/index.php?userid=\" . $a->id . \"\\\" title=\\\"\" .\n $a->email . \"\\\" rel=\\\"tooltip\\\">\" . $a->firstname . \" \" . $a->lastname . \"</a>\";\n $myusers[$a->id][1] = ''; //get_string('othertutee', 'report_myfeedback');\n $myusers[$a->id][2] = 1;\n $myusers[$a->id][3] = '';\n }\n }\n }\n // get all the users in the course you are a tutor for\n if ($tutor_mods) {\n //get_user_capability_course('moodle/course:changeshortname', $userid = null, $doanything = false)) {\n foreach ($tutor_mods as $value) {\n $context = context_course::instance($value);\n $query = 'select u.id as id, firstname, lastname, email from mdl_role_assignments as a, '\n . 'mdl_user as u where contextid=' . $context->id . ' and roleid=5 and a.userid=u.id';\n $users = $remotedb->get_recordset_sql($query);\n foreach ($users as $r) {\n $myusers[$r->id][0] = \"<a href=\\\"\" . $CFG->wwwroot . \"/report/myfeedback/index.php?userid=\" . $r->id . \"\\\" title=\\\"\" .\n $r->email . \"\\\" rel=\\\"tooltip\\\">\" . $r->firstname . \" \" . $r->lastname . \"</a>\";\n $myusers[$r->id][1] = ''; //get_string('othertutee', 'report_myfeedback');\n $myusers[$r->id][2] = 2;\n if ($stmods = enrol_get_users_courses($r->id, $onlyactive = TRUE)) {\n $num = 0;\n foreach ($stmods as $stval) {\n if ($stval->visible) {\n $coursecontext = context_course::instance($stval->id);\n if (has_capability('moodle/course:changeshortname', $coursecontext, $USER->id, $doanything = false)) {\n $myusers[$r->id][1] .= $stval->shortname . \", \";\n }\n }\n }\n $myusers[$r->id][1] = rtrim($myusers[$r->id][1], \", \");\n }\n $myusers[$r->id][3] = $myusers[$r->id][1];\n }\n }\n }\n\n // get all the mentees, i.e. users you have a direct assignment to\n if ($usercontexts = $remotedb->get_records_sql(\"SELECT c.instanceid, c.instanceid, u.id as id, firstname, lastname, email\n FROM {role_assignments} ra, {context} c, {user} u\n WHERE ra.userid = ?\n AND ra.contextid = c.id\n AND c.instanceid = u.id\n AND c.contextlevel = \" . CONTEXT_USER, array($USER->id))) {\n foreach ($usercontexts as $u) {\n $myusers[$u->id][0] = \"<a href=\\\"\" . $CFG->wwwroot . \"/report/myfeedback/index.php?userid=\" . $u->id . \"\\\" title=\\\"\" .\n $u->email . \"\\\" rel=\\\"tooltip\\\">\" . $u->firstname . \" \" . $u->lastname . \"</a>\";\n $myusers[$u->id][1] = get_string('personaltutee', 'report_myfeedback');\n $myusers[$u->id][2] = 3;\n $myusers[$u->id][3] = '';\n }\n }\n\n foreach ($myusers as $result) {\n $usertable.= \"<tr>\";\n $usertable.=\"<td>\" . $result[0] . \"</td>\";\n $usertable.=\"<td class=\\\"ellip\\\" data-sort=$result[2] title=\\\"$result[3]\\\" rel=\\\"tooltip\\\">\" . $result[1] . \"</td>\";\n $usertable.=\"</tr>\";\n }\n $usertable.=\"</tbody><tfoot><tr><td></td><td></td></tr></tfoot></table>\";\n return $usertable;\n }", "public function selectAllUsers(){\r\n $userList = new UsersList();\r\n return $userList->selectAllUsers();\r\n }", "public static function getAllUser()\n\t{\n\t\treturn array(self::_getDao()->count(), self::_getDao()->getAll());\n\t}" ]
[ "0.6721477", "0.6676935", "0.66450995", "0.6623731", "0.6589885", "0.6536673", "0.65193135", "0.64881223", "0.64603025", "0.645175", "0.645175", "0.645175", "0.6444243", "0.6440348", "0.64389354", "0.64368135", "0.6429843", "0.64271814", "0.6407488", "0.6394742", "0.6394742", "0.6387564", "0.6384799", "0.6380538", "0.6371314", "0.6371314", "0.636721", "0.6362961", "0.6353665", "0.63437885", "0.63324225", "0.6314987", "0.63148504", "0.6308302", "0.629697", "0.62797344", "0.627003", "0.6258814", "0.62478936", "0.62454146", "0.62449366", "0.6242764", "0.623747", "0.6231984", "0.6231886", "0.6230204", "0.6228537", "0.62282234", "0.62262547", "0.6224227", "0.6223617", "0.622101", "0.6216392", "0.62084275", "0.62042", "0.6204132", "0.6201266", "0.6193502", "0.6184119", "0.6182434", "0.61817986", "0.61784625", "0.61773217", "0.6173999", "0.6172888", "0.6166549", "0.61459047", "0.6136877", "0.61329895", "0.6130353", "0.6125394", "0.61247444", "0.6124459", "0.611619", "0.611394", "0.61080956", "0.6107691", "0.61037964", "0.61023796", "0.6098345", "0.6093601", "0.60880804", "0.60869014", "0.6078431", "0.6076431", "0.6074357", "0.60691285", "0.6067679", "0.60671484", "0.60609424", "0.60581195", "0.6052372", "0.60521257", "0.6051392", "0.6050352", "0.6049708", "0.6049262", "0.6048619", "0.60402304", "0.6039882", "0.60396624" ]
0.0
-1
Captures data from client user registration form, alphabetically sorts data to match table columns, securely inserts data into database using PDO.
public static function addUser($userData) { $db = DB::getInstance(); $columns = "admin, date_created, first_name, last_name, lump, password, username"; $placeholders = ":admin, :date_created, :first_name, :last_name, :lump, :password, :username"; $sorted = $userData; uksort($sorted, function ($val1, $val2) { return strncmp($val1, $val2, 2); }); $mssg = ""; // Insert form data into database try { $statement = $db->prepare("INSERT INTO `users` ($columns) VALUES ($placeholders)"); $statement->execute($sorted); // Grab the id of the newly inserted record and pass it back to client $mssg = $db->lastInsertId(); } catch (Exception $e) { $db->rollBack(); $mssg = $e->getMessage(); } return $mssg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register() {\n \n $controlquery = doquery(\"SELECT * FROM {{table}} WHERE id='1' LIMIT 1\", \"control\");\n $controlrow = mysql_fetch_array($controlquery);\n \n if (isset($_POST[\"submit\"])) {\n \n extract($_POST);\n \n $errors = 0; $errorlist = \"\";\n if (strlen($password1) > 10){ $errors++; $errorlist .= \"Senha não pode conter mais que 10 caracteres.<br />\"; }\n // Process username.\n if ($username == \"\") { $errors++; $errorlist .= \"Nome de usuário é necessário.<br />\"; }\n if (preg_match(\"/[^A-z0-9_\\-]/\", $username)==1) { $errors++; $errorlist .= \"Nome de usuário deve ser alfanumérico(não pode conter espaços).<br />\"; } // Thanks to \"Carlos Pires\" from php.net!\n $usernamequery = doquery(\"SELECT username FROM {{table}} WHERE username='$username' LIMIT 1\",\"users\");\n if (mysql_num_rows($usernamequery) > 0) { $errors++; $errorlist .= \"Esse nome de usuário já está em uso.<br />\"; }\n \n // Process charname.\n if ($charname == \"\") { $errors++; $errorlist .= \"Campo de Nome do Personagem é necessário.<br />\"; }\n if (preg_match(\"/[^A-z0-9_\\-]/\", $charname)==1) { $errors++; $errorlist .= \"Nome de usuário deve ser alfanumérico(não pode conter espaços).<br />\"; } // Thanks to \"Carlos Pires\" from php.net!\n $characternamequery = doquery(\"SELECT charname FROM {{table}} WHERE charname='$charname' LIMIT 1\",\"users\");\n if (mysql_num_rows($characternamequery) > 0) { $errors++; $errorlist .= \"Esse nome de usuário já está em uso.<br />\"; }\n \n // Process email address.\n if ($email1 == \"\" || $email2 == \"\") { $errors++; $errorlist .= \"Campo de e-mail é necessário.<br />\"; }\n if ($email1 != $email2) { $errors++; $errorlist .= \"Os e-mails não coincidem.<br />\"; }\n if (! is_email($email1)) { $errors++; $errorlist .= \"O e-mail não é válido.<br />\"; }\n $emailquery = doquery(\"SELECT email FROM {{table}} WHERE email='$email1' LIMIT 1\",\"users\");\n if (mysql_num_rows($emailquery) > 0) { $errors++; $errorlist .= \"Esse e-mail já está em uso.<br />\"; }\n \n // Process password.\n if (trim($password1) == \"\") { $errors++; $errorlist .= \"Campo de senha é necessário.<br />\"; }\n if (preg_match(\"/[^A-z0-9_\\-]/\", $password1)==1) { $errors++; $errorlist .= \"Sua senha deve ser alfanumérica.<br />\"; } // Thanks to \"Carlos Pires\" from php.net!\n if ($password1 != $password2) { $errors++; $errorlist .= \"Os campos de senha não coincidem.<br />\"; }\n $password = md5($password1);\n \n if ($errors == 0) {\n \n if ($controlrow[\"verifyemail\"] == 1) {\n $verifycode = \"\";\n for ($i=0; $i<8; $i++) {\n $verifycode .= chr(rand(65,90));\n }\n } else {\n $verifycode='1';\n }\n \n $query = doquery(\"INSERT INTO {{table}} SET id='',regdate=NOW(),verify='$verifycode',username='$username',password='$password',email='$email1',charname='$charname',charclass='$charclass',difficulty='$difficulty'\", \"users\") or die(mysql_error());\n \n if ($controlrow[\"verifyemail\"] == 1) {\n if (sendregmail($email1, $verifycode) == true) {\n $page = \"Sua conta foi criada com sucesso.<br /><br />Você deve receber um e-mail de confirmação logo. Você precisará verificar o código que está presente no seu e-mail antes de entrar no jogo. Uma vez recebido o e-mail, por favor visite a <a href=\\\"users.php?do=verify\\\">Página de Verificação</a> para ativar sua conta e começar a jogar.\";\n } else {\n $page = \"Sua conta foi criada com sucesso.<br /><br />De qualquer forma, houve um erro durante o envio do seu e-mail de confirmação. Por favor cheque com o Administrador do jogo para resolver seu problema.\";\n }\n } else {\n $page = \"Sua conta foi criada com sucesso.<br /><br />Você pode agora acessar a <a href=\\\"login.php?do=login\\\">Página de Login</a> e continuar jogando \".$controlrow[\"gamename\"].\"!\";\n }\n \n } else {\n \n $page = \"O(s) seguinte(s) erro(s) ocorreram enquanto sua conta estava sendo feita:<br /><span style=\\\"color:red;\\\">$errorlist</span><br />Por favor volte e tente novamente.\";\n \n }\n \n } else {\n \n $page = gettemplate(\"register\");\n if ($controlrow[\"verifyemail\"] == 1) { \n $controlrow[\"verifytext\"] = \"<br /><span class=\\\"small\\\">Um código de verificação será enviado para seu e-mail, você não está habilidade de jogar antes de entrar com seu código. Esteja certo de preencher com um e-mail válido.</span>\";\n } else {\n $controlrow[\"verifytext\"] = \"\";\n }\n $page = parsetemplate($page, $controlrow);\n \n }\n \n $topnav = \"<a href=\\\"login.php?do=login\\\"><img src=\\\"images/button_login.gif\\\" alt=\\\"Log In\\\" border=\\\"0\\\" /></a><a href=\\\"users.php?do=register\\\"><img src=\\\"images/button_register.gif\\\" alt=\\\"Register\\\" border=\\\"0\\\" /></a><a href=\\\"help.php\\\"><img src=\\\"images/button_help.gif\\\" alt=\\\"Help\\\" border=\\\"0\\\" /></a>\";\n display($page, \"Registrar\", false, false, false);\n \n}", "function add_user(){\n //data is retrieved from the POST array, It is passed to here from the index/register page.\n //check if we have a full array => expecting 9 entities, at least 2 will be \"\" strings.\n //this is due to the hidden field and the cancel button. so we will verify if the register button is been clicked.\n //this will be done in the index/register page...\n\n //setting vars\n global $db;\n\n //validating passed data to ensure that all fields are entered and all match the needed requirements\n if (strlen($_POST[\"Username\"]) > 4){\n $uName = $_POST[\"Username\"];\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if (strlen($_POST[\"Password\"]) > 5){\n $pw1 = $_POST[\"Password\"]; //unsalted yet\n }else{\n $pw1 = \"b\";\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"Passwordconf\"])>5){\n $pw2 = $_POST[\"Passwordconf\"]; //pw verification\n }else{\n $pw2 =\"a\";\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"emailAddress\"])>8){\n $email = $_POST[\"emailAddress\"];\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"Fname\"])>0){\n $firstName = $_POST[\"Fname\"]; //users first name\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n if(strlen($_POST[\"Lname\"])>0){\n $lastName = $_POST[\"Lname\"]; //obviously the last name\n }else{\n $message = \"A required field is missing data needed or is too short to continue, please try again.\";\n }\n $encoded = \"\"; //empty string here - dont need to validate it.\n //The following is just a test... I want to see if i can catch this error and spit it back out...\n if ($pw1 === $pw2){\n $salt = bin2hex(random_bytes(256));\n @ $encoded = crypt($_POST[\"Password\"],$salt);\n }else{\n //var_dump($message);\n //this should catch any messages and force an exit code with errors...\n if (empty($message)){\n $message = \"The two password fields must be the same. Please start over.\";\n }\n //var_dump($message);\n include(\"partial/user/_register.php\");\n exit(); //jic something goes wrong we do not want to have the script resume.\n }\n //final catch for the $message string being full... meaning that there was an error and to halt code... even if passwords match.\n if (!empty($message)){\n include(\"partial/user/_register.php\");\n exit(); //jic something goes wrong we do not want to have the script resume.\n }\n\n @ $query = \"INSERT INTO users\n (\n Username , Password , pwsecret , emailAddress , Fname , Lname , Joined_Date , HelpVotes , NegVotes , Posts, WarnCnt\n )\n VALUES\n (\n ? , ?, ? , ? , ? , ?, CURRENT_TIMESTAMP,0,0,0,0\n )\";\n\n $stmnt = $db -> prepare($query);\n @ $stmnt -> bind_param(\"ssssss\",$uName,$encoded,$salt,$email,$firstName,$lastName);\n $resultQ1 = $stmnt -> execute();\n\n if (!$resultQ1){\n $error_message = \"There was a problem when attempting to add you as a user, please try again and if the issue persists please contact the webadmin.\";\n //clear vars for reuse::\n $_POST = array(); //should stop data from persisting.\n $uName = \"\";\n $pw1 = \"\";\n $pw2 = \"\";\n $encoded = \"\";\n $email = \"\";\n $firstName = \"\";\n $lastName = \"\";\n include(\"partial/user/_register.php\");\n exit(); //jic something goes wrong we do not want to have the script resume.\n }else{\n //the following should add a newly generated user to the roles table.\n $select=\"(SELECT userID FROM users WHERE Username = ?)\"; //sub query to return a user ID\n $insert=\"INSERT INTO roles (userID , isAdmin , isMod , isFormerStaff , isUser , isBanned) VALUES (? , 0 , 0 , 0 , 1 , 0)\"; //insert query to add user to roles table\n //I tested this code in mysql phpmyAdmin and it worked with out error...\n $stmnt = $db -> prepare($select);\n @ $stmnt -> bind_param(\"s\",$uName);\n $resultQ2 = $stmnt -> execute();\n\n if (!$resultQ2){\n echo \"<p class='alert alert-danger'>User role not created - please add user manually.</p>\";\n }else{\n $resultQ2 = $stmnt -> get_result();\n $data = $resultQ2 -> fetch_assoc();\n $newUser = $data[\"userID\"];\n $stmnt2 = $db -> prepare($insert);\n $stmnt2 -> bind_param(\"i\",$newUser);\n $resultQ3 = $stmnt2 -> execute();\n\n if (!$resultQ3){\n echo \"<p class='alert alert-danger'>There was an error while attempting to update user role table for userID: \" . $newUser . \" please verify that the data is correct, or contact your webadmin.</p>\";\n }else {\n echo \"<p class='alert alert-success'>User and user roles updated successfully!</p>\";\n }\n }\n\n //clear vars for reuse::\n $_POST = array(); //should stop data from persisting.\n $uName = \"\";\n $pw1 = \"\";\n $pw2 = \"\";\n $encoded = \"\";\n $email = \"\";\n $firstName = \"\";\n $lastName = \"\";\n }\n}", "function insertTableRow($tableName)\n{\n\n if ($tableName == \"userdata\") {\n global $errorRegister, $errorFirstName, $errorLastName, $errorEmail, $errorPassword, $errorPassword, $errorPasswordRepeat, $errorRegister, $errorAGBCheckbox;\n\n $errorRegister = $errorFirstName = $errorLastName = $errorEmail = $errorPassword = $errorPasswordRepeat = $errorAGBCheckbox = $firstnameInput = $lastnameInput = $emailInput = $passwordInput = $passwordRepeatInput = $checkboxInput = \"\";\n if (!isset($_POST['agbCheckboxRegisterAdmin'])) {\n $_POST['agbCheckboxRegisterAdmin'] = \"\";\n }\n\n $tokenClass = new token();\n $xsrfType = \"AdminNewUserForm\";\n\n $firstnameInput = sanitize_input(ucfirst($_POST['firstnameRegisterAdmin']));\n $lastnameInput = sanitize_input(ucfirst($_POST['lastnameRegisterAdmin']));\n $emailInput = sanitize_input($_POST['emailRegisterAdmin']);\n $passwordInput = sanitize_input($_POST['passwordRegisterAdmin']);\n $passwordRepeatInput = sanitize_input($_POST['passwordRepeatRegisterAdmin']);\n $checkboxInput = $_POST['agbCheckboxRegisterAdmin'];\n\n $validation = new validation();\n $registrationValidation = $validation->validRegister($firstnameInput, $lastnameInput, $emailInput, $passwordInput, $passwordRepeatInput, $checkboxInput);\n\n if ($registrationValidation == true) {\n $data = database::getConnections()->view(\"userdata\", \"email=:email\", [':email' => $emailInput]);\n if ($data == false) {\n if (($tokenData = $tokenClass->checkXSRFToken($_POST[\"xsrfToken\"])) == true) {\n $password_hash = password_hash($passwordInput, PASSWORD_DEFAULT);\n $ipAddress = get_client_ip();\n\n if (database::getConnections()->insertRegisterUserData(\"userdata\", $firstnameInput, $lastnameInput, $emailInput, $password_hash) == true) {\n $data = database::getConnections()->view(\"userdata\", \"email=:email\", [':email' => $emailInput]);\n if (database::getConnections()->insertRegisterUserInfo(\"userinfo\", $data[\"id\"], $ipAddress) == true) {\n echo '<p class=\"success\">Sie wurden erfolgreich registriert!</p>';\n }\n } else {\n echo $errorSearch = '<p class=\"error\">Beim Anlegen Ihres Accounts ist ein fehler aufgetreten! Versuchen Sie es erneut!</p>';\n }\n\n $tokenClass->deleteXSRFToken($tokenData[\"id\"], $xsrfType);\n\n // Es wird ein Token erstellt zum Aktivieren des Accounts, dieser wird auch hochgeladen in die \"token\" Tabelle\n $xsrfTypeRegisterActivate = \"RegisterAccountActivate\";\n $xsrfExpiresRegisterActivate = date(\"Y-m-d H:i:s\", strtotime(date(\"Y-m-d H:i:s\") . \" +1440 minutes\")); // 24 Stunden (1 Tage)\n $xsrfTokenRegisterActivate = $tokenClass->generateXSRFToken();\n database::getConnections()->tokenInsert($xsrfTokenRegisterActivate, $xsrfTypeRegisterActivate, $xsrfExpiresRegisterActivate, $data[\"id\"]);\n\n // Schreibe dem User eine E-Mail mit allen Registrierungsdaten und dem Aktivierungslink\n $newMail = new mail();\n $newMail->registerAccountDataMail($emailInput, $firstnameInput, $lastnameInput, $ipAddress, $xsrfTokenRegisterActivate, $data[\"id\"]);\n\n // ACHTUNG! //// ACHTUNG! //// ACHTUNG! //// ACHTUNG! //// ACHTUNG! //// ACHTUNG! //// ACHTUNG! //\n // Diese zwei Links hier unten drunter sind nur dafür da, für die Entwicklung, also wenn man keine E-Mail enthalten kann\n global $errorSearch;\n $errorSearch = '<a href=\"http://localhost:8888/Boost-Your-Life/resources/login.php?token=' . $xsrfTokenRegisterActivate . '&id=' . $data[\"id\"] . '\">Klicken Sie hier um Ihren Account zu aktivieren! (Dieser Link besteht nur, weil man über MAMP keine E-Mails verschicken kann!)</a>';\n\n // Free Googie Host Server\n // $errorSearch = '<a href=\"http://boost-your-life.thats.im/resources/login.php?token=' . $xsrfTokenRegisterActivate . '&id=' . $data[\"id\"] . '\">Klicken Sie hier um Ihren Account zu aktivieren! (Dieser Link besteht nur, weil man bei dem Kostenlosen Server sehr oft keine E-Mails bekommt und es auch ein E-Mail Limit gibt!)</a>';\n } else {\n global $errorSearch;\n echo $errorSearch = '<p class=\"error\">Bitte versuchen Sie es nach einem Refresh erneut! Wenn nach dem Refresh das Problem immer noch besteht, so wenden Sie sich bitte an den Support ===> [email protected]</p>';\n }\n } else {\n global $errorSearch;\n echo $errorSearch = '<p class=\"error\">Diese E-Mail Adresse ist schon vergeben, bitte eine andere eingeben!</p>';\n }\n } elseif ($registrationValidation == false || $data == true || $tokenData == false) {\n global $errorEmail, $errorRegister;\n echo $form = '<div class=\"formAdminRegister\"><form method=\"post\" enctype=\"multipart/form-data\">\n <input type=\"hidden\" name=\"tableName\" value=\"user\">\n <input type=\"hidden\" name=\"xsrfToken\" value=\"' . $_POST[\"xsrfToken\"] . '\">\n <div>\n <div>' . $errorRegister . '</div>\n <h1>Registrieren</h1>\n </div>\n <div class=\"field\">\n <label for=\"firstnameRegisterAdmin\">Vorname:</label>\n <input type=\"text\" name=\"firstnameRegisterAdmin\" id=\"firstnameRegisterAdmin\" placeholder=\"Vorname\" title=\"Beispiel = Manfred Müller\" autofocus maxlength=\"75\" value=\"' . $firstnameInput . '\">\n <div>' . $errorFirstName . '</div>\n </div>\n <div class=\"field\">\n <label for=\"lastnameRegisterAdmin\">Nachname:</label>\n <input type=\"text\" name=\"lastnameRegisterAdmin\" id=\"lastnameRegisterAdmin\" placeholder=\"Nachname\" title=\"Beispiel = Trautmann-Neuhagen\" maxlength=\"75\" value=\"' . $lastnameInput . '\">\n <div>' . $errorLastName . '</div>\n </div>\n <div class=\"field\">\n <label for=\"emailRegisterAdmin\">Email Adresse:</label>\n <input type=\"email\" name=\"emailRegisterAdmin\" id=\"emailRegisterAdmin\" placeholder=\"E-Mail Adresse\" title=\"Beispiel = [email protected]\" maxlength=\"255\" value=\"' . $emailInput . '\">\n <div>' . $errorEmail . '</div>\n </div>\n <div class=\"field\">\n <label for=\"passwordRegisterAdmin\">Passwort:</label>\n <input type=\"password\" name=\"passwordRegisterAdmin\" id=\"passwordRegisterAdmin\" placeholder=\"Passwort\" title=\"Das Passwort muss einen klein und groß Buchstaben, eine Zahl und ein Sonderzeichen enthalten\" autocomplete=\"off\" maxlength=\"100\">\n <div>' . $errorPassword . '</div>\n </div>\n <div class=\"field\">\n <label for=\"passwordRepeatRegisterAdmin\">Passwort wiederholen:</label>\n <input type=\"password\" name=\"passwordRepeatRegisterAdmin\" id=\"passwordRepeatRegisterAdmin\" placeholder=\"Passwort wiederholen!\" title=\"Das Passwort muss wiederholt werden!\" autocomplete=\"off\" maxlength=\"100\">\n <div>' . $errorPasswordRepeat . '</div>\n </div>\n <div class=\"field\">\n <label for=\"agbCheckboxRegisterAdmin\">\n <input type=\"checkbox\" name=\"agbCheckboxRegisterAdmin\" id=\"agbCheckboxRegisterAdmin\"><a class=\"agbDatenschutzLink\" href=\"agb.php\">AGB</a> & <a class=\"agbDatenschutzLink\" href=\"datenschutz.php\">DATENSCHUTZBESTIMMUNGEN</a> Akzeptieren\n </label>\n <div>' . $errorAGBCheckbox . '</div>\n </div>\n <br>\n <input class=\"btn btnSecondary\" type=\"submit\" name=\"edit\" value=\"Registrieren\">\n </form></div><br>';\n }\n } else {\n\n $errorSections = $errorRegister = $errorTitle = $errorDescription = $errorTextMessage = $errorSoundcloudLink = $errorYouTubeLink = $errorAGBCheckbox = \"\";\n global $newUser, $userid, $errorTextMessage, $errorRegister, $errorTitle, $errorDescription, $errorSoundcloudLink, $errorYouTubeLink, $errorAGBCheckbox, $errorSections;\n\n $tokenClass = new token();\n $xsrfType = \"AdminNewNLPForm\";\n\n $author = $newUser->userFirstName . \" \" . $newUser->userLastName;\n $titleInput = sanitize_input(ucfirst($_POST['title']));\n $descriptionInput = sanitize_input(ucfirst($_POST['description']));\n $textInput = sanitize_input($_POST['text']);\n $soundcloudInput = sanitize_input($_POST['soundcloudLink']);\n $youtubeInput = sanitize_input($_POST['youtubeLink']);\n $checkboxInput = $_POST['agbCheckbox'];\n $genreInput = $_POST['genre'];\n\n $validation = new validation();\n $registrationValidation = $validation->validRegisterNLP($titleInput, $descriptionInput, $textInput, $genreInput, $soundcloudInput, $youtubeInput, $checkboxInput);\n\n if ($registrationValidation == true) {\n $data = database::getConnections()->view(\"nlp\", \"userid\");\n if ($data == true) {\n if (($tokenData = $tokenClass->checkXSRFToken($_POST[\"xsrfToken\"])) == true) {\n\n require_once '../functions/imageUpload.php';\n\n // Es wird geschaut ob ein Bild hochgeladen wurde\n if (!$_FILES['appImage']['size'] == 0) {\n $unlink = \"\";\n $bildFunktion = imageUploads(\"insert\", \"Nlp\", $userid, $id, $unlink);\n\n // Wenn das Bild erfolgreich hochgeladen wurde, dann lade die NLP Übung mit den Inhalten hoch\n if ($bildFunktion == false) {\n if (database::getConnections()->insertDataNLP(\"nlp\", $userid, $author, $genreInput, $titleInput, $descriptionInput, $textInput, $soundcloudInput, $youtubeInput) == true) {\n global $errorSearch;\n $errorSearch = '<p class=\"success\">Die NLP Übung wurde erfolgreich angelegt!</p>';\n\n $nlpData = database::getConnections()->view(\"nlp\", \"userid=:userid ORDER BY uploaded DESC LIMIT 1\", [':userid' => $userid]);\n $imageData = database::getConnections()->view(\"images\", \"userid=:userid ORDER BY uploaded DESC LIMIT 1\", [':userid' => $userid]);\n\n database::getConnections()->updateNlpImageID($nlpData[\"id\"], $imageData[\"id\"]);\n\n // $nlpData = database::getConnections()->view(\"nlp\", \"userid=:userid ORDER BY uploaded DESC LIMIT 1\", [':userid' => $userid]);\n\n // database::getConnections()->updateNlpImageID($nlpData[\"id\"], $userid);\n } else {\n global $errorSearch;\n $errorSearch = '<p class=\"error\">Beim Anlegen der NLP Übung ist ein fehler aufgetreten!</p>';\n }\n $tokenClass->deleteXSRFToken($tokenData[\"id\"], $xsrfType);\n }\n\n } else {\n global $errorImage;\n $errorImage = '<p class=\"errorMessages\">Bitte wählen Sie ein Bild aus!</p>';\n }\n\n } else {\n global $errorRegister;\n $errorRegister = '<p class=\"errorMessages\">Bitte versuchen Sie es nach einem Refresh erneut! Wenn nach dem Refresh das Problem immer noch besteht, so wenden Sie sich bitte an den Support = [email protected]</p>';\n }\n }\n } elseif ($registrationValidation == false || $data == false || $tokenData == false || $bildFunktion == true || $_FILES['appImage']['size'] == 0) {\n global $errorRegister, $errorImage;\n echo '<div class=\"formAdminRegister\"><form method=\"post\" enctype=\"multipart/form-data\">\n <input type=\"hidden\" name=\"tableName\" value=\"nlp\">\n <input type=\"hidden\" name=\"xsrfToken\" value=\"' . $_POST[\"xsrfToken\"] . '\">\n <div>\n <div>' . $errorRegister . '</div>\n <h1>Importieren</h1>\n </div>\n <div class=\"field\">\n <label for=\"nlpImage\">Übungsbild:</label>\n <input type=\"file\" required accept=\"image/*\" name=\"appImage\" id=\"nlpImage\">\n <div>' . $errorImage . '</div>\n </div>\n <div class=\"field\">\n <label for=\"title\">Titel:</label>\n <input type=\"text\" name=\"title\" id=\"title\" placeholder=\"Titel\" autofocus maxlength=\"45\" value=\"' . $titleInput . '\">\n <div>' . $errorTitle . '</div>\n </div>\n <div class=\"field\">\n <label for=\"description\">Beschreibung:</label>\n <input type=\"text\" name=\"description\" id=\"description\" placeholder=\"Beschreibung\" maxlength=\"200\" value=\"' . $descriptionInput . '\">\n <div>' . $errorDescription . '</div>\n </div>\n <div class=\"field\">\n <label for=\"text\">Text:</label>\n <textarea name=\"text\" id=\"text\" placeholder=\"Text\" rows=\"4\" cols=\"60\">' . $textInput . '</textarea>\n <div>' . $errorTextMessage . '</div>\n </div>\n <div class=\"field\">\n <label for=\"rights\">Genre:</label>\n <select class=\"\" name=\"genre\" id=\"genre\">\n\t\t\t\t <optgroug name=\"genre\" id=\"genre\">\n <option value=\"' . $genreInput . '\" disabled selected>Wähle aus!</option>\n <option value=\"A\">A</option>\n <option value=\"B\">B</option>\n <option value=\"C\">C</option>\n <option value=\"D\">D</option>\n <option value=\"E\">E</option>\n <option value=\"F\">F</option>\n <option value=\"G\">G</option>\n\t\t\t\t </optgroup>\n </select>\n <div>' . $errorSections . '</div>\n </div>\n <div class=\"field\">\n <label for=\"soundcloudLink\">Soundcloud Link/SRC:</label>\n <input type=\"url\" name=\"soundcloudLink\" id=\"soundcloudLink\" placeholder=\"Soundcloud Link\" maxlength=\"255\" value=\"' . $soundcloudInput . '\">\n <div>' . $errorSoundcloudLink . '</div>\n </div>\n <div class=\"field\">\n <label for=\"youtubeLink\">YouTube Link/SRC:</label>\n <input type=\"url\" name=\"youtubeLink\" id=\"youtubeLink\" placeholder=\"YouTube Link\" maxlength=\"255\" value=\"' . $youtubeInput . '\">\n <div>' . $errorYouTubeLink . '</div>\n </div>\n <div class=\"field\">\n <label for=\"agbCheckbox\">\n <input type=\"checkbox\" name=\"agbCheckbox\" id=\"agbCheckbox\"><a class=\"agbDatenschutzLink\" href=\"agb.php\">AGB</a> & <a class=\"agbDatenschutzLink\" href=\"datenschutz.php\">DATENSCHUTZBESTIMMUNGEN</a> Akzeptieren\n </label>\n <div>' . $errorAGBCheckbox . '</div>\n </div>\n <input class=\"btn btnSecondary\" type=\"submit\" name=\"edit\" value=\"Importieren\">\n </form></div><br>';\n }\n\n }\n\n}", "function register_user($register_data){\n\tarray_walk($register_data,'array_sanitize');\n\t$register_data['password']=md5($register_data['password']);\n\t//print_r($register_data);\n\t\n\t$fields='`'.implode('`,`',array_keys($register_data)).'`';\n\t//echo $fields;\n\t$data='\\''.implode('\\',\\'',$register_data).'\\'';\n\t//echo $data;\n\t\n\t//echo \"INSERT INTO `cwusers` ($fields) VALUES ($data)\";\n\t//die();\n\tmysql_query(\"INSERT INTO `cwusers` ($fields) VALUES ($data)\");\n}", "function saveToDatabase($connection){\n $submiting = (isset($_POST[\"submiting\"]))? $_POST[\"submiting\"]:null;\n //prevents from showing errors on first load, errors should only be shown after submitting \n if($submiting == null or $submiting == 'false')return;\n\n $firstName=(isset($_POST[\"firstName\"]))? $_POST[\"firstName\"]:null;\n $firstName = filter_var($firstName, FILTER_SANITIZE_STRING);\n\n $lastName=(isset($_POST[\"lastName\"]))? $_POST[\"lastName\"]:null;\n $lastName = filter_var($lastName, FILTER_SANITIZE_STRING);\n\n $phoneNumber=(isset($_POST[\"phoneNumber\"]))? $_POST[\"phoneNumber\"]:null;\n $phoneNumber = filter_var($phoneNumber, FILTER_SANITIZE_STRING);\n\n $emailAddress=(isset($_POST[\"emailAddress\"]))? $_POST[\"emailAddress\"]:\"[email protected]\";\n $emailAddress = filter_var($emailAddress, FILTER_SANITIZE_STRING);\n\n $address=(isset($_POST[\"address\"]))? $_POST[\"address\"]:null;\n $address = filter_var($address, FILTER_SANITIZE_STRING);\n\n $userName=(isset($_POST[\"userName\"]))? $_POST[\"userName\"]:null;\n $userName = filter_var($userName, FILTER_SANITIZE_STRING);\n\n $password=(isset($_POST[\"password\"]))? $_POST[\"password\"]:null;\n $password = filter_var($password, FILTER_SANITIZE_STRING);\n\n $validateResult = validateForm($firstName, $lastName, $phoneNumber, $emailAddress, $address, $userName, $password);\n if( !$validateResult->valid)return $validateResult;\n\n// $connection = getConnection();\n $salt=randomSalt();\n $encriptedPassword=getEncriptedPassword($password,$salt);\n\n $query = \"INSERT INTO Persons (firstName, lastName, phoneNumber, emailAddress, personAddress, userID, userPassword, salt, personTypeID) VALUES ('\".$firstName.\"','\".$lastName.\"','\".$phoneNumber.\"','\".$emailAddress.\"','\".$address.\"','\".$userName.\"','\".$encriptedPassword.\"','\".$salt.\"','4')\";\n \n $statement = $connection->prepare($query);\n $statement->execute();\n $statement->closeCursor();\n}", "public function DB_reg_submit($data){\n\t\ttry {\n\t\t\tparent::__construct(DB_DRIVER.':dbname='.DB_NAME.';host='.DB_HOST, DB_USERNAME, DB_PASSWORD);\n\t\t\t$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \t\n\t\t\t\n\t\t\t$query = $this->prepare('INSERT INTO '.DB_TABLE.' (email, password, first_name, last_name, date_of_birth, time_stamp) VALUES (:email, :password, :first_name, :last_name, :date_of_birth, :time_stamp)');\n\t\t\t$query->execute(array(\n\t\t\t':email' => $data['email'],\n\t\t\t':password' => $data['password'],\n\t\t\t':first_name' => $data['first_name'],\n\t\t\t':last_name' => $data['last_name'],\n\t\t\t':date_of_birth' => $data['date_of_birth'],\n\t\t\t':time_stamp' => $data['time_stamp']\n\t\t\t));\n\t\t \n\t\t\tif ($query->rowCount() === 1){\n\t\t\t\tsetcookie('user', $data['first_name'].'|'.$data['last_name'].'|'.$data['date_of_birth'].'|'.$data['time_stamp'], time()+3600, \"/reg_form/\");\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch(PDOException $e){\n\t\t\techo 'ERROR: '.$e->getMessage();\n\t\t}\n\t}", "function registerGebruiker($gebruikersnaam, $voornaam, $achternaam, $adres, $postcode,\n $plaatsnaam, $land, $geboortedatum, $email, $wachtwoord,\n $vraag, $telefoon, $validatieCode, $antwoord){\n global $db;\n $sql = \"INSERT INTO gebruiker (gebruikersnaam, voornaam, achternaam, adresregel1, postcode, plaatsnaam, land, geboortedatum, email, wachtwoord, verkoper, vraag, gevalideerd) VALUES\n (:username, :firstname, :lastname, :adres, :postcode, :plaatsnaam, :land, :geboortedatum, :email, :wachtwoord, :verkoper, :vraag, :gevalideerd)\";\n $query = $db->prepare($sql);\n $query->bindValue(':username', $gebruikersnaam, PDO::PARAM_STR);\n $query->bindValue(':firstname', $voornaam, PDO::PARAM_STR);\n $query->bindValue(':lastname', $achternaam, PDO::PARAM_STR);\n $query->bindValue(':adres', $adres, PDO::PARAM_STR);\n $query->bindValue(':postcode', $postcode, PDO::PARAM_STR);\n $query->bindValue(':plaatsnaam', $plaatsnaam, PDO::PARAM_STR);\n $query->bindValue(':land', $land, PDO::PARAM_STR); //////////////////\n $query->bindValue(':geboortedatum', $geboortedatum, PDO::PARAM_STR);\n $query->bindValue(':email', $email, PDO::PARAM_STR);\n $query->bindValue(':wachtwoord', $wachtwoord, PDO::PARAM_STR);\n $query->bindValue(':verkoper', 0, PDO::PARAM_INT);\n $query->bindValue(':vraag', $vraag, PDO::PARAM_INT);\n $query->bindValue(':gevalideerd', 0, PDO::PARAM_INT);\n $query->execute();\n\n $sql2 = \"INSERT INTO validation (gebruikersnaam, validatiecode) VALUES\n (:gebruiker, :validate)\";\n $query = $db->prepare($sql2);\n $query->bindValue(':gebruiker', $gebruikersnaam, PDO::PARAM_STR);\n $query->bindValue(':validate', $validatieCode, PDO::PARAM_STR);\n $query->execute();\n\n $sql3 = \"INSERT INTO antwoord (vraagnummer, gebruikersnaam, antwoordtekst) VALUES\n (:nummer, :gebruikersnaam, :antwoord)\";\n $query = $db->prepare($sql3);\n $query->bindValue(':nummer', $vraag, PDO::PARAM_STR);\n $query->bindValue(':gebruikersnaam', $gebruikersnaam, PDO::PARAM_STR);\n $query->bindValue(':antwoord', $antwoord, PDO::PARAM_STR);\n $query->execute();\n\n $sql4 = \"INSERT INTO gebruikerstelefoon (volgnr, gebruikersnaam, telefoon) VALUES\n (:nummer, :gebruikersnaam, :tel)\";\n $query = $db->prepare($sql4);\n $query->bindValue(':nummer', 0, PDO::PARAM_STR);\n $query->bindValue(':gebruikersnaam', $gebruikersnaam, PDO::PARAM_STR);\n $query->bindValue(':tel', $telefoon, PDO::PARAM_STR);\n $query->execute();\n}", "function setFormData(){\n // formdata in database zetten\n // checken of de data is opgeslagen\n global $con;\n\n\n if(isset($_POST['field_firstname']) && $_POST['field_firstname'] != ''){\n $firstName = dbp($_POST['field_firstname']);\n } else {\n echo \"Voornaam is verplicht\";\n }\n\n if(isset($_POST['field_infixname'])){\n $middleName = dbp($_POST['field_infixname']);\n } \n\n if(isset($_POST['field_lastname']) && $_POST['field_lastname'] != ''){\n $lastName = dbp($_POST['field_lastname']);\n } else {\n echo \"Achternaam is verplicht\";\n }\n\n if(isset($_POST['field_birthdate']) && $_POST['field_birthdate'] != ''){\n $birthDate = dbp($_POST['field_birthdate']);\n } else {\n echo \"Geboorte datum is verplicht\";\n }\n\n if(isset($_POST['field_email']) && $_POST['field_email'] != ''){\n $email = dbp($_POST['field_email']);\n } else {\n echo \"Email is verplicht\";\n }\n\n if(isset($_POST['field_password']) && $_POST['field_password'] != ''){\n $password = dbp($_POST['field_password']);\n } else {\n echo \"Wachtwoord is verplicht\";\n }\n\n\n\n\n $query1 = $con->prepare('INSERT INTO user (firstName, middleName, lastName, birthDate, `e-mailadres`, password) VALUES (?, ?, ?, ?, ?, ?);');\n if ($query1 === false) {\n \techo mysqli_error($con).\" - \";\n \texit(__LINE__);\n }\n $query1->bind_param('ssssss', $firstName, $middleName, $lastName, $birthDate, $email, $password);\n if ($query1->execute() === false) {\n \techo mysqli_error($con).\" - \";\n \texit(__LINE__);\n } else {\n echo \"Gebruiker toegevoegd\";\n header(\"Location: ../index\");\n \n \t$query1->close();\n }\n\n}", "function insertIntoDatabase($tableName, $columnNames) {\n\n $conn = connect();\n\n //extracts input data from superglobal\n $addData = array();\n for ($i=0; $i<count($columnNames); $i++) {\n $addData[$i] = $_POST[$columnNames[$i] ];\n }\n\n //tests if all fields are filled\n $test = TRUE;\n for ($i=0; $i<count($columnNames); $i++) {\n if ($addData[$i] == \"\") {\n $test = FALSE;\n }\n }\n\n //if tests where succesfull create sql query\n if ($test == TRUE) {\n\n //Generates commaseperated names\n $commaSeperatedcolumnNames = $columnNames[0];\n for ($i=1; $i<count($columnNames); $i++) {\n $commaSeperatedcolumnNames .= \",\" . $columnNames[$i];\n }\n\n //used for the login\n $username = $_POST['username'];\n $password = $_POST['password'];\n $article = \"'$username' , SHA2('$password',512)\";\n\n //Combines $article, $tableName and $commaSeperatedcolumnNames to create the SQL query\n $sql = \"INSERT INTO $tableName ($commaSeperatedcolumnNames)\n VALUES ($article)\";\n\n //if acticle gives a notification back if an article was added successfully\n //and reloads the page\n if ($conn->query($sql) === TRUE) {\n $message = \"Je account is aangemaakt\";\n echo \"<script type='text/javascript'>alert('$message');</script>\";\n echo \"<script type='text/javascript'>('window.location.reload();')</script>\";\n } else {\n $message = \"query failes\";\n echo \"<script type='text/javascript'>alert('$message');</script>\";\n }\n\n //if not all fields are filled gives a popup that not all fields are filled\n } else {\n $message = \"Fill in the whole form\";\n echo \"<script type='text/javascript'>alert('$message');</script>\";\n }\n $conn->close();\n}", "function add_user($name, $password, $email, $creation_date, $db)\n\n{\n\n$valid_name = FALSE;\n$valid_email = FALSE;\n$valid_password = FALSE;\n\n\nif(isset($_POST[\"name\"]))\n{\n\tif (strlen($_POST[\"name\"]) >= 3 && strlen($_POST[\"name\"]) <= 10)\n\t{\n\t\t$valid_name = TRUE;\n\t}\n\telse\n\t{\n\t\techo \"<br>\" . \"Invalid name\";\n\t}\n}\n\t\n\nif(isset($_POST[\"email\"]))\n{\n\tif (preg_match(\"#^[a-z0-9._-]+@[a-z0-9._-]{2,}\\.[a-z]{2,4}$#\", $_POST[\"email\"]))\n\t{\n\t\t$valid_email = TRUE;\n\t}\n\telse \n\t{\n\t\techo \"<br>\" . \"Invalid email\";\n\t}\n}\n\t\n\nif(isset($_POST[\"pass\"]) && isset($_POST[\"confirm_pass\"]))\n{\n\tif (strlen($_POST[\"pass\"]) >= 3 && strlen($_POST[\"pass\"] < 10) && $_POST[\"pass\"] == $_POST[\"confirm_pass\"])\n\t{\n\t\t$valid_password = TRUE;\n\t}\n\telse \n\t{\n\t\techo \"<br>\" . \"Invalid password or password confirmation\";\n\t}\n}\n\nif($valid_name && $valid_email && $valid_password)\n\n{\n$hash_pass = password_hash($password, PASSWORD_DEFAULT); \n$req_insert = $db->prepare('INSERT INTO users VALUES (NULL,?,?,?,CURDATE(),?)');\n$req_insert->execute(array($name, $hash_pass, $email, $creation_date)); \nheader('Location: Inscription.php');\n\n}\n\n}", "function addPatient ($pdo, $email, $first_name, $last_name, $password){\n $sql = \"INSERT INTO user (email, first_name, last_name, password, secmail) VALUES(:email, :first, :last, :password, :email);\";\n $stmt = $pdo->prepare($sql);\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->bindValue(':first', $first_name, PDO::PARAM_STR);\n $stmt->bindValue(':last', $last_name, PDO::PARAM_STR);\n $stmt->bindValue(':password', $password, PDO::PARAM_STR);\n $stmt->execute();\n $stmt->closeCursor();\n}", "function m_verifyInsertUser()\n\t{\n\t\t$this->errMsg=MSG_HEAD.\"<br />\";\n\t\t$data = implode(\",\",$this->request);\n\t\tif(CAPTCHA_REGISTRATION){\n\t\t\tif($_SESSION['image_auth_string'] != $this->request['cap_key']){\n\t\t\t\t$this->err=1;\n\t\t\t\t$this->errMsg.=MSG_INVALID_CAP_KEY.\"<br />\";\n\t\t\t}\n\t\t}\n\t\tif(!$this->libFunc->m_validEmailData($data)){\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_INVALID_EMAILDATA.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['first_name']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_FIRSTNAME_EMPTY.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['last_name']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_LASTNAME_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['txtemail']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_EMAIL_EMPTY.\"<br>\";\n\t\t}\n\t\tif(!$this->libFunc->m_validateEmail($this->request['txtemail']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_INVALID_EMAILADDR.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['address1']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_ADDRESS1_EMPTY.\"<br>\";\n\t\t}\n\n\t\tif(empty($this->request['city']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_CITY_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['zip']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_ZIP_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['phone']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_PHONE_EMPTY.\"<br>\";\n\t\t}\n\t\t#VALIDATING EXISTING OPTION TITLE\n\t\t//adding status check to allow for registration of a account that has already ordered once. Status signifies it was a auto generated account and shouldnt be used or is a yet to be verified account. Should consider making a seperate flag for account signalling that it is a autogenerated account.\n\t\t$this->obDb->query = \"SELECT iCustmerid_PK FROM \".CUSTOMERS.\" where vEmail = '\".$this->request['txtemail'].\"' AND iRegistered='1'\";\n\t\t$row_code = $this->obDb->fetchQuery();\n\t\tif($this->obDb->record_count != 0)\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_EMAIL_EXIST.\"<br>\";\n\t\t}\n\t\t\n\t\treturn $this->err;\n\t}", "function process_signup_params($db)\n{\n // Check if we should login the user\n if (isset($_POST['signup'])) {\n create_account($db, $_POST['signup_name'], $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_confirm_password']);\n }\n}", "public function register($data){\n // VALUES(:username, :email, :password)');\n\n\n // //Bind values\n // $this->db->bind(':username', $data['username']);\n // $this->db->bind(':email', $data['email']);\n // $this->db->bind(':password', $data['password']);\n\n // //Execution\n // if($this->db->execute()){\n // return true;\n // }else{\n // return false;\n // }\n\n try {\n $dns = \"mysql:host=\".$this->servername.\";dbname=\".$this->dbname;\n $conn = new PDO($dns,$this->username, $this->password);\n\n // set the PDO error mode to exception\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = 'INSERT INTO users (username, email, password) VALUES(:username, :email, :password)';\n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'username' => $data['username'],\n 'email' => $data['email'],\n 'password' => $data['password']\n ]);\n print_r($data['username']);\n\n } catch(PDOException $e) {\n echo \"this Error: \" . $e->getMessage();\n }\n\n $conn = null;\n\n\n }", "function signUp() {\n // create query\n $query = 'INSERT INTO ' . $this->table . \n ' SET \n username = :name, \n email = :email,\n password = :pass';\n\n // prepare statement\n $stmt = $this->conn->prepare($query);\n\n /* // clean data\n $this->name = htmlspecialchars(strip_tags(this->name));\n $this->email = htmlspecialchars(strip_tags(this->name));\n $this->password = htmlspecialchars(strip_tags(this->password)); */\n\n // hash password\n $hashedPass = password_hash($this->password, PASSWORD_DEFAULT);\n\n // bind params\n $stmt->bindParam(':name', $this->username);\n $stmt->bindParam(':email', $this->email);\n $stmt->bindParam(':pass', $hashedPass);\n\n if ($stmt->execute()) {\n return true;\n }\n else {\n //printf(\"Error: %s.\\n\", $stmt->error);\n return false;\n }\n }", "public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n unset($DBA, $rs, $fields, $fieldvals);\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'id');\n $idfields = array(0 => 'username');\n $idvals = array(0 => $this->Username);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('ID', $res['id']);\n }\n }\n unset($DBA, $rs, $fields, $idfields, $idvals);\n }", "function register() {\n if (isset($_POST[\"password\"]) && isset($_POST[\"firstname\"]) && isset($_POST[\"surname\"]) \n && isset($_POST[\"tel\"]) && isset($_POST[\"email\"])) {\n\n // Put parameters into local variables\n $password = $_POST[\"password\"];\n $firstname = $_POST[\"firstname\"];\n $surname = $_POST[\"surname\"];\n $tel = $_POST[\"tel\"];\n $email = $_POST[\"email\"];\n\n if ($_POST[\"user\"] == 'landlord') {\n $stmt = $this->db->prepare('SELECT id FROM user_landlord WHERE email=?');\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n\t $stmt->bind_result($id);\n\t $stmt->fetch();\n\t\t$stmt->close();\n\n\t if (!empty($id)) {\n\t echo '{\"success\":0, error_message\":\"Email address already registered.\"}';\n\t } else {\n\t $stmt = $this->db->prepare('INSERT INTO user_landlord(id, firstname, surname, password, email, tel) VALUES (null, ?, ?, ?, ?, ?)');\n\t $stmt->bind_param(\"sssss\", $firstname, $surname, $password, $email, $tel);\n $success = $stmt->execute();\n if ($this->db->commit()) {\n \t\t echo '{\"success\":1}';\n \t } else {\n \t\t echo '{\"success\":0, error_message\":\"Registration not successful.\"}';\n \t }\n $stmt->close();\n\t }\n } else if ($_POST[\"user\"] == 'tenant') {\n $stmt = $this->db->prepare('SELECT id FROM user_tenant WHERE email=?');\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n\t $stmt->bind_result($id);\n\t $stmt->fetch();\n\t\t$stmt->close();\n\n\t if (!empty($id)) {\n\t echo '{\"success\":0, error_message\":\"Email address already registered.\"}';\n\t } else {\n\t $stmt = $this->db->prepare('INSERT INTO user_tenant(id, firstname, surname, password, email, tel) VALUES (null, ?, ?, ?, ?, ?)');\n\t $stmt->bind_param(\"sssss\", $firstname, $surname, $password, $email, $tel);\n $success = $stmt->execute();\n if ($this->db->commit()) {\n \t\t echo '{\"success\":1}';\n \t } else {\n \t\t echo '{\"success\":0, error_message\":\"Registration not successful.\"}';\n \t }\n $stmt->close();\n\t }\n } \n }\n }", "function procAddUser() {\n\t\tglobal $session, $database, $form;\n\t\t/* Convert username to all lowercase (by option) */\n\t\tif(ALL_LOWERCASE){\n\t\t $_POST['user'] = strtolower($_POST['user']);\n\t\t}\n\t\t/* Registration attempt */\n\t\t$retval = $session->register($_POST['user'], $_POST['pass'], $_POST['email'], $_POST['fullname'], $_POST['ulevel']);\n\n\t\t/* Registration Successful */\n\t\tif($retval == 0){\n\t\t $_SESSION['reguname'] = $_POST['user'];\n\t\t $_SESSION['regsuccess'] = true;\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n\t\t/* Error found with form */\n\t\telse if($retval == 1){\n\t\t $_SESSION['value_array'] = $_POST;\n\t\t $_SESSION['error_array'] = $form->getErrorArray();\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n\t\t/* Registration attempt failed */\n\t\telse if($retval == 2){\n\t\t $_SESSION['reguname'] = $_POST['user'];\n\t\t $_SESSION['regsuccess'] = false;\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n }", "public function RegistrarUsuarios()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"nombres\"]) or empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t$sql = \" select cedula from usuarios where cedula = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"cedula\"]) );\n\t$num = $stmt->rowCount();\n\tif($num > 0)\n\t{\n\n\t\techo \"2\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\t$sql = \" select email from usuarios where email = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_POST[\"email\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 0)\n\t\t{\n\n\t\t\techo \"3\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \" select usuario from usuarios where usuario = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array($_POST[\"usuario\"]) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\t\t\t\t$query = \" insert into usuarios values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t\t$stmt->bindParam(1, $cedula);\n\t\t\t\t$stmt->bindParam(2, $nombres);\n\t\t\t\t$stmt->bindParam(3, $nrotelefono);\n\t\t\t\t$stmt->bindParam(4, $cargo);\n\t\t\t\t$stmt->bindParam(5, $email);\n\t\t\t\t$stmt->bindParam(6, $usuario);\n\t\t\t\t$stmt->bindParam(7, $password);\n\t\t\t\t$stmt->bindParam(8, $nivel);\n\t\t\t\t$stmt->bindParam(9, $status);\n\n\t\t\t\t$cedula = strip_tags($_POST[\"cedula\"]);\n\t\t\t\t$nombres = strip_tags($_POST[\"nombres\"]);\n\t\t\t\t$nrotelefono = strip_tags($_POST[\"nrotelefono\"]);\n\t\t\t\t$cargo = strip_tags($_POST[\"cargo\"]);\n\t\t\t\t$email = strip_tags($_POST[\"email\"]);\n\t\t\t\t$usuario = strip_tags($_POST[\"usuario\"]);\n\t\t\t\t$password = sha1(md5($_POST[\"password\"]));\n\t\t\t\t$nivel = strip_tags($_POST[\"nivel\"]);\n\t\t\t\t$status = strip_tags(strtoupper($_POST[\"status\"]));\n\t\t\t\t$stmt->execute();\n\n################## SUBIR FOTO DE USUARIOS ######################################\n//datos del arhivo \n\t\t\t\tif (isset($_FILES['imagen']['name'])) { $nombre_archivo = $_FILES['imagen']['name']; } else { $nombre_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['type'])) { $tipo_archivo = $_FILES['imagen']['type']; } else { $tipo_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['size'])) { $tamano_archivo = $_FILES['imagen']['size']; } else { $tamano_archivo =''; } \n//compruebo si las características del archivo son las que deseo \n\t\t\t\tif ((strpos($tipo_archivo,'image/jpeg')!==false)&&$tamano_archivo<50000) \n\t\t\t\t{ \n\t\t\t\t\tif (move_uploaded_file($_FILES['imagen']['tmp_name'], \"fotos/\".$nombre_archivo) && rename(\"fotos/\".$nombre_archivo,\"fotos/\".$_POST[\"cedula\"].\".jpg\"))\n\t\t\t\t\t{ \n## se puede dar un aviso\n\t\t\t\t\t} \n## se puede dar otro aviso \n\t\t\t\t}\n################## FINALIZA SUBIR FOTO DE USUARIOS ######################################\n\n\t\t\t\techo \"<div class='alert alert-success'>\";\n\t\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\t\t\techo \"<span class='fa fa-check-square-o'></span> EL USUARIO FUE REGISTRADO EXITOSAMENTE\";\n\t\t\t\techo \"</div>\";\t\t\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"4\";\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}\n}", "function input_data($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype, $aid, $name, $pwd, $repeatpwd, $email)\r\n{\r\n if ($pwd != $repeatpwd) {\r\n echo _PWBADMATCH;\r\n exit;\r\n } else {\r\n echo \"<font class=\\\"pn-title\\\">\" . _INPUT_DATA_1 . \"</font>\";\r\n\r\n echo \"<center>\";\r\n global $dbconn;\r\n/*\r\n\t\tif ($dbtype == \"mysql\") {\r\n\t\t\tmysql_connect($dbhost, $dbuname, $dbpass);\r\n\t\t mysql_select_db(\"$dbname\") or die (\"<br><font class=\\\"pn-sub\\\">\" . _NOTSELECT . \"</font>\"); \r\n\t\t}\r\n\t\telse if ($dbtype == \"oci8\") {\r\n//\t\t\t $db = ADONewConnection($dbtype);\r\n//\t\t\t\t$dbconn= $db->Connect($dbhost, $dbuname, $dbpass, $dbname);\r\n\t\t}\r\n*/\r\n // Put basic information in first\r\n include(\"install/newdata.php\"); \r\n // new installs will use md5 hashing - compatible on windows and *nix variants.\r\n $pwd = md5($pwd);\r\n $pwd1 = md5('instructor');\r\n $pwd2 = md5('student');\r\n $pwd3 = md5('instructor2');\r\n\t\t$result = $dbconn->Execute(\"INSERT INTO \" . $prefix . \"_users VALUES ( '1', '$name', '$aid', '$email', \" . time() . \", '$pwd', '', '000000', '1', '', '1','0')\") or die (\"<b>\" . _NOTUPDATED . $prefix . \"_users</b>\");\r\n $result = $dbconn->Execute(\"INSERT INTO \" . $prefix . \"_users VALUES ( '2', 'instructor', 'instructor', '', \" . time() . \", '$pwd1', '', '000001', '1', '', '1','0')\") or die (\"<b>\" . _NOTUPDATED . $prefix . \"_users</b>\");\r\n $result = $dbconn->Execute(\"INSERT INTO \" . $prefix . \"_users VALUES ( '3', 'student', 'student', '', \" . time() . \", '$pwd2', '', '000002', '1', '', '1','0')\") or die (\"<b>\" . _NOTUPDATED . $prefix . \"_users</b>\");\r\n $result = $dbconn->Execute(\"INSERT INTO \" . $prefix . \"_users VALUES ( '4', 'instructor2', 'instructor2', '', \" . time() . \", '$pwd3', '', '000003', '1', '', '1','0')\") or die (\"<b>\" . _NOTUPDATED . $prefix . \"_users</b>\");\r\n echo \"<br><font class=\\\"pn-sub\\\">\" . $prefix . \"_users\" . _UPDATED . \"</font>\"; \r\n\r\n\t\t// group_membership table\r\n\t\t$table = $prefix.\"_group_membership\";\r\n\t\t$result = $dbconn->Execute(\"INSERT INTO $table VALUES ('1','1')\") or die (\"<b>\"._NOTUPDATED. \" $table</b>\");\r\n\t\t$result = $dbconn->Execute(\"INSERT INTO $table VALUES ('2','2')\") or die (\"<b>\"._NOTUPDATED. \" $table</b>\");\r\n\t\t$result = $dbconn->Execute(\"INSERT INTO $table VALUES ('4','3')\") or die (\"<b>\"._NOTUPDATED. \" $table</b>\");\r\n\t\t$result = $dbconn->Execute(\"INSERT INTO $table VALUES ('2','4')\") or die (\"<b>\"._NOTUPDATED. \" $table</b>\");\r\n } \r\n}", "function register($firstname, $lastname, $birthday, $address, $town, $postal_code, $telephone, $email, $credit_card, $username, $password){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn -> prepare('INSERT INTO `clients` (`id`, `username`, `password`, `firstname`, `lastname`, `email`, `birthday`, `address`, `town`, `postal_code`, `telephone`, `credit_card`, `is_admin`) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0)');\n\t\t$sth \t-> execute(array($username, $password, $firstname, $lastname, $email, $birthday, $address, $town, $postal_code, $telephone, $credit_card));\n\t}", "public static function signUp()\n {\n global $cont;\n $name = $_POST['name'];\n $email = $_POST['email'];\n $password = SHA1($_POST['password']);\n\n $signup = $cont->prepare(\"INSERT INTO users(`name`, `email`, `password` , `role`) VALUES (? , ? , ? , ?) \");\n $signup->execute([$name , $email , $password , 0]);\n\n session_start();\n $_SESSION['message'] = \"Data entering correctly\";\n header(\"location:../login.php\");\n }", "function register() {\n\n // Validate user input\n $this->s_fname = testInput($this->s_fname);\n $this->s_lname = testInput($this->s_lname);\n $this->s_bdate = testInput($this->s_bdate);\n $this->s_sex = testInput($this->s_sex);\n $this->s_email = testInput($this->s_email);\n $this->s_password = testInput($this->s_password);\n\n // Check that student is not registered already\n $result = $this->conn->query(\"SELECT * FROM $this->tableName WHERE s_email LIKE '$this->s_email'\");\n \n if ($result->rowCount() === 0) {\n\n // Insert query \n $query = \"INSERT INTO $this->tableName (s_fname, s_lname, s_bdate, s_sex, s_email, s_password)\n VALUES(:firstName, :lastName, :birthday, :sex, :email, :hashedPassword)\";\n\n // Prepare insert statement\n $insert = $this->conn->prepare($query);\n\n $insert->bindParam(\":firstName\", $this->s_fname);\n $insert->bindParam(\":lastName\", $this->s_lname);\n $insert->bindParam(\":birthday\", $this->s_bdate);\n $insert->bindParam(\":sex\", $this->s_sex);\n $insert->bindParam(\":email\", $this->s_email);\n // Hash password before storing it\n $this->s_password = password_hash($this->s_password, PASSWORD_DEFAULT);\n $insert->bindParam(\":hashedPassword\", $this->s_password);\n\n // Send new user to DB\n try {\n $insert->execute();\n return true;\n }\n catch(PDOException $e) {\n echo $e;\n return false;\n }\n }\n else {\n return false;\n }\n }", "function addUserTemp($data)\n {\n $pwd = $this->encrypt_password($data[$this->dataFields['password']]);\n //$pwd = \"'\".$data[$this->dataFields['password']].\"'\";\n $activation = $this->randomPass();\n \n $dob_str = NULL;\n if($data[$this->dataFields[\"dob\"]] == \"\"){\n $dob_str = \"NULL\";\n }else{\n $dob_tmp = explode(\"/\", $data[$this->dataFields[\"dob\"]]);\n if(sizeof($dob_tmp) == 3)\n $dob_str = \"'\".$dob_tmp[2].\"-\".$dob_tmp[1].\"-\".$dob_tmp[0].\"'\";\n } \n if($data[$this->dataFields[\"newsletter_flag\"]] != '1' && $data[$this->dataFields[\"newsletter_flag\"]] != '0'){\n $data[$this->dataFields[\"newsletter_flag\"]] = 1;\n }\n \n $res = $this->query(\"INSERT INTO `{$this->userTempTable}` (`{$this->tbTmpFields['password']}`, `{$this->tbTmpFields['first_name']}`, `{$this->tbTmpFields['last_name']}`, `{$this->tbTmpFields['gender']}`, `{$this->tbTmpFields['dob']}`, `{$this->tbTmpFields['telephone']}`,`{$this->tbTmpFields['fax']}`,`{$this->tbTmpFields['email']}`, `{$this->tbTmpFields['newsletter_flag']}`, `{$this->tbTmpFields['company']}`, `{$this->tbTmpFields['address']}`, `{$this->tbTmpFields['postal']}`, `{$this->tbTmpFields['city']}`, `{$this->tbTmpFields['country']}`, `{$this->tbTmpFields['primary_flag']}`, `{$this->tbTmpFields['activation_code']}`, `{$this->tbTmpFields['date_registered']}`) VALUES ('\".$pwd.\"', '\".$data[$this->dataFields[\"first_name\"]].\"', '\".$data[$this->dataFields[\"last_name\"]].\"', '\".$data[$this->dataFields[\"gender\"]].\"', \".$dob_str.\", '\".$data[$this->dataFields[\"telephone\"]].\"', '\".$data[$this->dataFields[\"fax\"]].\"', '\".$data[$this->dataFields[\"email\"]].\"', '\".$data[$this->dataFields[\"newsletter_flag\"]].\"', '\".$data[$this->dataFields[\"company\"]].\"', '\".$data[$this->dataFields[\"address\"]].\"', '\".$data[$this->dataFields[\"postal\"]].\"', '\".$data[$this->dataFields[\"city\"]].\"', '\".$data[$this->dataFields[\"country\"]].\"', \".$data[$this->dataFields[\"primary_flag\"]].\", '\".$activation.\"', CURRENT_TIMESTAMP)\");\n \n if($res){\n $activation_link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'&email='.$data[$this->dataFields[\"email\"]].'&activate='.$activation;\n //echo $activation_link.\"<p>\"; \n\n // SEND ACTIVATION EMAIL\n return $this->sendActivation($data[$this->dataFields[\"first_name\"]], $activation_link, $data[$this->dataFields['email']]);\n }else{\n return false;\n } \n }", "public function registration(){\n\n\t\t\t$userData = $this->Common_model->selRowData(PREFIX.\"user\",\"\",\"emailId ='\".$_POST['email2'].\"'\");\n\t\t\t $topRatedFuncies= $this->Common_model->selTableData(\"fc_flyers\",\"GROUP_CONCAT(keywords) AS funcyName\",\"createdOn BETWEEN '\".date('Y-m-d',strtotime('-30 days')).\"' AND '\".date('Y-m-d').\"'\",\"viewCount DESC\",\"5\");\n\t\t\n\n\t\t\tif(isset($_POST[\"firstName\"]) && isset($_POST[\"email2\"]) && $userData ==\"\"){\n\t\t\t\n\t\t\t\t\n\t\t $insertData\t\t\t\t=\tarray();\n\n\t\t\t\t$insertData[\"firstName\"]=\tucfirst($_POST[\"firstName\"]);\n\t\t\t\t$insertData[\"lastName\"]\t=\tucfirst($_POST[\"lastName\"]);\n\t\t\t\t$insertData[\"emailId\"]\t=\ttrim(strtolower($_POST[\"email2\"]));\n\t\t\t\t$insertData[\"password\"]\t=\tmd5(trim($_POST[\"password1\"]));\n\t\t\t // $insertData[\"funcies\"]\t= $topRatedFuncies[0]->funcyName ;\n\t\t\t\t/*if ($_POST[\"txt_keyword\"]!=\"\") {\n\t\t\t\t\t$insertData[\"funcies\"]\t=\timplode(\",\",$_POST[\"txt_keyword\"]);\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t $insertData[\"funcies\"]\t=$topRatedFuncies[0]->funcyName ;\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\t/*$insertData[\"contactNumber\"]\t=\t$_POST[\"txt_contactNumber\"];\n\t\t\t\t$insertData[\"altContactNumber\"]\t=\t$_POST[\"txt_altContactNumber\"];\n\t\t\t\t//$insertData[\"password\"]\t=\t$_POST[\"txt_password\"];\n\t\t\t\t$insertData[\"city\"]\t=\t$_POST[\"txt_city\"];\n\t\t\t\t$insertData[\"status\"]\t=\t$_POST[\"txt_status\"];\n\t\t\t\t$insertData[\"address\"]\t=\t$_POST[\"txtarea_address\"];\n\t\t\t\t$insertData[\"zipcode\"]\t=\t$_POST[\"txt_zipcode\"];\t*/\n\t\t\t\t$insertedUserId\t\t\t\t\t=\t$this->Common_model->insert(PREFIX.\"user\",$insertData);\n\t\t\t\n\t\t\tif($insertedUserId){\n\t\t\t\t/*//send email URL to registered \n\t\t\t\t$settings = array();\n\t\t\t\t$settings[\"template\"] \t\t\t\t= \"welcome_to_funcano.html\";\n\t\t\t\t$settings[\"email\"] \t\t\t\t\t= trim($insertData['emailId']); \n\t\t\t\t$settings[\"subject\"] \t\t\t\t= \"Warm welcome from the Funcano\";\n\t\t\t\t$contentarr['[[[NAME]]]']\t\t\t=\ttrim($insertData[\"firstName\"]);\n\t\t\t\t$contentarr['[[[USERNAME]]]']\t\t=\t$insertData[\"emailId\"];\n\t\t\t\t$contentarr['[[[PASSWORD]]]']\t\t=\t$insertData[\"password\"];\n\t\t\t\t//$contentarr['[[[DASHURL]]]']\t\t=\tBASEURL.'/login';\n\t\t\t\t$settings[\"contentarr\"] \t= \t$contentarr;\n\t\t\t\t$this->common_lib->sendMail($settings);*/\n\t\t\t\t//insert into hr_verification\n\t\t\t\t$insertVeri['userId']\t\t=\t$insertedUserId;\n\t\t\t\t$insertVeri['verifyType']\t=\t1;\n\t\t\t\t$insertVeri['code']\t\t\t=\tgenerateStrongPassword(16,false,'lud');\t\t\t\t\t\t\n\t\t\t\t$insertStatus = $this->Common_model->insert(\"fc_verification\", $insertVeri);\n\t\t\t\tif($insertStatus){\n\t\t\t\t\t//Send verification email\n\t\t\t\t\t$settings = array();\n\t\t\t\t\t$settings[\"template\"] \t\t\t\t= \t\"verify_account.html\";\n\t\t\t\t\t$settings[\"email\"] \t\t\t\t\t= \t$insertData['emailId']; //\"[email protected]\";\n\t\t\t\t\t$settings[\"subject\"] \t\t\t\t=\t\"Funcano - verify account\";\n\t\t\t\t\t$contentarr['[[[VERIFYURL]]]']\t\t=\tBASEURL.\"/home/verify-account/\".$insertVeri['code'];\n\t\t\t\t\t$settings[\"contentarr\"] \t\t\t= \t$contentarr;\n\t\t\t\t\t$this->common_lib->sendMail($settings);\t\n\t\t\t\t\t\n\t\t\t\t\t$outputData['result']\t=\t\"Success\";\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t} else{\n\t\t\t$outputData['result']\t=\t\"Failed\";\n\t\t\t\n\t\t}\n\t\t$this->load->viewF('ajaxresult',$outputData);\n\t}", "function register(){\r\n //FullName\r\n $fullName = $this->safety($_REQUEST['reg_fullName']);\r\n \t$_SESSION['reg_fullName'] = $fullName;\r\n //Email\r\n \t$email = $this->safety($_REQUEST['reg_email']);\r\n \tif (! filter_var($email, FILTER_VALIDATE_EMAIL) ){\r\n \t\t$errors[] = \"Invalid email format\";\r\n \t}\r\n \telseif( $this->emailExists($email) ) {\r\n \t\t\t$errors[] = \"Email already in use\";\r\n \t}\r\n \t$_SESSION['reg_email'] = $email; //Stores email into session variable\r\n \t//Password\r\n \t$password = $_REQUEST['reg_password'];\r\n //Fav. Quote\r\n \t$quote = $this->safety($_REQUEST['reg_quote']);\r\n //Current date\r\n \t$date = date(\"Y-m-d\");\r\n //Validate name\r\n \tif(strlen($fullName) > 100 || strlen($fullName) < 2) {\r\n \t\t$errors[] = \"Your name must be between 2 and 100 characters\";\r\n \t}\r\n //Validate password\r\n \tif (strlen($password) < 6) {\r\n \t $errors[] = \"Password is too short!\";\r\n \t}\r\n \t/* Check Password Strength */\r\n /* More about regular expressions https://www.w3schools.com/php/php_regex.asp */\r\n \tif (!preg_match(\"#[0-9]+#\", $password)) {\r\n \t $errors[] = \"Password must include at least one number!\";\r\n \t}\r\n \tif (!preg_match(\"#[a-zA-Z]+#\", $password)) {\r\n \t $errors[] = \"Password must include at least one letter!\";\r\n \t}\r\n // only proceed if there are no errors.\r\n \tif(empty($errors)) {\r\n //Encrypt before sending to database\r\n $password = password_hash($password, PASSWORD_DEFAULT);\r\n \t\t//Assign a random profile picture\r\n \t\t$number = rand(1, 16); //Random number between 1 and 16\r\n \t\t$avatar = 'assets/avatars/'.$number.'.png';\r\n \t\t// prepare data to be inserted\r\n $data = [\r\n 'fullName' => $fullName,\r\n 'email' => $email,\r\n 'password' => $password,\r\n 'quote' => $quote,\r\n 'signup_date' => $date,\r\n 'avatar' => $avatar\r\n ];\r\n // wrap structure with `backticks` and content with regular \"quotemarks\"\r\n $columns = '`'.implode('`,`',array_keys($data)).'`';\r\n $values = '\"'.implode('\",\"', $data).'\"';\r\n $sql = \"INSERT INTO `users` ($columns) VALUES ($values) \";\r\n if ( $this->q($sql) ){\r\n // redirect if registration was successful.\r\n header('Location: '.site_root.'?login_form&reg_success='.$email);\r\n \t\t}\r\n \t\telse{\t$errors[] = \"Something went wrong: \".$this->ixd->error; }\r\n \t}\r\n return $errors;\r\n }", "function post_new_user(){\n\t\tglobal $conn;\n\t\t$data \t\t= json_decode(file_get_contents('php://input'));\n\t\t$username \t= htmlspecialchars($data->username);\n\t\t$email \t\t= htmlspecialchars($data->email);\n\t\t$password \t= htmlspecialchars($data->password);\n\t\t\n\t\t$password_hash = password_hash($password, PASSWORD_DEFAULT);\n\t\t\n\t\t//check if username is already taken\n\t\t\n\t\tif($sql = $conn->prepare(\"SELECT * FROM members where member_name = ?\")){\n\t\t\t\t\t\n\t\t\t$sql->bind_param('s', $username);\n\t\t\t$sql->execute();\n\t\t\t$result = get_result_fill($sql);\n\t\t\t$username_count = count(array_shift($result));\n\n\t\t\tif($username_count > 0 )\n\t\t\t{\n\t\t\t\t//we already have that user name taken. \n\t\t\t\techo \"taken\";\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif($sql = $conn->prepare(\"INSERT INTO members (member_id, member_name, member_email, member_password) VALUES (null, ?, ?, ?)\")){\n\t\t\t\t\t$sql->bind_param('sss', $username, $email, $password_hash);\n\t\t\t\t\tif($sql->execute()){\n\t\t\t\t\t\t//create a new table for this user and copy and paste the default suggestions\n\t\t\t\t\t\tcreate_new_member_table($username);\n\t\t\t\t\t\techo create_jwt($username);\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Error\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\techo \"fail\";\n\t\t}\n\n\t\t\n\t\t\n\t}", "function user_check_input()\n\t{\n\t\t$do_register = true;\n\t\t$cols = $this->DB->database_build_query('USER_INSERT');\n\t\t\n\t\t_validate_input($cols, $_POST, false);\n\t\t\n\t\t$rows = $this->DB->database_select('users', $cols, array('username' => $_POST['username']), 1); //Does username already exist\n\n\t\tif($rows != false)\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Username already exists\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\t$rows = $this->DB->database_select('users', 'email', array('email' => $_POST['email'])); //Does email already exist\n\t\t\t\n\t\tif($rows != false)\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Email address already exists\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(empty($_POST['username']) || empty($_POST['password']) //Are primary fields empty\n\t\t || empty($_POST['password_confirm']) || empty($_POST['email']))\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"No fields can be left blank\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(!preg_match(\"/^[A-Za-z0-9_\\-\\.]+@[A-Z0-9a-z]+\\.[a-zA-Z]{2,5}\\.?[a-zA-Z]*$/\", trim($_POST['email']))) //Check email format\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Invalid email address\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif($_POST['password'] !== $_POST['password_confirm']) //Confirm that passwords match\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Passwords do not match\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(strlen($_POST['password']) < 6 || strlen($_POST['password']) > 12) //Confirm password validity\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Password must be between 6 and 12 characters\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(!preg_match(\"/([a-zA-Z])/\", $_POST['password']) || !preg_match(\"/([0-9])/\", $_POST['password']))\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Password must be contain both numbers and letters\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif (empty($_SESSION['captcha']) || trim(strtolower($_REQUEST['captcha'])) != $_SESSION['captcha']) //Check captcha\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Invalid captcha\");\n\t\t\t$do_register = false;\t\n\t\t}\n\t\t\n\t\treturn $do_register;\n\t}", "function formData($fname,$lname,$upassword,$gender,$address,$city,$state,$country,$phone) \n {\n global $conn;\n //update the Table dynamically = Schemaname.table name \n $sql = \"INSERT INTO anjyo.user_details (uname,upassword,gender,address,city,state,country,phone) VALUES ('\".$fname.$lname.\"','\".$upassword.\"','\".$gender.\"','\".$address.\"','\".$city.\"','\".$state.\"','\".$country.\"','\".$phone.\"')\"; \n echo $sql; \n if ($conn->query($sql) === TRUE)\n {\n //echo \"<br> Registration details are added successfully to the DB table\";\n \n header( 'Location: ./AnkutLogin.html' ) ;\n echo \"Session variables are sucessfully set\";\n } \n else \n {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n $conn->close();\n }", "function addNewUser($email, $password)\r\n{\r\n // first time registration\r\n global $dbh;\r\n\r\n // 1. define the query\r\n $sql = \"INSERT INTO loginCredentials (email, password) VALUES (:email, :password)\";\r\n\r\n // 2. prepare the statement\r\n $statement = $dbh->prepare($sql);\r\n\r\n // 3. bind parameters\r\n $statement->bindParam(':email', $email, PDO::PARAM_STR);\r\n $statement->bindParam(':password', sha1($password), PDO::PARAM_STR);\r\n\r\n // 4. execute the statement\r\n $success = $statement->execute();\r\n\r\n return $success;\r\n\r\n}", "function insertUser($email, $password, $id, $chamber, $firstname, $lastname, $expiry, $jobtitle, $type){\r\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n try{\r\n if(!isset($jobtitle) || empty($jobtitle)) { $jobtitle = null; }\r\n if(!isset($id) || empty($id)) { $id = null; }\r\n if(!isset($expiry) || empty($expiry)) { $expiry = null; }\r\n\r\n $sql = $this->db->prepare(\"INSERT INTO `USER` (`email`, `password`, `businessID`, `chamberID`, `firstname`, `lastname`, `expiry`, `jobtitle`, `type`)\r\n VALUES(:email, :password, :id, :chamber, :firstname, :lastname, $expiry, :jobtitle, :type)\");\r\n\r\n $sql->bindParam(':email', $email, PDO::PARAM_STR);\r\n $sql->bindParam(':password', $password, PDO::PARAM_STR);\r\n $sql->bindParam(':firstname', $firstname, PDO::PARAM_STR);\r\n $sql->bindParam(':lastname', $lastname, PDO::PARAM_STR);\r\n $sql->bindParam(':jobtitle', $jobtitle, PDO::PARAM_STR);\r\n $sql->bindParam(':chamber', $chamber, PDO::PARAM_INT);\r\n $sql->bindParam(':id', $id, PDO::PARAM_INT);\r\n $sql->bindParam(':type', $type, PDO::PARAM_INT);\r\n\r\n } catch(PDOExecption $e) {\r\n echo $e->getMessage();\r\n }\r\n\r\n try{\r\n if($sql->execute()){\r\n return (\"success\");\r\n }\r\n else{\r\n return(\"error\");\r\n }\r\n\r\n } catch(PDOExecption $e) {\r\n echo $e->getMessage();\r\n }\r\n\r\n }", "function addUser($user_name, $display_name,$fullname,$roll,$yearjoin,$yearend,$dept,$section,$alumni, $title, $password, $email, $active, $activation_token){\n try {\n global $db_table_prefix;\n\n $db = pdoConnect();\n\n $query = \"INSERT INTO \".$db_table_prefix.\"users (\n user_name,\n display_name,\n password,\n email,\n activation_token,\n last_activation_request,\n lost_password_request,\n lost_password_timestamp,\n active,\n title,\n sign_up_stamp,\n last_sign_in_stamp\n )\n VALUES (\n :user_name,\n :display_name,\n :password,\n :email,\n :activation_token,\n '\".time().\"',\n '0',\n '\".time().\"',\n :active,\n :title,\n '\".time().\"',\n '0'\n )\";\n\n $sqlVars = array(\n ':user_name' => $user_name,\n ':display_name' => $display_name,\n ':title' => $title,\n ':password' => $password,\n ':email' => $email,\n ':active' => $active,\n ':activation_token' => $activation_token\n );\n\n $stmt = $db->prepare($query);\n\n if (!$stmt->execute($sqlVars)){\n // Error: column does not exist\n return false;\n }\n\n $inserted_id = $db->lastInsertId();\n\t\t\t\t$stmt = null;\n\t\t\t\t$query2 = \"INSERT INTO \".$db_table_prefix.\"user_details\n\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t:user_id,\n\t\t\t\t\t\t:full_name,\n\t\t\t\t\t\t:rollno,\n\t\t\t\t\t\t:dept,\n\t\t\t\t\t\t:section,\n\t\t\t\t\t\t:yj,\n\t\t\t\t\t\t:ye,\n\t\t\t\t\t\t:alumni,\n\t\t\t\t\t\t'0',\n\t\t\t\t\t\t'0'\n\t\t\t\t\t\t)\";\n\n\t\t\t\t$sqlVars2 = array(\n\t\t\t\t\t\t':user_id' => $inserted_id,\n\t\t\t\t\t\t':full_name' => $fullname,\n\t\t\t\t\t\t':rollno' => $roll,\n\t\t\t\t\t\t':dept' => $dept,\n\t\t\t\t\t\t':section'=>$section,\n\t\t\t\t\t\t':yj' => $yearjoin,\n\t\t\t\t\t\t':ye' => $yearend,\n\t\t\t\t\t\t':alumni' => $alumni\n\t\t\t\t);\n\n\t\t\t\t$stmt2 = $db->prepare($query2);\n\n\t\t\t\tif (!$stmt2->execute($sqlVars2)){\n\t\t\t\t\t\t// Error: column does not exist\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\n $stmt2 = null;\n\t\t\t\tif($alumni==1){\n\t\t\t\t\tdbAddUserToGroups($inserted_id,5);\n\t\t\t\t}\n\t\t\t\tautoSubscribe($inserted_id);\n return $inserted_id;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}", "function register_user($username,$fullname,$roll,$department,$email,$alt_email,$year_of_study,$mobile,$room,$cpi,$experience)\n{\n\t$db = mysql_connect(\"10.105.177.5\", \"ugacademics\", \"ug_acads\");\n\n\tmysql_select_db(\"ugacademics\");\n\n\t$query = \"INSERT INTO surp_registered (username,roll,fullname,department,email,alt_email,year_of_study,mobile,room,cpi,first_year_exp) VALUES ('$username','$roll','$fullname','$department','$email','$alt_email','$year_of_study','$mobile','$room','$cpi','$experience')\";\n\t$result= mysql_query($query) or die ('Error Connecting to database');\n\t\n\t/*$query->bindParam(':username',$username);\n\t$query->bindParam(':fullname',$fullname);\n\t$query->bindParam(':department',$department);\n\t$query->bindParam(':email',$email);\n\t$query->bindParam(':alt_email',$alt_email);\n\t$query->bindParam(':year_of_study',$year_of_study);\n\t$query->bindParam(':mobile',$mobile);\n\t$query->bindParam(':hostel',$hostel);\n\t$query->bindParam(':room',$room);*/\n\t//$query->execute(array($username,$fullname,$department,$email,$alt_email,$year_of_study,$mobile,$hostel,$room));\n//\t$db=null;\n\t\n\t\n\t\n\t\n}", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }", "function register_user($register_data){\n\t\n\tglobal $db;\n\tglobal $table_name;\n\tglobal $session_user_id;\n\t\n\tarray_walk($register_data, 'array_sanitize');\n\t$register_data['password'] = md5($register_data['password']);\n\t\n\t$fields = '`' . implode('`, `', array_keys($register_data)) . '`';\n\t$data = '\\'' . implode('\\', \\'', $register_data) . '\\'';\n\t\n\t//Add new user to `users` table\n\t$db->query(\"INSERT INTO `users` ($fields) VALUES ($data)\");\n\t\n\t$user_id = $db->query(\"SELECT `user_id` FROM `users` WHERE `username` = '{$register_data['username']}'\")->fetch_assoc();\n\t$table_name = $register_data['username'] . $user_id['user_id'];\n\t\n\t//create new tables\n\t$db->query(\"CREATE TABLE $table_name AS (SELECT * FROM `user_template`)\");\n\t$db->query(\"UPDATE $table_name SET `user_id` = {$user_id['user_id']}\");\n\t$db->query(\"ALTER TABLE $table_name MODIFY COLUMN lastmodified TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\");\n\n\t$new_table = ($table_name . \"_callbook\");\n\t$db->query(\"CREATE TABLE $new_table AS (SELECT * FROM `callbook_template`)\");\n\t$db->query(\"UPDATE $new_table SET `user_id` = {$user_id['user_id']}\");\n}", "public function register () {\r\n if (isset($_POST['submitr'])) {\r\n\r\n $fnm = addslashes(strip_tags($_POST['fname']));\r\n $lnm = addslashes(strip_tags($_POST['lname']));\r\n $email = addslashes(strip_tags($_POST['emailr']));\r\n $pwd = addslashes(strip_tags($_POST['pwdr']));\r\n\r\n if ($fnm !==\"\" && $lnm !==\"\" && $email !==\"\" && $pwd!==\"\") {\r\n\r\n\r\n $s = \"INSERT INTO users (firstName,lastName,email, password) VALUES (?,?,?,?)\";\r\n $sql = $this->_r-> prepare($s);\r\n $sql->execute(array($fnm,$lnm,$email,$pwd));\r\n\r\n echo \"Successfully registered\";\r\n\r\n\r\n\r\n }else {\r\n echo \"Please fill all the information\";\r\n }\r\n\r\n }\r\n\r\n\r\n }", "function insert_user($db, $email, $password, $display_name)\n{\n\t/* Hash the password */\n\t$password = md5($password);\n\n\t/* Create the query */\n\t$sql = 'INSERT INTO users (email, password, display_name) VALUES (:email, :password, :display_name)';\n\n\t/* Execute the query */\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':email' =>$email, ':password'=> $password, ':display_name'=> $display_name));\n}", "function register() {\n\t$a = array(\n\t 'status' => 'system-error'\n\t);\n\n\t// raw inputs\n\t$taint_uname = isset($_POST['uname']) ? $_POST['uname'] : 0;\n\t$taint_email = isset($_POST['email']) ? $_POST['email'] : 0;\n\t$taint_pword = isset($_POST['pword']) ? $_POST['pword'] : 0;\n\n\t// validate inputs\n\t$uname = validateUname($taint_uname);\n\t$email = validateEmail($taint_email);\n\t$pword = validatePword($taint_pword);\n\n\tif (!$email || !$uname || !$pword) {\n\t\tLog::write(LOG_WARNING, \"attempt with invalid parameter set\");\n\t\treturn $a;\n\t}\n\n\t$conn = getConnection();\n\tif (!$conn) {\n\t\treturn $a;\n\t}\n\n\t// validate username is unique\n\t$name = 'test-unique-username';\n\t$sql = \"select id from accounts.user where username = $1\";\n\t$params = array($uname);\n\t$result = execSql($conn, $name, $sql, $params, false);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t$numrows = pg_num_rows($result);\n\tif ($numrows > 0) {\n\t\tLog::write(LOG_NOTICE, \"$name: username already on file\");\n\t\t$a['status'] = 'username-in-use';\n\t\treturn $a;\n\t}\n\n\t// validate email is unique\n\t$name = 'test-unique-email';\n\t$sql = \"select id from accounts.user where email = $1\";\n\t$params = array($email);\n\t$result = execSql($conn, $name, $sql, $params, false);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t$numrows = pg_num_rows($result);\n\tif ($numrows > 0) {\n\t\tLog::write(LOG_NOTICE, \"$name: email already on file\");\n\t\t$a['status'] = 'email-in-use';\n\t\treturn $a;\n\t}\n\n\t// get the next user id\n\t$name = 'get-next-user-id';\n\t$sql = \"select nextval('accounts.user_id_seq')\";\n\t$params = array();\n\t$result = execSql($conn, $name, $sql, $params, true);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t$row = pg_fetch_array($result, 0, PGSQL_ASSOC);\n\t$id = $row['nextval'];\n\n\t// hash the password\n\t$hashPassword = hashPassword($pword);\n\n\t$auth = DB::$auth_registered;\n\t$access = DB::$auth_novice;\n\n\t// get TIC\n\t$publicTic = generateTic();\n\t$hashTic = hashTic($publicTic);\n\n\t// write a session token\n\t$si = writeToken($conn, $id);\n\tif (!$si){\n\t\treturn $a;\n\t}\n\n\t// write the user record\n\t$name = 'insert-user';\n\t$sql = \"insert into accounts.user (id, username, email, hashpassword, auth, hashtic, tmhashtic) values ($1, $2, $3, $4, $5, $6, now())\";\n\t$params = array($id, $uname, $email, $hashPassword, $auth, $hashTic);\n\t$result = execSql($conn, $name, $sql, $params, true);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t// send TIC to user by email\n\t$boo = sendAuthenticationEmail($email, 'verify', $publicTic);\n\tif (!$boo) {\n\t\t$a['status'] = 'send-email-failed';\n\t\treturn $a;\n\t}\n\n\t// success\n\t$a['status'] = 'ok';\n\t$a['si'] = $si;\n\t$a['auth'] = $auth;\n\t$a['access'] = $access;\n\t$a['uname'] = $uname;\n\t//$a['email'] = obscureEmail($email);\n\treturn $a;\n}", "public function UserRegister($fname, $sname, $username,$email,$addr,$county, $dob, $password){\n try {\n \n \n // ceates a new db connection instance\n $db = new dbcon();\n $dbcon = $db->getDBCon();\n $dbcon->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $stmt = $dbcon->prepare(\"INSERT INTO user(fname, sname, username, email, addr,county, dob, password) \n VALUES(:fname,:sname,:username,:email,:address,:county,:dob,:password)\");\n $stmt->bindParam(':fname', $fname);\n $stmt->bindParam(':sname',$sname);\n $stmt->bindParam(':username',$username);\n $stmt->bindParam(':email',$email);\n $stmt->bindParam(':address',$addr);\n $stmt->bindParam(':county',$county);\n $stmt->bindParam(':dob',$dob);\n $stmt->bindParam(':password',$password);\n //$stmt = $con->prepare(\"SELECT name,sname,address,email,dob FROM users WHERE username = ? AND password = ?\");\n \n //checkes to see if data has been inserted sucessfully \n if($stmt->execute()){\n echo 'success';\n }else{\n echo 'failed';\n }\n \n } catch (Exception $e) {\n \n print(\"error\".$e);\n } \n \n \n //close connection\n $stmt = null;\n }", "public function register(){\n // 2- check post submitted\n $post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n if ($post['submit']){\n\n if ($post['name']=== \"\" || $post['email']=== \"\" ||\n $post['password']=== \"\" || $post['confirm_password']=== \"\" ){\n\n Messages::setMessage('Please Fill All Fields!', 'error');\n return;\n }\n\n // prepare query\n $this->query('INSERT INTO users (name, email, password) VALUES(:name, :email, :password)');\n\n // bind params\n $this->bind(':name',$post['name']);\n $this->bind(':email',$post['email']);\n $this->bind(':password',md5($post['password']));\n\n\n // execute\n $this->execute();\n // check if inserted\n if ($this->lastInsertId()){\n header('Location: '.'users/login');\n }\n\n }\n }", "function registerNewUser($dbh, $user, $pass)\n{\n $query = \"INSERT INTO users (user_id, username, password) \n VALUES (:user_id, :username, :password)\";\n $stmt = $dbh->prepare($query);\n $stmt->execute(array('user_id' => null, 'username' => $user, 'password' => $pass));\n}", "function insertUser($username, $hash, $fName, $mName, $lName) {\r\n global $db;\r\n\r\n $query = $db->prepare(\"INSERT INTO katie_db.system_user (`system_user_id` , \" .\r\n \"`system_user_name` , `system_user_password` , `is_administrator` , \" .\r\n \"`first_name` , `middle_name` , `last_name` , `creation_date`) VALUES \" . \r\n \"( NULL, '$username', '$hash', '0', '$fName', '$mName', '$lName', UTC_DATE());\");\r\n\r\n return $query->execute();\r\n}", "function regUser($uname, $disname, $pass, $email) {\n\tglobal $pdo;\n\t\n\t$salt = genSalt();\n\t$phash = hashPass($pass, $salt);\n\t$stmt = $pdo->prepare(\"SELECT * FROM `users` WHERE `display` = :name OR `uname` = :uname OR `email` = :email\");\n\t\n\t$civid = getCiv($disname);\n\tif(!$civid) $civid = createCiv($disname);\n\t\n\t$stmt->bindParam(\":name\", $disname);\n\t$stmt->bindParam(\":uname\", $uname);\n\t$stmt->bindParam(\":email\", $email);\n\t$stmt->execute();\n\tif($stmt->rowCount()) {\n\t\t$user = $stmt->fetch();\n\t\tif($user['uname'] == $uname) return 1;\n\t\tif($user['display'] == $disname) return 2;\n\t\tif($user['email'] == $email) return 3;\n\t}\n\t$stmt->closeCursor();\n\t$stmt = $pdo->prepare(\"INSERT INTO `users` (`citid`, `RegiDate`, `LastLogin`, `uname`, `display`, `phash`, `salt`, `ip`, `email`, `plevel`) VALUES (:civid, NOW(), NOW(), :uname, :disname, :phash, :psalt, '$_SERVER[REMOTE_ADDR]', :email, '[\\\"none\\\"]')\");\n\t$stmt->bindParam(\":civid\", $civid['id']);\n\t$stmt->bindParam(\":uname\", $uname);\n\t$stmt->bindParam(\":disname\", $disname);\n\t$stmt->bindParam(\":phash\", $phash);\n\t$stmt->bindParam(\":psalt\", $salt);\n\t$stmt->bindParam(\":email\", $email);\n\t$stmt->execute();\n\tif($stmt->rowCount()) return false;\n\treturn 4;\n}", "function sign_up($conn){\r\n\tif (isset($_POST['signupSubmit'])){\r\n\t\t$uid = $_POST['uid'];\r\n\t\t$pwd = $_POST['pwd'];\r\n\t\t$sql1 = \"SELECT * FROM users WHERE uid='$uid'\";\r\n\t\t$result1 = pg_query($conn, $sql1);\r\n\t\tif (pg_num_rows($result1)>0) {\r\n\t\t\techo \"<div class='alert alert-danger alert-dismissible' role='alert'>\r\n\t\t\t This username has been used. Please try again.\r\n\t\t\t</div>\";\r\n\t\t} else {\r\n\t\t\t$sql = \"INSERT INTO users VALUES ('$uid', '$pwd', 500)\";\r\n\t\t\t$result = pg_query($conn, $sql);\r\n\t\t\t//header(\"Location: index.php\");\r\n\t\t\techo \"<div class='alert alert-success alert-dismissible' role='alert'>\r\n\t\t\t You have signed up successfully!\r\n\t\t\t</div>\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n}", "function insertprofile($pdo) {\n $sql = \"INSERT INTO profile (user_id,first_name,last_name,email,headline,summary)\n VALUES (:user_id, :first_name, :last_name, :email, :headline, :summary)\";\n $stmt = $pdo->prepare($sql);\n $stmt->execute(array(\n ':first_name'=>$_POST['first_name'],\n ':last_name'=>$_POST['last_name'],\n ':email'=>$_POST['email'],\n ':user_id'=>$_SESSION['uid'],\n ':summary'=>$_POST['summary'],\n ':headline'=>$_POST['headline']));\n}", "public function insert() {\n\t\t$this->insert_user();\n\t}", "function randomPass($length=10, $chrs = '1234567890qwertyuiopasdfghjklzxcvbnm')\n {\n $pwd = \"\";\n for($i = 0; $i < $length; $i++) {\n $pwd .= $chrs{mt_rand(0, strlen($chrs)-1)};\n }\n return $pwd;\n }\n ////\n// Return a random value\n function random2($min = null, $max = null) {\n static $seeded;\n\n if (!isset($seeded)) {\n mt_srand((double)microtime()*1000000);\n $seeded = true;\n }\n\n if (isset($min) && isset($max)) {\n if ($min >= $max) {\n return $min;\n } else {\n return mt_rand($min, $max);\n }\n } else {\n return mt_rand();\n }\n }\n \n /**\n * Check if username exist. Return Boolean.\n **/\n function user_exist($uname)\n {\n $this->removeOldTemps();\n \n $res = $this->query(\"SELECT * FROM `{$this->userTable}` WHERE `{$this->tbFields1['email']}` = '\".$uname.\"'\");\n $res2 = $this->query(\"SELECT * FROM `{$this->userTempTable}` WHERE `{$this->tbTmpFields['email']}` = '\".$uname.\"'\"); \n \n if((!$res && !$res2) || (mysql_num_rows($res) == 0 && mysql_num_rows($res2) == 0)){ // no records \n return false;\n }\n return true; \n }\n \n function removeOldTemps()\n {\n $res = $this->query(\"DELETE FROM `{$this->userTempTable}` WHERE DATE_SUB(CURDATE(), INTERVAL 30 DAY) > `{$this->tbTmpFields['date_registered']}`\");\n \n } \n \n function getCountries()\n { \n $res = $this->query(\"SELECT `{$this->tbFields3['id']}` AS `ID`, `{$this->tbFields3[\"name\"]}` AS `NAME` FROM `{$this->countriesTable}`\");\n return $this->SqlToArray($res);\n }\n \n function getCountryName($id)\n { \n $res = $this->query(\"SELECT `{$this->tbFields3[\"name\"]}` AS `NAME` FROM `{$this->countriesTable}` WHERE `{$this->tbFields3['id']}`=\".$id.\" LIMIT 1\");\n if(!$res && mysql_num_rows($res) == 0){\n return \"\";\n }else{\n $res = mysql_fetch_array($res);\n return $res['NAME'];\n }\n }\n \n function getCountryCode($id, $code = '2')\n { \n $country_code = \"iso_code_\".$code; \n $res = $this->query(\"SELECT `{$this->tbFields3[$country_code]}` AS `CODE` FROM `{$this->countriesTable}` WHERE `{$this->tbFields3['id']}`=\".$id.\" LIMIT 1\");\n if(!$res && mysql_num_rows($res) == 0){\n return \"\";\n }else{\n $res = mysql_fetch_array($res);\n return $res['CODE'];\n }\n }\n\n function getTransactions($pending = 0)\n {\n if($this->userID != \"\"){\n if($pending != 0){\n $sql = \" AND (`{$this->tbFields5['payment_status']}` <> 1 OR `{$this->tbFields5['delivery_status']}` <> 1)\"; \n }\n $res = $this->query(\"SELECT `{$this->tbFields5['id']}`, `{$this->tbFields5['date_created']}`, `{$this->tbFields5['invoice_number']}`,`{$this->tbFields5['delivery_status']}`,`{$this->tbFields5['payment_status']}`, `{$this->tbFields5['total_price']}` FROM `{$this->orderTable}` WHERE `{$this->tbFields5['customer_id']}`=\".$this->userID.$sql);\n if($res && mysql_num_rows($res) > 0){\n return $this->SqlToArray($res);\n }else return false; \n }else{\n echo \"You are not logged in!\";\n return false;\n }\n }\n \n \n function getOrder($invoice_number = \"\", $order_id = \"\")\n {\n if($invoice_number != \"\"){\n $res = $this->query(\"SELECT * FROM `{$this->orderTable}` WHERE `{$this->tbFields5['invoice_number']}`='\".$invoice_number.\"' LIMIT 1\"); \n }else if($order_id != \"\"){\n $res = $this->query(\"SELECT * FROM `{$this->orderTable}` WHERE `{$this->tbFields5['id']}`='\".$order_id.\"' LIMIT 1\"); \n } \n if($res && mysql_num_rows($res)>0){\n $res = mysql_fetch_array($res);\n return $res; \n }else{\n return false;\n } \n }\n \n \n function getOrderProductsAttributes($order_products_id)\n {\n $res = $this->query(\"SELECT * FROM `{$this->order_products_attribTable}` WHERE `{$this->tbFields41['order_products_id']}`=\".$order_products_id);\n if($res && mysql_num_rows($res) > 0){\n return $this->SqlToArray($res);\n }else\n return false; \n }\n \n function getOrderProducts($order_id)\n {\n $res = $this->query(\"SELECT * FROM `{$this->order_productTable}` WHERE `{$this->tbFields4['order_id']}`=\".$order_id);\n if($res && mysql_num_rows($res) > 0){\n return $this->SqlToArray($res);\n }else\n return false; \n }\n \n function sendActivation($name, $activation_link, $email)\n {\n $our_email = WELCOME_EMAIL;\n \n //define the subject of the email\n $subject = \"Welcome to ---!\";\n //create a boundary string, unique \n $random_hash = md5(date('r', time()));\n //define the headers we want passed. Note that they are separated with \\r\\n\n $headers = \"From: \".$our_email.\"\\nReply-To: \".$our_email.\"\\n\";\n \n //add boundary string and mime type specification\n $headers .= \"MIME-Version:1.0\\n\";\n $headers .= \"Content-Type: multipart/alternative; boundary=\\\"PHP-alt-\".$random_hash.\"\\\"\\n\";\n //define the body of the message.\n ob_start(); //Turn on output buffering\n \n echo \"\\nThis is a multi-part message in MIME format.\\n\"; \n echo \"\\n--PHP-alt-\".$random_hash.\"\\n\"; \n echo \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\";\n echo \"Content-Transfer-Encoding: 7bit\\n\";\n \n echo \"\\n\";\n //PLAIN \n echo \"Dear \".$name.\",\\n\\nThank you for registering at ---! \\n\\n\";\n \n echo \"Please activate your account within 30 days by clicking on the link or by copying and pasting the url below:\\n\";\n echo $activation_link.\"\\n\";\n \n echo \"You can now take part in the various services we have to offer you. Some of these services include:\\n\\n\";\n echo \"Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.\\n\";\n echo \"Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.\\n\";\n echo \"Order History - View your history of purchases that you have made with us.\\n\\n\";\n \n echo \"For help with any of our online services, please email the store-owner: ----.\\n\\n\";\n\n echo \"Note: If you did not signup to be a member, please ignore this email or notify us at ----.\"; \n echo \"\\n\";\n \n echo \"\\n--PHP-alt-\".$random_hash.\"\\n\"; \n echo \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\\nContent-Transfer-Encoding: 7bit\\n\";\n //HTML\n echo \"\\n<html><body>\";\n echo \"Dear \".$name.\",<p>Thank you for registering at <a href='---' target='_blank'><b>---</b>!</a><p>\";\n \n echo \"Please activate your account <b>within 30 days</b> by clicking on the link or by copying and pasting the url below:<br>\";\n echo \"<a href='\".$activation_link.\"' target='_blank'>\".$activation_link.\"</a><p>\";\n \n echo \"You can now take part in the various services we have to offer you. Some of these services include:<p>\";\n echo \"<b>Permanent Cart</b> - Any products added to your online cart remain there until you remove them, or check them out.<br>\";\n echo \"<b>Address Book</b> - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.<br>\";\n echo \"<b>Order History</b> - View your history of purchases that you have made with us.<p>\";\n \n echo \"For help with any of our online services, please email the store-owner: ---.<p>\";\n\n echo \"Note: If you did not signup to be a member, please ignore this email or notify us at ---.<p>\"; \n echo \"</body></html>\\n\";\n echo \"\\n--PHP-alt-\".$random_hash.\"--\\n\";\n\n //copy current buffer contents into $message variable and delete current output buffer\n $message = ob_get_clean(); \n //send the email\n $mail_sent = @mail( $email, $subject, $message, $headers );\n //if the message is sent successfully print \"Mail sent\". Otherwise print \"Mail failed\" \n \n return $mail_sent; \n \n }\n \n function mailOrder($invoice_number)\n {\n $our_email = INVOICE_EMAIL_ONE;\n $our_email2 = INVOICE_EMAIL_TWO;\n if($this->is_logged_in()){ \n $this->checkMemberships(); \n \n $email = $this->userData[$this->tbFields1[\"email\"]];\n \n //define the subject of the email\n $subject = \"Purchase from --- [Invoice:\".$invoice_number.\"]\";\n //create a boundary string, unique \n $random_hash = md5(date('r', time()));\n //define the headers we want passed. Note that they are separated with \\r\\n\n $headers = \"From: \".$our_email.\"\\nReply-To: \".$our_email.\"\\n\";\n //$headers .= \"cc: \".$our_email2.\",\".$our_email.\"\\n\";\n $headers .= \"cc: \".$our_email.\"\\n\";\n //add boundary string and mime type specification\n $headers .= \"MIME-Version:1.0\\n\";\n $headers .= \"Content-Type: multipart/alternative; boundary=\\\"PHP-alt-\".$random_hash.\"\\\"\\n\";\n //define the body of the message.\n ob_start(); //Turn on output buffering\n \n echo \"\\nThis is a multi-part message in MIME format.\\n\";\n \n echo \"\\n--PHP-alt-\".$random_hash.\"\\n\"; \n echo \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\";\n echo \"Content-Transfer-Encoding: 7bit\\n\";\n\n echo \"\\n\";\n echo \"You have placed the following order(s). We will get back to you within 24-48 hours.\\n\";\n echo \"Thank you.\\n\";\n $this->printPlainOrder($invoice_number);\n echo \"\\n\";\n\n echo \"\\n--PHP-alt-\".$random_hash.\"\\n\"; \n echo \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\\nContent-Transfer-Encoding: 7bit\\n\";\n \n echo \"\\n<html><body>\";\n echo \"You have placed the following order(s). We will get back to you within 24-48 hours.<br>Thank you.<p>\";\n\n $this->printOrder($invoice_number);\n \n echo \"</body></html>\\n\";\n echo \"\\n--PHP-alt-\".$random_hash.\"--\\n\";\n\n //copy current buffer contents into $message variable and delete current output buffer\n $message = ob_get_clean(); \n //send the email\n $mail_sent = @mail( $email, $subject, $message, $headers );\n //if the message is sent successfully print \"Mail sent\". Otherwise print \"Mail failed\" \n \n return $mail_sent; \n \n }else{\n echo \"Illegal Access. Please contact administrator.\";\n exit;\n }\n }\n \n function mailRental($invoice_number)\n {\n $our_email = INVOICE_EMAIL_ONE;\n $our_email2 = INVOICE_EMAIL_TWO;\n if($this->is_logged_in()){ \n $email = $this->userData[$this->tbFields1[\"email\"]];\n \n //define the subject of the email\n $subject = \"Rental from --- [Rental ID(s):\".$invoice_number.\"...]\";\n //create a boundary string, unique \n $random_hash = md5(date('r', time()));\n //define the headers we want passed. Note that they are separated with \\r\\n\n $headers = \"From: \".$our_email.\"\\nReply-To: \".$our_email.\"\\n\";\n $headers .= \"cc: \".$our_email2.\",\".$our_email.\"\\n\";\n //add boundary string and mime type specification\n $headers .= \"MIME-Version:1.0\\n\";\n $headers .= \"Content-Type: multipart/alternative; boundary=\\\"PHP-alt-\".$random_hash.\"\\\"\\n\";\n //define the body of the message.\n ob_start(); //Turn on output buffering\n \n echo \"\\nThis is a multi-part message in MIME format.\\n\";\n \n echo \"\\n--PHP-alt-\".$random_hash.\"\\n\"; \n echo \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\";\n echo \"Content-Transfer-Encoding: 7bit\\n\";\n\n echo \"\\n\";\n echo \"You have placed the following rental order(s). We will get back to you within 24-48 hours.\\n\";\n echo \"Thank you.\\n\";\n $this->printPlainRental($invoice_number);\n echo \"\\n\";\n\n echo \"\\n--PHP-alt-\".$random_hash.\"\\n\"; \n echo \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\\nContent-Transfer-Encoding: 7bit\\n\";\n \n echo \"\\n<html><body>\";\n echo \"You have placed the following rental order(s). We will get back to you within 24-48 hours.<br>Thank you.<p>\";\n\n $this->printRental($invoice_number);\n \n echo \"</body></html>\\n\";\n echo \"\\n--PHP-alt-\".$random_hash.\"--\\n\";\n\n //copy current buffer contents into $message variable and delete current output buffer\n $message = ob_get_clean(); \n //send the email\n $mail_sent = @mail( $email, $subject, $message, $headers );\n //if the message is sent successfully print \"Mail sent\". Otherwise print \"Mail failed\" \n \n return $mail_sent; \n \n }else{\n echo \"Illegal Access. Please contact administrator.\";\n exit;\n }\n }\n \n function printPlainOrder($invoice_number = \"\", $order_id =\"\")\n {\n $data = $this->getOrder($invoice_number, $order_id);\n echo \"=============================================================\\n\";\n echo \"Invoice Number: \".$data[$this->tbFields5['invoice_number']].\"\\nDate: \".$data[$this->tbFields5['date_created']].\"\\n\\n\";\n echo \"Customer's Name: \".$this->getName($data[$this->tbFields5['customer_id']]).\" \".$this->getLastName($data[$this->tbFields5['customer_id']]).\" (\".$data[$this->tbFields5['telephone']].\")\".\"\\nDelivery Details:\\n \".$data[$this->tbFields5['first_name']].\" \".$data[$this->tbFields5['last_name']].\"\\n\";\n \n if($data[$this->tbFields5['company']] != \"\"){\n echo \" \".$data[$this->tbFields5['company']].\"\\n\";\n }\n \n echo \" \".$data[$this->tbFields5['address']].\"\\n\";\n \n if($data[$this->tbFields5['city']] != \"\"){\n echo \" \".$data[$this->tbFields5['city']];\n }else{\n echo \" \".$this->getCountryName($data[$this->tbFields5['country']]); /// get country name\n }\n \n echo \" \".$data[$this->tbFields5['postal']].\"\\n \".$this->getCountryName($data[$this->tbFields5['country']]).\"\\n\\n\";\n echo \"=============================================================\\n\";\n echo \"Items Bought:\\n\";\n echo \"-------------\\n\\n\";\n \n $subtotal = 0;\n if($products_data = $this->getOrderProducts($data[$this->tbFields5['id']])){ \n $i=0;\n foreach($products_data AS $product_data){ \n $i++;\n echo $i.\". \".$product_data[$this->tbFields4['product_model']].\", \".$product_data[$this->tbFields4['product_title']];\n \n if($product_attributes_datas = $this->getOrderProductsAttributes($product_data[$this->tbFields4['id']])){\n echo \" (\";\n $size_tmp = sizeof($product_attributes_datas);\n $j = 0;\n foreach($product_attributes_datas AS $product_attributes_data){\n $j++;\n echo $product_attributes_data[$this->tbFields41['options_name']];\n if($product_attributes_data[$this->tbFields41['options_values_name']] != \"\"){\n echo \"-\".$product_attributes_data[$this->tbFields41['options_values_name']];\n }\n if($j < $size_tmp) echo \", \";\n }\n echo \")\"; \n } \n \n echo \", Qty: \".$product_data[$this->tbFields4['quantity']].\", at $\".$product_data[$this->tbFields4['price_per_unit']];\n \n if($product_attributes_datas = $this->getOrderProductsAttributes($product_data[$this->tbFields4['id']])){\n echo \" (\"; \n $j = 0;\n $attrib_price = 0;\n foreach($product_attributes_datas AS $product_attributes_data){\n $j++;\n if($product_attributes_data[$this->tbFields41['price']] >= 0) echo \"+\";\n echo \"$\".$product_attributes_data[$this->tbFields41['price']];\n if($j < $size_tmp) echo \", \";\n $attrib_price += $product_attributes_data[$this->tbFields41['price']];\n }\n echo \")\"; \n } \n \n echo \" each.\\n\"; \n \n $subtotal += $product_data[$this->tbFields4['sub_total_price']] + ($attrib_price * $product_data[$this->tbFields4['quantity']]);\n } \n \n } \n echo \"=============================================================\\n\"; \n echo \"Subtotal: $\".number_format($subtotal,2).\"\\n\";\n echo \"Delivery by \".$data[$this->tbFields5['shipping_method']].\": $\".number_format($data[$this->tbFields5['shipping_cost']],2).\"\\n\";\n //discount\n if($data[$this->tbFields5['member_discounts']] != 0){\n echo \"Member Discount: \".$data[$this->tbFields5['member_discounts']].\"%\\n\";\n }\n \n echo \"Grand Total: $\".number_format($data[$this->tbFields5['total_price']],2).\"\\n\\n\";\n \n \n echo \"Payment Method: \".$data[$this->tbFields5['payment_type']].\"\\nPayment Status: \".$this->getStatusString($data[$this->tbFields5['payment_status']],\"payment\").\"\\n\"; \n echo \"Delivery Method: \".$data[$this->tbFields5['shipping_method']].\"\\nDelivery Status: \".$this->getStatusString($data[$this->tbFields5['delivery_status']],\"delivery\").\"\\n\";\n echo \"Comments: \".$data[$this->tbFields5['comments']].\"\\n\";\n echo \"=============================================================\\n\"; \n \n }\n \n \n function getRental($invoice_number = \"\")\n {\n if($invoice_number == \"\" && $this->is_logged_in()){\n $res = $this->query(\"SELECT * FROM `{$this->rentTable}` WHERE `{$this->tbFields6['customer_id']}`=\".$this->userID.\" AND `{$this->tbFields6['delivery_status']}` <> 1 AND `{$this->tbFields6['delivery_status']}` <> -1 ORDER BY `{$this->tbFields6['invoice_number']}` DESC\");\n if($res && mysql_num_rows($res) > 0){\n return $this->SqlToArray($res);\n } \n }else{ \n $res = $this->query(\"SELECT * FROM `{$this->rentTable}` WHERE `{$this->tbFields6['invoice_number']}` LIKE '\".$invoice_number.\"%' ORDER BY `{$this->tbFields6['invoice_number']}` ASC\");\n if($res && mysql_num_rows($res) > 0){\n return $this->SqlToArray($res);\n }\n }\n return false;\n }\n \n function printPlainRental($invoice_number = \"\")\n {\n $data_full = $this->getRental($invoice_number);\n \n $data = $data_full[0];\n \n echo \"=============================================================\\n\";\n echo \"Date: \".$data[$this->tbFields6['date_created']].\"\\n\\n\";\n echo \"Customer's Name: \".$this->getName($data[$this->tbFields6['customer_id']]).\" \".$this->getLastName($data[$this->tbFields6['customer_id']]).\" (\".$data[$this->tbFields6['telephone']].\")\".\"\\nDelivery Details:\\n \".$data[$this->tbFields6['first_name']].\" \".$data[$this->tbFields6['last_name']].\"\\n\";\n \n if($data[$this->tbFields6['company']] != \"\"){\n echo \" \".$data[$this->tbFields6['company']].\"\\n\";\n }\n \n echo \" \".$data[$this->tbFields6['address']].\"\\n\";\n \n if($data[$this->tbFields6['city']] != \"\"){\n echo \" \".$data[$this->tbFields6['city']];\n }else{\n echo \" \".$this->getCountryName($data[$this->tbFields6['country']]); /// get country name\n }\n \n echo \" \".$data[$this->tbFields6['postal']].\"\\n \".$this->getCountryName($data[$this->tbFields6['country']]).\"\\n\\n\";\n echo \"=============================================================\\n\";\n echo \"Items Rented:\\n\";\n echo \"-------------\\n\\n\";\n\n for($i=0; $i< sizeof($data_full);$i++){\n $product_data = $data_full[$i];\n echo $i.\". \".$product_data[$this->tbFields6['invoice_number']].\" -- \".$product_data[$this->tbFields6['product_model']].\", \".$product_data[$this->tbFields6['product_title']].\" at \".$product_data[$this->tbFields6['rental_points']].\" RP\\n\";\n } \n echo \"=============================================================\\n\"; \n echo \"Delivery Method: \".$data[$this->tbFields6['shipping_method']].\"\\nDelivery Status: \".$this->getStatusString($data[$this->tbFields6['delivery_status']],\"rental\").\"\\n\";\n echo \"Comments: \".$data[$this->tbFields6['comments']].\"\\n\";\n echo \"=============================================================\\n\"; \n \n }\n \n \n \n function printRental($invoice_number = \"\")\n {\n $data_full = $this->getRental($invoice_number);\n \n $data = $data_full[0];\n \n echo \"<table style='background-color:#222222;border:2px solid #000000;width:580px;font-family:Arial,Verdana,Times New Roman;font-size:14px;line-height:25px;color:#000000;padding:0px;border-spacing:2px;width:580px;'>\n<tr><td colspan=4 style='background-color:#AAAAFF;text-align:center;font-size:16px;'><b>Rental from ---</b></td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;width:120px;text-align:left;'>Date</td>\n<td style='background-color:#FFFFFF;width:170px;text-align:left;' colspan=3>\".$data[$this->tbFields6['date_created']].\"</td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;text-align:left;'>Customer's Name</td><td style='background-color:#FFFFFF;width:170px;text-align:left;'>\".$this->getName($data[$this->tbFields6['customer_id']]).\" \".$this->getLastName($data[$this->tbFields6['customer_id']]).\"<br>(\".$data[$this->tbFields6['telephone']].\")</td><td style='background-color:#DDDDDD;width:80px;text-align:left;'>Delivery Details</td><td style='background-color:#FFFFFF;width:140px;text-align:left;'>\".$data[$this->tbFields6['first_name']].\" \".$data[$this->tbFields6['last_name']].\"<br>\";\n \n if($data[$this->tbFields6['company']] != \"\"){\n echo $data[$this->tbFields6['company']].\"<br>\";\n }\n \n echo $data[$this->tbFields6['address']].\"<br>\";\n \n if($data[$this->tbFields6['city']] != \"\"){\n echo $data[$this->tbFields6['city']];\n }else{\n echo $this->getCountryName($data[$this->tbFields6['country']]); /// get country name\n }\n \n echo \" \".$data[$this->tbFields6['postal']].\"<br>\".$this->getCountryName($data[$this->tbFields6['country']]).\"</td></tr>\";\n echo \"<tr><td colspan=4 style='background-color:#AAAAAA;height:15px;font-size:1px;line-height:5px;'>&nbsp;</td></tr><tr><td colspan=4 style='background-color:#FFFFFF;'><table style='background-color:#111177;font-family:Arial,Verdana,Times New Roman;font-size:14px;line-height:25px;color:#000000;padding:0px;border-spacing:2px;'><tr><td style='background-color:#DDDDDD;width:20px;'>&nbsp;</td><td style='background-color:#DDDDDD;width:120px;'><b>RENTAL ID</b></td><td style='background-color:#DDDDDD;width:100px;'><b>MODEL</b></td><td style='background-color:#DDDDDD;width:280px;'><b>ITEM DESCRIPTION</b></td><td style='background-color:#DDDDDD;width:40px;'><b>RP</b></td></tr>\";\n \n for($i=0; $i< sizeof($data_full);$i++){\n $product_data = $data_full[$i];\n echo \"<tr style='background-color:#FFFFFF;'><td>\".($i+1).\"</td><td>\".$product_data[$this->tbFields6['invoice_number']].\"</td><td>\".$product_data[$this->tbFields6['product_model']].\"</td><td style='text-align:left;'>\".$product_data[$this->tbFields6['product_title']].\"</td><td>\".$product_data[$this->tbFields6['rental_points']].\"</td></tr>\"; \n }\n \n echo \"</table></td></tr><tr><td colspan=4 style='background-color:#AAAAAA;height:15px;font-size:1px;line-height:5px;'>&nbsp;</td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;text-align:left;'>Delivery Method</td><td style='background-color:#FFFFFF;text-align:left;'>\".$data[$this->tbFields6['shipping_method']].\"</td><td style='background-color:#DDDDDD;text-align:left;'>Delivery Status</td><td style='background-color:#FFFFFF;text-align:left;'>\".$this->getStatusString($data[$this->tbFields6['delivery_status']],\"rental\").\"</td></tr>\";\n echo \"<tr><td colspan=4 style='background-color:#AAAAAA;height:15px;font-size:1px;line-height:5px;'>&nbsp;</td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;text-align:left;'>Comments</td><td colspan=3 style='background-color:#FFFFFF;text-align:left;'>\".$data[$this->tbFields6['comments']].\"</td>\";\n echo \"</table>\";\n \n }\n \n function printOrder($invoice_number = \"\", $order_id = \"\")\n {\n $data = $this->getOrder($invoice_number, $order_id);\n \n echo \"<table style='background-color:#222222;border:2px solid #000000;width:580px;font-family:Arial,Verdana,Times New Roman;font-size:14px;line-height:25px;color:#000000;padding:0px;border-spacing:2px;width:580px;'>\n<tr><td colspan=4 style='background-color:#CCCCFF;text-align:center;font-size:16px;'><b>Purchase from ---</b></td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;width:120px;text-align:left;'>Invoice Number</td>\n<td style='background-color:#FFFFFF;width:170px;text-align:left;'>\".$data[$this->tbFields5['invoice_number']].\"</td>\n<td style='background-color:#DDDDDD;width:80px;text-align:left;'>Date</td><td style='background-color:#FFFFFF;text-align:left;width:140px'>\".$data[$this->tbFields5['date_created']].\"</td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;text-align:left;'>Customer's Name</td><td style='background-color:#FFFFFF;text-align:left;'>\".$this->getName($data[$this->tbFields5['customer_id']]).\" \".$this->getLastName($data[$this->tbFields5['customer_id']]).\"<br>(\".$data[$this->tbFields5['telephone']].\")</td><td style='background-color:#DDDDDD;text-align:left;'>Delivery Details</td><td style='background-color:#FFFFFF;text-align:left;'>\".$data[$this->tbFields5['first_name']].\" \".$data[$this->tbFields5['last_name']].\"<br>\";\n \n if($data[$this->tbFields5['company']] != \"\"){\n echo $data[$this->tbFields5['company']].\"<br>\";\n }\n \n echo $data[$this->tbFields5['address']].\"<br>\";\n \n if($data[$this->tbFields5['city']] != \"\"){\n echo $data[$this->tbFields5['city']];\n }else{\n echo $this->getCountryName($data[$this->tbFields5['country']]); /// get country name\n }\n \n echo \" \".$data[$this->tbFields5['postal']].\"<br>\".$this->getCountryName($data[$this->tbFields5['country']]).\"</td></tr>\";\n \n echo \"<tr><td colspan=4 style='background-color:#AAAAAA;height:15px;font-size:1px;line-height:5px;'>&nbsp;</td></tr><tr><td colspan=4 style='background-color:#FFFFFF;'><table style='background-color:#111177;font-family:Arial,Verdana,Times New Roman;font-size:14px;line-height:25px;color:#000000;padding:0px;border-spacing:2px;'><tr><td style='background-color:#DDDDDD;width:20px;'>&nbsp;</td><td style='background-color:#DDDDDD;width:100px;'><b>MODEL</b></td><td style='background-color:#DDDDDD;width:280px;'><b>ITEM DESCRIPTION</b></td><td style='background-color:#DDDDDD;width:40px;'><b>QTY</b></td><td style='background-color:#DDDDDD;width:120px;'><b>PRICE PER UNIT</b></td></tr>\";\n $subtotal = 0;\n if($products_data = $this->getOrderProducts($data[$this->tbFields5['id']])){ \n $i=0;\n foreach($products_data AS $product_data){ \n $i++;\n echo \"<tr style='background-color:#FFFFFF;'><td>\".$i.\"</td><td>\".$product_data[$this->tbFields4['product_model']].\"</td><td style='text-align:left;'>\".$product_data[$this->tbFields4['product_title']];\n \n if($product_attributes_datas = $this->getOrderProductsAttributes($product_data[$this->tbFields4['id']])){\n echo \" (\";\n $size_tmp = sizeof($product_attributes_datas);\n $j = 0;\n foreach($product_attributes_datas AS $product_attributes_data){\n $j++;\n echo $product_attributes_data[$this->tbFields41['options_name']];\n if($product_attributes_data[$this->tbFields41['options_values_name']] != \"\"){\n echo \"-\".$product_attributes_data[$this->tbFields41['options_values_name']];\n }\n if($j < $size_tmp) echo \", \";\n }\n echo \")\"; \n } \n \n echo \"</td><td>\".$product_data[$this->tbFields4['quantity']].\"</td><td>$\".$product_data[$this->tbFields4['price_per_unit']];\n $attrib_price = 0;\n if($product_attributes_datas = $this->getOrderProductsAttributes($product_data[$this->tbFields4['id']])){\n echo \" (\"; \n $j = 0;\n //$attrib_price = 0;\n foreach($product_attributes_datas AS $product_attributes_data){\n $j++;\n if($product_attributes_data[$this->tbFields41['price']] >= 0) echo \"+\";\n echo \"$\".$product_attributes_data[$this->tbFields41['price']];\n if($j < $size_tmp) echo \", \";\n $attrib_price += $product_attributes_data[$this->tbFields41['price']];\n }\n echo \")\"; \n } \n \n echo \"</td></tr>\"; \n \n $subtotal += $product_data[$this->tbFields4['sub_total_price']] + ($attrib_price * $product_data[$this->tbFields4['quantity']]);\n } \n \n } \n \n echo \"<tr><td colspan=5 style='background-color:#aaaaaa;height:7px;font-size:1px;line-height:5px;'>&nbsp;</td></tr>\";\n echo \"<tr style='background-color:#FFFFFF;'><td></td><td colspan=3 style='text-align:right;padding:0px 15px 0px 0px'>Subtotal</td><td>$\".number_format($subtotal,2).\"</td></tr>\";\n echo \"<tr style='background-color:#FFFFFF;'><td></td><td colspan=3 style='text-align:right;padding:0px 15px 0px 0px'>Delivery by \".$data[$this->tbFields5['shipping_method']].\"</td><td>$\".number_format($data[$this->tbFields5['shipping_cost']],2).\"</td></tr>\";\n //discount\n if($data[$this->tbFields5['member_discounts']] != 0){\n echo \"<tr style='background-color:#FFFFFF;'><td></td><td colspan=3 style='text-align:right;padding:0px 15px 0px 0px'>Member Discount</td><td>\".$data[$this->tbFields5['member_discounts']].\"%</td></tr>\";\n }\n \n echo \"<tr style='background-color:#FFFFFF;'><td></td><td colspan=3 style='text-align:right;padding:0px 15px 0px 0px'><b>Grand Total</b></td><td>$\".number_format($data[$this->tbFields5['total_price']],2).\"</td></tr>\";\n echo \"</table></td></tr><tr><td colspan=4 style='background-color:#AAAAAA;height:15px;font-size:1px;line-height:5px;'>&nbsp;</td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;text-align:left;'>Payment Method</td><td style='background-color:#FFFFFF;text-align:left;'>\".$data[$this->tbFields5['payment_type']].\"</td><td style='background-color:#DDDDDD;text-align:left;'>Payment Status</td><td style='background-color:#FFFFFF;text-align:left;'>\".$this->getStatusString($data[$this->tbFields5['payment_status']],\"payment\").\"</td></tr>\";\n echo \"<tr><td colspan=4 style='background-color:#AAAAAA;height:15px;font-size:1px;line-height:5px;'>&nbsp;</td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;text-align:left;'>Delivery Method</td><td style='background-color:#FFFFFF;text-align:left;'>\".$data[$this->tbFields5['shipping_method']].\"</td><td style='background-color:#DDDDDD;text-align:left;'>Delivery Status</td><td style='background-color:#FFFFFF;text-align:left;'>\".$this->getStatusString($data[$this->tbFields5['delivery_status']],\"delivery\").\"</td></tr>\";\n echo \"<tr><td colspan=4 style='background-color:#AAAAAA;height:15px;font-size:1px;line-height:5px;'>&nbsp;</td></tr>\";\n echo \"<tr><td style='background-color:#DDDDDD;text-align:left;'>Comments</td><td colspan=3 style='background-color:#FFFFFF;text-align:left;'>\".$data[$this->tbFields5['comments']].\"</td>\";\n echo \"</table>\";\n \n }\n \n function getStatusString($status, $type = \"payment\")\n {\n if($type == \"payment\"){\n switch($status){\n case -1:\n return \"Not Paid (Reason Unknown)\";\n break;\n case 0:\n return \"Not Paid\";\n break;\n case 1:\n return \"Paid\";\n break;\n case 2:\n return \"Pending\";\n break;\n default;\n return false;\n break;\n }\n \n }else if($type == \"delivery\"){\n switch($status){\n case 1:\n return \"Delivered\";\n break;\n case 2:\n return \"In Process\";\n break;\n case -1:\n return \"Not Delivered (Reason Unknown)\";\n break;\n case 0:\n return \"Not Delivered\";\n break;\n default;\n return false;\n break; \n }\n \n }else if($type == \"rental\"){\n switch($status){\n case 1:\n return \"Returned\";\n break;\n case 2:\n return \"Request Return\";\n break;\n case 3:\n return \"Rented\";\n break;\n case -1:\n return \"Cancelled\";\n break;\n case 0:\n default;\n return \"Rented (Delivering)\";\n break;\n \n } \n }\n }\n \n //member functions\n \n function getMember($cid){\n if($cid != \"\"){\n $res = $this->query(\"SELECT `{$this->tbFields1[\"discount_type\"]}` AS `DT` FROM `{$this->userTable}` WHERE `{$this->tbFields1[\"id\"]}`=\".$cid.\" LIMIT 1\");\n if($res && mysql_num_rows($res) > 0){\n $res = mysql_fetch_array($res);\n return $res['DT'];\n }\n }\n return false;\n }\n \n function findCMember($discount=0,$exclu_discount=0,$type=\"\"){\n if(!$id = $this->findMember($discount,$exclu_discount)){\n while($this->findMember(0,0,$type)){\n $type = $type.\"v\";\n }\n $id = $this->createMemberType($type, $discount, $exclu_discount); \n }\n return $id;\n }\n \n \n function findMember($discount=0, $exclu_discount=0, $type=\"\"){\n if($type != \"\"){\n $res = $this->query(\"SELECT `{$this->tbFields11[\"id\"]}` AS `ID` FROM `{$this->memberTable}` WHERE `{$this->tbFields11[\"type\"]}`='\".$type.\"' LIMIT 1\");\n }else{\n $res = $this->query(\"SELECT `{$this->tbFields11[\"id\"]}` AS `ID` FROM `{$this->memberTable}` WHERE `{$this->tbFields11[\"discount\"]}`=\".$discount.\" AND `{$this->tbFields11[\"exclusive_discount\"]}`=\".$exclu_discount.\" LIMIT 1\");\n }\n if($res && mysql_num_rows($res)>0){\n $res = mysql_fetch_array($res);\n return $res['ID'];\n }\n \n return false;\n \n }\n \n function createMemberType($type, $discount, $exclusive_d)\n {\n if($type != \"\" && is_numeric($discount) && $discount < 100 && is_numeric($exclusive_d) && $exclusive_d < 100)\n $res = $this->query(\"INSERT INTO `{$this->memberTable}` (`{$this->tbFields11['type']}`, `{$this->tbFields11['discount']}`,`{$this->tbFields11['exclusive_discount']}`) VALUES('\".$type.\"',\".$discount.\",\".$exclusive_d.\")\");\n else{\n return false;\n }\n return mysql_insert_id($this->dbConn);\n }\n \n function setCustomerMember($customer_id, $member_id)\n {\n if($customer_id != \"\" && $member_id != \"\")\n $res = $this->query(\"UPDATE `{$this->userTable}` SET `{$this->tbFields1['discount_type']}`='\".$member_id.\"' WHERE `{$this->tbFields1['id']}`='\".$customer_id.\"' LIMIT 1\"); \n }\n \n function unsetCustomerMember($customer_id)\n {\n if($customer_id != \"\")\n $res = $this->query(\"UPDATE `{$this->userTable}` SET `{$this->tbFields1['discount_type']}`=0 WHERE `{$this->tbFields1['id']}`='\".$customer_id.\"' LIMIT 1\"); \n }\n\n function getMemberTypeInfo($id, $arr=\"\")\n {\n if($id == 0){\n return \"\";\n }\n if($arr == \"\"){\n $arr = $this->getMemberTypes(); \n }\n foreach($arr AS $arr_ele){\n if($arr_ele[$this->tbFields11['id']] == $id){\n return $arr_ele;\n } \n }\n return \"\"; \n }\n\n function getMemberTypes()\n {\n $res = $this->query(\"SELECT * FROM `{$this->memberTable}`\");\n \n if($res && mysql_num_rows($res) > 0){\n return $this->SqlToArray($res);\n }else{\n return false;\n }\n \n }\n \n function storeOldDiscountType($cid,$discount_type,$discount_name,$discount,$exclu_discount){\n $res = $this->query(\"INSERT INTO `{$this->olddiscountTable}` (`{$this->olddiscountFields[\"customer_id\"]}`,`{$this->olddiscountFields[\"discount_type\"]}`,`{$this->olddiscountFields[\"discount_name\"]}`,`{$this->olddiscountFields[\"discount\"]}`,`{$this->olddiscountFields[\"exclusive_discount\"]}`) VALUES(\".$cid.\",\".$discount_type.\",'\".$discount_name.\"',\".$discount.\",\".$exclu_discount.\")\");\n }\n \n function deleteOldDiscountType($id){\n $res = $this->query(\"DELETE FROM `{$this->olddiscountTable}` WHERE `{$this->olddiscountFields[\"id\"]}`=\".$id.\" LIMIT 1\");\n return true;\n }\n \n function restoreOldDiscountType($cid){\n $res = $this->query(\"SELECT * FROM `{$this->olddiscountTable}` WHERE `{$this->olddiscountFields[\"customer_id\"]}`=\".$cid.\" LIMIT 1\");\n if($res && mysql_num_rows($res) > 0){\n $res = mysql_fetch_array($res);\n $data = $this->getMemberTypeInfo($res[$this->olddiscountFields[\"discount_type\"]]);\n if($data != \"\"){\n if($res[$this->olddiscountFields[\"discount\"]] == $data[$this->tbFields11[\"discount\"]] && $res[$this->olddiscountFields[\"exclusive_discount\"]] == $data[$this->tbFields11[\"exclusive_discount\"]]){\n $this->setCustomerMember($cid,$res[$this->olddiscountFields[\"discount_type\"]]);\n return $this->deleteOldDiscountType($res[$this->olddiscountFields[\"id\"]]); \n }\n }\n \n $this->setCustomerMember($cid, $this->findCMember($res[$this->olddiscountFields[\"discount\"]],$res[$this->olddiscountFields[\"exclusive_discount\"]],$res[$this->olddiscountFields[\"discount_name\"]]));\n return $this->deleteOldDiscountType($res[$this->olddiscountFields[\"id\"]]); \n }\n return false;\n }\n \n \n function SqlToArray($res)\n {\n $result = array();\n if(!$res && mysql_num_rows($res) == 0){\n $result = \"\";\n }else{\n while($row = mysql_fetch_assoc($res)){\n $result[] = $row;\n }\n } \n return $result;\n }\n \n}", "public function p_signup() {\n\t#print_r($_POST);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t#encrypt\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t#can override password salt in application version in core config\n\n\t$_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\t#token salt, users email, random string then hashed\n\n\t$_POST['created'] = Time::now(); #could mimic different time\n\t$_POST['modified'] = Time::now(); #time stamp\n\n\t#check if the address is not in use in the system\n\t$q = \"SELECT email\n\tFROM users WHERE email = '\".$_POST['email'].\"'\";\n\n\t$email = DB::instance(DB_NAME)->select_field($q);\n\n\tif($email == $_POST['email'] && $_POST['email' != \"\"]){\t\n\n\t\t$address_in_use = \"The email address you have entered is already in use. Please pick another.\";\n\t\tRouter::redirect(\"/users/signup/error=$address_in_use\");\n\t}\n\n\tif($_POST['email'] == \"\" || $_POST['first_name'] == \"\" || $_POST['last_name'] == \"\" || $_POST['password'] == \"\" ){\n\n\t\t$required = \"All fields on this form are required.\";\n\t\tRouter::redirect(\"/users/signup/error: $required\");\n\t}\n\telse{\n\n\t\t$user_id = DB::instance(DB_NAME)->insert(\"users\", $_POST);\n\n\n\t\t# For now, just confirm they've signed up - we can make this fancier later\n\t\techo \"You're registered! Now go <a href='/users/login'>add issue</a>\";\n\t\tRouter::redirect(\"/users/login\");\n\t}\t\n}", "function handle_memberlist_insert() {\r\n\tglobal $wpdb;\r\n\t\r\n\t$table = $wpdb->prefix . 'memberlist';\r\n\t\r\n\r\n\tif (isset($_POST['name'])) {\r\n\t\t$name = $_POST['name'];\r\n\t}\r\n\tif (isset($_POST['phone'])) {\r\n\t\t$phone = $_POST['phone'];\r\n\t}\r\n\tif (isset($_POST['email'])) {\r\n\t\t$email = $_POST['email'];\r\n\t}\r\n\tif (isset($_POST['extra'])) {\r\n\t\t$extra = $_POST['extra'];\r\n\t}\r\n\t\r\n\t$wpdb->insert(\r\n\t\t$table, //table\r\n\t\tarray('name' => $name, 'phone' => $phone, 'email' => $email, 'extra' => $extra ), //variables\r\n\t\tarray('%s','%s','%s','%s') //data format\r\n\t);\r\n}", "function addUser($decode_data)\n{\n global $db;\n\n $stmt=$db->prepare(\"INSERT INTO users(name, surname, user_type, add_data, active) VALUES(:name, :surname, '5', :add_data, '1')\");\n $stmt->bindValue(':name', $decode_data['name'], PDO::PARAM_STR);\n $stmt->bindValue(':surname', $decode_data['surname'], PDO::PARAM_STR);\n $stmt->bindValue(':add_data', time(), PDO::PARAM_INT);\n $stmt->execute();\n\n return 'User add!';\n}", "function regUser($first_name, $last_name, $isRealtor, $mlsNum, $phone, $email, $user_password, $db){\n $sql = 'INSERT INTO users (first_name, last_name, is_realtor, MLS_num, phone, email, user_password)\n VALUES (:first_name, :last_name, :isRealtor, :mlsNum, :phone, :email, :user_password)';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':first_name', $first_name, PDO::PARAM_STR);\n $stmt->bindValue(':last_name', $last_name, PDO::PARAM_STR);\n $stmt->bindValue(':isRealtor', $isRealtor, PDO::PARAM_STR);\n $stmt->bindValue(':mlsNum', $mlsNum, PDO::PARAM_STR);\n $stmt->bindValue(':phone', $phone, PDO::PARAM_STR);\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->bindValue(':user_password', $user_password, PDO::PARAM_STR);\n $stmt->execute();\n $rowsChanged = $stmt->rowCount();\n $stmt->closeCursor();\n return $rowsChanged;\n }", "function registerUser($uName,$pass,$_POST) {\n \t$first = $_POST['first'];\n $last = $_POST['last'];\n $dob = $_POST['dob'];\n $gender = $_POST['gender'];\n $email = $_POST['email'];\n $address = $_POST['address']; \n $membership = $_POST['membership'];\n $ccn = $_POST['ccn'];\n $cce = $_POST['cce'];\n $duration = $_POST['duration'];\n \n // Validate credit card, return error if not valid\n if(cc_validate_checksum($ccn) == false) {\n \treturn \"<p class=\\\"errorMessage\\\">Invalid Credit Card number check and try again</p>\";\n }\n \n $text = $uName.\":\".$pass.\":\".$first.\":\".$last.\":\".$dob.\":\".$gender.\":\".$email.\":\".$address.\":\".\n \t$membership.\":\".$ccn.\":\".$cce.\":\".$duration.\"\\n\";\n $file = \"data/registeredUsers.txt\";\n $handle = fopen($file,\"a+\");\n if (!$handle) {\n \treturn \"<p> Internal Error </p>\";\n }\n while (($line = fgets($handle)) !== false) {\n \t$current = explode(\":\",$line);\n \tif ($current[0] == $uName) {\n \t\treturn \"<p class=\\\"errorMessage\\\">Username already taken</p>\";\n \t}\n }\n fwrite($handle, $text);\n fclose($handle);\n return;\n }", "function addUser($data)\n { \n $this->query(\"INSERT INTO `{$this->userTable}` (`{$this->tbFields1['first_name']}`, `{$this->tbFields1['last_name']}`, `{$this->tbFields1['gender']}`, `{$this->tbFields1['dob']}`, `{$this->tbFields1['telephone']}`, `{$this->tbFields1['fax']}`, `{$this->tbFields1['email']}`, `{$this->tbFields1['newsletter_flag']}`, `{$this->tbFields1['password']}`, `{$this->tbFields1['date_created']}`) VALUES ('\".$data[$this->dataFields['first_name']].\"', '\".$data[$this->dataFields['last_name']].\"', '\".$data[$this->dataFields['gender']].\"', '\".$data[$this->dataFields['dob']].\"', '\".$data[$this->dataFields['telephone']].\"', '\".$data[$this->dataFields['fax']].\"', '\".$data[$this->dataFields['email']].\"', '\".$data[$this->dataFields['newsletter_flag']].\"', '\".$data[$this->dataFields['password']].\"', CURRENT_TIMESTAMP)\"); \n \n $data[$this->dataFields['customer_id']] = mysql_insert_id($this->dbConn);\n \n if($data[$this->dataFields['address']] != \"\"){\n $this->addAddress($data);\n }\n \n }", "function register_a_user($Client_id, $Client_Name, $Client_Tel_w, $Client_Tel_h, $Client_Cell, $Client_Password, $Client_Age, $Client_Email, $Client_Address){\n global $db;\n $sql = \"INSERT INTO `client`(`Client_id`, `Client_Name`, `Client_Tel_w`, `Client_Tel_h`, `Client_Cell`, `Client_Password`, `Client_Age`, `Client_Email,`Client_Address`) \"\n . \"VALUES ('$Client_id`, `$Client_Name`, `$Client_Tel_w`, `$Client_Tel_h`, `$Client_Cell`, `$Client_Password`, `$Client_Age`, `$Client_Email,`$Client_Address`)\";\n $result = $db->exec($sql);\n return $result;\n}", "function createUser($db, $voornaam, $achternaam, $emailadres, $telefoonnummer, $woonplaats, $postcode, $straatnaam, $huisnummer, $wachtwoord, $antwoord) {\n\tIf($antwoord != 10) {\n\t\theader(\"location: ../registratie.php?error=reken\");\n\t\texit;\n\t}\n\t\n\t$sql = \"INSERT INTO klanten (voornaam, achternaam, straatnaam, huisnummer, postcode, woonplaats, telefoonnummer, email, wachtwoord) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);\";\n\n\tif(!$stmt = $db->prepare($sql)) {\n\t\theader(\"location: ../registratie.php?error=stmtFailed\");\n\t\texit;\n\t}\n\t\n\t$encryptwachtwoord = password_hash($wachtwoord, PASSWORD_DEFAULT);\n\t$emailzonderhoofdletters = strtolower($emailadres);\n\t$postcodemethoofdletters = strtoupper($postcode);\n\n\t$stmt->bindParam(1, $voornaam);\n\t$stmt->bindParam(2, $achternaam);\n\t$stmt->bindParam(3, $straatnaam);\n\t$stmt->bindParam(4, $huisnummer);\n\t$stmt->bindParam(5, $postcodemethoofdletters);\n\t$stmt->bindParam(6, $woonplaats);\n\t$stmt->bindParam(7, $telefoonnummer);\n\t$stmt->bindParam(8, $emailzonderhoofdletters);\n\t$stmt->bindParam(9, $encryptwachtwoord);\n\n\t$stmt->execute();\n\t$stmt=null;\n\n\theader(\"location: ../login.php\");\n\texit;\n}", "public function p_signup() {\n\n $q= 'Select email \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n # see if the email exists\n $emailexists= DB::instance(DB_NAME)->select_field($q);\n \n # email exists, throw an error\n if($emailexists){ \n \n Router::redirect(\"/users/signup/error\"); \n \n }\n \n #requires all fields to be entered if java script is disabled, otherwise thow a different error\n \n elseif (!$_POST['email'] OR !$_POST['last_name'] OR !$_POST['first_name'] OR !$_POST['password']) {\n Router::redirect(\"/users/signup/error2\"); \n }\n # all is well , proceed with signup\n else{\n \n $_POST['created']= Time::now();\n $_POST['password']= sha1(PASSWORD_SALT.$_POST['password']); \n $_POST['token']= sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n # add user to the database and redirect to users login page \n $user_id=DB::instance(DB_NAME)->insert_row('users',$_POST);\n # Create users first Notebook\n $notebook['name']= $_POST['first_name'].' Notebook';\n $notebook['user_id']= $user_id;\n $notebook['created']= Time::now(); \n $notebook['modified']= Time::now(); \n DB::instance(DB_NAME)->insert_row('notebooks',$notebook); \n\n Router::redirect('/users/login');\n }\n \n }", "function insertpatient()\n{\n\tglobal $uid;\n\tglobal $uname;\n\tglobal $pass_hash;\n\tglobal $gender;\n\tglobal $email;\n\tglobal $number;\n\tglobal $dob;\n\tglobal $divission;\n\tglobal $district;\n\tglobal $thana;\n\tglobal $bloodgroup;\n\t$status=3;\n\n\t//insert into patients table\n\t$pquery=\"INSERT INTO patients VALUES (NULL,'$uid','$uname','$gender','$email','$number','$dob','$bloodgroup','$divission','$district','$thana')\";\n\t//insert into users table\n\t$uquery=\"INSERT INTO users VALUES (NULL,'$uid','$pass_hash','$status')\";\n\n\texecute($pquery); \n\texecute($uquery); \n}", "function save_client(){\n//include connection.php\ninclude \"connection.php\";\t\n\n//fetch the data from the POST (array)\n$rowdata=$_POST['data'];\n$fullname=$rowdata[0]; //fetch index 0\n$phone=$rowdata[1];//fetch index 1\n$address=$rowdata[2];//fetch index 2\n$email=$rowdata[3];//fetch index 3\n$username=$rowdata[4];//fetch index 4\n$password=password_hash($rowdata[5],PASSWORD_DEFAULT);//fetch index 5\n$date=date(\"Y\").\"-\".date(\"m\").\"-\".date(\"d\");\n//create a query\n$query=\"INSERT INTO tblusers(fullname,phoneno,useraddress,\nuseremail,username,userpass,usertype,registereddate)\n VALUES('$fullname','$phone','$address','$email',\n'$username','$password','client','$date')\";\n//execute the query\t\n if(mysqli_query($db,$query)){\n\techo \"Registration Successful\";\t\n }\n else{\n\techo mysqli_error($db); \n }\n}", "function user_register() {\n // I'm not passing in any values or declaring globals\n global $supersecret_hash_padding;\n\nif (isset($_POST['HealthLeap'])) \n{\n\t$healthleap = \"Y\";\n}\nelse\n{\n\t$healthleap = \"N\";\n}\n\nif (isset($_POST['AutoAcct'])) \n{\n\t$autoaccount = \"Y\";\n}\nelse\n{\n\t$autoaccount = \"N\";\n}\n\nif (isset($_POST['LeapTo'])) \n{\n\t$leapto = \"Y\";\n}\nelse\n{\n\t$leapto = \"N\";\n}\n\nif (isset($_POST['MarketLeap'])) \n{\n\t$marketleap = \"Y\";\n}\nelse\n{\n\t$marketleap = \"N\";\n}\n\nif (isset($_POST['POLeap'])) \n{\n\t$poleap = \"Y\";\n}\nelse\n{\n\t$poleap = \"N\";\n}\n\nif (isset($_POST['Uploads'])) \n{\n\t$uploads = \"Y\";\n}\nelse\n{\n\t$uploads = \"N\";\n}\n\n\n // Are all vars present and passwords match?\n if (strlen($_POST['clientusername']) <= 25 && strlen($_POST['password1']) <= 25 && ($_POST['password1'] == $_POST['password2']) && strlen($_POST['clientemail']) <= 50 && validate_email($_POST['clientemail'])) {\n // Validate username and password\n if (account_namevalid($_POST['clientusername']) || strlen($_POST['password1'] >= 6)) {\n\n $username = strtolower($_POST['clientusername']);\n $username = trim($username);\n // Don't need to escape, because single quotes aren't allowed\n $email= $_POST['clientemail'];\n // Don't allow duplicate usernames or emails\n $query = \"SELECT user_id\n FROM user\n WHERE user_name = '$username'\n OR email = '$email'\";\n $result = mysql_query($query);\n if ($result && mysql_num_rows($result) > 0) {\n $feedback = 'ERROR - Username or email address already exists';\n return $feedback;\n } else {\n\t$first_name = $_POST['first_name'];\n\t$last_name = $_POST['last_name'];\n\t$emailpassword = $_POST['password1'];\n $password = md5($_POST['password1']);\n\t$user_ip = $_SERVER['REMOTE_ADDR'];\n\t\t\n\n // Create a new hash to insert into the db and the confirmation email\n $hash = md5($email.$supersecret_hash_padding);\n\n $query = \"INSERT INTO user (user_id, user_name, first_name, last_name, password, email, remote_addr, confirm_hash, is_confirmed, role, date_created)\n VALUES (NULL, '$username', '$first_name', '$last_name', '$password', '$email', '$user_ip', '$hash', 1, 1, NOW())\";\n $result = mysql_query($query);\n if (!$result) {\n $feedback = 'ERROR - Database error';\n return $feedback;\n } else {\n $query = \"SELECT user_id\n FROM user\n WHERE user_name = '$username'\";\n \n\t\t\t $result = mysql_query($query);\n\t\t\t if ($result && mysql_num_rows($result) <> 1) {\n\t\t\t\t$feedback = 'ERROR - Could not get User ID';\n\t\t\t\treturn $feedback;\n\t\t\t }\n else {\n\t\t\t\t $user_id = mysql_result($result, 0, 'user_id');\n\t \n\t\t\t\t\t$query = \"INSERT INTO SoftwareAccess (ClientId, ClientName, AutoAccount, HealthLeap, LeapTo, MarketLeap, POLeap, uploads)\n\t\t\t\t\t\t\t VALUES ($user_id, '$username', '$autoaccount', '$healthleap', '$leapto', '$marketleap', '$poleap', '$uploads')\";\n\t\t\t\t\n\t\t\t\t\t$result = mysql_query($query);\n\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\t$feedback = 'ERROR - Could not add privledges';\n\t\t\t\t\t}\n\t\t\t\t\n \t\t\t}\n\n\n\t\t\tif ($_POST['sendemail'] == '1')\n\t\t\t{\n \n\t\t\t // Send the confirmation email\n\t\t\t $encoded_email = urlencode($_POST['clientemail']);\n\t\n\t\t\t $mail_body = <<< EOMAILBODY\nYou have been registered for the Health Quest Software website. \n\n\nYour username is: $username\nYour password is: $emailpassword\n\n\n\t\t\t http://www.HealthQuestSoftware.com/index.php\nEOMAILBODY;\n\t\t\t mail ($email, 'Health Quest Software Registration', $mail_body, 'From: [email protected]');\n\t\t\t}\n\t // Give a successful registration message\n $feedback = 'YOU HAVE SUCCESSFULLY REGISTERED. A confirmation email has been sent.';\n return $feedback;\n }\n }\n } else {\n $feedback = 'ERROR - Username or password is invalid';\n return $feedback;\n }\n } else {\n $feedback = 'ERROR - Please fill in all fields correctly';\n return $feedback;\n }\n}", "protected function insert()\n {\n $insert = 'INSERT INTO users (first_name, last_name, email, password)\n VALUES (:first_name, :last_name, :email, :password)';\n $statement = self::$dbc->prepare($insert);\n unset($this->attributes['id']);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n $this->attributes['id'] = self::$dbc->lastInsertId();\n }", "function insert_stmt()\n {\n if ( (! array_key_exists(\"cust_fname\", $_POST)) or\n ($_POST[\"cust_fname\"] == \"\") or\n (! isset($_POST[\"cust_fname\"])) )\n {\n destroy_and_exit(\"must insert a First Name!\");\n }\n elseif ( (! array_key_exists(\"cust_lname\", $_POST)) or\n ($_POST[\"cust_lname\"] == \"\") or\n (! isset($_POST[\"cust_lname\"])) )\n {\n destroy_and_exit(\"must insert a Last Name!\");\n }\n elseif ( (! array_key_exists(\"cust_phone\", $_POST)) or\n ($_POST[\"cust_phone\"] == \"\") or\n (! isset($_POST[\"cust_phone\"])) )\n {\n destroy_and_exit(\"must insert a phone number!\");\n }\n elseif ( (! array_key_exists(\"cust_email\", $_POST)) or\n ($_POST[\"cust_email\"] == \"\") or\n (! isset($_POST[\"cust_email\"])) )\n {\n destroy_and_exit(\"must insert a Customer Email!\");\n }\n \n $username = $_SESSION[\"username\"];\n $password = $_SESSION[\"password\"];\n \n $conn = hsu_conn_sess($username, $password);\n\n $cus_fname = trim(htmlspecialchars($_POST['cust_fname']));\n $cus_lname = trim(htmlspecialchars($_POST['cust_lname']));\n $cus_pho = trim(htmlspecialchars($_POST['cust_phone']));\n $cus_email = trim(htmlspecialchars($_POST['cust_email']));\n\n ?>\n \n <p> [<?= $cus_fname ?>] </p>\n <p> [<?= $cus_lname ?>] </p>\n <p> [<?= $cus_pho ?>] </p>\n <p> [<?= $cus_email ?>] </p>\n <?php\n \n $adding_cus = \"begin project_insert(:cust_fname, :cust_lname, :cust_phone, :cust_email); end; \";\n \n $somethingcool = oci_parse($conn, $adding_cus);\n \n oci_bind_by_name($somethingcool, \":cust_fname\", $cus_fname);\n oci_bind_by_name($somethingcool, \":cust_lname\", $cus_lname);\n oci_bind_by_name($somethingcool, \":cust_phone\", $cus_pho);\n oci_bind_by_name($somethingcool, \":cust_email\", $cus_email);\n \n oci_execute($somethingcool, OCI_DEFAULT);\n \n oci_commit($conn);\n \n oci_free_statement($somethingcool);\n \n $outputting_stmt = \"select *\n from Customer\";\n \n $somethingcoolpart2 = oci_parse($conn, $outputting_stmt);\n \n oci_execute($somethingcoolpart2, OCI_DEFAULT);\n \n ?> \n <p> <a href=\"<?= htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES) ?>\">\n Start Over </a> </p>\n <?php\n \n \n oci_free_statement($somethingcoolpart2);\n \n oci_close($conn);\n }", "public function p_signup(){\n\t\tforeach($_POST as $field => $value){\n\t\t\tif(empty($value)){\n\t\t\t\tRouter::redirect('/users/signup/empty-fields');\n\t\t\t}\n\t\t}\n\n\t\t#check for duplicate email\n\t\tif ($this->userObj->confirm_unique_email($_POST['email']) == false){\n\t\t\t#send back to signup page\n\t\t\tRouter::redirect(\"/users/signup/duplicate\");\n\t\t}\n\n\t\t#adding data to the user\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\n\t\t#encrypt password\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t#create encrypted token via email and a random string\n\t\t$_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\n\t\t#Insert into the db\n\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\n\t\t# log in the new user\n\n\t\tsetcookie(\"token\", $_POST['token'], strtotime('+2 weeks'), '/');\n\n\t\t# redirect to home\n\t\tRouter::redirect('/users/home');\n\t\t\n\t}", "function CollectRegistrationSubmission(&$formvars){\r\n\t\t\r\n $formvars['UFname'] = $this->Sanitize($_POST['UFname']);\r\n $formvars['ULname'] = $this->Sanitize($_POST['ULname']);\r\n\t\t$formvars['UuserName'] = $this->Sanitize($_POST['UuserName']);\r\n $formvars['UPswd'] = $this->Sanitize($_POST['UPswd']);\r\n $formvars['ConPswd'] = $this->Sanitize($_POST['ConPswd']);\r\n $formvars['Uemail'] = $this->Sanitize($_POST['Uemail']);\r\n\t\t$formvars['Uphone'] = $this->Sanitize($_POST['Uphone']);\r\n// \t\t$formvars['Upic'] = $this->Sanitize($_POST['Upic']);\r\n\t\t\r\n //$formvars['Uadmin'] = $this->Sanitize($_POST['Uadmin']);\r\n }", "function registerU(){\r\n global $db ,$errors, $firstname, $lastname, $email, $password;\r\n\r\n //receive all input values from the form. call the e() function\r\n //defined below to escape from values\r\n\r\n $firstname =e( $_POST['name']);\r\n $lastname = e($_POST['Lastname']);\r\n $email= e($_POST['email']);\r\n $password_1= e($_POST['password_1']);\r\n $password_2= e($_POST['password_2']);\r\n\r\n\r\n // form validation: ensure that the form is correcttly filled\r\n\r\nif(empty($firstname)){\r\n array_push($errors, \"Username is required\");\r\n}\r\nif(empty($lastname)){\r\n array_push($errors, \"Username is required\");\r\n}\r\n\r\nif (empty($email)){\r\n array_push($errors, \"Email is required\");\r\n}\r\n\r\nif (empty($password_1)){\r\n array_push($errors, \"password is required\");\r\n}\r\nif($password_1 != $password_2){\r\n\r\n array_push($errors, \"the passwords does not match\");\r\n}\r\n\r\n//register users if there are no errors in the form\r\nif(count($errors)==0){\r\n $password =md5($password_1);//encrypt the password before saving in the database\r\n\r\n\r\n $q3=mysqli_query($db,\"INSERT INTO users VALUES ( '','$firstname' , '$lastname', '$email' ,'$password')\");\r\nif($q3)\r\n{\r\n \r\n \r\n session_start();\r\n\r\n \r\n header ('location:customerLog.php');\r\n \r\n \r\n\r\n }\r\n}\r\n}", "function create(){\n \n // insert query\n $query = \"INSERT INTO \" . $this->table_name . \"\n SET\n userid = :user_id,\n username = :username,\n password = :user_pass,\n mobile = :user_recovery_mobile,\n email = :alternate_email\";\n \n // prepare the query\n $stmt = $this->conn->prepare($query);\n \n // sanitize\n\t$this->user_id=htmlspecialchars(strip_tags($this->user_id));\n $this->user_pass=htmlspecialchars(strip_tags($this->user_pass));\n $this->mobile=htmlspecialchars(strip_tags($this->user_recovery_mobile));\n $this->username=htmlspecialchars(strip_tags($this->username));\n $this->alternate_email=htmlspecialchars(strip_tags($this->alternate_email));\n \n // bind the values\n\t$stmt->bindParam(':user_id',$this->user_id);\n\t$stmt->bindParam(':user_recovery_mobile',$this->user_recovery_mobile);\n $stmt->bindParam(':username', $this->username);\n\t$stmt->bindParam(':alternate_email', $this->alternate_email);\n // hash the password before saving to database\n $password_hash = md5($this->user_pass);\n $stmt->bindParam(':user_pass', $password_hash);\n// echo \"all set\";\n // execute the query, also check if query was successful\n if($stmt->execute()){\n\t//\techo \"insert OK\";\n return true;\n }\n //echo implode(\",\",$stmt->errorInfo());\n $this->errmsg=implode(\",\",$stmt->errorInfo());\n return false;\n}", "function create_temp_ac(){\n\n global $conn, $errors;\n\n $firstname = mysqli_real_escape_string($conn, $_POST['FirstName']);\n $lastname = mysqli_real_escape_string($conn, $_POST['LastName']);\n $email = mysqli_real_escape_string($conn, $_POST['Email']);\n $password_1 = mysqli_real_escape_string($conn, $_POST['Password_1']);\n $password_2 = mysqli_real_escape_string($conn, $_POST['Password_2']);\n\n // form validation: ensure that the form is correctly filled ...\n // by adding (array_push()) corresponding error unto $errors array\n\n if (empty($firstname)) { array_push($errors, \"First Name is required\"); }\n if (empty($lastname)) { array_push($errors, \"Last Name is required\"); }\n if (empty($email)) { array_push($errors, \"Email is required\"); }\n if (empty($password_1)) { array_push($errors, \"Password is required\"); }\n if ($password_1 != $password_2) {\n\t array_push($errors, \"Passwords do not match\");\n }\n\n // first check the database to make sure a user does not already exist with the same email\n $user_check_query = \"SELECT * FROM users WHERE Email='$email'\";\n $result = mysqli_query($conn, $user_check_query);\n $user = mysqli_fetch_assoc($result);\n\n if ($user) { // if email exists\n if ($user['Email'] == $email) {\n array_push($errors, \"Email already exists\");\n }\n }\n\n // Finally, register user if there are no errors in the form\n if (count($errors) == 0) {\n\n //encrypt the password before saving in the database\n \t$password = md5($password_1);\n \n //Insert data into user table\n $query = \"INSERT INTO users (FirstName, LastName, Email, user_type, Password) \n \t\t\t VALUES('$firstname', '$lastname', '$email', 'doctor', '$password')\";\n \tmysqli_query($conn, $query);\n\n $query = \"SELECT * FROM users WHERE Email = '$email'\";\n $res = mysqli_query($conn, $query);\n $user = mysqli_fetch_assoc($res);\n $id = $user['id'];\n\n $query = \"INSERT INTO doctorsdetails\n (DoctorId, FirstName, LastName, Phone, Street, City, Country, Gender, DOB, Nationality, Speciality, Department, Qualifications, Availability)\n VALUES('$id', '$firstname', '$lastname', '', '','', '', '', '', '', '', '', '', 'No') \";\n mysqli_query($conn, $query) or die('MySQL Error: ' . mysqli_error($conn));\n $_SESSION['success'] = \"Blank Data Inserted\" ;\n header('location: create-doctor.php');\n }\n}", "function add_user($bdd, $user)\n{\n $req = $bdd->prepare('INSERT INTO users(name,email,adress,postal_code,city)\n VALUES(:name,:email,:adress,:postal_code,:city)');\n $req->execute(array(\n ':name' => $user[0],\n ':email' => $user[1],\n ':adress' => $user[2],\n ':postal_code' => $user[3],\n ':city' => $user[4]\n ));\n}", "function insert($name, $surn, $email, $pass1, $un, $id, $conn){\n //insert query\n if($id == \"teachers\"){\n $sqlq = \"INSERT INTO `teachers_verify` (`name`, `surname`, `email`, `password`, `username`, `time`) VALUES (?, ?, ?, ?, ?, ?);\";\n }else if($id == \"students\"){\n $sqlq = \"INSERT INTO `students_verify` (`name`, `surname`, `email`, `password`, `username`, `time`) VALUES (?, ?, ?, ?, ?, ?);\";\n }\n $pswhash = passWord_hash($pass1, PASSWORD_DEFAULT);\n $stmt = mysqli_stmt_init($conn);\n if(!mysqli_stmt_prepare($stmt, $sqlq)){\n echo 'SQL ERROR';\n }else{\n $reg_time = date(\"Y/m/d\") . ' ' . date(\"h:i:sa\");\n mysqli_stmt_bind_param($stmt, \"ssssss\", $name, $surn, $email, $pswhash, $un, $reg_time);\n mysqli_stmt_execute($stmt);\n #VERIFICATION NOTICE\n header(\"Location: ../../main.php?signup=Please_wait_for_system_verification\");\n exit();\n }\n }", "function registerUser($CustomerID, $username, $email, $phone, $postcode, $password) {\n // return UID created or false if fail\n// $sql = \"UPDATE customer SET Username = :Username, Pass = :Pass, Email = :Email, Phone = :Phone=1 WHERE CustomerID = :CustomerID\";\n\n// $lastCustID = $this->dbconn->lastInsertID();\n\n// $sql = \"INSERT INTO customer(CustomerID,Username,Pass,Email,Phone) VALUES (:CustomerID,:Username,:Pass,:Email, :Phone)\";\n $sql = \"INSERT INTO customer (username,email,phone,postcode,password) VALUES (:username,:email, :phone,:postcode,:password);\";\n $stmt = $this->dbconn->prepare($sql);\n// $stmt->bindParam(':CustomerID', $lastCustID, PDO::PARAM_INT);\n $stmt->bindParam(':username', $username, PDO::PARAM_STR);\n $stmt->bindParam(':email', $email, PDO::PARAM_STR);\n $stmt->bindParam(':phone', $phone, PDO::PARAM_INT); \n $stmt->bindParam(':postcode', $postcode, PDO::PARAM_INT); \n $stmt->bindParam(':password', $password, PDO::PARAM_STR); \n\n $result = $stmt->execute();\n if($result === true) {\n return true;\n } else {\n return false;\n }\n }", "function insertUser($userType, $email, $password, $firstname, $lastname) {\n $connection = openDb();\n $date = date('Y-m-d');\n $userType = escape($userType, $connection);\n $email = escape($email, $connection);\n $password = escape($password, $connection);\n $firstname = escape($firstname, $connection);\n $lastname = escape($lastname, $connection);\n\n //Using prepared statements and parameterized queries:\n $sql = \"INSERT INTO users (USER_TYPE, EMAIL, PASSWORD, FIRST_NAME, LAST_NAME, DATE_CREATED) \";\n $sql.= \"VALUES (?, ?, ?, ?, ?, ?)\";\n $stmt = $connection->stmt_init();\n if(!$stmt->prepare($sql)) {\n return false;\n }\n $stmt->bind_param(\"ssssss\",$userType,$email,$password,$firstname,$lastname,$date);\n\n return executeNonQuery($stmt, $connection);\n}", "public static function create_account() {\n $email = $_POST[\"email\"];\n $user = $_POST[\"user\"];\n $vercode = sha1(time());\n\n // Check if the email's valid\n $pattern = \"/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/\";\n if (!preg_match($pattern, $email)) {\n return array(3, \"email\");\n }\n // Check if username's valid\n $pattern = \"/^[a-zA-Z0-9]{3,15}$/\";\n if (!preg_match($pattern, $user)) {\n return array(3, \"username\");\n }\n // Check if email is already in use\n if (!DB::query(\"SELECT Email FROM `Users` WHERE Email=:email;\", array(\":email\" => $email))) {\n if (!DB::query(\"SELECT Username FROM `Users` WHERE Username=:user\", array(\":user\" => $user))) {\n try {\n DB::query(\"INSERT INTO `Users` (Email, Username, Vercode) VALUES (:email, :user, :ver);\", array(\":email\" => $email, \":user\" => $user, \":ver\" => $vercode));\n } catch (PDOException $e) {\n return array(2, \"Server error... Please try again.\");\n }\n } else {\n return array(1, \"Username in use!\");\n }\n } else {\n return array(1, \"Email already registered!\");\n }\n\n // Send registration email\n $to = $email;\n $headers = <<<MESSAGE\nFROM: George || <[email protected]>\nContent-Type: text/plain;\nMESSAGE;\n $subject = \"Flat Dragons Registration\";\n $msg = <<<EMAIL\nHi $user,\n\nPlease follow this link to verify your account:\nhttps://flatdragons.com/signup.php?user=$user&ver=$vercode\n\nKind regards,\nGeorge (FlatDragons)\nEMAIL;\n mail($to, $subject, $msg, $headers);\n return array(0, null);\n }", "function processBeforeInsert($record, $pObj) {\n\t\t\t// Perform operation only for the fe_users table and for external index 0\n\t\tif ($pObj->getTableName() == 'fe_users' && $pObj->getIndex() == 0) {\n\t\t\t\t// Simply reverse the username to create the password\n\t\t\t$record['password'] = strrev($record['username']);\n\t\t}\n\t\treturn $record;\n\t}", "function saveRegistration(array $data, $pdo) {\n $password = password_hash($data['password'], PASSWORD_DEFAULT);\n\n $query = 'INSERT INTO users(username, email, password, dateCreated) VALUES ( :username, :email, :password, NOW())';\n $stmt = $pdo->prepare($query);\n $result = $stmt->execute([':username' => $data['username'], ':email' => $data['email'], ':password' => $password]);\n if ($result) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function insertnurse()\r\n{\r\n\tglobal $uid;\r\n\tglobal $uname;\r\n\tglobal $pass_hash;\r\n\tglobal $gender;\r\n\tglobal $email;\r\n\tglobal $number;\r\n\tglobal $dob;\r\n\tglobal $divission;\r\n\tglobal $district;\r\n\tglobal $thana;\r\n\tglobal $bloodgroup;\r\n\t$status=5;\r\n\r\n\t//insert into patients table\r\n\t$pquery=\"INSERT INTO tempnursereq VALUES (NULL,'$uid','$uname','$gender','$email','$number','$dob','$bloodgroup','$divission','$district','$thana')\";\r\n\t//insert into users table\r\n\t$uquery=\"INSERT INTO tempnusers VALUES (NULL,'$uid','$pass_hash','$status')\";\r\n\r\n\texecute($pquery); \r\n\texecute($uquery); \r\n}", "function sign_up($user_post_data)\n\t{\n\t\t$salted_password = hash_pbkdf2(\"sha1\", $user_post_data[\"password\"], $user_post_data[\"salt\"], $user_post_data[\"iteration_count\"], 40);\n\t\t$client_key = hash_hmac(\"sha1\", $salted_password, \"'Client Key'\");\n\t\t$server_key = hash_hmac(\"sha1\", $salted_password, \"'Server Key'\");\n\t\t$hashed_password = sha1($client_key);\n\t\t$user_post_data[\"password\"] = $hashed_password;\n\n\t\t$query_builder= $this->db->db_connect();\n\t\t$query = $query_builder->prepare(\"insert into user(name,lastname,email,password,server_key,salt,iteration_count,user_created) values(?,?,?,?,?,?,?,?)\");\n\t\t$query->execute(array($user_post_data[\"name\"], $user_post_data[\"lastname\"], $user_post_data[\"email\"], $user_post_data[\"password\"],$server_key, $user_post_data[\"salt\"], $user_post_data[\"iteration_count\"], $user_post_data[\"user_signed_up\"]));\n\t\treturn true;\n\t\t$this->db->db_disconnect();\n\t\t\n\t}", "function procRegister() {\n global $session, $form;\n /* Convert username to all lowercase (by option) */\n if (ALL_LOWERCASE) {\n $_POST['user'] = strtolower($_POST['user']);\n }\n /* Registration attempt */\n $retval = $session->register($_POST['user'], $_POST['pass'], $_POST['email']);\n\n /* Registration Successful */\n if ($retval == 0) {\n $_SESSION['reguname'] = $_POST['user'];\n $_SESSION['regsuccess'] = true;\n header(\"Location: \" . $session->referrer);\n }\n /* Error found with form */ else if ($retval == 1) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n /* Registration attempt failed */ else if ($retval == 2) {\n $_SESSION['reguname'] = $_POST['user'];\n $_SESSION['regsuccess'] = false;\n header(\"Location: \" . $session->referrer);\n }\n }", "public function insertUser() {\n try {\n /* Check if for the empty or null parameters */\n if (isset($_POST[\"email\"]) && isset($_POST[\"username\"]) && isset($_POST[\"password\"]) && isset($_POST[\"access\"])) {\n // Get the username from POST request to check\n $check_data = array(\n ':email' => $_POST[\"email\"]\n );\n // Get the username, password and access from POST request to insert\n $form_data = array(\n ':email' => $_POST[\"email\"],\n ':username' => $_POST[\"username\"],\n ':password' => $_POST[\"password\"],\n ':access' => $_POST[\"access\"]\n );\n // Check for existent user with the same username in Database\n $query = \"\n select id \n from tb_user \n where email = :email\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 parameter username\n $statement->execute($check_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 $data[] = array('result' => 'This record already exists!');\n } else {\n // Create a SQL query to insert an new user with all parameters\n $query = \"\n insert tb_user(email, username, password, access, state) values(:email, :username, :password, :access, 1);\n \";\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameters\n $statement->execute($form_data);\n // Check if any affected row\n if ($statement->rowCount()) {\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'No operations performed on the database!');\n }\n }\n } else {\n // Check for missing parameters\n if (!isset($_POST[\"email\"]) && !isset($_POST[\"username\"]) && !isset($_POST[\"password\"]) && !isset($_POST[\"access\"])) {\n $data[] = array('result' => 'Missing all parameters');\n } elseif (!isset($_POST[\"email\"])) {\n $data[] = array('result' => 'Missing email parameter!');\n } elseif (!isset($_POST[\"username\"])) {\n $data[] = array('result' => 'Missing username parameter!');\n } elseif (!isset($_POST[\"password\"])) {\n $data[] = array('result' => 'Missing password parameter!');\n } else {\n $data[] = array('result' => 'Missing access parameter!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "function do_register()\n{\nif ($_POST[\"do\"]==\"register\")\n{ $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n\n //Am Anfang keine Fehler ;-)\n\t$error=\"\";\n\t\n\t\t//Pr&uuml;fe ob AGB akzeptiert wurden [AGB]\n\tif($_POST[\"acc_agb\"]==\"0\")\n\t{ $error.=\"Sie m&uuml;ssen mit unseren Nutzungsbedingungen einverstanden sein, um alle Funktionen dieser Webpr&auml;senz nutzen zu k&ouml;nnen.<br />\"; }\n\t\n\t//Pr&uuml;fe leeres Felder [NICK]\n\tif(empty($_POST[\"nick\"]))\n\t{ $error.=\" Bitte geben Sie einen Nicknamen ein.<br />\"; }\n\t\n\t//Pr&uuml;fe leeres Felder [PW]\n\tif(empty($_POST[\"pw\"]))\n\t{ $error.=\"Bitte geben Sie ein Passwort ein.<br />\"; }\n\t\n\t//Pr&uuml;fe leeres Felder [PW2]\n\tif(empty($_POST[\"pw2\"]))\n\t{ $error.=\"Bitte geben Sie Ihr Password doppelt ein, um Fehleingaben zu verhindern.<br />\"; }\n\t\n\t//Pr&uuml;fe leeres Felder [E-Mail]\n\tif(empty($_POST[\"email\"]))\n\t{ $error.=\" Bitte geben Sie eine g&uuml;tige E-Mail-Adresse ein.<br />\"; }\t\t\n\n\t//Pr&uuml;fe gleichheit der Felder PW und PW2\n\tif($_POST[\"pw\"]!=$_POST[\"pw2\"])\n\t{ $error.=\"Die eingegebenen Passw&ouml;rter m&uuml;ssen &uuml;bereinstimmen.<br />\"; }\t\t\n\t\t\n\t\n\n //Pr&uuml;fe, ob Nickname schon vergeben ist (Global)\n $sql=\"SELECT COUNT(*) AS result FROM user WHERE nick='\".filter($_POST[\"nick\"]).\"'\";\n $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n $result = mysql_db_query(\"portal\", $sql);\n $zeile = mysql_fetch_array($result);\n if ($zeile[\"result\"] > \"0\")\n\t{ $error.=\" Dieser Nickname ist bereits registriert.<br />\"; }\n\t\n //Pr&uuml;fe, ob Nickname schon vergeben (zum aktivieren)\n $sql=\"SELECT COUNT(*) AS result FROM akti WHERE nick='\".filter($_POST[\"nick\"]).\"'\";\n $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n $result = mysql_db_query(\"portal\", $sql);\n $zeile = mysql_fetch_array($result);\n if ($zeile[\"result\"] > \"0\")\n\t{ $error.=\"Dieser Nickname muss noch aktiviert werden. Den Aktivierungscode haben Sie per E-Mail bekommen.<br />\"; }\t\t \n\t\n\t//Pr&uuml;fe, ob E-Mail Adresse schon vergeben ist (Global)\n $sql=\"SELECT COUNT(*) AS result FROM user WHERE email='\".filter($_POST[\"email\"]).\"'\";\n $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n $result = mysql_db_query(\"portal\", $sql);\n $zeile = mysql_fetch_array($result);\n if ($zeile[\"result\"] > \"0\")\n\t{ $error.=\"Diese E-Mail-Adresse ist bereits registriert.<br />\"; }\t\t\n\t\n\t//Pr&uuml;fe, ob E-Mail Adresse schon vergeben ist (zum Aktivieren)\n $sql=\"SELECT COUNT(*) AS result FROM akti WHERE email='\".filter($_POST[\"email\"]).\"'\";\n $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n $result = mysql_db_query(\"portal\", $sql);\n $zeile = mysql_fetch_array($result);\n if ($zeile[\"result\"] > \"0\")\n\t{ $error.=\"An diese E-Mail-Adresse wurde bereits ein Aktivierungscode geschickt.<br />\"; }\t\t\n\t \n\n $ok=0;\n $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n // while($ok=0)\n // { \n\t $akti=\"\"; \n\t $akti=generate_key();\n\t //Pr&uuml;fe, ob Schl&uuml;ssel schon in der Datenbank vorhanden ist (Unwahrscheinlich, aber wir wollen ja viele User haben *g*)\n $sql=\"SELECT COUNT(*) AS result FROM akti WHERE akti='\".$akti.\"'\";\n $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n $result = mysql_db_query(\"portal\", $sql);\n $zeile = mysql_fetch_array($result);\n if ($zeile[\"result\"] >= \"1\")\n \t { $akti=generate_key(); }\t\n // }\n \n \t//Pr&uuml;fe, ob PW im Woerterbuch vorhanden ist.\n $sql=\"SELECT lang FROM book WHERE word LIKE '%\".filter($_POST[\"pw\"]).\"%'\";\n $db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\");\n $result = mysql_db_query(\"portal\", $sql);\n \n if (mysql_num_rows($result)!=0)\n\t{ $zeile = mysql_fetch_array($result);\n\t\t$error.= \"Dieses PW wurde von uns als unsicher gewertet. Es ist bei uns in dem W&ouml;rterbuch:<b>\".$zeile[\"lang\"].\"</b> vorhanden. Bitte &auml;ndern die es nach dem vollst&auml;ndigen registrieren.\"; }\t\n \n\n \n \n \n //Pr&uuml;fe ob es Fehler gab, falls ja gebe die Meldungen aus und &uuml;berspringe den SQL Teil.\n \t\n $nick = filter($_POST[\"nick\"]);\n $pw = md5($_POST[\"pw\"]);\n \n //Datum wird ben&ouml;tigt um Veraltete Eintr&auml;ge Aktivierungen zu l&ouml;schen\n $datum = date(\"y-m-d\");\n $sql = \"INSERT INTO akti (datum, nick, pw, email, akti, sex)\n VALUES ('\".$datum.\"', \n '\".filter($_POST[\"nick\"]).\"',\n '\".$pw.\"',\n '\".filter($_POST[\"email\"]).\"',\n '\".$akti.\"' ,\";\n //Pruefe Geschlecht\n \n if (filter($_POST[\"sex\"])==\"m\")\n { $sql.=\"'m')\"; }\n elseif (filter($_POST[\"sex\"])==\"w\")\n { $sql.=\"'w')\"; }\n else\n { $error.=\"Dein Geschlecht konnte nicht &Uuml;bertragen werden.<br />\"; } \n \n \n if ($error==\"\")\n { \n\t$db = mysql_connect(\"localhost\", \"portal\", \"psacln\") or die(\"Verbindungsfehler\"); \n $result = mysql_db_query(\"portal\", $sql);\n if ($result==\"1\")\n {\n\t echo 'Ihnen wurde soeben eine Aktiverungs E-mail geschickt. Pr&uuml;fen Sie bitte ihre SPAM verzeichnisse, falls sie innerhalb von 60 Minuten keine Mail bekommen solten.';\n \n $betreff = \"Registrierung bei discollection-radio\";\n $text = \"Hallo!\n Sie haben sich soeben bei Discollection-radio Registriert. Um ihre Registrierung abzuschlie&szlig;en, klicken Sie im Men&uuml;punkt LOG-IN auf AKTIVIEREN\n und Kopiere Folgenden Aktivierungscode in das dort vorhandene Feld:\n \n \".$akti.\"\n \n Alternativ kannst du einfach foldenen Link in deinen Browser kopieren:\n www.discollection-radio.eu/aktivieren.htm?code=\".$akti.\" \n \n Nicht aktivierte Nicks werden innerhalb einer Woche gel&ouml;scht.\";\n \n \n @mail(filter($_POST[\"email\"]), $betreff, $text,\n \"From: Ein \\\"Hallo\\\" aus dem Netz <[email protected]>\");\n \n }\n else\n { echo \"Fehler.\";\n }\n \n \n \n \n }\n else\n { echo '<b>' . $error . '</b>'; }\n}\n}", "function makeUser($firstname, $lastname, $username, $email, $department, $isReadOnly){\n $password = genPassword(7);\n $md5_password = md5($password);\n sqlQuery(\"INSERT INTO users SET user_firstname='$firstname', user_lastname='$lastname', user_username='$username', user_email='$email', user_isreadonly='$isReadOnly', user_department='$department', user_password='$md5_password'\");\n sendSignupEmail(getUserId($username), $password);\n alog(\"Added user $username\");\n}", "function registerUser() {\n $org = htmlspecialchars(trim($_POST['org']), ENT_QUOTES);\n $email = htmlspecialchars(trim($_POST['email']), ENT_QUOTES);\n $password = htmlspecialchars(trim($_POST['password1']), ENT_QUOTES);\n $date = date('Y-m-d');\n \n connectDatabase();\n \n $result = queryDatabase(\"SELECT pk\n FROM user\n WHERE email = '$email'\");\n \n if (mysql_num_rows($result) == 1) {\n header('Location: ' . HOME . 'login.php?feedback=3');\n } else {\n queryDatabase(\"INSERT INTO user (email, password, registered) VALUES ('$email', '$password', '$date')\");\n \n $emailCrypt = HOME . 'login.php?account=' . crypt($email, SALT);\n\n $message = \"Hello $email,\\n\\nTo activate your \" . COMPANY . \" account, please click the link below:\\n\\n$emailCrypt\\n\\nThank you,\\n\" . COMPANY . \" support staff - \" . date('m/d/Y');\n\n mail($email, 'Activate ' . COMPANY . ' account', $message, 'From: ' . EMAIL);\n \n header('Location: ' . HOME . 'login.php?feedback=4');\n }\n}", "function addUser($username, $email, $firstname, $lastname, $gender,$address1,$address2,$country, $contactnumber, $password) {\n\tif(hasNotSensitiveCharacters($username)){\n\t\tif(hasNotSensitiveCharacters($email)){\n\t\t\tif(hasNotSensitiveCharacters($firstname)){\n\t\t\t\tif(hasNotSensitiveCharacters($lastname)){\n\t\t\t\t\tif(hasNotSensitiveCharacters($gender)){\n\t\t\t\t\t\tif(hasNotSensitiveCharacters($address1)){\n\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($address2)){\n\t\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($country)){\n\t\t\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($contactnumber)){\n\t\t\t\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($password)){\n\t\t\t\t\t\t\t\t\t\t\tif($gender != \"Select a gender\" && $country != \"Select a country\"){\n\t\t\t\t\t\t\t\t\t\t\t\tif (!(isUserExistsByUsername($username) || isUserExistsByEmail($email))) { \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\tif(isNonFetchQuerySuccess(\"INSERT INTO user_profile_details (username, first_name, last_name,gender,address_line1,country,email,address_line2,picture_file_path,contact_number) VALUES ('$username', '$firstname','$lastname' , '$gender' , '$address1', '$country', '$email', '$address2', '', '$contactnumber')\")){\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$password = encodeString($password);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (isAdminAlreadyExists($username)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisNonFetchQuerySuccess(\"INSERT INTO user_login (username, password , status) VALUES ('$username', '$password', 'NORMAL USER')\");\n\t\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\tisNonFetchQuerySuccess(\"INSERT INTO user_login (username, password , status) VALUES ('$username', '$password', 'ADMIN USER')\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['firstSignIn'] = \"Successfully signed up! <br> Now you can login here\" ;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tredirect_to(\"home\");\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\treturn \"Registration Failed\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t} else if (isUserExistsByUsername($username)) { \n\t\t\t\t\t\t\t\t\t\t\t\t\treturn \"Username is not available\";\n\t\t\t\t\t\t\t\t\t\t\t\t} else if (isUserExistsByEmail($email)) { \n\t\t\t\t\t\t\t\t\t\t\t\t\treturn \"Email already exists\";\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}else{\n\t\t\t\t\t\t\t\t\t\t\treturn \"Password has Invalid characters\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\treturn \"Contact number has Invalid characters\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\treturn \"Country has Invalid characters\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn \"Address Line 2 has Invalid characters\";\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\treturn \"Address Line 1 has Invalid characters\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn \"Gender has Invalid characters\";\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn \"Last name has Invalid characters\";\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn \"First name has Invalid characters\";\n\t\t\t}\n\t\t}else{\n\t\t\treturn \"Email has Invalid characters\";\n\t\t} \n\t} else{\n\t\treturn \"Username has Invalid characters\";\n\t}\n \n}", "function dataAdd($p_username, $p_salt, $p_hashpwd, $p_fname, $p_lname, $p_email, $p_usertype, $p_publish)\n {\n $result_id = false;\n \n $sql = 'INSERT INTO user ';\n $sql .= '(fkusertypeid, username, userpwd, saltpwd, firstname, lastname, email, isactive) VALUES ';\n $sql .= '(?, ?, ?, ?, ?, ?, ?, ?) ';\n\n $paramtype = 'issssssi';\n \n $paramdata = array(\n 'fkusertypeid' => $p_usertype,\n 'username' => $p_username,\n 'userpwd' => $p_hashpwd,\n 'saltpwd' => $p_salt,\n 'firstname' => $p_fname,\n 'lastname' => $p_lname,\n 'email' => $p_email,\n 'isactive' => $p_publish\n );\n \n parent::stmtPrepare($sql); \n\n parent::stmtSetParamTypeString($paramtype);\n parent::stmtSetParamData($paramdata);\n parent::stmtBindParam();\n \n parent::stmtExecute();\n $result_id = parent::stmtGetInsertedID();\n parent::stmtReset();\n parent::stmtClose(); \n\n return $result_id; \n }", "public function m_insert_supervisor_user(){\n $this->FirstName = $_POST['FirstName'];\n $this->LastName = $_POST['LastName'];\n $this->EmailPN = $_POST['EmailPN'];\n $this->Password = password_hash($_POST['Password'], PASSWORD_DEFAULT);\n //insert value to users table\n $this->db->insert('users', $this);\n }", "function insert_user_loging(){\n /*\n * Algorithm:\n * get all information about user\n * restructure query based on which fields are filled out\n * execute insert on user_logging\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n */\n\n}", "function addUser($connection, $username, $email, $cryptedPw, $salt, $get_emails){\r\n $query = \"INSERT INTO users (name, email, password, salt, gets_emails) VALUES (:username, :email, :cryptedPw, :salt, :get_emails)\";\r\n //$query = \"INSERT INTO users (name, email, password, salt, gets_emails) VALUES ($username, $email, $cryptedPw, $salt, $get_emails);\";\r\n /* $statement = $connection->prepare($query);\r\n $statement->bindValue(\":username\", $username, PDO::PARAM_STR);\r\n $statement->bindValue(\":email\", $email, PDO::PARAM_STR);\r\n $statement->bindValue(\":cryptedPw\", $cryptedPw, PDO::PARAM_STR);\r\n $statement->bindValue(\":salt\", $salt, PDO::PARAM_STR);\r\n $statement->bindValue(\":get_emails\", $get_emails, PDO::PARAM_INT); \r\n $OK = $statement->execute();\r\n\r\n return $OK;\r\n*/\r\n try{\r\n $statement = $connection->prepare($query);\r\n $statement->bindValue(\":username\", $username, PDO::PARAM_STR);\r\n $statement->bindValue(\":email\", $email, PDO::PARAM_STR);\r\n $statement->bindValue(\":cryptedPw\", $cryptedPw, PDO::PARAM_STR);\r\n $statement->bindValue(\":salt\", $salt, PDO::PARAM_STR);\r\n $statement->bindValue(\":get_emails\", $get_emails, PDO::PARAM_INT);\r\n $OK = $statement->execute();\r\n\r\n } catch (Exception $e) {\r\n $e->getMessage();\r\n }\r\n return $OK; \r\n }", "private function registration(){\n\t\tif(empty($_POST['username'])){\n\t\t\t$this->errors[] = \"Username field was empty.\";\n\t\t} else if (empty($_POST['password'])){\n\t\t\t$this->errors[] = \"Password field was empty.\";\t\n\t\t} else if(empty($_POST['email'])){\n\t\t\t$this->errors[] = \"Email field was empty.\";\n\t\t} else if(!preg_match('/^[a-z\\d]{2,20}$/i', $_POST['username'])){\n\t\t\t$this->errors[] = \"Username must be between 3 and 20 characters.\";\n\t\t} else if(strlen($_POST['password']) < 2){\n\t\t\t$this->errors[] = \"Password must be between 3 and 20 characters.\";\n\t\t} else if(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)){\n\t\t\t$this->errors[] = \"Email is not valid.\";\n\t\t}// validation to be continued\n\t\t\n\t\t//$this->connection = new mysqli(HOST_NAME, DB_USER, DB_PASS, DATABASE);\n\t\tif (!$this->connection->set_charset(\"utf8\")) {\n\t\t\t$this->errors[] = $this->connection->error;\n\t\t}//set chars to utf8\n\t\t\n\t\t$this->username = $this->connection->real_escape_string(strip_tags($_POST['username'], ENT_QUOTES));\n\t\t$this->name = $this->connection->real_escape_string(strip_tags($_POST['name'], ENT_QUOTES));\n\t\t$this->email = $this->connection->real_escape_string(strip_tags($_POST['email'], ENT_QUOTES));\n\t\t$password = $_POST['password'];\n\t\t\n\t\t//works only with PHP v5.5+\n\t\t$user_password_hash = password_hash($password, PASSWORD_DEFAULT);\n\t\t\n\t\t//check if user already exist\n\t\t$sql = \"SELECT * FROM users WHERE username = ? OR email = ? \";\n\t\tif($stmt = $this->connection->prepare($sql)){\n\t\t\t$stmt->bind_param(\"ss\", $this->username, $this->email);\n\t\t\t$stmt->execute();\n\t\t\t$check_user = $stmt->num_rows;\n\t\t}\n\t\t\n\t\tif (!$this->connection->connect_errno){\n\n\t\t\t//if($check_user->num_rows > 0){\n\t\t\tif($check_user > 0){\n\t\t\t\t//raise error if duplicate entry\n\t\t\t\t$this->errors[] = \"Sorry, Username or Email already taken.\";\t\n\t\t\t} else {\n\t\t\t\t//prepare statement to insert new user data, validation and sanitation is done by Prepare\n\t\t\t\t$insert = \"INSERT INTO users (username, name, password, email) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\n\t\t\t\tif($stmt->prepare($insert)){\n\t\t\t\t\t$stmt->bind_param(\"ssss\", $this->username, $this->name, $user_password_hash, $this->email);\n\t\t\t\t\tif($stmt->execute()){//returns False on failure\n\t\t\t\t\t\t$this->messages[] = \"Your account has created successfully.\";\n\t\t\t\t\t\t$_SESSION['username'] = $this->username;\n\t\t\t\t\t\t$_SESSION['email'] = $this->email;\n\t\t\t\t\t\t$_SESSION['user_login_status'] = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->errors[] = \"Sorry, registration failed, please try again.\";\n\t\t\t\t\t}//query execute failed\n\t\t\t\t} else {\n\t\t\t\t\t$this->errors[] = \"Sorry, connection to database lost.\";\n\t\t\t\t}//query prepare failed\n\t\t\t}//else \n\t\t} else {\n\t\t\t$this->errors = \"No database connection.\";\n\t\t}//no connection to database\n\t}", "function adduser($data)\n {\n $mysqli = $this->conn;\n\n if (empty($table))\n $table = $this->table;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"INSERT INTO User (\n\t\t\n\t\t\troleID,\n \tcoordinatorID,\t \n\t\t\tfirstName, \n\t\t\tlastName, \n\t\t\tphoneNumber, \n\t\t\tuserName, \n\t\t\temail, \n\t\t\tpassword, \n \tactiveUser) \n\t\t\t\n\t\t\tVALUES (?,?,?,?,?,?,?,SHA1(?),?)\"))\n ) {\n\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n // Creates array of firstName & lastName\n $userNameArray = array($data['firstName'], $data['lastName']);\n // Combines firstName & lastName and adds a . in the middle\n $userName = implode(\".\", $userNameArray);\n //$userName is created as firstName.lastName\n\n // Creates array for phone number using areaCode, phoneBegin, phoneEnd\n $phoneNumberArray = array($data['areaCode'], $data['phoneBegin'], $data['phoneEnd']);\n // Combines areaCode, phoneBegin, and phoneEnd and adds hyphens inbetween to produce a phone number\n $phoneNumber = implode(\"-\", $phoneNumberArray);\n\n // Sets user to active; or yes\n $activeUser = 1;\n\n\n /* Prepared statement, stage 2: bind and execute */\n if (!($stmt->bind_param(\"isssssssi\",\n\n $data['roleID'],\n implode(',', $data['coordinatorID']),\n $data['firstName'],\n $data['lastName'],\n $phoneNumber,\n $userName,\n $data['email'],\n $data['password'],\n $activeUser\n ))\n ) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n }", "function prepareBind($conn)\r\n{\r\n\t// prepare and bind\r\n\t$stmt = $conn->prepare(\"INSERT INTO MyGuests (firstname, lastname, email) VALUES (?, ?, ?)\");\r\n\t$stmt->bind_param(\"sss\", $firstname, $lastname, $email);\r\n\r\n\t// set parameters and execute\r\n\t$firstname = \"John\";\r\n\t$lastname = \"Doe\";\r\n\t$email = \"[email protected]\";\r\n\t$stmt->execute();\r\n\r\n\t$firstname = \"Mary\";\r\n\t$lastname = \"Moe\";\r\n\t$email = \"[email protected]\";\r\n\t$stmt->execute();\r\n\t\r\n\t$firstname = \"Julie\";\r\n\t$lastname = \"Dooley\";\r\n\t$email = \"[email protected]\";\r\n\t$stmt->execute();\r\n\t\r\n\techo \"New records created successfully\";\r\n\r\n\t$stmt->close();\r\n}", "function registrati()\n{\n global $connection;\n if (isset($_POST['registrati'])) {\n $name = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['name']);\n $cognome = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['cognome']);\n $email = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['email']);\n $citta = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['citta']);\n $telefono = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['telefono']);\n $username = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['username']);\n $password = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['password']);\n\n $select_username = \"SELECT * FROM users WHERE user_username='$username'\";\n $result_select = mysqli_query($connection, $select_username);\n\n if (mysqli_num_rows($result_select) == 0) {\n $registrati_dati_user = \"INSERT INTO users (user_name,user_surname,user_username,user_password,user_email,user_phone,user_city,user_livel) VALUES ('$name','$cognome','$username','$password','$email','$telefono','$citta',1)\";\n\n $result_registrati = mysqli_query($connection, $registrati_dati_user);\n\n if ($result_registrati) {\n echo \"<script>\n alert('I datti sono stati registrati');\n window.location.href='loginPage.php';\n </script>\";\n }\n } else {\n echo \"<script>\n alert('Non puoi usare questo username');\n window.location.href='registrati.php';\n </script>\";\n }\n }\n}", "function register(){ \r\n\r\n //call these variables with the global keyword to make them available in the function\r\n global $db ,$errors, $firstname, $lastname, $email, $password;\r\n\r\n //receive all input values from the form. call the e() function\r\n //defined below to escape from values\r\n\r\n $firstname =e( $_POST['name']);\r\n $lastname = e($_POST['lname']);\r\n $email= e($_POST['email']);\r\n $password_1= e($_POST['password']);\r\n $password_2= e($_POST['password1']);\r\n\r\n\r\n // form validation: ensure that the form is correcttly filled\r\n\r\nif(empty($firstname)){\r\n array_push($errors, \"Username is required\");\r\n}\r\nif(empty($lastname)){\r\n array_push($errors, \"Username is required\");\r\n}\r\n\r\nif (empty($email)){\r\n array_push($errors, \"Email is required\");\r\n}\r\n\r\nif (empty($password_1)){\r\n array_push($errors, \"password is required\");\r\n}\r\nif($password_1 != $password_2){\r\n\r\n array_push($errors, \"the passwords does not match\");\r\n}\r\n\r\n//register users if there are no errors in the form\r\nif(count($errors)==0){\r\n $password =md5($password_1);//encrypt the password before saving in the database\r\n\r\n\r\n $q3=mysqli_query($db,\"INSERT INTO artist VALUES ( '','$firstname' , '$lastname', '$email' ,'$password')\");\r\nif($q3)\r\n{\r\n \r\n \r\n session_start();\r\n\r\n \r\n header ('location:artist.php');\r\n \r\n \r\n\r\n }\r\n}\r\n}", "function CreateUser()\n{\n$names = array(\"Micheal\",\"Chika\",\"Yakubu\",\"Bola\",\"Josephine\");\n//Username values\n\n$passwords = array(\"qwe\",\"rty\",\"uio\",\"pas\",\"dfg\");\n//Password headers values\n\n\n$errormsg = \"not allowed (Username must not exceeed 8 characters)\";\n//Error messages for unallowed characters\n\nfunction RandNum3()\n{\n$randnum=\"\";\nfor ($i=0; $i < 3; $i++) \n{\n$randnum.= rand (0,9);\n}\nreturn $randnum;\n}\n//Function to generate random 3 digits\n\nforeach ($names as $index => $user)\n{\nif (strlen($user) < 6) \n//Sort Usernames lower than 6\n{\n$newuser[$index]=$user.RandNum3();\n//add 3 random digits to Username\n}\n\nif (strlen($user) >= 6 && strlen($user) <= 8)\n//Username between 6 and 8\n{\n$newuser[$index]=$user;\n}\n\nif (strlen($user) > 8) \n//Username greater than 8\n{\necho \"<font color='red'>Error</font> <b>\".$user.\"</b> \".$errormsg.\"<br><br>\";\n//Display error\n}\n\n}\n\nforeach ($passwords as $index => $pass)\n{\n$newpass[$index]=$pass.RandNum3().$pass;\n}\n//Generate password from headers\n\n$arrlength = count($newuser);\n\nfor($x = 0; $x < $arrlength; $x++) \n{\n\necho \"<b>Username:\".$newuser[$x].\"<br>Password:\".$newpass[$x].\"</b><br><br>\";\n// Display user details\n} \n}", "public function registration( array $data )\n\t{\n\t\tif( !empty( $data ) ){\n\t\t\t\n\t\t\t// Trim all the incoming data:\n\t\t\t$trimmed_data = array_map('trim', $data); //echo '<pre>'; print_r($trimmed_data);\n\t\t\t// escape variables for security\n\t\t\t$name = mysqli_real_escape_string( $con, $trimmed_data['name'] );\n\t\t\t$nick_name = mysqli_real_escape_string( $con, $trimmed_data['nick_name'] );\n\t\t\tif($nick_name=='')\n\t\t\t{\n\t\t\t\t$new_nick_name = 'lazygamer'.mt_rand(0,10000).''; //echo $new_nick_name; die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_nick_name = $nick_name; //echo $nick_name; die();\n\t\t\t}\n\t\t\t$password = mysqli_real_escape_string( $con, $trimmed_data['password'] );\n\t\t\t$cpassword = mysqli_real_escape_string( $con, $trimmed_data['confirm_password'] );\n\t\t\t$gender = mysqli_real_escape_string( $con, $trimmed_data['gender'] );\n\t\t\t$address = mysqli_real_escape_string( $con, $trimmed_data['address'] );\n\t\t\t$contact_no = mysqli_real_escape_string( $con, $trimmed_data['contact_no'] );\n\t\t\t$file = $_FILES['file']['name'];\t\n\t\t\t\n\t\t\t// Check for an email address:\n\t\t\tif (filter_var( $trimmed_data['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t$email = mysqli_real_escape_string( $con, $trimmed_data['email']);\n\t\t\t} else {\n\t\t\t\tthrow new Exception( \"Please enter a valid email address!\" );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif((!$name) || (!$email) || (!$password) || (!$cpassword) ) {\n\t\t\t\tthrow new Exception( FIELDS_MISSING );\n\t\t\t}\n\t\t\tif ($password !== $cpassword) {\n\t\t\t\tthrow new Exception( PASSWORD_NOT_MATCH );\n\t\t\t}\n\t\t\t$password = md5( $password );\n\t\t\t$query = \"INSERT INTO users (id, name, nick_name, email, password, contactno, gender, shippingAddress, user_picture, regDate) VALUES (NULL, '$name', '$new_nick_name', '$email', '$password', '$contact_no', '$gender', '$address', '$file', CURRENT_TIMESTAMP)\";\n\t\t\tif(mysqli_query($con, $query))return true;\n\t\t} else{\n\t\t\tthrow new Exception( USER_REGISTRATION_FAIL );\n\t\t}\n\t}", "function registerUser()\r\n {\r\n if (CheckExist('ptr:signup:username', 'EMPLOYEES', 'EMAIL', $_POST))\r\n {\r\n echo \"exist\";\r\n return false;\r\n }\r\n else\r\n {\r\n if (isset($_POST))\r\n {\r\n if (!empty($_POST) && !empty($_POST['ptr:signup:username']))\r\n {\r\n $email = filter_var($_POST['ptr:signup:username'], FILTER_SANITIZE_EMAIL);\r\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n echo \"email\";\r\n return false;\r\n }\r\n if ($_POST['ptr:signup:secret2'] === $_POST['ptr:signup:secret1'])\r\n {\r\n $password = $_POST['ptr:signup:secret2'];\r\n }\r\n else\r\n {\r\n echo \"password\";\r\n return false;\r\n }\r\n $ID = filter_var($_POST['ptr:signup:empID'], FILTER_SANITIZE_NUMBER_INT);\r\n $password = password_hash($password, PASSWORD_DEFAULT);\r\n $pdo = connect();\r\n $query= \"INSERT INTO EMPLOYEES (email, password)\r\n VALUES(:email, :password)\";\r\n $prepare = oci_parse($pdo,$query);\r\n oci_bind_by_name($prepare, ':email', $email);\r\n oci_bind_by_name($prepare, ':password', $password);\r\n if(oci_execute($prepare))\r\n {\r\n if (session_id() == '')\r\n {\r\n session_start();\r\n }\r\n else if(isset($_SESSION['email']))\r\n {\r\n unset($_SESSION[\"EMAIL\"]);\r\n unset($_SESSION['EMPID']);\r\n unset($_SESSION['PASSWORD']);\r\n if (isset($_SESSION['INITIAL']))\r\n unset($_SESSION['INITIAL']);\r\n }\r\n $_SESSION['EMPID'] = GrabData('EMPLOYEES', 'EMPID', 'EMAIL', $email)[\"EMPID\"];\r\n $_SESSION['EMAIL'] = $email;\r\n $_SESSION['PASSWORD'] = GrabData('EMPLOYEES', 'PASSWORD', 'EMAIL', $email)[\"PASSWORD\"];\r\n echo \"success\";\r\n return true;\r\n }\r\n else\r\n {\r\n $e = oci_error($prepare); \r\n echo \"There was an error, contact the system adminstrator and copy this error: \" . $e['message']; \r\n }\r\n }\r\n }\r\n }\r\n}", "public function register(){\n\t\t// if the incoming request is of type $_POST[], process it.\n\t\t// else load the form\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST'){ // if POST request, run the validation proccess.\n\t\t\tif (isset($_POST['user_name']))\n\t\t\t\t$user_name = trim($_POST['user_name']);\n\t\t\tif (isset($_POST['email']))\n\t\t\t\t$email = trim($_POST['email']);\n\t\t\t$data = [\n\t\t\t\t'user_name'\t\t\t=> $user_name, //store values here so the user doesnt have to retype it.\n\t\t\t\t'email'\t\t\t\t=> $email,\n\t\t\t\t'password'\t\t\t=> '',\n\t\t\t\t'confirm_password'\t=> '',\n\t\t\t\t'name_error'\t\t=> '',\n\t\t\t\t'email_error'\t\t=> '',\n\t\t\t\t'password_error'\t=> '',\n\t\t\t\t'confirm_password_error' => ''\n\t\t\t];\n\n\t\t\tif (empty($user_name)){\n\t\t\t\t$data['name_error'] = 'Choose a user name.';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase strlen($user_name) < 4 : \n\t\t\t\t\t\t$data['name_error'] = 'User name must be 4 characters or longer.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase strlen($user_name) > 16 :\n\t\t\t\t\t\t$data['name_error'] = 'User name must be 15 characters or shorter.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase !preg_match('/^[A-Z]([a-z0-9])*([_-]){0,1}([a-z0-9])+$/', $user_name) :\n\t\t\t\t\t\t$data['name_error'] = 'User name must start with capital letter and contain characters from A-Z a-z, 0-9, one hyphen at max.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase $this->userModel->userNameExists($user_name) :\n\t\t\t\t\t\t$data['name_error'] = 'User name is taken';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['user_name'] = $user_name;\n\t\t\t\t\t\t$data['name_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($email)){\n\t\t\t\t$data['email_error'] = 'Please provide your email address.';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase !filter_var($email, FILTER_VALIDATE_EMAIL) :\n\t\t\t\t\t\t$data['email_error'] = 'Please provide a valid email address.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase $email !== filter_var($email, FILTER_SANITIZE_EMAIL) :\n\t\t\t\t\t\t$data['email_error'] = 'Please provide a valid email address!';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase $this->userModel->emailExists($email) :\n\t\t\t\t\t\t$data['email_error'] = 'Email already exists.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['email'] = $email;\n\t\t\t\t\t\t$data['email_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($_POST['password'])){\n\t\t\t\t$data['password_error'] = 'Password can\\'t be empty';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase strlen($_POST['password']) > 25 :\n\t\t\t\t\t\t$data['password_error'] = 'Your password should be 25 characters or shorter';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase strlen($_POST['password']) < 5 :\n\t\t\t\t\t\t$data['password_error'] = 'Your password should be 5 characters or longer';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase !preg_match('/^(?=.*\\d)(?=.*[A-Za-z])[A-Za-z\\d]{5,25}$/', $_POST['password']) :\n\t\t\t\t\t\t$data['password_error'] = 'Your password should contain and at least 1 digit and 1 character';\t\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['password'] = $_POST['password'];\n\t\t\t\t\t\t$data['password_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($_POST['confirm_password'])){\n\t\t\t\t$data['confirm_password_error'] = 'Please confirm your password.';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase $_POST['confirm_password'] !== $data['password'] :\n\t\t\t\t\t\t$data['confirm_password_error'] = 'Password does not match.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['confirm_password'] = $_POST['confirm_password'];\n\t\t\t\t\t\t$data['confirm_password_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// registration data is good. send query to model. else reload register page with appropriate errors.\n\t\t\tif (empty($data['name_error']) && empty($data['email_error'])\n\t\t\t\t&& empty($data['password_error']) && empty($data['confirm_password_error'])){\n\t\t\t\t$data['password'] = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\t\t\t\tif ($this->userModel->registerUser($data)){\n\t\t\t\t\t$link = '<a target=\"_blank\" href=\"' . URLROOT . '/users/login?xjk=' . base64_url_encode($this->userModel->getUserId($data['user_name'])) . '&hr=' . md5($data['user_name']) .'\">Click here</a>';\n\t\t\t\t\tmail($data['email'], 'Verify email', 'Hello ' . $data['user_name'] . PHP_EOL . 'Please verify your email by visiting the following link :' . PHP_EOL . $link);\n\t\t\t\t\t$this->view('users/login', $data); // redirect through url to login page\n\t\t\t\t} else {\n\t\t\t\t\t$data['name_error'] = 'Something went wrong!!!';\n\t\t\t\t\t$this->view('users/register', $data); // data is valid but something went wrong in model\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\t$this->view('users/register', $data); // data is not valid\n\n\t\t} else {\n\t\t\t$data = [\n\t\t\t\t'user_name'\t\t\t=> '', // not POST request => load register page with empty data\n\t\t\t\t'email'\t\t\t\t=> '',\n\t\t\t\t'password'\t\t\t=> '',\n\t\t\t\t'confirm_password'\t=> '',\n\t\t\t\t'name_error'\t\t=> '',\n\t\t\t\t'email_error'\t\t=> '',\n\t\t\t\t'password_error'\t=> '',\n\t\t\t\t'confirm_password_error' => ''\n\t\t\t];\n\t\t\t$this->view('users/register', $data);\n\t\t}\n\t}", "function generateUsers()\n\t{\n\t\tglobal $connect;\n\t\tfor($i=0;$i<25;$i++){\n\t\t$sql = 'INSERT INTO USER(ID,FIRSTNAME,LASTNAME,CITY,ADDRESS,POSTALCODE,COUNTRY,EMAIL,PASSWORD,BIRTH) VALUES(NULL,:firstname,:lastname,:city,:address,:postalcode,:country,:email,:password,:birth)';\n\t\t$req = $connect->prepare($sql);\n\t\t$req->execute(array(':firstname' => \"firstname_\".$i,':lastname' => \"lastname_\".$i ,':city' => \"ville_\".$i,':address' => \"address_\".$i,':postalcode' => $i.$i.$i.$i.$i,':country' => \"country_\".$i,':email' => \"email_\".$i.\"@test.fr\",':password' => md5(\"test\"),':birth' => $i.$i.$i.$i.\"/01/\".$i.$i)) or die(print_r($connect->erroInfo()));\n\t\t}\n\t\theader('Location: adminShowUser.php');\n\t}", "function registerUser($emailInput, $usernameInput, $passwordInput, $repeatpasswordInput){\n global $conn;\n\n\n # Checks, if the User let an Input Field empty and sends User back to Login\n if (empty($emailInput) || empty($usernameInput) || empty($passwordInput) || empty($repeatpasswordInput)) {\n header('Location: ../View/Registration.php?error=emptyfields');\n exit();\n\n\n } else {\n\n $username = $usernameInput;\n\n $email = checkEmail($emailInput);\n\n $password = checkPassword($passwordInput, $repeatpasswordInput);\n\n $email = mysqli_real_escape_string($conn, $email);\n $username = mysqli_real_escape_string($conn, $username);\n $password = mysqli_real_escape_string($conn, $password);\n\n $username = replaceSpace($username);\n\n $sql = \"INSERT INTO `user`(`email`, `username`, `password`) VALUES ('\" . $email . \"', '\" . $username . \"', '\" . $password . \"');\";\n mysqli_query($conn, $sql);\n\n header('Location: ../View/LogIn.php?SignUp=Success');\n exit();\n }\n\n\n}", "function create_app_user($db) {\n\t\t\t\t\t$query = \"INSERT INTO app_user VALUES (\n\t\t\t\t\t\t\t\t'$_POST[phone_number]', \n\t\t\t\t\t\t\t\t'$_POST[email]', \n\t\t\t\t\t\t\t\t'$_POST[name]', \n\t\t\t\t\t\t\t\t'$_POST[gender]', \n\t\t\t\t\t\t\t\t'$_POST[dob]',\n\t\t\t\t\t\t\t\t'$_POST[password]'\n\t\t\t\t\t\t\t\t );\";\n\n\t\t\t\t\treturn pg_query($db, $query);\n\t\t\t\t}", "function insert($user)\n{ \n $cmd = 'INSERT INTO ' . TABLE . ' (name, price) ' .\n 'VALUES (:name, :price)';\n $sql = $GLOBALS['db']->prepare($cmd);\n $sql->bindValue(':name', $user['name']);\n $sql->bindValue(':price', $user['price']);\n $sql->execute();\n}", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "public function register(){\n $db = Database::init();\n $sql = \"INSERT INTO CLIENT(NOMC,PRENOMC,SEXE,DATE_DE_NAISSANCE,ADRESSEC,TELEPHONEC,EMAILC,USERC,PASSWORDC,NUM_PASSEPORT) VALUES (:nom,:prenom,:sexe,:daten,:adresse,:tel,:email,:username,:password,:passeport)\";\n $qry = $db->prepare($sql);\n //htmlentities\n $daten = date(\"Y-m-d\", strtotime($this->daten));\n $qry->bindParam(\":nom\",$this->nom,\\PDO::PARAM_STR);\n $qry->bindParam(\":prenom\",$this->prenom,\\PDO::PARAM_STR);\n $qry->bindParam(\":sexe\",$this->sexe,\\PDO::PARAM_STR);\n $qry->bindParam(\":daten\",$daten,\\PDO::PARAM_STR);\n $qry->bindParam(\":adresse\",$this->adresse,\\PDO::PARAM_STR);\n $qry->bindParam(\":tel\",$this->tel,\\PDO::PARAM_STR);\n $qry->bindParam(\":email\",$this->email,\\PDO::PARAM_STR);\n $qry->bindParam(\":username\",$this->username,\\PDO::PARAM_STR);\n $qry->bindParam(\":password\",$this->password,\\PDO::PARAM_STR);\n $qry->bindParam(\":passeport\",$this->passeport,\\PDO::PARAM_INT);\n $qry->execute();\n }" ]
[ "0.64977", "0.6479849", "0.63656586", "0.63578534", "0.6337286", "0.62500536", "0.6245404", "0.62007517", "0.6192037", "0.6191592", "0.61715764", "0.6137734", "0.6136647", "0.6136335", "0.61072147", "0.6105207", "0.61049545", "0.6098253", "0.60967386", "0.60888857", "0.6076365", "0.6076128", "0.6061647", "0.6057733", "0.6053124", "0.60509956", "0.6043649", "0.60402185", "0.60289264", "0.6015202", "0.601327", "0.6010408", "0.60084665", "0.6000433", "0.5990876", "0.5988568", "0.59636205", "0.5963166", "0.59561694", "0.594467", "0.5913799", "0.5896847", "0.588424", "0.58841497", "0.5871471", "0.58607846", "0.5859897", "0.58591014", "0.58558345", "0.5844079", "0.5842895", "0.5842557", "0.58421904", "0.58408195", "0.5831316", "0.5829363", "0.5819906", "0.5816456", "0.5814062", "0.581359", "0.5812951", "0.58124995", "0.5808448", "0.5806691", "0.58053756", "0.58013403", "0.5797229", "0.5797047", "0.5788792", "0.5784684", "0.5771424", "0.5766226", "0.5765698", "0.5757931", "0.5751573", "0.5750018", "0.57487494", "0.574797", "0.5742422", "0.573735", "0.5732677", "0.5731857", "0.5731717", "0.5725932", "0.57257706", "0.571862", "0.57175887", "0.5715496", "0.5708079", "0.5703708", "0.57003474", "0.5689511", "0.56833965", "0.56782067", "0.56773406", "0.5665322", "0.56637317", "0.5663531", "0.5662661", "0.5662536", "0.56573147" ]
0.0
-1
Update a user's record using data from client update form. Sort data entries as done in addUser method
public static function updateUser($userData) { $db = DB::getInstance(); $id = $userData['id']; $sorted = $userData; // Remove user id before sorting so it can be added to the end // of the soon to be sorted array unset($sorted['id']); uksort($sorted, function ($val1, $val2) { return strncmp($val1, $val2, 2); }); $updates = self::prepareUpdate($sorted); // Add user id back in array_push($sorted, $id); try { $statement = $db->prepare("UPDATE `users` SET $updates"); $statement->execute(array_values($sorted)); $mssg = "Transaction successful, user updated"; } catch (Exception $e) { $db->rollBack(); $mssg = $e->getMessage(); } return $mssg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"PUT\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t\texit;\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['user_name']) && isset($_POST['password']) && isset($_POST['_id'])){\n\t\t\t\t\t$user_id = $_POST['_id'];\n\t\t\t\t\t$array['user_name'] = $_POST['user_name'];\n\t\t\t\t\t$array['password'] = $_POST['password'];\n\t\t\t\t\t$result = $this->model->setUser($array, \"_id='\".$user_id.\"'\");\n\t\t\t\t\tif($result) {\n\t\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t\t$response_array['message']='One record updated.';\n\t\t\t\t\t\t$update = $this->model->getUser('*',\"_id = \".\"'\".$user_id.\"'\");\n\t\t\t\t\t\t$response_array['data']=$update;\n\t\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t\t$response_array['message']='no record updated';\n\t\t\t\t\t\t$response_array['data']='';\n\t\t\t\t\t\t$this->rest->response($response_array, 304);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->rest->response('No parameters given',204);\t// If no records \"No Content\" status\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\t\n\t\t\t}\n\t\t\t\n\n\t\t}", "public function testUpdateUser()\n {\n }", "private function updateUser(){\n\t\t$data['datosUsuario'] = $this->users->get($_REQUEST[\"idusuario\"]);\n\t\t$data['tipoUsuario'] = Seguridad::getTipo(); \n\t\tView::show(\"user/updateForm\", $data);\n\t}", "public function updateUser($data) {\n\t\t\n\t}", "public function update(){\n\t\t\t$record = $this->modelGetrenter_user();\n\t\t\tinclude \"Views/AccountUpdateView.php\";\n\t\t}", "public function update()\n {\n $userId = Helper::getIdFromUrl('user');\n\n // Save post data in $user\n $user = $_POST;\n \n // Save record to database\n UserModel::load()->update($user, $userId);\n\n View::redirect('user/' . $userId);\n }", "public function editUser()\n {\n\n $this->displayAllEmployees();\n $new_data = [];\n $id = readline(\"Unesite broj ispred zaposlenika čije podatke želite izmjeniti: \");\n\n $this->displayOneEmployees( $id);\n\n foreach ( $this->employeeStorage->getEmployeeScheme() as $key => $singleUser) { //input is same as addUser method\n\n $userInput = readline(\"$singleUser : \");\n $validate = $this->validateInput($userInput, $key);\n\n while (!$validate)\n {\n $userInput = readline(\"Unesite ispravan format : \");\n $validate = $this->validateInput($userInput, $key);\n\n }\n if ($key === 'income'){\n $userInput = number_format((float)$userInput, 2, '.', '');\n }\n\n $new_data[$key] = $userInput;\n\n }\n $this->employeeStorage->updateEmployee($id, $new_data); //sends both id and data to updateEmployee so the chosen employee can be updated with new data\n\n echo \"\\033[32m\". \"## Izmjene za \". $new_data['name'].\" \". $new_data['lastname'].\" su upisane! \\n\\n\".\"\\033[0m\";\n\n }", "function UpdateUser() {\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USER_TYPE] = $this->reseller->getUserType();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USERNAME] = $this->reseller->getUserLoginName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EMAIL_ID] = $this->reseller->getEmailId();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CONTACT_NO] = $this->reseller->getMobileNo();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_FULL_NAME] = $this->reseller->getFullName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ADDRESS] = $this->reseller->getAddress();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CITY] = $this->reseller->getCity();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_REGION] = $this->reseller->getRegion();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_COUNTRY] = $this->reseller->getCountry();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DOMAIN_NAME] = $this->reseller->getDomainName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EXPIRY_DATE] = $this->reseller->getExpiryDate();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ENABLE_CMS] = $this->reseller->getEnableCMS();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USER_STATUS] = $this->reseller->getUserStatus();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_NEWPASSWORD] = $this->reseller->getNewPassword();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DLT_ENTITY_ID] = $this->reseller->getDltEntityId();\n $response = new sgc_callapi(sgc_constant::SGC_API, sgc_constant::SGC_ENDPOINT_RESELLER_UPDATE_USER, $this->data, $this->header, sgc_common_api_params::API_COMMON_METHOD_POST, $this->useRestApi);\n\t\t\treturn $response->getResponse();\n\t\t}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "public function postUserupdate(){\n \n $uid = Input::get('user_id');\n $user = User::find($uid);\n if($user != ''){\n $user->email = Input::get('useremail');\n $user->fullname = Input::get('fullname');\n $user->category = Input::get('category');\n $user->language = Input::get('language');\n $user->enable = Input::get('enable');\n $user->save();\n return Redirect::to('admin/edituser/'.$uid)\n ->with('message', 'User data updated!');\n }else{\n return Redirect::to('admin/edituser/'.$uid)\n ->with('message', 'No such user!');\n }\n\n }", "public function update()\n { if (is_null($this->id))\n trigger_error(\"User::update(): Attempt to update a User object that does not have its ID property set.\", E_USER_ERROR);\n \n // Update the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"UPDATE users SET user_name=:user_name, user_password_hash=:user_password_hash, user_email=:user_email, orcid=:orcid, orcid_code=:orcid_code, orcid_access_token=:orcid_access_token WHERE user_id = :id\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":user_name\", $this->userName, PDO::PARAM_STR);\n $st->bindValue(\":user_password_hash\", $this->userPasswordHash, PDO::PARAM_STR);\n\t$st->bindValue(\":user_email\", $this->userEmail, PDO::PARAM_STR);\n $st->bindValue(\":orcid\", $this->orcid, PDO::PARAM_STR);\n $st->bindValue(\":orcid_code\", $this->orcidCode, PDO::PARAM_STR);\n $st->bindValue(\":orcid_access_token\", $this->orcidAccessToken, PDO::PARAM_STR);\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "public function Update( )\n {\n\t\t\t$password = \"\";\n\t\t\tif( $this->password!=\"\" )\n\t\t\t{\n\t\t\t\t$password = $this->password;\n\t\t\t}\n\t\t\t\n $dataArray = array( \"userInfo\" =>array( \"email\"=>$this->email,\n\t\t\t\t\t\t\t\t\t\t\t\t \"username\"=>$this->username,\n \"firstname\"=>$this->firstname,\n \"lastname\"=>$this->lastname,\n \"password\"=>$password,\n \"gender\"=>$this->gender,\n \"yearOfBirth\"=>$this->yearOfBirth,\n \"phone\"=>$this->phone,\n \"mobile\"=>$this->mobile,\n \"addressLine1\"=>$this->addressLine1,\n \"addressLine2\"=>$this->addressLine2,\n \"addressCity\"=>$this->addressCity,\n \"addressState\"=>$this->addressState,\n \"addressCountry\"=>$this->addressCountry,\n \"addressZipCode\"=>$this->addressZipCode,\n \"interests\"=>$this->interests,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"newsletters\"=>intval($this->newsletters)\n )\n );\n\t\t\t//Check if isAdmin exists\n\t\t\tif( isset($this->isAdmin) )\n\t\t\t{\n\t\t\t\t$tempArray = array(\"isAdmin\"=>intval($this->isAdmin));\t\t\t\t\n\t\t\t\t$dataArray = array_merge($dataArray,$tempArray);\n\t\t\t}\n\t\t\t\n\t\t\t//Check if recordStatus exists\n\t\t\tif( isset( $this->recordStatus ) )\n\t\t\t{\n\t\t\t\t$tempArray = array(\"recordStatus\"=>intval($this->recordStatus));\n\t\t\t\t$dataArray = array_merge($dataArray,$tempArray);\n\t\t\t}\n\t\t\t//Check if facebook details are provided for update\n\t\t\tif( isset( $this->facebookDetails ) )\n\t\t\t{\n\t\t\t\t$tempArray = array(\"facebookDetails\"=>$this->facebookDetails);\n\t\t\t\t$dataArray = array_merge($dataArray,$tempArray);\n\t\t\t}\n\t\t\t//Check if twitter details are provided for update\n\t\t\tif( isset( $this->twitterDetails ) )\n\t\t\t{\n\t\t\t\t$tempArray = array(\"twitterDetails\"=>$this->twitterDetails);\n\t\t\t\t$dataArray = array_merge($dataArray,$tempArray);\n\t\t\t}\n\t\t\t\n\t\t\t//Check if isDataAdmin field is set\n\t\t\tif( isset( $this->isDataAdmin ) )\n\t\t\t{\n\t\t\t\t$tempArray = array(\"isDataAdmin\"=> $this->isDataAdmin );\t\t\t\t\n\t\t\t\t$dataArray = array_merge( $dataArray, $tempArray );\n\t\t\t}\n\t\t\t\n $response = ServiceAPIUtils::CallAPIService( $dataArray,\"/User/Update/\".$this->id, \"json\" );\n \n return $response;\n }", "public function p_edit() { if(!$this->user) {\n Router::redirect('/');\n }\n \n $this->user->user_id = DB::instance(DB_NAME)->sanitize($this->user->user_id);\n $q = 'SELECT first_name, last_name, email\n FROM users\n WHERE user_id = \"'.$this->user->user_id.'\"';\n $user = DB::instance(DB_NAME)->select_row($q);\n \n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n \n $_POST['first_name'] = htmlspecialchars($_POST['first_name'], ENT_QUOTES, 'UTF-8');\n $_POST['last_name'] = htmlspecialchars($_POST['last_name'], ENT_QUOTES, 'UTF-8');\n \n $q = 'SELECT count(*)\n FROM users\n WHERE email = \"'.$_POST['email'].'\"'; \n $count = DB::instance(DB_NAME)->select_rows($q); \n //if the user enters an email which already exists in the data base kick them back\n if(intval($count[0]['count(*)']) >= 1) {\n Router::redirect('/users/edit/error');\n } else {\n \n if($_POST['first_name'] != NULL)\n {\n $user['first_name'] = $_POST['first_name'];\n }\n if($_POST['last_name'] != NULL )\n {\n $user['last_name'] = $_POST['last_name'];\n }\n if($_POST['email'] != NULL )\n {\n $user['email'] = $_POST['email'];\n }\n \n \n \n DB::instance(DB_NAME)->update(\"users\", $user, \"WHERE user_id =\".$this->user->user_id);\n Router::redirect('/users/profile/'.$this->user->user_id);\n }\n \n \n }", "public function api_entry_setprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n $arg = $this->safeArray(array('fullname', 'avatar', 'church', 'city', 'province', 'bday', 'mood'), $_POST);\n\n $arg['id'] = $_POST[\"user\"];\n\n if (count($arg) == 1)\n parent::returnWithErr(\"You should pass the profile 1 entry at least to update.\");\n\n $user = $this->Mdl_Users->update($arg);\n\n if ($user == null)\n parent::returnWithErr(\"Profile has not been updated.\");\n\n parent::returnWithoutErr(\"Profile has been updated successfully.\", $user);\n }", "public function updateUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$data = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\t\t\t$userModel->fill($data);\n\t\t\t$userModel->save();\n\t\t\treturn $this->sendResponse('Your details have been successfully updated');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to update this account');\n }", "public function update($user)\n {\n }", "public function update():void\n {\n $id = $this->id;\n $first_name = $this->first_name;\n $last_name = $this->last_name;\n $image = $this->image;\n $user_type = $this->user_type;\n $address = $this->address;\n\t\t$phone = $this->phone;\n $this->fetch(\n 'UPDATE user\n SET first_name = ?,\n last_name = ?,\n image = ?,\n user_type = ?,\n address=?,\n phone=?\n WHERE id = ?;',\n [$first_name, $last_name,$image, $user_type,$address ,$phone , $id]\n );\n }", "public function update()\n {\n //print_r(Input::get('skills', [])); print_r(Input::get('skill_levels', []));die();\n $user = $this->_user;\n $user->update(Input::only(['first_name', 'last_name']));\n\n $dob = Input::get('year_dob', '0000') . '-' . Input::get('month_dob', '00') . '-' . Input::get('date_dob', '00');\n\n if ($dob != '0000-00-00' && $dob != $user->dob)\n $user->dob = $dob;\n $user->contact_frequency = Input::get('emails_per_week', 0);\n $user->first_name = Input::get('first_name');\n $user->last_name = Input::get('last_name');\n $user->english_level = Input::get('english_level');\n $user->ethnicity_id = Input::get('ethnicity');\n $user->gender = Input::get('gender');\n $user->contact_frequency = Input::get('emails_per_week');\n\n if( Input::has('desired_payment') )\n {\n if( is_array(Input::get('desired_payment')) )\n $user->desired_payment = array_sum(Input::get('desired_payment'));\n }\n\n $options = array_merge(Input::get('attributes', []), Input::get('capabilities', []), Input::get('work_option', []));\n\n $user->option()->sync($options);\n $user->desiredWorkType()->sync(Input::get('desired_job_type'));\n $user->desiredLocation()->sync(Input::get('job_location'));\n\n $user->massUpdateSchoolQualification(Input::get('qual_type', []), Input::get('qual_subject_type', []),\n Input::get('qual_subject_name', []), Input::get('qual_result', []), Input::get('school-id', []));\n\n $user->massUpdateLanguage(Input::get('languages', []), Input::get('languages_level', []), Input::get('language-id', []));\n $user->updateAvailability(Input::get('availability'), Input::get('availability_month'), Input::get('availability_year'));\n $user->massUpdateSkills(Input::get('skills', []), Input::get('skill_levels', []));\n $user->massUpdateDegree(Input::get('degree_type', []), Input::get('degree_uni', []), Input::get('degree_subject', []),\n Input::get('degree_subject_name', []), Input::get('degree_result', []), Input::get('degree_graduation', []),\n Input::get('degree-id', []));\n $user->massUpdateSocial(Input::get('society_category', []), Input::get('society_position', []), Input::get('society_name'), Input::get('social-id'));\n $user->massUpdateSport(Input::get('sport_category'), Input::get('sport_level', []), Input::get('sport_position', []), Input::get('sport-id', []));\n $user->massUpdateWork(Input::get('work_type', []), Input::get('work_length', []), Input::get('work_sector', []),\n Input::get('work_organisation', []), Input::get('work-experience-id', []));\n\n $user->save();\n \n return Redirect::to(route('profile.edit'));\n }", "public function updateAction($userId) {\r\n\t\t// When submit information of user\r\n\t\tif ($this->request->isPost ()) {\r\n\t\t\t$updateUser = Users::findFirst ( $this->request->get ( \"id\" ) );\r\n\t\t\t$updateUser->firstname = $this->request->get ( \"first_name\" );\r\n\t\t\t$updateUser->lastname = $this->request->get ( \"last_name\" );\r\n\t\t\t$updateUser->bithday = $this->request->get ( \"date\" );\r\n\t\t\t$updateUser->save ();\r\n\t\t\treturn $this->dispatcher->forward ( array (\r\n\t\t\t\t\t'action' => 'index' \r\n\t\t\t) );\r\n\t\t} else {\r\n\t\t\t// When click to select user to update\r\n\t\t\t$this->view->user = Users::findFirst ( $userId );\r\n\t\t}\r\n\t}", "public function actionUpdate()\n\t{\n\t if (!Yii::app()->user->checkAccess('admin')){\n\t\t\treturn $this->actionView();\n\t }\n\t\t$this->model = DrcUser::loadModel();\n\t\tif($this->model===null)\n\t\t\tthrow new CHttpException(404,'The requested user does not exist.');\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_edit',\n\t\t\t'contentTitle' => 'Update User Data',\n\t\t\t'createNew'=>false,\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'action'=>Yii::app()->createUrl(\"user/save\", array('username'=>$this->model->username)),\n\t\t));\n\t}", "public function user_updated( $ui ) {\n\n //fish out all the needed params\n $dirty_phone_number = $ui->getAttribute('phone_number');\n $full_country_code = (string)$ui->getAttribute('phone_country_code');\n $email_addr = $ui->getUserEmail();\n\n //and request the update\n self::updateUserAuthy( $ui, $email_addr, $dirty_phone_number, $full_country_code );\n }", "public function actionUpdate()\n {\n $model = $this->loadModel();\n\n if (isset($_POST['User']))\n {\n $model->attributes = $_POST['User'];\n\n if ($model->save())\n {\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Данные обновлены!'));\n\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "function updateUser (){\n\t\t$params = array(\n\t\t\t':idusuarios' => $_SESSION['idusuarios'],\n\t\t\t':nombres' => $_POST['nombres'],\n\t\t\t':apellidos' => $_POST['apellidos'],\n\t\t\t':direccion' => $_POST['direccion'],\n\t\t\t':foto' => $_POST['foto'],\n\t\t\t':email' => $_POST['email'],\n\t\t\t':usuario' => $_POST['usuario'],\n\t\t\t':contrasena' => $_POST['contrasena'],\n\t\t);\n\n\t\t/* Preparamos el query apartir del array $params*/\n\t\t$query ='UPDATE usuarios SET\n\t\t\t\t\tnombres = :nombres,\n\t\t\t\t\tapellidos = :apellidos,\n\t\t\t\t\tdireccion = :direccion,\n\t\t\t\t\tfoto = :foto,\n\t\t\t\t\temail = :email,\n\t\t\t\t\tusuario = :usuario,\n\t\t\t\t\tcontrasena = :contrasena \n\t\t\t\t WHERE idusuarios = :idusuarios;\n\t\t\t\t';\n\n\t\t$result = excuteQuery(\"blogs\", \"\", $query, $params);\n\t\tif ($result > 0){\n\t\t\tunset($_SESSION['idusuarios']);\n\t\t\t$_SESSION['idusuarios'] = NULL;\n\t\t\theader('Location: viewUsers.php?result=true');\n\t\t}else{\n\t\t\theader('Location: editUser.php?result=false');\n\t\t}\n\t}", "public function updateUser( UserDataInf $user )\n {\n \n $userName = $user->getName();\n \n $userId = $this->getUserId( $userName );\n $passwd = Password::passwordHash( $user->getPasswd() );\n \n $sqlUser = <<<SQL\nUPDATE wbfsys_role_user\nSET\n name = '{$userName}', \n inactive = FALSE, \n non_cert_login = TRUE,\n profile = '{$user->getProfile()}',\n level = '{$user->getLevel()}',\n password = '{$passwd}'\nWHERE rowid = {$userId}\n;\nSQL;\n \n $this->db->update( $sqlUser );\n \n $personId = $this->db->select( 'SELECT id_person from wbfsys_role_user where rowid = '.$userId );\n \n \n $sqlPerson = <<<SQL\nUPDATE core_person\nSET\nfirstname = '{$user->getFirstname()}', \nlastname = '{$user->getLastname()}'\nWHERE rowid = {$personId};\nSQL;\n\n $this->db->update( $sqlPerson );\n \n }", "function updateUser(){\n\t$conn = db_connect();\n\n\tif(isset($_GET['id']) && (int)$_GET['id'] > 0){#proper data must be on querystring\n\t\t$myID = (int)$_GET['id']; #Convert to integer, will equate to zero if fails\n\t}\n\n\tif(isset($_POST['firstname'])){$firstName=$_POST['firstname'];}else{$firstName = '';}\n if(isset($_POST['lastname'])){$lastName=$_POST['lastname'];}else{$lastName = '';}\n if(isset($_POST['userPhone'])){$userPhone=$_POST['userPhone'];}else{$firstName = '';}\n if(isset($_POST['userEmail'])){$userEmail=$_POST['userEmail'];}else{$lastName = '';}\n if(isset($_POST['type'])){$type=$_POST['type'];}else{$type = '';}\n\n\t$sql = \"UPDATE users set firstName='%s',lastName='%s',PhoneNumber='%s',EmailAddress='%s',TypeId=%d WHERE UserId = \" . $myID;\n\n\t$sql = sprintf($sql,$firstName,$lastName, $userPhone,$userEmail, $type);\n\t$result = mysqli_query($conn,$sql); \n \n\tif ($result)\n\t{#successful update!\n\t\t$newURL = 'detail.php?id=' . $myID;\n\t}else{\n\t\t$newURL = 'edit.php?id=' . $myID;\n\t}\n\theader('Location: '.$newURL);\n die();\n}", "function update ( $post ) {\n if ( !isset($post['id']) || !User::exists($post['id']) ) {\n \t$_SESSION['fail'] = \"You must select a user\";\n \theader( 'Location: index.php?action=index');\n \texit;\n }\n \n // get the existing user\n $user = User::find( 'first', $post['id']);\n \n // update the values\n $user->first_name = $post['first_name'];\n $user->last_name = $post['last_name'];\n $user->email = $post['email'];\n \n // if the password has been set\n if ( !empty($post['password'])) {\n \t$user->password = $post['password'];\n \t$user->confirm_password = $post['confirm_password'];\n }\n \n \n $user->role = $post['role'];\n \n //save the user\n $user->save(false);\n \n // check if save method\n if ($user->is_invalid()) {\n \t// set the massage\n \t$_SESSION['fail'][] = $user->error->full_messagr();\n \t$_SESSION['fail'][] = 'The user could not be updated.';\n \t\n \t// redirect\n \theader( 'Location: index.php?action=edit&id=' . $user->id);\n \texit;\n }\n \n // refresh session (when login user and updated user are same user)\n if ($user->id == $_SESSION['id']) {\n \t$_SESSION['role'] = $user->role;\n \t$_SESSION['email'] = $user->email;\n }\n \n // set the success message and redirect\n $_SESSION['success'] = 'User was updated successfully.';\n header('Location: index.php?action=index');\n }", "public function update_userdetails($data)\n {\n foreach($data as $key=>$val) $$key=get_magic_quotes_gpc()?$val:addslashes($val);\n $userId = Yii::$app->user->id;\n\n $query = new Query;\n\n $result = $query->createCommand()->update('core_users', ['user_name' => $name,'company_name' => $company_name,'company_address' => $address,'designation' => $designation,'company_email' => $company_email], 'user_id = \"'.$userId.'\"')->execute();\n\n if ($result == 1){\n return \"SUCCESS\";\n }else{\n return \"FAILED\";\n }\n }", "function updateUser()\r\n {\r\n return $this->UD->user_update($_GET['uid']);\r\n }", "public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}", "public function update_userdetails_by_admin($data)\n {\n foreach($data as $key=>$val) $$key=get_magic_quotes_gpc()?$val:addslashes($val);\n \n $query = new Query;\n\n $result = $query->createCommand()->update('core_users', ['user_name' => $name,'company_name' => $company_name,'company_address' => $address,'designation' => $designation,'company_email' => $company_email], 'user_id = \"'.$userid.'\"')->execute();\n\n if ($result == 1){\n return \"SUCCESS\";\n }else{\n return \"FAILED\";\n }\n }", "public function update()\n\t{\n\t\t$this->user->db_update();\n\t}", "function updateUser() {\n\t\t$rating = $this -> getTaskRating();\n\t\t$sql = \"Update Users set finishedBasic=1, userRating=userRating+\" . $rating . \" where UID= (Select t.UID from Task t WHERE t.TaskId=\" . $this -> data[0]['TaskId'] . \")\";\n\t\t$stmt = $this -> DB -> prepare($sql);\n\t\tif ($stmt -> execute()) {\n\t\t\t$this -> checkforLast();\n\t\t} else {\n\t\t\tinclude_once \"Email.php\";\n\t\t\tnew Email('failed', 'to update user with TaskId=' . $this -> data[0]['TaskId'], $this -> id);\n\t\t}\n\t}", "public function update_user($data) {\n\t\t$user_data=array('user_type' =>$data['user_type'] ,\n\t\t\t'first_name' =>$data['first_name'] ,\n\t\t\t'last_name' =>$data['last_name'] ,\n\t\t\t'status' =>$data['status'] \n\t\t);\n\t\t$this->db->where('id',$data['id']);\n\t\treturn $this->db->update('users',$user_data);\n\t}", "public function updateUser() {\n //validations\n if ($this->updateUserValidator()->fails()) {\n return redirect()->back()\n ->withErrors($this->updateUserValidator())\n ->withInput();\n }\n\n //update logic\n $updateArray = [\n \"first_name\" => $this->request->input(\"first_name\"),\n \"last_name\" => $this->request->input(\"last_name\"),\n \"username\" => $this->request->input(\"username\"),\n \"email\" => $this->request->input(\"email\"),\n \"address\" => $this->request->input(\"address\"),\n \"country\" => $this->request->input(\"country\"),\n \"pincode\" => $this->request->input(\"pincode\"),\n \"mobileno\" => $this->request->input(\"mobileno\"),\n \"updated_by\" => $this->request->session()->get('user_id'),\n ];\n\n\n if (strlen($this->request->input(\"password\")) > 0) {\n $updateArray[\"password\"] = Hash::make($this->request->input(\"password\"));\n }\n\n\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }", "public function update($user_id)\n\t{\n\t\t//\n\t}", "public function p_editProfile() {\n\t$_POST['modified'] = Time::now();\n \n $w = \"WHERE user_id = \".$this->user->user_id;\n\t\t\n\t# Insert\n\tDB::instance(DB_NAME)->update(\"users\", $_POST, $w);\n \n Router::redirect(\"/users/profile\");\n\n }", "public function updating(User $user)\n {\n //\n }", "public static function updateUserDetails($updatedData){\n $response = array(\n \"successful\" => false,\n \"errors\" => array()\n );\n\n // Validating the data provided in the request\n $validateData = InputData::validate($updatedData, array(\n \"required\" => array(\"first_name\", \"last_name\", \"email\"),\n \"string\" => array(\"first_name\", \"last_name\", \"email\"),\n \"email\" => array(\"email\")\n ));\n\n // Checking if the user is also changing their password (based on a hidden\n // input that would have been added to the form client side, if they had\n // clicked the \"updatePassword\" button)\n if(isset($updatedData[\"password_change\"])){\n // Validating the data provided in the request\n $validatePasswordData = InputData::validate($updatedData, array(\n \"required\" => array(\"password\", \"confirm_password\"),\n \"string\" => array(\"password\", \"confirm_password\"),\n \"enum\" => array(\"password\" => array($_POST[\"confirm_password\"]))\n ));\n\n // Multiplying the \"dataValidated\" boolean of the response associative array by\n // the boolean result of the passwordData validation. Storing the result\n // in the \"dataValidated\" property of the response associative array i.e. the initial\n // data may have been valid, but if the password data was not then\n // true * false = false (1 * 0 = 0)\n $validateData[\"dataValidated\"] *= $validatePasswordData[\"dataValidated\"];\n\n // Looping through any errors from the password validation, and adding them\n // to the original validation's error message array\n foreach($validatePasswordData[\"errors\"] as $key => $value){\n array_push($validateData[\"errors\"], $value);\n }\n }\n\n // Checking if the user is adding or updating their address(based on a hidden\n // input that would have been added to the form client side, if they had\n // clicked the \"addAddress\" button)\n if(isset($updatedData[\"address_new\"]) || isset($updatedData[\"address_change\"])){\n // Validating the data provided in the request\n $validateAddressData = InputData::validate($updatedData, array(\n \"required\" => array(\"houseName\", \"street\", \"town\", \"county\", \"country\", \"zipCode\"),\n \"string\" => array(\"houseName\", \"street\", \"town\", \"county\", \"country\", \"zipCode\")\n ));\n\n // Multiplying the \"dataValidated\" boolean of the response associative array by\n // the boolean result of the addressData validation. Storing the result\n // in the \"dataValidated\" property of the response associative array i.e. the initial\n // data may have been valid, and the passwordData (if provided) may have been\n // valid, but if the addressData was not then true * false = false (1 * 0 = 0)\n $validateData[\"dataValidated\"] *= $validateAddressData[\"dataValidated\"];\n\n // Looping through any errors from the address validation, and adding them\n // to the original validation's error message array\n foreach($validateAddressData[\"errors\"] as $key => $value){\n array_push($validateData[\"errors\"], $value);\n }\n }\n\n // Checking if all the supplied data has been validated (note - if the user is\n // updating the contact details, password and address, all three validations must be\n // passed for this value to be true\n if ($validateData[\"dataValidated\"]) {\n // Sanitising all of the supplied data from the request\n $sanitisedData = InputData::sanitise($_POST);\n\n // Updating the user's details in the database, and determing if the update was\n // successful based on the response from the database\n $response[\"successful\"] = Database::updateUserDetails($sanitisedData);\n } else {\n // Looping through any errors reported by the data validations, and adding\n // them to the response associative array's errors array\n foreach($validateData[\"errors\"] as $key => $value){\n array_push($response[\"errors\"], $value);\n }\n }\n return $response;\n }", "public function actionUpdate() {\r\n\r\n //common view data\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n \r\n $errors = [];\r\n $success = null;\r\n \r\n //check if the user is logged in and get User $user properties from the database\r\n $userID = $this->checkLogged();\r\n \r\n $user = new User;\r\n $user = $user->getUserById($userID);\r\n \r\n if(!$user) {\r\n $errors['firstname'][0] = 'Unable to find user. Please, try again later';\r\n } else {\r\n //user properties\r\n $firstname = $user->firstname;\r\n $lastname = $user->lastname;\r\n $email = $user->email;\r\n } \r\n \r\n //check if the form has been submitted\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n \r\n $firstname = $this->test_input($_POST['firstname']);\r\n $lastname = $this->test_input($_POST['lastname']);\r\n $email = $this->test_input($_POST['email']);\r\n \r\n //create form model, validate it and if success - update user profile\r\n $model = new EditProfileForm($userID, $firstname, $lastname, $email);\r\n \r\n if(!$model->validate()) {\r\n $errors = $model->errors;\r\n } else {\r\n #!!!!!!!!!!!!!\r\n $success = $model->updateProfile() ? 'USER DATA SUCCESFULLY UPDATED': 'UNABLE TO UPDATE USER PROFILE. TRY AGAIN LATER';\r\n }\r\n }\r\n \r\n include_once ROOT . '/views/profile/update.php';\r\n }", "public function updateUser($userId=-1,$firstName=null, $lastName=null, $userName=null, $password=null, $emailAddress=null,$studentId=null, $major=null, $address=null);", "public function updateUserinfo()\n\t{\n\t\t$user_array = Session::all();\n\n \t$userID = Session::get('id');\n\t\t$data = $this->request->all();\n\t\t$data['user'] = Auth::user();\n\t\t\t$rules = array(\n \t\t'full_name' => 'required',\n\t\t\t\t'zip_code' => 'required',\n\t\t\t\t'aniversary_date' => 'required',\n\t\t\t\t'phone_number' => 'required',\n\t\t\t\t'dob' => 'required',\n\t\t\t\t'gender' => 'required',\n\t\t\t\t'location_id' => 'required'\t\t\t\t\n\t\t\t);\n\n\t\t\t$message = array(\n\t\t\t\t'required' => 'The :attribute is required', \n\t\t\t);\n\n\t\t\t$validation = Validator::make($data, $rules, $message);\n\n\t\t\tif($validation->fails())\n\t\t\t{\n\t\t\t\treturn Redirect::to('/users/updateinfo')->withErrors($validation);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n \t$arrResponse=Profile::updateProfileWeb($data, $userID);\n \treturn Redirect::to('/users/myaccount')\n\t\t ->with('flash_notice', '');\n\t\t }\n\t}", "function updateUser($data){\r\n global $pdo;\r\n if($data['pwd']!=''){\r\n\t\t$update = $pdo->prepare(\"UPDATE users \r\n SET `first_name`= ?,`email`= ?, `password`= ?, \r\n `username`= ?, `type`= ?, `role`= ? \r\n WHERE id= ?\");\r\n $update->execute(array($data['name'], $data['email'], $this->getPasswordHashOfUser($data['userName'],$data['pwd']), \r\n $data['userName'], $data['userType'], $data['role'], $data['userId']));\r\n\r\n //update the password log\r\n $this->updatePasswordLog($this->getPasswordHashOfUser($data['userName'],$data['pwd']));\r\n\r\n }else{\r\n $update = $pdo->prepare(\"UPDATE users \r\n SET `first_name`= ?,`email`= ?, \r\n `username`= ?, `type`= ?, `role`= ? \r\n WHERE id= ?\");\r\n $update->execute(array($data['name'], $data['email'],$data['userName'], \r\n $data['userType'], $data['role'], $data['userId']));\r\n }\r\n\t\t\t\t\t$log = debug_backtrace();\r\n\t\t\t\t\t$this->createActionLog($log);\r\n\t\t\t\t\treturn true;\r\n\t}", "function edit(){\n if (!empty($this->data)){\n if ($this->User->save($this->data)){\n $this->Session->setFlash(\"Your account has been updated successfully\");\n $this->go_back();\n } \n }else{\n $this->User->id = $this->Session->read(\"Auth.User.id\");\n $this->data = $this->User->read();\n }\n }", "public function user_update($data = array())\n\t{\n\t\tunset($data['user']['u_password']);\n\t\t\n\t\t$this->CI->logger->add('users/user_update', $data);\n\t\t\n\t\t// Update the permission cache table\n\t\t$this->CI->load->model('permissions_model');\n\t\t$this->CI->permissions_model->set_cache($data['u_id']);\n\t}", "public function update() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"UPDATE users SET mail=?, name=?, password=?, state=? WHERE id = ?\");\n\t\t$stmt->execute(array($this->mail, $this->name, $this->password, $this->state, $this->id));\n\t}", "private function updateUser () {\n $sql = \"UPDATE users SET avatar = :avatar,\n biography = :biography,\n birthdate = :birthdate,\n email = :email,\n nickname = :nickname,\n location = :location,\n password = :password,\n activated = :activated,\n phone = :phone,\n username = :username,\n website = :website WHERE id_user = :id_user\";\n $query = $this->bdd->prepare($sql);\n $query->bindParam(':avatar', $this->avatar);\n $query->bindParam(':biography', $this->biography);\n $query->bindParam(':birthdate', $this->birthdate);\n $query->bindParam(':email', $this->email);\n $query->bindParam(':nickname', $this->nickname);\n $query->bindParam(':location', $this->location);\n $query->bindParam(':password', $this->password);\n $query->bindParam(':phone', $this->phone);\n $query->bindParam(':username', $this->username);\n $query->bindParam(':website',$this->website);\n $query->bindParam(':activated',$this->activated);\n $query->bindParam(':id_user',$_SESSION['auth']['id_user']);\n $query->execute();\n }", "function Update_user_Stmt (){\n\nif (isset($_POST[\"Update_user\"])) {\n\n\n// Defining Variables for user Update SQL Statement \n\n$id=$_POST['id'];\n$user_id=$_POST['user_id'];\n$user_password=$_POST['user_password'];\n$Name=$_POST['Name'];\n$user_priviledge=$_POST['user_priviledge'];\n$security_question=$_POST['security_question'];\n$security_q_answer=$_POST['security_q_answer'];\n$user_active_status=$_POST['user_active_status'];\n$effective_dt=$_POST['effective_dt'];\n$UpdateSQLuser = \" UPDATE user SET \n\nid='$id',user_id='$user_id',user_password='$user_password',Name='$Name',user_priviledge='$user_priviledge',security_question='$security_question',security_q_answer='$security_q_answer',user_active_status='$user_active_status',effective_dt='$effective_dt' WHERE id='$id'\";\n// END of Update SQL Statement for user\n\n\n$Result_update = mysql_query($UpdateSQLuser) or die(mysql_error());} //End If\n}", "public function update()\n {\n \n $user = $_POST;\n $user['password'] = password_hash('Gorilla1!', PASSWORD_DEFAULT);\n $user['updated_by'] = Helper::getUserIdFromSession();\n $user['created'] = date('Y-m-d');\n\n // Save the record to the database\n UserModel::load()->update($user, Helper::getUserIdFromSession());\n\n return view::redirect('/');\n }", "public function update($user, $ident, DatabaseDataHandler $data);", "public function update_user(Request $request){\n Session::put('menu_item_parent', 'users');\n Session::put('menu_item_child', '');\n Session::put('menu_item_child_child', '');\n $user = User::where('userIdx', $request->userIdx)->get()->first();\n\n if($user){\n $data = array();\n $data['firstname'] = $request->firstname;\n $data['lastname'] = $request->lastname;\n $data['email'] = $request->email;\n $data['jobTitle'] = $request->jobTitle;\n if($request->businessName2 == \"Other industry\") {\n $data['businessName'] = $request->businessName;\n } else {\n $data['businessName'] = $request->businessName2;\n }\n if($request->role2 == \"Other\") {\n $data['role'] = $request->role;\n } else {\n $data['role'] = $request->role2;\n }\n User::where('userIdx', $request->userIdx)->update($data);\n\n $logDetail = 'Updated: UserID- '.$request->userIdx.', Email- '.$data['email'].', Firstname- '.$data['firstname'].', Lastname- '.$data['lastname'];\n SiteHelper::logActivity('USER', $logDetail, 'admin');\n\n Session::flash('flash_success', 'User detail has been updated successfully');\n echo \"success\";\n }else \n echo \"fail\";\n }", "public function updateAction()\n {\n $result = [\n 'type' => 'error',\n 'message' => 'Missing parameters, this functionality expects a POST array called `user` with `id`, `given_name`, and `family_name` keys!'\n ];\n\n if ($this->request->hasPost('user')) {\n $formData = $this->request->getPost('user');\n $userService = new UserService(new Users());\n // validating the data\n if ($userService->validateData($formData, ['id', 'given_name', 'family_name'])) {\n $userService->updateUser($formData);\n }\n }\n return $this->response->setJsonContent($result);\n }", "private function editAccount()\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 //country\n if(!isset($request['country']) || $request['country']==\"\")\n throw_error_msg(\"provide country\");\n\n //sex\n if(!isset($request['sex']) || $request['sex']==\"\")\n throw_error_msg(\"provide sex\");\n\n if(!in_array($request['sex'], array('male','female')))\n throw_error_msg(\"sex must be male/female\");\n\n //dob\n if(!isset($request['dob']) || $request['dob']==\"\")\n throw_error_msg(\"provide dob\");\n\n if(!isset($request['dob']) || $request['dob']==\"\")\n throw_error_msg(\"provide dob\");\n\n $is_valid_date = DateTime::createFromFormat('Y-m-d', $request['dob']);\n\n if(!$is_valid_date)\n throw_error_msg(\"dob must be in Y-m-d like 1990-11-18 format\");\n\n if(!isset($request['category']) || $request['category']==\"\")\n throw_error_msg(\"provide category\");\n\n $request['userid'] = userid();\n $userquery->update_user($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $user_info = format_users($request['userid']);\n \n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $user_info);\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function updatePoinsUserAction()\n {\n \t$this->pointServices->updatePointUser($this->getUser());\n \t\n \treturn new Response(\"OK\");\n }", "public function account_update_info()\n\t{\n\t\t$data = $this->input->post();\n\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t{\n\t\t\t$messages = $this->ion_auth->messages();\n\t\t\t$this->system_message->set_success($messages);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errors = $this->ion_auth->errors();\n\t\t\t$this->system_message->set_error($errors);\n\t\t}\n\n\t\tredirect('admin/panel/account');\n\t}", "function _update_user()\n {\n //pr_db($post_total);\n $tbl = 'user';\n $list = model($tbl)->get_list();\n foreach ($list as $row) {\n $post_total = model('product')->filter_get_total(['user_id' => $row->id]);\n $post_is_publish = model('product')->filter_get_total(['user_id' => $row->id, 'status' => 1]);\n $post_is_draft = model('product')->filter_get_total(['user_id' => $row->id, 'is_draft' => 1]);\n $post_is_deleted = model('product')->filter_get_total(['user_id' => $row->id, 'deleted' => 1]);\n\n $follow_total = model('user_storage')->filter_get_total(['user_id' => $row->id,'action'=>'subscribe']);\n $follow_by_total = model('user_storage')->filter_get_total(['table_id' => $row->id,'action'=>'subscribe']);\n model($tbl)->update($row->id,\n [\n 'post_total' => $post_total,\n 'post_is_publish' => $post_is_publish,\n 'post_is_draft' => $post_is_draft,\n 'post_is_deleted' => $post_is_deleted,\n\n 'follow_total' => $follow_total,\n 'follow_by_total' => $follow_by_total,\n ]\n );\n echo '<br>--';\n pr_db(0, 0);\n }\n }", "public function update(User $model);", "function update_user($user_id, $old_userdata){\r\n $old_userdata = (array)$old_userdata;\r\n if($old_userdata['user_nicename']) $user_nicename = $old_userdata['user_nicename'];\r\n if($old_userdata['user_pass']) $user_pass = $old_userdata['user_pass'];\r\n if($old_userdata['user_email']) $user_email = $old_userdata['user_email'];\r\n if($old_userdata['nickname'] AND server(get_option('sso_user_nickname')) !== FALSE)\r\n update_usermeta($user_id, 'nickname', $old_userdata['nickname']);\r\n if($old_userdata['first_name'] AND server(get_option('sso_user_firstname')) !== FALSE)\r\n update_usermeta($user_id, 'first_name', $old_userdata['first_name']);\r\n if($old_userdata['last_name'] AND server(get_option('sso_user_lastname')) !== FALSE)\r\n update_usermeta($user_id, 'last_name', $old_userdata['last_name']);\r\n\r\n global $wpdb;\r\n $data = compact('user_pass', 'user_email', 'user_nicename');\r\n $data = stripslashes_deep($data);\r\n $e = $wpdb->update($wpdb->users, $data, array('ID' => $user_id));\r\n}", "function editUser($id, $fname, $username, $password, $email){\n $pdo = Database::getInstance()->getConnection();\n\n //TODO: Run the proper SQL query to update tbl_user with proper values\n $update_user_query = 'UPDATE tbl_user SET user_fname = :fname, user_name = :username,';\n $update_user_query .= ' user_pass=:password, user_email =:email WHERE user_id = :id';\n $update_user_set = $pdo->prepare($update_user_query);\n $update_user_result = $update_user_set->execute(\n array(\n ':fname'=>$fname,\n ':username'=>$username,\n ':password'=>$password,\n ':email'=>$email,\n ':id'=>$id\n )\n );\n\n // echo $update_user_set->debugDumpParams();\n // exit;\n\n //TODO: if everything goes well, redirect user to index.php\n // Otherwise, return some error message...\n if($update_user_result){\n redirect_to('index.php');\n }else{\n return 'Guess you got canned...';\n }\n}", "public function testUserUpdate()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n self::$username = 'A0Tester' . uniqid();\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaab')\n ->type('last_name', 'aaaab')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('User data successfully updated!')\n ->assertSee('User data successfully updated!')\n ->assertValue('input[name=\"username\"]', self::$username)\n ->assertValue('input[name=\"first_name\"]', 'aaaab')\n ->assertValue('input[name=\"last_name\"]', 'aaaab');\n });\n }", "public function update() {\r\n\r\n // get database connection\r\n\r\n \r\n \r\n $sql_update = \"update employees SET fname = '$this->firstName', lname = '$this->lastName', email = '$this->email' where id = '$this->id'\";\r\n if ($this->dbc->query($sql_update)) {\r\n\r\n echo \"<p> User Successfully Updated </p>\";\r\n return true;\r\n } else {\r\n\r\n echo \"<p> Could not run query </p>\";\r\n return false;\r\n }\r\n }", "public function updateForm()\n{\n\n $user = $this->model->getUser();\n $this->view->updateForm($user);\n \n}", "public function UpdateUserCollection($userProfileform,$oldUserObj){\n try {\n $userCollectionModel=new UserCollection();\n// if(isset($userProfileform['country']) && $oldUserObj['country']!=$userProfileform['country'])\n// {\n// $NetworkId= Network::model()->getNeworkId($userProfileform['country']);\n// (isset($NetworkId) && $NetworkId!='error')?'':$NetworkId=1; \n// $userProfileform['network']=$NetworkId;\n// }\n $result=User::model()->updateUser($userProfileform,$oldUserObj[\"UserId\"]); \n if($result=='success'){ \n $userId= (int)$oldUserObj[\"UserId\"];\n $userCollectionModel->UserId=$userId;\n $userCollectionModel->DisplayName=$userProfileform['firstName'].\" \".$userProfileform['lastName'];\n $userCollectionModel->State=$userProfileform['state'];\n $userCollectionModel->CountryId=$userProfileform['country'];\n $userCollectionModel->AboutMe=$userProfileform['aboutMe'];\n // $userCollectionModel->NetworkId=(int)$NetworkId;\n $displayName = trim($userCollectionModel->DisplayName);\n $uniqueHandle=\"\";\n if(strlen($displayName)>0){\n $uniqueHandle = $this->generateUniqueHandleForUser($userProfileform['firstName'],$userProfileform['lastName']);\n }else{\n $emailPref = explode(\"@\", $userProfileform['email']);\n $displayName = $emailPref[0];\n $uniqueHandle = $this->generateUniqueHandleForUser($displayName,\"\");\n }\n $userCollectionModel->uniqueHandle=$uniqueHandle;\n \n UserCollection::model()->updateUserCollection($userCollectionModel); \n }\n /**********saving the availability in userAchievementsCollection************/\n $userDetails=UserCollection::model()->getTinyUserCollection($userId); \n $userAchievementsInputBean = new UserAchievementsInputBean();\n $userAchievementsInputBean->UserId = $userId;\n $userAchievementsInputBean->UserClassification = $userDetails->UserClassification;\n $userAchievementsInputBean->OpportunityType = \"\";\n $userAchievementsInputBean->SegmentId = $userDetails->SegmentId;\n $userAchievementsInputBean->NetworkId = $userDetails->NetworkId;\n\n Yii::app()->amqp->achievements(json_encode($userAchievementsInputBean));\n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:UpdateUserCollection::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n error_log(\"Exception Occurred in SkiptaUserService->UpdateUserCollection### \".$ex->getMessage());\n }\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "public function updated(User $user)\n {\n //\n }", "function editUserAction()\n {\n $userRp = new UserRepository();\n $validateF = new ValidateFunctions();\n $user = $userRp->getOneFromDB($validateF->sanitize($_GET['id']));\n if ($user != 0) {\n $obj_array = json_decode($user[3], true);\n $pass = $obj_array['user_password'];\n $addedBy = $obj_array['user_added'];\n\n if (!empty($_POST)) {\n $requiredFields = [$_POST['user_name'], $_POST['user_street1'], $_POST['user_city'], $_POST['user_country'], $_POST['user_phone'], $_POST['user_email']];\n\n if ($_SESSION['id'] == $_GET['id']) {\n $requiredFields = [$_POST['user_name'], $_POST['user_street1'], $_POST['user_city'], $_POST['user_country'], $_POST['user_phone'], $_POST['user_email'], $_POST['user_password'], $_POST['user_confirm']];\n }\n if ($this->checkUserInfo($_POST, $_FILES, $requiredFields)) {\n $file = $this->uploadUserImage($_FILES);\n $userInfo = $this->buildUserObject($_POST, $file, $pass, $addedBy);\n $email = $validateF->sanitize($_POST['user_email']);\n $this->updateUserToDatabase($userInfo, $validateF->sanitize($_GET['id']), $email);\n $_SESSION['success'] = ['User edited successfully.'];\n header('Location:index.php?action=index');\n } else{\n header('Location:index.php?action=index');\n }\n } else{\n $modelF = new ModelFunctions();\n $modelF->getAddUserForm();\n }\n } else {\n $_SESSION['error'] = ['User not found.'];\n header('Location:index.php?action=adminUsers');\n }\n\n }", "public function testUpdateUser()\n {\n $userData = [\n \"name\" => \"User 2\",\n \"email\" => \"[email protected]\",\n \"password\" => \"demo12345123\",\n \"org_id\" => 2\n ];\n $id = 4;\n $this->json('PUT', \"api/user/update/$id\", $userData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"action\",\n \"data\" => [],\n \"status\"\n ]);\n }", "public function updateAction() : object\n {\n if (isset($_SESSION['username'])) {\n $form = new UpdateForm($this->di);\n $form->check();\n\n $this->page->add(\"user/crud/update\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $this->page->render([\n \"title\" => \"Update an item\",\n ]);\n }\n $this->di->get(\"response\")->redirect(\"user/login\");\n }", "public function update()\n\t{\n\t\t$crud = $this->crud->find($_POST['id']);\n\t\t$curd->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->update();\n\t\t$this->redirect('crud');\n\t}", "public function updateprofileAction()\n\t{\n\t\t$this->view->headTitle(\"Update Your Profile\");\n\t\t\n\t\t//if not logged in, user can't edit profile\n\t\tif(!$this->loggedEmail){\n\t\t\t$this->_redirect('/'); \n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$user = new Default_Model_User();\n\t\t$resultRow = $user->getUserByEmail($this->loggedEmail);\n\t\t\n\t\tif($this->getRequest()->isPost()){\n\t\t\t\n\t\t\t$resultRow->email = $this->getRequest()->getPost('email');\n\t\t\t$resultRow->first_name = $this->getRequest()->getPost('first_name');\n\t\t\t$resultRow->last_name = $this->getRequest()->getPost('last_name');\n\t\t\t$resultRow->gender = $this->getRequest()->getPost('gender');\n\t\t\t$resultRow->address = $this->getRequest()->getPost('address');\n\t\t\t\n\t\t\tif(strlen($this->getRequest()->getPost('password'))){\n\t\t\t\t$resultRow->password = $this->getRequest()->getPost('password');\n\t\t\t}\n\t\t\t$resultRow->updated_at = date('Y-m-d H:i:s');\n\t\t\t$resultRow->save();\n\t\t\t\n\t\t} \n\t\t\t\n\t\t$this->view->email = $resultRow->email;\n\t\t$this->view->first_name = $resultRow->first_name;\n\t\t$this->view->last_name = $resultRow->last_name;\n\t\t$this->view->gender = $resultRow->gender;\n\t\t$this->view->address = $resultRow->address;\n\t\t$this->view->handle = $resultRow->handle;\n\t\n\t}", "public function updateForm($user) {\n if (isset($_SESSION['user']) && ($_SESSION['level'] == \"admin\" || $_SESSION['level'] == \"redacteur\")){\n $this->page .= \"<h2>Modification de l'Utilisateur :</h2>\";\n $this->page .= \"<a class='btn btn-primary col-12 mt-3' href='index.php?controller=user&action=start'>Retour en arrière</a>\";\n $this->page .= file_get_contents('template/formUser.html');\n $this->page = str_replace('{action}','updateDB', $this->page);\n $this->page = str_replace('{id}',\"<label class='d-none' for='id'>ID : </label>\n <input class='form-control d-none' id='id' type='text' name='id' value='\" .$user['id'] .\"' readonly><br>\", $this->page);\n $this->page = str_replace('{username}',$user['username'], $this->page);\n $this->page = str_replace('{password}',$user['password'], $this->page);\n $this->page = str_replace('{firstname}',$user['firstname'], $this->page);\n $this->page = str_replace('{lastname}',$user['lastname'], $this->page);\n\n $this->displayPage();\n } else {\n header ('location:index.php?controller=login&action=formLog');\n }\n }", "public function updateData($data) {\n\t // Treat data well\n\t unset($data['id']); // No messing up with the IDs\n\t unset($data['submit']);\n\t unset($data['old_password']);\n\t // Password salting\n\n\t if(isset($data['password'])) {\n\t $data['password'] = trim($data['password']);\n\n\t if($data['password'] != \"\") {\n\t $data['password_salt'] = sha1($data['password']);\n\t $data['password'] = md5(Zend_Registry::get('staticSalt') . $data['password'] . sha1($data['password']));\n\t }\n\t }\n\t \n\t $this->_db->update($this->_users_table, $data, $this->_db->quoteInto('username = ?', Zend_Auth::getInstance()->getIdentity()));\n\t}", "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Profile has been updated', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Profile could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t} else {\n\t\t\t// Set the form data (display prefilled data) \n\t\t\t$this->data = $user;\n\t\t}\n\n\t\t// Set the view variable\n\t\t$this->set(compact('user'));\n\t}", "public function update(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::update(): Attempt to update a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\t//Update the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\t\t\r\n\t\t\t$sql = \"UPDATE \".TABLENAME_GROUPS.\" SET name=:name, caption=:caption, adminId=:adminId, per2Id=:per2Id, per3Id=:per3Id, icon_link=:icon_link, status=:status WHERE id = :id\";\r\n\t\t\t$st = $conn->prepare( $sql );\r\n\t\t\t$st->bindValue( \":name\", $this->name, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":caption\", $this->caption, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":adminId\", $this->adminId, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":per2Id\", $this->per2Id, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":per3Id\", $this->per3Id, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":icon_link\", $this->icon_link, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":status\", $this->status, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\techo \"<br>\";\r\n\t\t\t$st->execute();\r\n\t\t//\tprint_r($st->errorInfo());\r\n\t\t\t$conn = null;\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}", "public function updateUser()\n {\t\t\n\t\t\t// database connection and sql query\n\t\t\t$core = Core::dbOpen();\n\t\t\t\n\t\t\tif( $this->userID == 0 ) // add new user\n\t\t\t{\n\t\t\t\t$sql = \"INSERT INTO user (programID,typeID,firstName,lastName,email,timezoneID,hash,active)\n\t\t\t\t\t\t\t\tVALUES (:programID, :typeID, :firstname, :lastname, :email, :timezoneID, :hash, :active)\";\n\t\t\t}\n\t\t\telse // update existing record\n\t\t\t{\n\t\t\t\t$sql = \"UPDATE user SET programID = :programID, typeID = :typeID, firstName = :firstname, \n\t\t\t\t\t\t\t\tlastName = :lastname, email = :email, timezoneID = :timezoneID, active = :active \";\n\n\t\t\t\t if( $this->password != \"\" ) { $sql .= \", hash = :hash \"; }\n\t\t\t\t \n\t\t\t\t$sql .= \" WHERE userID = :userID\";\n\t\t\t}\n\t\t\t\n\t\t\t$stmt = $core->dbh->prepare($sql);\n\t\t\tif( $this->userID > 0 ) { $stmt->bindParam(':userID', $this->userID); }\n\t\t\tif( $this->password != \"\" ) { $stmt->bindParam(':hash', $this->newHash() ); }\n\t\t\t$stmt->bindParam(':programID', $this->programID);\n\t\t\t$stmt->bindParam(':typeID', $this->typeID);\n\t\t\t$stmt->bindParam(':firstname', $this->firstName);\n\t\t\t$stmt->bindParam(':lastname', $this->lastName);\n\t\t\t$stmt->bindParam(':email', $this->email);\n\t\t\t$stmt->bindParam(':timezoneID', $this->timezoneID);\n\t\t\t$stmt->bindParam(':active', $this->active);\n\t\t\tCore::dbClose();\n\t\t\t\n\t\t\ttry\n\t\t\t{\t\t\t\n\t\t\t\tif( $stmt->execute()) {\n\t\t\t\t\t\n\t\t\t\t\t// if it's a new user, get the last insertId\n\t\t\t\t\tif( $this->userID == 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->userID = $core->dbh->lastInsertId(); \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch ( PDOException $e ) {\n\t\t\t\techo \"Set User Information Failed!\";\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n }", "public function getPostEditUser()\n {\n // Render login page if not logged in.\n if (!$this->di->get(\"session\")->has(\"account\")) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n }\n\n $title = \"Edit\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n $user = new User();\n $username = $this->di->get(\"session\")->get(\"account\");\n $user->setDb($this->di->get(\"db\"));\n $user->find(\"username\", $username);\n\n $form = new EditUserForm($this->di, $user);\n\n $form->check();\n\n $data = [\n \"form\" => $form->getHTML(),\n ];\n\n $view->add(\"user/edit\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "function profileUpdated($user_id, $old_user_data) {\n \tif(isSet($_POST)) {\n \t\t$user_data = get_userdata($user_id);\n\t\t\t$first_name = $user_data->first_name;\n\t\t\t$last_name = $user_data->last_name;\n\t\t\t$email = $user_data->user_email;\n\t\t\tif(!empty($email) && (!empty($first_name) || !empty($last_name))) {\n\t\t\t\t$courses = $this->subscriptions->getApproved();\n\n\t\t\t\t//Send out update info to all the subscribed courses - teacher blog database update.\n\t\t\t\tforeach($courses as $course) {\n\t\t\t\t\t$studentRequest = new LePressRequest(2, 'profileUpdated');\n\t\t\t\t\t$studentRequest->addParams(array('first_name' => $first_name, 'last_name' => $last_name, 'new_email' => $email, 'old_email' => $old_user_data->user_email, 'accept-key' => $course->accept_key));\n\t\t\t\t\t$studentRequest->doPost($course->course_url, false); //Do request without blocking\n\t\t\t\t\t//Keeping fingers crossed that request is successful\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "public function update(User $user, MainModel $mainModel)\n {\n //\n }", "function updates_meta( $user_id, $old_user_data ) {\n \t $field_name = $_POST['field_name'];\n\t\t$field_key = $_POST['field_key'];\n\t\t$company_names = $_POST['company_names'];\n\t \t$job_role = $_POST['job_role'];\n \t\tif( !empty( $field_name ) && !empty( $field_key ) ) {\n\t\t\tupdate_user_meta( $user_id, $field_name, $company_names );\n\t\t\tupdate_user_meta( $user_id, '_' . $field_name, $company_names );\n\t\t\tupdate_user_meta( $user_id, 'job_role' , $job_role );\n\t\t\tupdate_user_meta( $user_id, '_job_role', $job_role );\n\t\t}\n}", "public function actioneditProfile()\n\t{\t\n\t\t$data = array();\n\t\t$data['city'] = $_POST['city'];\n\t\t\n\t\t\n\t\t$userObj = new Users();\n\t\t$userObj->setData($data);\n\t\t$userObj->insertData($_POST['userId']);\n\t\tYii::app()->user->setFlash('success',\"Successfully updated\");\n\t\t$this->redirect('admin/users');\n\t\t//Yii::app()->user->setFlash('error',\"Please update your profile\");\n\t\t//$this->render('userProfile',$profileData);\n\t\n\t}", "public function update()\n {\n echo uniqid('km-');\n // $data = $this->Users_model->get_all();\n // foreach ($data as $datas) {\n // $d['users_id'] = uniqid('km-');\n // $this->Users_model->update_users($datas->users_email, $d);\n // }\n }", "function update_user($u_data, $ui_data, $update_user_id){\n\t\t$this->db->trans_begin();\n\t\t\t $this->db->where('user_id', $update_user_id);\n\t\t$r1 = $this->db->update('users', $u_data);\n\n\t\t\t $this->db->where('user_id', $update_user_id);\n\t\t$r2 = $this->db->update('user_info', $ui_data);\n\n\t\tif (($r1==true)&&($r2==true)) {\n\t\t\t$this->db->trans_commit();\n\t\t\treturn true;\n\n\t\t}else{\n\t\t\t $this->db->trans_rollback();\n\t\t\t return false;\n\t\t}\n\t}", "protected function lstUsersAsCharity_Update() {\n\t\t\tif ($this->lstUsersAsCharity) {\n\t\t\t\t$this->objCharityPartner->UnassociateAllUsersAsCharity();\n\t\t\t\t$objSelectedListItems = $this->lstUsersAsCharity->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objCharityPartner->AssociateUserAsCharity(User::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function updateuser($data)\n {\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"UPDATE User SET \n\t\t\t\t\n \t\troleID = ?,\n \t\tcoordinatorID = ?,\n\t\t\t\tfirstName = ?,\n\t\t\t\tlastName = ?, \n\t\t\t\tphoneNumber = ?,\n\t\t\t\temail = ?, \n\t\t\t\tpassword = SHA1(?)\n\t\t\t\t\t\t\t\t\t\tWHERE ID = ?\"))\n ) {\n\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n // Creates array for phone number using areaCode, phoneBegin, phoneEnd\n $phoneNumberArray = array($data['areaCode'], $data['phoneBegin'], $data['phoneEnd']);\n // Combines areaCode, phoneBegin, and phoneEnd and adds hyphens inbetween to produce a phone number\n $phoneNumber = implode(\"-\", $phoneNumberArray);\n\n /* Prepared statement, stage 2: bind and execute */\n if (!($stmt->bind_param(\"issssssi\",\n\n $data['roleID'],\n implode(',', $data['coordinatorID']),\n $data['firstName'],\n $data['lastName'],\n $phoneNumber,\n $data['email'],\n $data['password'],\n $this->id))\n ) {\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 }", "public function updateUser(UserInterface $user);", "function user_update($adminAction = false)\n\t{\n\t\tif(session_get('username')) //Ensure that this action cannot be done while not logged on\n\t\t{\n\t\t\t$uid = ($adminAction) ? $adminAction : $this->user_getid();\n\t\t\t$do_update = $this->user_check_update_input($uid); \n\t\t\tif($do_update)\n\t\t\t{\n\t\t\t\t$ins = $_POST;\n\t\t\t\tarray_pop($ins); //We don't need the last post value doUpdateUser...\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Get the existing user values, then determine any incoming values that are different\n\t\t\t\t * than existing values\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t$existingStruct = $this->DB->database_select('users', '*', array('uid' => $uid), 1);\n\t\t\t\t$diff = array_diff($ins, $existingStruct); //Only these values are to be updated\n\t\t\t\t\n\t\t\t\tif(isset($diff['password']))\n\t\t\t\t{\n\t\t\t\t\t$diff['salt'] = $this->generateSalt();\n\t\t\t\t\t$diff['password'] = md5(sha1(md5(sha1($diff['password'] . $diff['salt']))));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isset($_POST['email_hidden'])) //Did the user want to hide their email?\n\t\t\t\t{\n\t\t\t\t\t$diff['email_hidden'] = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$diff['email_hidden'] = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//There needs to be values that have been modified...\n\t\t\t\t\n\t\t\t\tif(count($diff) > 0 || !empty($_FILES['profile_picture']['name'])) \n\t\t\t\t{\n\t\t\t\t\tif(!empty($_FILES['profile_picture']['name']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$name = upload_image();\n\t\t\t\t\t\t$diff['profile_image'] = $name;\n\t\t\t\t\t}\n\t\t\t\t\tif($this->DB->database_update('users', $diff, array('uid' => $uid)))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function update_info()\n\t{\n\t\t$this->load->model('admin_user_model', 'admin_users');\n\t\t$updated = $this->admin_users->update_info($this->mUser->id, $this->input->post());\n\n\t\tif ($updated)\n\t\t{\n\t\t\tset_alert('success', 'Successfully updated account info.');\n\t\t\t$this->mUser->full_name = $this->input->post('full_name');\n\t\t\t$this->session->set_userdata('admin_user', $this->mUser);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tset_alert('danger', 'Failed to update info.');\n\t\t}\n\n\t\tredirect('admin/account');\n\t}", "public function indexApUpdate(){\n //This will be used to display in the Wizard of available Realms in the Create screens of Vouchers; Permanent Users; and Devices\n $user = $this->Aa->user_for_token($this);\n if(!$user){ //If not a valid user\n return;\n }\n $this->_doApListFor($user,'update'); \n }", "public function updateUser($data){\n\t\t$user = $this->update($data, array(\"id_users\"=>$data['id_users']));\n\t\treturn $user;\n\t}" ]
[ "0.72046643", "0.7049093", "0.7004831", "0.69486153", "0.6914516", "0.6852044", "0.6818012", "0.6806075", "0.6792286", "0.6713711", "0.6704334", "0.6698259", "0.6661887", "0.66524005", "0.66427976", "0.661599", "0.66091025", "0.6604343", "0.6593484", "0.6590227", "0.65733427", "0.65516573", "0.65254444", "0.65170306", "0.6516738", "0.65109646", "0.6502895", "0.64770186", "0.6463388", "0.64600575", "0.6451296", "0.6437025", "0.64239436", "0.64235175", "0.6419248", "0.6410022", "0.640379", "0.6396192", "0.63689435", "0.63509333", "0.63466805", "0.6342016", "0.6321232", "0.63185596", "0.6308846", "0.6294795", "0.62870383", "0.62852037", "0.62781584", "0.6273291", "0.6271161", "0.62708193", "0.6264248", "0.6259077", "0.62558526", "0.62535787", "0.62488467", "0.62446123", "0.6238609", "0.6237179", "0.62346536", "0.6232153", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220697", "0.6220152", "0.6218012", "0.62101924", "0.6209128", "0.6207597", "0.6206374", "0.620621", "0.6205894", "0.62048715", "0.619637", "0.61960703", "0.6183419", "0.6180886", "0.6179472", "0.6171239", "0.6164463", "0.6158563", "0.615771", "0.61561924", "0.6143917", "0.61439", "0.6139388", "0.6135598", "0.61335474" ]
0.6535107
22
Delete user from database
public static function removeUser($id) { $db = DB::getInstance(); $mssg = ""; try { $db->beginTransaction(); $db->exec("DELETE FROM `users` WHERE ID=$id"); $db->commit(); $mssg = "Transaction successful, user deleted"; } catch (Exception $e) { $db->rollBack(); $mssg = $e->getMessage(); } return $mssg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteUser()\n {\n $this->delete();\n }", "public function delete() {\n\t\t$query = \"DELETE FROM Users WHERE userId = :id\";\n\t\t$query_params = array(':id' => $this->userData['userId']);\n\t\texecuteSQL($query, $query_params);\n\t}", "public function delete() {\n try {\n $db = Database::getInstance();\n $sql = \"DELETE FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $this->username]);\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "public function delete_user($user);", "public function delete()\n { if (is_null($this->id))\n trigger_error(\"User::delete(): Attempt to delete a User object that does not have its ID property set.\", E_USER_ERROR);\n\n // Delete the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $st = $conn->prepare(\"DELETE FROM users WHERE id = :id LIMIT 1\");\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT); \n $st->execute();\n \n $conn = null;\n }", "public function deleteFromDb($user) {\n $sql = \"DELETE FROM users WHERE username = ?\";\n $stmt = $this->dbh->prepare($sql);\n $succ = $stmt->execute(array($user->getUsername()));\n }", "public function delete_delete()\n {\n $response = $this->UserM->delete_user(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function delete(): void\n {\n $id = $this->id;\n $this->fetch(\n 'DELETE FROM user WHERE id = ?;',\n [$id]\n );\n }", "public function deleteUserById($user_id){\n $this->dao->deleteUserByid($user_id);\n }", "public function Delete(){\n $query = \"DELETE FROM user where id=\".$this->id;\n\n $result = $this->dbh->exec($query);\n if ($result) {\n Message::setMessage(\"<div class='yes'>Removed Permanently</div>\");\n } else {\n\n Message::setMessage(\"<div class='no'>Failed to Remove</div>\");\n }\n Utility::redirect(\"volunteers.php\");\n }", "public function delete() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"UPDATE users SET state='DELETED' WHERE id = ?\");\n\t\t$stmt->execute(array($this->id));\n\t}", "public static function delete(Users $user)\n {\n $email=$user->Email;\n DB::delete(\"user\",\"Email='$email' AND IsDeleted=0\");\n \n //$conn->close();\n header('location: DeleteUser.php');\n\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "function deleteUser()\n {\n $validateF = new ValidateFunctions();\n if ($_SESSION['id'] == $_GET['']) {\n logUserOut();\n }\n $id = $validateF->sanitize($_GET['id']);\n $userRp = new UserRepository();;\n $hasUser = $userRp->getOneFromDB($id);\n if ($hasUser != 0) {\n $this->deleteUserImage($id);\n $this->removeUser($id);\n $_SESSION['success'] = ['User deleted successfully'];\n } else {\n $_SESSION['error'] = ['No user found.'];\n }\n header('Location:index.php?action=adminUsers');\n }", "public function delete()\n {\n $pdo = static::getDB();\n\n $sql = \"DELETE FROM users WHERE user_id = :user_id\";\n\n $result = $pdo->prepare($sql);\n\n return $result->execute([$this->user_id]);\n }", "public function delete(User $user)\n {\n //\n }", "public function deleteUser($userId);", "public function deleteAction() {\n $uid = $this->getInput('uid');\n $info = Admin_Service_User::getUser($uid);\n if ($info && $info['groupid'] == 0) $this->output(-1, '此用户无法删除');\n if ($uid < 1) $this->output(-1, '参数错误');\n $result = Admin_Service_User::deleteUser($uid);\n if (!$result) $this->output(-1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function deleteUser(request $request){\n \n $afi = User::find($request->id);\n $afi->delete();\n \n }", "public function destroy($id)\n {\n // delete user\n }", "public function deleteUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$userModel->destroy();\n\t\t\t$this->expireToken($userModel);\n\t\t\treturn $this->sendResponse('Your account has been deleted');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to delete this account');\n }", "public function delete($user)\n {\n $user->deleteProfilePhoto();\n $user->tokens->each->delete();\n\n // $user->delete(); csak logikai törlés a megngedett\n $user->update([\"name\" => \"deleted\".$user->id,\n \"email\" => \"deleted\".$user->id.\"@deleted.com\",\n \"password\" => \"psw\".rand(100000,999999)]);\n\n \\DB::table('members')\n ->where('user_id','=',$user->id)\n ->delete();\n\n }", "public function delete($user){\n }", "function delete_user()\n {\n\n //return true if successful\n }", "protected function deleteUser()\n {\n $userId = $this->request->variable('user_id',0);\n\n if($userId === 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n // Determine if this user is an administrator\n $arrUserData = $this->auth->obtain_user_data($userId);\n $this->auth->acl($arrUserData);\n $isAdmin = $this->auth->acl_get('a_');\n\n if($isAdmin)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'User was not deleted because they are an admin',\n 'error' => ['phpBB admin accounts cannot be automatically deleted. Please delete via ACP.']\n ]);\n }\n\n user_delete('remove', $userId);\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user was deleted',\n 'data' => [\n 'user_id' => $userId\n ]\n ]);\n }", "private function deleteUser()\n {\n try \n {\n $request = $_REQUEST;\n\n if(!isset($request['userid']) || $request['userid']==\"\")\n throw_error_msg(\"user id not provided\");\n else if(!is_numeric($request['userid']))\n throw_error_msg(\"invalid user id\");\n else\n $userid = (int)$request['userid'];\n\n global $userquery;\n $user = $userquery->delete_user($userid);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'user deleted successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n } \n }", "private function deleteUser()\r\n {\r\n if (isset($_GET['id'])) {\r\n\r\n $id_user = $_GET['id'];\r\n UserDAO::deleteUser($id_user);\r\n $_SESSION['deleteUser'] = '';\r\n header('Location:' . BASE_URL . \"users\");\r\n exit();\r\n }\r\n }", "public function deleted(User $user)\n {\n debug('User deleted');\n }", "public function delete(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::delete(): Attempt to delete a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\t//Delete the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t\t$st = $conn->prepare ( \"DELETE FROM \".TABLENAME_GROUPS.\" WHERE id = :id LIMIT 1\" );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\t$st->execute();\r\n\t\t\t$conn = null;\t\t\r\n\t\t}", "function deleteUser($username)\r\n {\r\n $this->querySimpleExecute('delete from t_user where useUsername = ' . $username);\r\n }", "public function delete_user() {\n $query = 'DELETE FROM ' . $this->table_name . ' WHERE vendor_id = :vendor_id';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean data\n\n // Bind data\n $stmt->bindParam(':vendor_id', $this->vendor_id);\n\n // Execute query\n if($stmt->execute()) {\n return true;\n }\n\n //Error $stmt->error;\n return false;\n }", "function deleteUser($id){\n\t\t$this->db->where('id_usuario', $id);\n\t\t$this->db->delete('usuarios');\n\t}", "function deleteUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"DELETE\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['_id'])){\n\t\t\t\t\t$where = \"_id='\".$_POST['_id'].\"'\";\n\t\t\t\t\t$delete = $this->model->getUser('*',$where);\n\t\t\t\t\t$result = $this->model->deleteUser($where);\n\t\t\t\t\tif($result) {\n\t\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t\t$response_array['message']='One record deleted.';\n\t\t\t\t\t\t$response_array['data']=$delete;\n\t\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t\t$response_array['message']='The record does not exist';\n\t\t\t\t\t\t$data['user_id'] = $_POST['_id'];\n\t\t\t\t\t\t$response_array['data']=$data;\n\t\t\t\t\t\t$this->rest->response($response_array, 404);\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\t\t\t\t\t$this->rest->response('No parameters given',204);\t// If no records \"No Content\" status\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\n\t\t\t}\n\t\t\t\n\t\t}", "function delete_user($user_id = 0)\n\t{\n\t\t//delete user\n\t\t$this->db->where('user_id', $user_id);\n\t\t$this->db->delete('ci_users');\n\t}", "public function delete($user)\n {\n\n }", "public function deleteUser($id)\n {\n $user = User::find($id);\n $user->delete();\n }", "function deleteuser(){\n\n\t\t$id = $this->input->post('id');\n\n\t\t$this->setting_model->delete('londontec_users','user_id',$id);\n\t\n\t}", "public function delete(){\n $bd = Db::getInstance();\n $sql = \"DELETE FROM login WHERE id= :id\";\n $stmt = $bd->prepare($sql);\n $stmt->execute([\":id\" => $this->id]);\n }", "public function userDeleted()\n\t{\n\t\tself::authenticate();\n\n\t\t$userId = FormUtil::getPassedValue('user', null, 'GETPOST');\n\t\tif(!is_string($userId)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$user = $this->entityManager->getRepository('Owncloud_Entity_DeleteUser')->findOneBy(array('uname' => $userId));\n\t\tif(!($user instanceof Owncloud_Entity_DeleteUser)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\t\t$this->entityManager->remove($user);\n\t\t$this->entityManager->flush();\n\n\t\treturn self::ret(true);\n\t}", "public function destroy(){\n $query = 'delete from Usuario where\n user_id = \"'.$this->getUser_id().'\"';\n $this->driver->exec($query);\n }", "public function delUser($user_id) {\n $db = $this->dbConnect();\n $req = $db->prepare('DELETE FROM `p5_users` WHERE USER_ID = ?');\n $req->execute(array($user_id));\n $req->closeCursor();\n }", "public function deleteUser()\n {\n $user = User::find(Auth::id());\n $user->delete();\n return redirect('/');\n }", "public function delete($id) {\n\t\t// Delete the user\n\t\t$this->getDb()->delete('t_user', array('idUser' => $id));\n\t}", "function delete_user ($user_id) {\r\n $conn = db_connect();\r\n\r\n $query = \"delete from users where user_id = '\".$user_id.\"'\";\r\n $result = $conn->query($query);\r\n if (!$result) {\r\n throw new Exception(\"Could not connect to the db!\");\r\n } else {\r\n return true;\r\n }\r\n }", "function deleteUser(int $id) : void\n{\n $db = new Database;\n $db = $db->dbConnect();\n\n $sql = \"DELETE FROM user WHERE id = :id \";\n $deleteUser = $db->prepare($sql);\n $deleteUser->execute([':id' => $id]);\n}", "public function deleteUser(){\n\t\t$id = $_POST[\"id\"];\n\t\ttry {\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\t\t\t$result = $db->query('SELECT * FROM users WHERE id=\"'.$id.'\"');\n\n\t\t\t$row = $result->fetchColumn();\n\t\t\t\tif(!$row == 0){\n\t\t\t\t\t$statement = $db->query('DELETE FROM users WHERE id=\"'.$id.'\" ');\n\t\t\t\t\t$db = null;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"No data present.\");\n\t\t\t\t}\t\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}", "public function deleteUsuario(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_usuario WHERE usuario_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "function deleteUser($id)\r\n {\r\n $sql = \"DELETE FROM users WHERE ID_user='\" . $id . \"'\";\r\n $stmt = $this->connect()->query($sql);\r\n if (!$stmt) {\r\n echo \"Something wrong in the binding process. sql error?\";\r\n exit();\r\n } else {\r\n echo \"Delete Successful\";\r\n }\r\n }", "public function deleteUser()\n {\n \n $headers = getallheaders();\n $token = $headers['Authorization'];\n $key = $this->key;\n $userData = JWT::decode($token, $key, array('HS256'));\n $id_user = Users::where('email', $userData->email)->first()->id;\n $id_users = $_POST['idUser'];\n $id = $id_users;\n\n $user = Users::find($id);\n\n $rolUser = Users::where('email', $userData->email)->first();\n \n\n if ($rolUser->rol_id == 1){\n\n $user_name = Users::where('id', $id_users)->first()->name;\n Users::destroy($id);\n\n return $this->success('Acabas de borrar a', $user_name);\n\n }else{\n return $this->error(403, 'No tienes permisos');\n }\n \n\n if (is_null($user)) \n {\n return $this->error(400, 'El lugar no existe');\n }\n // }else{\n\n // $user_name = Users::where('id', $id_users)->first()->name;\n // Users::destroy($id);\n\n // return $this->success('Carlos he borrado el usuario', $user_name);\n // }\n }", "public function delete() {\n $stmt = $this->pro->prepare('delete from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n return $stmt->execute() == 1;\n }", "function deleteAccount(){\n try{\n $bdd = dbConnect();\n $stmt = $bdd->prepare(\"DELETE FROM user WHERE username=:username\");\n $stmt->execute(array(\n 'username' => $_SESSION['username']\n ));\n }\n catch(PDOException $e){\n echo \"<br>\" . $e->getMessage();\n }\n }", "public function delete($id) {\n // Delete the user\n $this->getDb()->delete('user', array('user_email' => $id));\n }", "public function delete($id_user){\n\t\t\t \n\t\t\t$this -> query = \"DELETE FROM usuari WHERE id='$id_user'\";\n\t\t\t$this -> executa_query();\n\t\t}", "function mysql_deluser($username)\n{\n $user_id = mysql_auth_user_id($username);\n\n dbDelete('entity_permissions', \"`user_id` = ?\", array($user_id));\n dbDelete('users_prefs', \"`user_id` = ?\", array($user_id));\n dbDelete('users_ckeys', \"`username` = ?\", array($username));\n\n return dbDelete('users', \"`username` = ?\", array($username));\n}", "function delete(){\n $user_id = $this->uri->rsegment('3');\n $this->_del($user_id);\n redirect(admin_url('user'));\n\n }", "function deleteUserDB($id){\n $data = User::find($id);\n session()->flash('deleteUser',$data['username']);\n $data->delete();\n return redirect('user/rabin?age=20');\n }", "public function deleteUser($id) {\n $database = new Database();\n\n $queryUser = 'DELETE FROM user WHERE id=:id';\n\n $database->prepareQuery($queryUser, 'id', $id, TRUE, FALSE);\n\n $queryUserPlan = 'DELETE FROM user_plan WHERE User_Id=:id';\n\n $database->prepareQuery($queryUserPlan, 'id', $id, TRUE, FALSE);\n }", "public function userDeleted();", "public function delete_user($id)\n\t{\n\n\t\t/**\n\t\t * Update the user table referent to the id\n\t\t */\n\t\t$this->db->where(\"id\", $id);\n\t\t$this->db->delete(\"users\");\n\n\t}", "function delete_user($id)\n {\n return $this->db->delete('users',array('id'=>$id));\n }", "function delete_user($id)\n {\n return $this->db->delete('users',array('id'=>$id));\n }", "function delete_user($id)\n {\n return $this->db->delete('users',array('id'=>$id));\n }", "public function delete(){\n\t\t\t$id = $_GET['id'];\n\t\t\t$result = $this->userrepository->delete($id);\n\t\t\tif($result = true){\n\t\t\t\theader(\"Location: index.php/admin/index/delete\");\n\t\t\t}\n\t\t}", "public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }", "public function delete($id)\n {\n $req = $this->_db->prepare('DELETE FROM user WHERE user_id=:id LIMIT 1');\n $req->bindValue(':id', $id);\n $req->execute();\n }", "public function test_users_destroy_valid_from_user_removes_from_db(){\n $this->signInUser();\n $this->delete(route('users.destroy', ['user' => 5])); \n $this->assertDatabaseMissing('users', ['id' => 5]);\n }", "public function delUser($user_id)\n {\n $user = User::findOrFail($user_id);\n if ($user) {\n $user->delete();\n return redirect()->back();\n }else{\n\n return redirect()->back();\n }\n }", "public function test_it_deletes_a_user()\n {\n $user = User::create(['email' => '[email protected]', 'given_name' => 'Andrew', 'family_name' => 'Hook']);\n\n $response = $this->call('DELETE', sprintf('/users/%d', $user->id));\n\n $this->assertEquals(204, $response->status());\n $this->assertEquals(0, User::count());\n }", "function deleteuser()\n {\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"DELETE FROM User WHERE ID = ?\"))) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n /* Prepared statement, stage 2: bind and execute */\n if (!($stmt->bind_param(\"i\", $this->id))) {\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 }", "static public function delete(){\n\n\t\tinclude ($GLOBALS['PATH'] . '/classes/requests/users/DeleteRequest.php');\n\n\t\t$requests = new DeleteRequest;\n\t\t$errors = $requests->validate();\n\t\t\n\t\tif(count($errors) > 0){\n\n\t\t\t//Verifica se id não existe no banco ou deixar enviar, força o redirecionamento para pagina /users\n\t\t\tif( isset($errors['id']) ){\n\n\t\t\t\t$back = '/users?errors=' . json_encode(['id' => $errors['id']]);\n\n\t\t\t}else{\n\n\t\t\t\t$back = explode('?', $_SERVER['HTTP_REFERER'])[0] ?? '/users';\n\t\t\t\t$back .= '?id='.$_POST['id'].'&errors=' . json_encode($errors);\n\n\t\t\t}\n\n\t\t\theader('Location: ' . $back);\n\n\t\t}else{\n\n\t\t\t//Caso não houver nenhum impedimento, faz o delete do usuario\n\t\t\t$conn = Container::getDB();\n\t\t\t$user = new User;\n\t\t\t$crud = new CrudUser($conn, $user);\n\n\t\t\t$crud->delete($_POST['id']);\n\n\t\t\t//Redireciona para pagina de /users\n\t\t\theader('Location: /users?success=Usuário deletado com sucesso');\n\t\t\t\n\t\t}\n\n\t}", "public function executeDeleteUser(HTTPRequest $request)\n {\n $this->managers->getManagerOf('Users')->delete($request->getData('id'));\n\n $this->app->user()->setFlash('L\\'utilisateur a bien été supprimé, merci !');\n \n $this->app->httpResponse()->redirect('/admin/new-user.html');\n }", "public function deleteUser(){\n\t\t$sql = \"SELECT COUNT(aid) AS theCount FROM administrator where uid=:uid\";\n\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_SESSION['UID'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch();\n\t\t\tif($row['theCount']==0){\n\t\t\t\treturn \"<h2> Error </h2>\" . \n\t\t\t\t\t\"<p> Only administrators can do this. </p>\";\n\t\t\t}\n\t\t\t$stmt ->closeCursor();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong checking the admin table.\";\n\t\t}\n\t\t\n\t\t//TODO: send the deleted user an email telling them they have been deleted\n\t\t\n\t\t$sql = \"DELETE FROM user WHERE uid=:uid\";\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_GET['u'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong deleting the user.\";\n\t\t}\n\n\t\treturn \"done\";\n\t}", "public function delete(){\n\t\t$this->_getDAO(false);\n\t\treturn $this->dao->delete($this->user->getID(), $this->ident);\n\t}", "public function deleteUser($id){\n$sql = \"DELETE FROM utilisateurs WHERE id = :id\";\n $stmt= $this->pdo->prepare($sql);\n $stmt->execute([\n 'id' => $id\n ]);\n}", "public function destroy(User $user)\n {\n \n }", "public function destroy($id)\n {\n $user = User::find($id)->delete();\n }", "public function deleteUser($idUser){\n $query = \"DELETE FROM final_usuario WHERE idUser=\".$idUser;\n return $this->con->action($query);\n }", "public function testDeleteUser()\n {\n $user = factory(User::class)->create();\n $this->assertTrue($user->delete());\n $this->assertEmpty(User::query()->find($user->id));\n }", "public function deluser($userid)\n { \n try{\n $sql = 'DELETE FROM users WHERE userid=:userid';\n $aa = $this->conns->prepare($sql);\n $aa->bindParam(':userid', $userid);\n $aa->execute();\n // echo \"Record deleted successfully\\n\";\n }catch (PDOException $e)\n {\n /*echo $sql . \"<br>\" . */$e->getMessage();\n }\n }", "public function userDeleteAction(Request $request)\n {\n $id = $request->get('id');\n\n $userRepo = $this->get('doctrine')->getManager()->getRepository('AppBundle:User');\n $user = $userRepo->find($id);\n\n // delete user\n $userManager = $this->getDoctrine()->getManager();\n $userManager->remove($user);\n $userManager->flush();\n \n return $this->redirectToRoute('app_users');\n }", "public function deleteUser(User $user): void\n {\n $em = $this->getDoctrine()->getManager();\n $em->remove($user);\n $em->flush();\n }", "function delete($id){\n\t\tglobal $conn;\n\t\t$sqlCmd = \"DELETE FROM user WHERE id=:id\";\n\t\t$stmt = $conn->prepare($sqlCmd);\n\t\t$stmt->bindParam(':id',$id);\n\t\t$stmt->execute();\n\t}", "public function delete($params) {\n $token = $this->require_authentication();\n $userid = $token->getUser()->getUserId();\n\n // delete user object, redirect to homepage\n try {\n $res = User::delete($this->getDBConn(), $userid);\n } catch (\\PDOException $dbErr) {\n $this->addFlashMessage('Database error on deleting user:<br>'.$dbErr->getMessage(), self::FLASH_LEVEL_SERVER_ERR);\n $this->redirect(\"/\");\n }\n\n // make sure user is logged out after deletion\n session_unset();\n session_destroy();\n session_start();\n\n $this->addFlashMessage(\"Deleted user.\", self::FLASH_LEVEL_INFO);\n\n if ($res) {\n error_log(\"Deleted user \".$userid);\n $this->redirect(\"/\");\n } else {\n $this->error404('/users/delete/' . $userid);\n }\n }", "function eliminarUser($id) {\n $sql = \"DELETE FROM usuario WHERE id='\" . $id . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "public static function delete($conn, User $user) {\n\t\t$query = $conn->prepare('DELETE FROM users WHERE id = ?;');\n\t\t$query->bind_param(\"i\", $user->id);\n\t\treturn $query->execute();\n\t}", "public function delete()\n {\n foreach ($this->users as $user) {\n $uid = $user->id;\n // delete whole website info for this user\n if ((bool)$this->delete) {\n $model = new FormUserClear($user);\n $model->comments = true;\n $model->content = true;\n $model->feedback = true;\n $model->wall = true;\n $model->make();\n }\n\n // delete avatars\n File::remove('/upload/user/avatar/big/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/medium/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/small/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/original/' . $uid . '.jpg');\n // delete user profile and auth data\n $user->profile()->delete();\n // delete user provider data\n $user->provider()->delete();\n // delete user object\n $user->delete();\n }\n }" ]
[ "0.87488234", "0.8642228", "0.83821976", "0.83556765", "0.82819825", "0.80244935", "0.7997251", "0.7979946", "0.78483224", "0.7843256", "0.7814623", "0.7740485", "0.77305776", "0.77305776", "0.77305776", "0.77167374", "0.7667169", "0.7659463", "0.7650734", "0.7633149", "0.76048106", "0.76044023", "0.7602058", "0.7600106", "0.75816584", "0.75750124", "0.7543956", "0.75358796", "0.7529439", "0.75279933", "0.75242347", "0.75212324", "0.7520274", "0.7519983", "0.75164485", "0.7508362", "0.7508166", "0.75034356", "0.74957496", "0.74919355", "0.74826646", "0.7481893", "0.7478954", "0.74736166", "0.7472639", "0.74622977", "0.74440426", "0.74208146", "0.73950005", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.73893076", "0.7374219", "0.7373862", "0.73647153", "0.7350933", "0.7349794", "0.7347708", "0.7336329", "0.7332585", "0.733008", "0.73289657", "0.7328394", "0.7317165", "0.730861", "0.730861", "0.730861", "0.73073685", "0.73070735", "0.73051727", "0.7303382", "0.7302502", "0.7294716", "0.72811204", "0.728011", "0.72771513", "0.7259176", "0.7248766", "0.7245434", "0.7244803", "0.7240466", "0.72365904", "0.72362506", "0.72283405", "0.7228321", "0.7225328", "0.7224856", "0.7214902", "0.721425", "0.72126925", "0.72074014" ]
0.0
-1
Simple password verification function
private static function verifyPassword($submittedPassword, $dbPassword) { return password_verify($submittedPassword, $dbPassword); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function passwordValid($password) {\n\treturn true;\n}", "public function checkPassword($value);", "function check_password($password)\n{\n return ($password == 'qwerty');\n}", "public function verify($password, $securePass);", "function passwd_verify(string $password, string $hash): bool\n{\n return password_verify($password, $hash);\n}", "public function verifyPassword (string $hash, string $password): bool;", "public function verify($password): bool;", "public function check_password($password)\n {\n }", "public function hasPassword() : bool;", "function check_password($password)\n{\n if (strlen($password) < 8) {\n throw new Exception(\"password_short.\", 1);\n return false;\n }\n if (!preg_match(\"/[0-9]{1,}/\", $password) || !preg_match(\"/[A-Z]{1,}/\", $password)) {\n throw new Exception(\"password_bad\", 1);\n return false;\n }\n return true;\n}", "public function isPassword($password);", "function checkPassword($password, $username = false) {\n $length = strlen($password);\n\n if ($length < 8) {\n return FALSE;\n } elseif ($length > 32) {\n return FALSE;\n } else {\n\n//check for a couple of bad passwords:\n if ($username && strtolower($password) == strtolower($username)) {\n return FALSE;\n } elseif (strtolower($password) == 'password') {\n return FALSE;\n } else {\n\n preg_match_all(\"/(.)\\1{2}/\", $password, $matches);\n $consecutives = count($matches[0]);\n\n preg_match_all(\"/\\d/i\", $password, $matches);\n $numbers = count($matches[0]);\n\n preg_match_all(\"/[A-Z]/\", $password, $matches);\n $uppers = count($matches[0]);\n\n preg_match_all(\"/[^A-z0-9]/\", $password, $matches);\n $others = count($matches[0]);\n\n//see if there are 3 consecutive chars (or more) and fail!\n if ($consecutives > 0) {\n return FALSE;\n } elseif ($others > 1 || ($uppers > 1 && $numbers > 1)) {\n//bulletproof\n return TRUE;\n } elseif (($uppers > 0 && $numbers > 0) || $length > 14) {\n//very strong\n return TRUE;\n } else if ($uppers > 0 || $numbers > 2 || $length > 9) {\n//strong\n return TRUE;\n } else if ($numbers > 1) {\n//fair\n return FALSE;\n } else {\n//weak\n return FALSE;\n }\n }\n }\n return $returns;\n}", "public function testCheckPassword()\n {\n $hasher = new PasswordHash(8, true);\n\n $testHash = '$P$BbD1flG/hKEkXd/LLBY.dp3xuD02MQ/';\n $testCorrectPassword = 'test123456!@#';\n $testIncorrectPassword = 'test123456!#$';\n\n $this->assertTrue($hasher->CheckPassword($testCorrectPassword, $testHash));\n $this->assertFalse($hasher->CheckPassword($testIncorrectPassword, $testHash));\n }", "function password_security($tested_password){\r\n $isSecured = false;\r\n $contains_letter = preg_match('/[a-zA-Z]/', $tested_password);\r\n $contains_capital = preg_match('/[A-Z]/', $tested_password);\r\n $contains_digit = preg_match('/\\d/', $tested_password);\r\n $contains_special = preg_match('/[^a-zA-Z\\d]/', $tested_password);\r\n\r\n $contains_all = $contains_letter && $contains_capital && $contains_digit && $contains_special;\r\n\r\n if (strlen($tested_password) >= 8 && $contains_all == \"1\") {\r\n $isSecured = true;\r\n }\r\n return $isSecured;\r\n}", "public function isValidPassword($uid, $password);", "function isValidPassword2($password)\n{\n return checkLength($password) && specialChar($password) && containsUpperAndLower($password);\n}", "static function checkPassword($password, $answer){\n require INCLUDE_DIR.'password.inc.php';\n return password_verify($password, $answer);\n }", "function is_password_valid ($password, $user_data) {\n // the one in the user records.\n $is_valid = $password == $user_data['password'];\n return $is_valid;\n}", "public function valida_password($password){\n\t\tif (preg_match(\"/^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/\", $password)) \n\t\t\techo \"Su password es seguro.\"; \n\t\telse echo \"Su password no es seguro.\";\n\n\t}", "function validate_password($password)\n {\n $reg1='/[A-Z]/'; //Upper case Check\n $reg2='/[a-z]/'; //Lower case Check\n $reg3='/[^a-zA-Z\\d\\s]/'; // Special Character Check\n $reg4='/[0-9]/'; // Number Digit Check\n $reg5='/[\\s]/'; // Number Digit Check\n\n if(preg_match_all($reg1,$password, $out)<1) \n return \"There should be atleast one Upper Case Letter...\";\n\n if(preg_match_all($reg2,$password, $out)<1) \n return \"There should be atleast one Lower Case Letter...\";\n\n if(preg_match_all($reg3,$password, $out)<1) \n return \"There should be atleast one Special Character...\";\n\n if(preg_match_all($reg4,$password, $out)<1) \n return \"There should be atleast one numeric digit...\";\n \n if(preg_match_all($reg5,$password, $out)>=1) \n return \"Spaces are not allowed...\";\n\n if(strlen($password) <= 8 || strlen($password) >= 16 ) \n return \"Password Length should be between 8 and 16\";\n\n return \"OK\";\n }", "function checkPassword($clientPassword){\r\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\r\n return preg_match($pattern, $clientPassword);\r\n }", "function validPassword($password){\t\r\n \tglobal $API;\r\n return $API->userValidatePassword($this->username,$password); \r\n }", "function validate($firstpw, $secondpw) {\n\tif(strcmp($firstpw, $secondpw) == 0) {\n\t\t// Booleans to check password complexity - if true, then firstpw is ok\n\t\t$uppercase = preg_match('@[A-Z]@', $firstpw);\n\t\t$lowercase = preg_match('@[a-z]@', $firstpw);\n\t\t$number = preg_match('@[0-9]@', $firstpw);\n\t\tif($uppercase && $lowercase && $number && strlen($firstpw) > 8) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function pwdMatch($password, $passwordRepeat){\n $result = true;\n if ($password !== $passwordRepeat){\n $result = true;\n }\n else{\n $result = false;\n }\n return $result;\n}", "function checkPassword($clientPassword)\n{\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\n return preg_match($pattern, $clientPassword);\n}", "function password($pass)\n\t{\n\t\tif (strcmp($pass, AUCTION_PASSWORD))\n\t\t\texit(\"Wrong password\");\n\t}", "private function valid_password() {\n return (strlen($this->password) == 6);\n }", "function isPassOk($pass){\n\treturn true;\n}", "function validate_password($field) {\n\t\tif ($field == \"\") return \"No Password was entered.<br>\";\n\t\telse if (strlen($field) < 6)\n\t\t\treturn \"Password must be at least 6 characters.<br>\";\n\t\telse if (!preg_match(\"/[a-z]/\",$field) || !preg_match(\"/[A-Z]/\",$field) || !preg_match(\"/[0-9]/\",$field) )\n\t\t\treturn \"Password require one each of a-z, A-Z,0-9.<br>\";\n\t\treturn \"\";\n\t}", "function isValidPass($p) {\r\n global $passes;\r\n $i = 0;\r\n foreach ($passes as $password) {\r\n if($passes[$i]==$p) {\r\n return true;\r\n }\r\n $i++;\r\n }\r\n }", "function isPassCorrect($psw, $psw_repeat){\r\n\t$regex = '/(?:[^`!@#$%^&*\\-_=+\\'\\/.,]*[`!@#$%^&*\\-_=+\\'\\/.,]){2}/';\r\n\tif (strlen($psw) >= 2 && strlen($psw_repeat) <= 255 && $psw == $psw_repeat) {\r\n\t\tif (preg_match($regex, $psw)) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}", "public function checkPassword($password){\n\n/*\n* verify the password\n* if correct ,return true else return false\n* verify the password\n*/\n\n if (password_verify($password,$this->getHashedPassword())){\n return true;\n }else{\n return false;\n }\n\n }", "function verify_password($username,$password) {\r\n\r\n\t/* MODIFY THIS FOR YOUR INSTITUTION! */\r\n\tif ($username == 'dssadmin' && password == 'dssadmin') return 1;\r\n\telse return 0;\r\n\r\n}", "function passwordGood($pass) {\n\t// default encoding/encoding specified in php.ini for nginx's php fpm module\n\t// is 'UTF-8'\n\t$len = mb_strlen($pass);\n\t//$len = strlen($pass);\n\t// original code of ($len >= 8 && $len <= 24) doesn't seem to work since I think\n\t// when true these return 1, when false they seem to return nothing, when printed empty string\n\t// be careful, these seem to return nothing or they don't print properly\n\t// this does work though :P\n\tif ( ( $len < 8 ) || ( $len > 24 ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function validate_pw($password, $hash){\n /* Regenerating the with an available hash as the options parameter should\n * produce the same hash if the same password is passed.\n */\n return crypt($password, $hash)==$hash;\n }", "public function verify($password, $hash);", "function testPass($pass){\n$level=0;\nif(eight($pass)){$level+=1;}\nif(upper($pass)){$level+=1;}\nif(lower($pass)){$level+=1;}\nif(hasDigit($pass)){$level+=1;}\nif(hasSpecial($pass)){$level+=1;}\n\nswitch($level){\ncase 1: echo 'Password strength : <b><font color=red\">Very weak.</font></b>';return false; break;\ncase 2: echo 'Password strength : <b><font color=\"orange\">Weak.</font></b>';return true; break;\ncase 3: echo 'Password strength : <b><font color=\"grey\">Medium</font></b>';return true; break;\ncase 4: echo 'Password strength : <b><font color=\"blue\">Good</font></b>';return true; break;\ncase 5: echo 'Password strength : <b><font color=\"green\">Strong.</font></b>';return true; break;\ndefault : echo 'Password strength : <b><font color=\"red\">Very weak.</font></b>'; break;}\n}", "function checkIfPasswordsMatch($password1, $password2) {\r\n return $password1 == $password2;\r\n}", "function vPassword2() \r\n\t\t{\r\n\t\t\t# Check password strength\r\n\t\t\t$p = $p1;\r\n\t\t\t\r\n\t\t\tif( strlen($p) < 8 ) $reg_errors[] = \"Password too short!\";\r\n\t\t\t\r\n\t\t\tif( strlen($p) > 20 ) $reg_errors[] = \"Password too long!\";\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[0-9]+#\", $p) ) $reg_errors[] = \"Password must include at least one number!\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[a-z]+#\", $p) ) $reg_errors[] = \"Password must include at least one letter!\";\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[A-Z]+#\", $p) ) $reg_errors[] = \"Password must include at least one CAPS!\";\r\n\t\t\t\r\n\t\t\t/* if( !preg_match(\"#\\W+#\", $p) ) $errors[] = \"Password must include at least one symbol!\"; */\t\r\n\t\t\t\r\n\t\t}", "function isValidPassword($password)\n{\n $len = strlen($password);\n if ($len < MIN_PASSWORD) {\n return false;\n }\n return true;\n}", "function valid_pass($password)\n {\n $r2 = '/[A-z]/'; //lowercase\n $r3 = '/[0-9]/'; //numbers\n $r4 = '/[~!@#$%^&*()\\-_=+{};:<,.>?]/'; // special char\n\n /*if (preg_match_all($r1, $candidate, $o) < 1) {\n $msg = \"密码必须包含至少一个大写字母,请返回修改!\";\n return FALSE;\n }*/\n if (preg_match_all($r2, $password, $o) < 1) {\n $msg = \"密码必须包含至少一个字母,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n if (preg_match_all($r3, $password, $o) < 1) {\n $msg = \"密码必须包含至少一个数字,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n /*if (preg_match_all($r4, $candidate, $o) < 1) {\n $msg = \"密码必须包含至少一个特殊符号:[~!@#$%^&*()\\-_=+{};:<,.>?],请返回修改!\";\n return FALSE;\n }*/\n if (strlen($password) < 8) {\n $msg = \"密码必须包含至少含有8个字符,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n return ['code' => 0, 'msg' => 'success'];\n }", "public function hash_check($user,$pass){\r\n //check if password matches hash \r\n $hash=array();\r\n $hash= checkLoginInfoTest($user);\r\n foreach ($hash as $hashItem):\r\n $hashGiven=(string)$hashItem['password'];\r\n endforeach;\r\n if (isset($hashGiven)){\r\n if (password_verify($pass,(string)$hashGiven))\r\n { \r\n return true;\r\n } \r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n \r\n \r\n}", "function leonardo_check_password($password,$hash) {\n\treturn leonardo_check_hash($password, $hash);\n}", "function nrua_check_password($pwd) {\n\t$errors = [];\n\t\n\tif (strlen($pwd) < 8) {\n\t$errors[] = \"Password too short!\";\n\t}\n\t\n\tif (!preg_match(\"#[0-9]+#\", $pwd)) {\n\t$errors[] = \"Password must include at least one number!\";\n\t}\n\t\n\tif (!preg_match(\"#[a-zA-Z]+#\", $pwd)) {\n\t$errors[] = \"Password must include at least one letter!\";\n\t}\n\t\n\treturn $errors;\n}", "public function isPasswordValid(string $encoded, string $raw);", "function check() {\r\n static $pass = NULL;\r\n if (is_null($pass)) {\r\n if (function_exists('crypt')) {\r\n $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';\r\n $test = crypt(\"password\", $hash);\r\n $pass = $test == $hash;\r\n } else {\r\n $pass = false;\r\n }\r\n }\r\n return $pass;\r\n }", "function valid_password($pwd) {\n\t\tif (!$pwd)\n\t\t\treturn FALSE;\n\t\tif (strlen($pwd) < 6)\n\t\t\treturn FALSE;\n\t\tif (!preg_match('/[a-zA-Z]+/', $pwd) || !preg_match('/[0-9]+/', $pwd))\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "private function validate_password($password){\n\t\treturn TRUE;\n\t}", "function pwdMatch($password, $pwdRepeat) {\n $result=true;\n if($password !== $pwdRepeat){\n $result =false;\n } else {\n $result = true;\n }\n return $result;\n}", "public function test($password) {\n $error = array();\n if($password == trim($password) && strpos($password, ' ') !== false) {\n $error[] = \"Password can not contain spaces!\";\n }\n \n if(($this->password_lenghtMin!=null) && (strlen($password) < $this->password_lenghtMin)) {\n $error[] = \"Password too short! Minimum \".$this->password_lenghtMin.\" characters.\";\n }\n if(($this->password_lenghtMax!=null) && (strlen($password) > $this->password_lenghtMax)) {\n $error[] = \"Password too long! Maximum \".$this->password_lenghtMax.\" characters.\";\n }\n \n if(($this->password_number!=null) && (!preg_match(\"#[0-9]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_number.\" number(s)!\";\n } elseif($this->password_number>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_number) {\n $error[] = \"Password must include at least \".$this->password_number.\" number(s)!\";\n }\n }\n\n if(($this->password_letter!=null) && (!preg_match(\"#[a-z]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_letter.\" letter(s)! \";\n } elseif($this->password_letter>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_letter) {\n $error[] = \"Password must include at least \".$this->password_letter.\" letter(s)! \";\n }\n }\n\n if(($this->password_capital!=null) && (!preg_match(\"#[A-Z]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_capital.\" capital letter(s)! \";\n } elseif($this->password_capital>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_capital) {\n $error[] = \"Password must include at least \".$this->password_capital.\" capital letter(s)! \";\n }\n }\n \n \n if(($this->password_symbol!=null) && (!preg_match(\"/\\W+/\", $password))) {\n $error[] = \"Password must include at least \".$this->password_symbol.\" symbol(s)!\";\n } elseif($this->password_symbol>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_symbol) {\n $error[] = \"Password must include at least \".$this->password_symbol.\" symbol(s)!\";\n }\n }\n \n if(($this->password_strength!=null) && (($this->strength($password)!==false) && ($this->strength($password)['score']<$this->password_strength))) {\n $error[] = \"Password too weak! \".$this->strength($password)['score'].'/4 minimum '.$this->password_strength;\n }\n\n if(!empty($error)){\n return $error;\n } else {\n return true;\n }\n }", "public function password_check($str){\n \n if($this->user_model->exist_row_check('username', $this->username_temp) > 0){\n $user_detail = $this->user_model->getUserDetailByUsername($this->username_temp);\n if($user_detail->password == crypt($str,$user_detail->password)){\n return TRUE;\n }\n else{\n $this->form_validation->set_message('password_check','Password yang dimasukkan tidak sesuai');\n return FALSE;\n }\n }else{\n $this->form_validation->set_message('password_check','Username yang dimasukkan tidak sesuai');\n return FALSE;\n }\n \n }", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "function password_check($password) {\n\t\treturn password_check_user($this->userid, $password);\n\t}", "function password_verify($password, $hash) {\r\n if (!function_exists('crypt')) {\r\n trigger_error(\"Crypt must be loaded for password_verify to function\", E_USER_WARNING);\r\n return false;\r\n }\r\n $ret = crypt($password, $hash);\r\n if (!is_string($ret) || strlen($ret) != _strlen($hash) || _strlen($ret) <= 13) {\r\n return false;\r\n }\r\n $status = 0;\r\n for ($i = 0; $i < _strlen($ret); $i++) {\r\n $status |= (ord($ret[$i]) ^ ord($hash[$i]));\r\n }\r\n return $status === 0;\r\n }", "function checkLength($password)\n{\n return strlen($password) >= MIN_PASSWORD;\n}", "function user_pass_ok($user_login, $user_pass)\n {\n }", "function password_verify($password, $hash) {\n return crypt($password,$hash) === $hash;\n }", "function vPassword( $password )\r\n\t\t{\r\n\t\t\t\treturn preg_match( '/^(?=^.{8,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$/', $password );\r\n\t\t\t\t\r\n\t\t}", "function wp_validate_application_password($input_user)\n {\n }", "public function validate_password($password){\nif(!preg_match('%\\A(?=[-_a-zA-Z0-9]*?[A-Z)(?=[-_a-zA-Z0-9]*?[a-z])(?=[-_a-zA-Z0-9]*?[0-9])\\S{6,}\\z%', $password)){\n\treturn false;\n\t}else{\n\t\treturn true;\n\t\t}\n}", "function _cek_password($str)\n{\n if ($str!=\"\") {\n if (pass_decrypt(profile(\"token\"),$str,profile(\"password\"))) {\n return true;\n }else {\n $this->form_validation->set_message('_cek_password', '* Password Salah');\n return false;\n }\n }else {\n return true;\n }\n}", "function passwordMatch($id, $password) {\n \n $userdata = $this->getUserDataByUserId($id);\n \n // use pass word verify to decrypt the pass stored in the database and compare it eith the one user provided\n if(password_verify($password,$userdata['pwd'])) {\n return true;\n } else {\n return false;\n }\n \n \n }", "function password_check($str)\n\t\t\t{\n\t\t\t\tif(preg_match('/[0-9]/', $str) && preg_match('/[a-zA-Z]/', $str))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t}", "static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }", "static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }", "function valid_password($password1,$password2)\n{\n\t// if the comparison of the 2 strings (the passwords)\n\t// results in 0 difference\n\tif(strcmp($password1,$password2)==0)\n\t{\n\t\t// if the password has a length of at least 6 characters\n\t\tif(strlen($password1)>=6)\n\t\t{\n\t\t\t// then return true\n\t\t\treturn true;\n\t\t}\n\t\t// if length lower than 6\n\t\telse\n\t\t{\n\t\t\t// return false\n\t\t\treturn false;\n\t\t}\n\t}\n\t// if 2 passwords are different\n\telse\n\t{\n\t\t// return false\n\t\treturn false;\n\t}\n}", "function validatePassword($pwd) {\r\n\t\treturn (strlen($pwd) >= 6 && preg_match_all(\"/[0-9]/\", $pwd) >= 2);\r\n\t}", "function confirmPassword($password, $confirmPassword){\n return $password == $confirmPassword;\n }", "function testPasswordErr($password) {\n if (empty($password)) {\n $passwordErr = 'Password required';\n } else {\n $password = test_input($password);\n //VALIDATE PASSWORD\n if (!filter_var($password, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,10})\")))) {\n //da 4 a 10 caratteri, deve contenere maiuscole, minuscole e numeri\n $passwordErr = \"Invalid Password format\";\n } else\n $passwordErr = \"*\";\n }\n return $passwordErr;\n }", "function validatePassword() : bool\n {\n if($this->Password && preg_match('/^[[:alnum:]]{6,20}$/', $this->Password)) // solo numeri-lettere da 6 a 20\n {\n return true;\n }\n else\n return false;\n }", "function validate_password($plain, $encrypted) {\n if ($plain != \"\" && $encrypted != \"\") {\n// split apart the hash / salt\n $stack = explode(':', $encrypted);\n\n if (sizeof($stack) != 2) return false;\n\n if (md5($stack[1] . $plain) == $stack[0]) {\n return true;\n }\n }\n\n return false;\n }", "function password_is_hash($password)\r\n{\r\n $nfo = password_get_info($password);\r\n return $nfo['algo'] != 0;\r\n}", "public function password_verifies() {\n\t\treturn AuthComponent::password($this->data[$this->alias]['old_password']) === $this->data[$this->alias]['password'];\n\t}", "public function check_password_strength($password){\n // Validate password strength\n $uppercase = preg_match('@[A-Z]@', $password);\n $lowercase = preg_match('@[a-z]@', $password);\n $number = preg_match('@[0-9]@', $password);\n $specialChars = preg_match('@[^\\w]@', $password);\n\n if(!$uppercase || !$lowercase || !$number || !$specialChars || strlen($password) < 8) {\n $GLOBALS['error_message'] = 'Password should be at least 8 characters in length and should include at least one upper case letter, one number, and one special character.';\n return false;\n }else{\n return true;\n }\n }", "public function verify_hash_pass($password, $hash) {\n\n return password_verify ($password, $hash);\n}", "function wp_check_password($password, $hash, $user_id = '')\n {\n }", "public function check_password($password)\n {\n return FALSE;\n }", "public function isPasswordValid($encoded, $raw, $salt)\n {\n\n }", "function CheckPassword($pw) {\n //if the length of a password is less than 8, an error is show to the user\n if (strlen($pw) < 8) {\n $regError = \"Your password must contain at least 8 characters!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if the password doesnt contain a number, an error is shown to the user\n elseif (!preg_match(\"#[0-9]+#\", $pw)) {\n $regError = \"Your password must contain at least 1 number!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if the password doesnt contain a capital letter, an error is shown to the user\n elseif (!preg_match(\"#[A-Z]+#\", $pw)) {\n $regError = \"Your password must contain at least 1 capital letter!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if the password doesnt contain a lowercase letter, an error is shown to the user\n elseif (!preg_match(\"#[a-z]+#\", $pw)) {\n $regError = \"Your password must contain at least 1 lowercase letter!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if these 4 requirements are met, the function returns true (which means that the password is good)\n else {\n return true;\n }\n}", "public function password($password);", "function valid_passwd($uid, $passwd) {\n $dbh = DB::connect();\n\n $q = \"SELECT salt, passwd \";\n $q.= \"FROM Users \";\n $q.= \"WHERE id = \" . $dbh->quote($uid);\n $result = $dbh->query($q);\n\n if (!$result) {\n return false;\n }\n\n $row = $result->fetch(PDO::FETCH_NUM);\n $salted_hash = hash(\"sha256\", $row[0] . $passwd);\n\n if ($salted_hash == $row[1]) {\n return true;\n } else {\n return false;\n }\n}", "public function password_verification() {\n\n $criteria = array(\"email\" => $this->ci->input->post(\"email\"));\n\n $passed = $this->verify_password($criteria, $this->ci->input->post(\"password\")); // variable to mark the user is allowed to pass or not.\n\n if (!$passed) {\n $this->ci->form_validation->set_message(\"password_verification\", \"Invalid email or password.\");\n }\n\n return $passed;\n }", "function verifyHash($password, $hash) {\r\n return $hash == crypt($password, $hash);\r\n}", "function is_valid_password($password)\n{\n if (is_null($password) || strlen($password) < 6 || strlen($password) > 40)\n {\n return false;\n }\n $pattern = \"/^[a-z0-9~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]{6,40}$/i\";\n\n return (preg_match($pattern, $password) == 1);\n}", "static function password_verify($password, $hash) {\n $ret = substr($hash, 0, 3);\n if (!isset($hash[12])) return false;\n\n if ('$P$' === $ret || '$H$' === $ret) {\n $ret = self::crypt_md5($password, $hash);\n } else {\n/**/ if (!function_exists('crypt')) {\n trigger_error(\"Crypt must be loaded for password_verify to function\", E_USER_WARNING);\n return false;\n/**/ }\n\n/**/ if (PASSWORD_DEFAULT && !$bcrypt_2y)\n if ('$' === $hash[3] && ('$2x' === $ret || '$2y' === $ret)) $hash[2] = 'a';\n\n $ret = crypt($password, $hash);\n }\n\n if (!is_string($ret) || strlen($ret) != strlen($hash) || strlen($ret) <= 13) {\n return false;\n }\n\n $status = 0;\n $i = strlen($ret);\n while ($i-- > 0) {\n $status |= (ord($ret[$i]) ^ ord($hash[$i]));\n }\n\n return $status === 0;\n }", "function is_secured_password($password)\n{\n if (is_null($password) || strlen($password) < 6 || strlen($password) > 40)\n {\n return false;\n }\n $pattern = \"/^[a-z0-9~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]{6,40}$/i\";\n $pattern1 = \"/[A-Z]/\";\n $pattern2 = \"/[a-z]/\";\n $pattern3 = \"/[0-9]/\";\n $pattern4 = \"/[~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]/\";\n\n return (preg_match($pattern, $password) == 1) && (preg_match($pattern1, $password) == 1) && (preg_match($pattern2, $password) == 1) && (preg_match($pattern3, $password) == 1) && (preg_match($pattern4, $password) == 1);\n}", "function checkPasswordErrors($password, $username = false) {\n $returns = array(\n 'strength' => 0,\n 'error' => 0,\n 'text' => ''\n );\n\n $length = strlen($password);\n\n if ($length < 8) {\n $returns['error'] = 1;\n $returns['text'] = 'The password is not long enough';\n } elseif ($length > 32) {\n $returns['error'] = 1;\n $returns['text'] = 'The password is too long';\n } else {\n\n//check for a couple of bad passwords:\n if ($username && strtolower($password) == strtolower($username)) {\n $returns['error'] = 4;\n $returns['text'] = 'Password cannot be the same as your Username';\n } elseif (strtolower($password) == 'password') {\n $returns['error'] = 3;\n $returns['text'] = 'Password is too common';\n } else {\n\n preg_match_all(\"/(.)\\1{2}/\", $password, $matches);\n $consecutives = count($matches[0]);\n\n preg_match_all(\"/\\d/i\", $password, $matches);\n $numbers = count($matches[0]);\n\n preg_match_all(\"/[A-Z]/\", $password, $matches);\n $uppers = count($matches[0]);\n\n preg_match_all(\"/[^A-z0-9]/\", $password, $matches);\n $others = count($matches[0]);\n\n//see if there are 3 consecutive chars (or more) and fail!\n if ($consecutives > 0) {\n $returns['error'] = 2;\n $returns['text'] = 'Too many consecutive characters';\n } elseif ($others > 1 || ($uppers > 1 && $numbers > 1)) {\n//bulletproof\n $returns['strength'] = 5;\n $returns['text'] = 'Virtually Bulletproof';\n } elseif (($uppers > 0 && $numbers > 0) || $length > 14) {\n//very strong\n $returns['strength'] = 4;\n $returns['text'] = 'Very Strong';\n } else if ($uppers > 0 || $numbers > 2 || $length > 9) {\n//strong\n $returns['strength'] = 3;\n $returns['text'] = 'Strong';\n } else if ($numbers > 1) {\n//fair\n $returns['strength'] = 2;\n $returns['text'] = 'Fair';\n } else {\n//weak\n $returns['strength'] = 1;\n $returns['text'] = 'Weak';\n }\n }\n }\n return $returns;\n}", "function verifyUser ($username, $hash) {\r\n //TO-DO\r\n\r\n //if credentials match return true\r\n\r\n //else return false\r\n\r\n //dummy CODE\r\n return true;\r\n}", "function verify($password, $hashedPassword) {\n return crypt($password, $hashedPassword) == $hashedPassword;\n}", "function check_passwords($username, $password1, $password2)\n{\n\treturn $password1 = $password2 = Raven::_pwd($username); // This is how Raven does passwords\n}", "public function testValidLengthPassword()\n {\n $password = \"accepted\";\n\n $response = $this->user->isValidPassword($password);\n\n $this->assertTrue($response);\n }", "function get_password($usrid){\r\n\t\r\n}", "function testPasswordsAreEqual($password, $password_one) {\n if (empty($password_one)) {\n $passwordErr = 'Password required';\n } elseif (strlen($password) > 0 && strlen($password_one) > 0 && $password == $password_one) {\n //QUERY FOR DATABASE CONNECTION HERE\n if (!filter_var($password, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,10})\")))) {\n //da 4 a 10 caratteri, deve contenere maiuscole, minuscole e numeri\n $passwordErr = \"Invalid Password format\";\n } else\n $passwordErr = \"*\";\n }else {\n $passwordErr = 'Passwords do not match!';\n }\n return $passwordErr;\n }", "function validate_password($candidate) \n{\n if (!empty($candidate))\n {\n // Declare and Initialize Local Variables\n $CritCount = 0; //Tabulator for keeping track of number of criteria matched\n\n /*\n Regular Expression Example $\\S*(?=\\S{8,})(?=\\S*[a-z])(?=\\S*[A-Z])(?=\\S*[\\d])(?=\\S*[\\W])\\S*$\n $ = beginning of string\n \\S* = any set of characters\n (?=\\S{8,}) = of at least length 8\n (?=\\S*[a-z]) = containing at least one lowercase letter\n (?=\\S*[A-Z]) = and at least one uppercase letter\n (?=\\S*[\\d]) = and at least one number\n (?=\\S*[\\W]) = and at least a special character (non-word characters)\n $ = end of the string\n\n */\n // Test for each requirement \n if (strlen($candidate) >= 8) $CritCount = $CritCount + 10; // Value of 10 for minimum length\n if (preg_match('/[a-z]/', $candidate)) $CritCount = $CritCount + 1; //Contains lower case a-z\n if (preg_match('/[A-Z]/', $candidate)) $CritCount = $CritCount + 1; //Contains UPPER case A-Z\n if (preg_match('/[\\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one numeric digit\n if (preg_match('/[^a-zA-Z\\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one special Character (!@#$%^&*()-_, etc.)\n \n if ($CritCount > 12) //Meets minimum length, plus 3 additional criteria\n {\n return TRUE;\n }\n else \n {\n return FALSE;\n }\n }\n else\n return false;\n}", "function passwordMatch($wachtwoord, $wachtwoordbevestiging) {\n\tif ($wachtwoord !== $wachtwoordbevestiging) {\n\t\t$result = true;\n\t} else {\n\t\t$result = false;\n\t}\n\treturn $result;\n}", "function checkUserPassword($username, $password)\n{\n\n $user = getuser($username);\n\n return $user !== false && password_verify($password, $user['password']);\n}", "function m_verifyEditPass()\n\t{\n\t\t$this->errMsg=MSG_HEAD.\"<br>\";\n\t\tif(empty($this->request['password']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_PASS_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['verify_pw']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_VERIFYPASS_EMPTY.\"<br>\";\n\t\t}\n\t\tif($this->request['password']!=$this->request['verify_pw'])\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_PASS_NOTMATCHED.\"<br>\";\n\t\t}\n\t\treturn $this->err;\n\t}", "public function passwordEntryIsValid() {\r\n \r\n //todo put logic here (same as email)\r\n // also check if it matches confirmpassword\r\n // set the var equal to function call of getpassword\r\n $password = $this->getPassword();\r\n // If the fields empty\r\n if ( empty($password) ) {\r\n // Will send it to errors as username and display the message to user\r\n $this->errors[\"password\"] = \"Password is missing.\";\r\n } \r\n // Calls the password function above and if its not equal to the orgincal password returns error\r\n else if ( $this->getConfirmpassword() !== $this->getPassword() ){\r\n // Message displayed to user\r\n $this->errors[\"password\"] = \"Password does not match confirmation password.\";\r\n }\r\n // Also goes test the password against the password is valid function in the validator class\r\n else if ( !Validator::passwordIsValid($this->getPassword()) ) {\r\n $this->errors[\"password\"] = \"Password is not valid.\"; \r\n }\r\n //Will return if its empty and whether any errors are contained\r\n return ( empty($this->errors[\"password\"]) ? true : false ) ;\r\n }", "function validate_password($hashed_password, $cleartext_password) {\n if (!is_string($hashed_password) || !is_string($cleartext_password))\n return false;\n if (config\\HASHING_ALGORITHM == \"crypt\") {\n $salt_end = strrpos($hashed_password, \"$\");\n if ($salt_end === false) {\n // DES, first two charachers is salt.\n $salt = substr($hashed_password, 0, 2);\n } else {\n // Salt before $.\n $salt_end++;\n $salt = substr($hashed_password, 0, $salt_end);\n }\n return crypt($cleartext_password, $salt) == $hashed_password;\n } else if (config\\HASHING_ALGORITHM == \"sha1\") {\n if (strlen($hashed_password) != 80)\n return false;\n $salt = substr($hashed_password, 0, 40);\n $hash = substr($hashed_password, 40);\n return $hash == sha1($salt . $cleartext_password, false);\n } else if (config\\HASHING_ALGORITHM == \"md5\") {\n if (strlen($hashed_password) != 64)\n return false;\n $salt = substr($hashed_password, 0, 32);\n $hash = substr($hashed_password, 32);\n return $hash == sha1($salt . $cleartext_password, false);\n } else\n trigger_error(\"The configured hashing algorithm '\" . config\\HASHING_ALGORITHM . \"' is not supported.\", \\E_USER_ERROR);\n}" ]
[ "0.8108709", "0.80354327", "0.79714274", "0.7850707", "0.7739929", "0.7737853", "0.77277213", "0.7719317", "0.7676892", "0.76546663", "0.7639732", "0.755541", "0.7532916", "0.75009954", "0.7466339", "0.74472564", "0.74453133", "0.7430817", "0.7420084", "0.7362727", "0.7361647", "0.73426616", "0.7337746", "0.7335798", "0.73273456", "0.73270744", "0.73125964", "0.731178", "0.7305433", "0.7286636", "0.7286333", "0.72857267", "0.72804976", "0.7275088", "0.72650146", "0.72606957", "0.72541106", "0.72492254", "0.7241179", "0.7232679", "0.7225984", "0.72224295", "0.72185624", "0.72090155", "0.72087705", "0.72087145", "0.7202758", "0.72004575", "0.7197556", "0.71949595", "0.71924967", "0.7189971", "0.7189971", "0.7189971", "0.71897495", "0.7175261", "0.7167699", "0.71505123", "0.7146901", "0.71408135", "0.7120028", "0.71191955", "0.71181244", "0.711443", "0.711244", "0.71105963", "0.71105963", "0.7110044", "0.7109545", "0.71044064", "0.7097724", "0.7093332", "0.7090359", "0.7063437", "0.7063421", "0.7055413", "0.70532674", "0.70471716", "0.7044615", "0.7040175", "0.7036557", "0.70334864", "0.7020009", "0.7015895", "0.7013339", "0.70039636", "0.7001554", "0.6994035", "0.69792414", "0.69788355", "0.6971128", "0.6956349", "0.69528514", "0.6950951", "0.6949296", "0.6946831", "0.6921852", "0.6918218", "0.69111353", "0.69076514", "0.6907528" ]
0.0
-1
Format array into SQL statement in prep for inserting into database
private static function prepareUpdate($toupdate) { $updates = ""; $keys = array_keys($toupdate); for($i = 0; $i < count($keys); $i++) { $updates .= $keys[$i] . "=?"; $updates .= ($i < count($keys) - 1 ? ", " : " "); } $updates .= "WHERE id=?"; return $updates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_array_to_insert_sqladd( $arr ) {\n\t$s = '';\n\tif ( DB_TYPE == 'access' )$arr = toutf( $arr );\n\t$keys = array();\n\t$values = array();\n\tforeach ( $arr as $k => $v ) {\n\t\t$k = ( $k );\n\t\t$v = ( $v );\n\t\t$keys[] = '`' . $k . '`';\n is_array( $v ) || is_object( $v ) and $v=tojson($v);\n\t\t$v = ( is_int( $v ) || is_float( $v ) ) ? $v : \"'$v'\";\n\t\t$values[] = $v;\n\t}\n\t$keystr = implode( ',', $keys );\n\t$valstr = implode( ',', $values );\n\t$sqladd = \"($keystr) VALUES ($valstr)\";\n\treturn $sqladd;\n}", "function arrayToSqlStatement($arrayImageWithInfo, $tableName) {\n $removeRegex = \"/[\\n\\t\\r]/\";\n\n foreach ($arrayImageWithInfo as $key => $imageInfo) {\n foreach ($imageInfo as $key => $value) {\n $value = replaceCharacter($removeRegex, \"\", $value);\n $tableNameColumns = $tableNameColumns . $key . \",\";\n $dataToBeInsertedText = $dataToBeInsertedText . '\\'' . $value . \"',\";\n }\n $tableNameColumns = substr($tableNameColumns, 0, -1);\n $dataToBeInsertedText = substr($dataToBeInsertedText, 0, -1);\n mysqlUtilities::insertIntoTable($tableName, $tableNameColumns, $dataToBeInsertedText);\n $dataToBeInsertedText = \"\";\n $tableNameColumns = \"\";\n }\n}", "public function addToInsertSQLArray();", "function _insert ($table_name, $data_array) {\n\t\t$statement = 'INSERT INTO ';\n\t\t$statement .= \"`{$table_name}` (\";\n\t\t$sub_stmt_1 = '';\n\t\t$sub_stmt_2 = '';\n\t\t$p_pointer = 0;\n\t\t$p_count = count($data_array);\n\t\t$first_column_name = '';\n\t\tforeach ($data_array as $column_name => $value) {\n\t\t\tif ($p_pointer == 0) {\n\t\t\t\t$first_column_name = $column_name;\n\t\t\t}\n\t\t\tif ($p_pointer == $p_count - 1) {\n\t\t\t\t$sub_stmt_1 .= '`' . $column_name . '`';\n\t\t\t} else {\n\t\t\t\t$sub_stmt_1 .= '`' . $column_name . '`, ';\n\t\t\t}\n\t\t\t$p_pointer ++;\n\t\t}\n\t\t$p_pointer = 0;\n\t\t$statement .= $sub_stmt_1;\n\t\t$statement .= ') VALUES ';\n\t\tif (is_array($data_array[$first_column_name])) {\n\t\t\t$s_count = count($data_array[$first_column_name]);\n\t\t\tfor ($s_pointer = 0; $s_pointer < $s_count; $s_pointer++) {\n\t\t\t\t$sub_stmt_2 .= '(';\n\t\t\t\t$p_pointer = 0;\n\t\t\t\tforeach ($data_array as $column_name => $value) {\n\t\t\t\t\tif ($p_pointer == $p_count - 1) {\n\t\t\t\t\t\t$sub_stmt_2 .= $this->escape($data_array[$column_name][$s_pointer]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sub_stmt_2 .= $this->escape($data_array[$column_name][$s_pointer]) . ', ';\n\t\t\t\t\t}\n\t\t\t\t\t$p_pointer ++;\t\t\t\n\t\t\t\t}\n\t\t\t\t$sub_stmt_2 .= ')';\n\t\t\t\tif ($s_pointer != $s_count - 1) {\n\t\t\t\t\t$sub_stmt_2 .= ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$sub_stmt_2 .= '(';\n\t\t\tforeach ($data_array as $column_name => $value) {\n\t\t\t\tif ($p_pointer == $p_count - 1) {\n\t\t\t\t\t$sub_stmt_2 .= $this->escape($data_array[$column_name]);\n\t\t\t\t} else {\n\t\t\t\t\t$sub_stmt_2 .= $this->escape($data_array[$column_name]) . ', ';\n\t\t\t\t}\n\t\t\t\t$p_pointer ++;\n\t\t\t}\n\t\t\t$sub_stmt_2 .= ')';\n\t\t}\n\t\t$statement .= $sub_stmt_2;\n\t\treturn $statement;\n\t}", "function array_to_sql($table, $rows){\n $sql = \"INSERT INTO `$table` (\" . implode_padded(array_keys(current($rows))) . \") VALUES \\n\";\n $count = count($rows) - 1;\n $i = 0;\n foreach ($rows as $row) {\n $sql .= '(' . implode_padded($row, ',', \"'\") . ')';\n if ($i != $count) $sql .= \",\";\n $sql .= \"\\n\";\n ++$i;\n }\n $sql .= \";\\n\\n\";\n\n return $sql;\n}", "public function insert($array)\n {\n\n $sql = \"insert into $this->table \";\n $fields = '';\n $values = '';\n foreach ($array as $key => $value) {\n if ($key != 'id') {\n $fields .= $key . ',';\n $values .= \"'$value'\" . ',';\n }\n }\n $fields = rtrim($fields, ',');\n $values = rtrim($values, ',');\n $sql .= \"(\" . $fields . \") values(\" . $values . \")\";\n $this->conn->exec($sql);\n \n\n }", "function insertData($array, $table,$db_conn)\n{\n\n try {\n\n $fields = array_keys($array);\n $values = array_values($array);\n $fieldlist = implode(',', $fields);\n $qs = str_repeat(\"?,\", count($fields) - 1);\n $firstfield = true;\n\n $sql = \"INSERT INTO `$table` SET\";\n\n for ($i = 0; $i < count($fields); $i++) {\n if (!$firstfield) {\n $sql .= \", \";\n }\n $sql .= \" \" . $fields[$i] . \"=?\";\n $firstfield = false;\n }\n\n $sth = $db_conn->prepare($sql);\n return $sth->execute($values);\n\n return $sth;\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n}", "function getInsertQuery($table, $insertArray) {\n return sprintf(\"INSERT INTO `%s`(`%s`) VALUES('%s')\",\n $table,\n implode(\"`,`\", array_keys($insertArray)),\n implode(\"','\", $insertArray));\n}", "function array_to_insertquery($table, $attrs)\r\n{ \r\n $sql1 = '';\r\n $sql2 = '';\r\n $first = true;\r\n foreach ($attrs as $key => $value) {\r\n if (!$first) {\r\n $sql1 = $sql1.\",\";\r\n $sql2 = $sql2.\",\";\r\n }\r\n $sql1 = $sql1.' `'.mysql_escape_string($key).\"`\";\r\n $sql2 = $sql2.\" '\".mysql_escape_string($value).\"'\";\r\n $first = false;\r\n }\r\n $query = \"INSERT INTO `\".mysql_escape_string($table).\"` ($sql1) VALUES ($sql2);\";\r\n return $query;\r\n}", "function generate_insert_query($matches_array) {\n global $person_id;\n $query = \"INSERT INTO `snelkoppeling`.`matches` (`id` ,`A` ,`B` ,`match`) VALUES\";\n\n for($i = 0; $i < count($matches_array); $i++) {\n $query .= \"(NULL, '{$person_id}', '{$matches_array[$i][0]}', '{$matches_array[$i][1]}'),\";\n }\n return mb_substr($query, 0, -1);\n }", "function arrayToSQLString ($arr) {\r\n $sql = \"\";\r\n foreach ($arr as $key => $value) {\r\n $sql = $sql . $value . ',';\r\n }\r\n $sql = rtrim($sql,',');\r\n return $sql;\r\n}", "protected function insert($array) {\n $sql = \"INSERT INTO `\" . static::$tableName . \"` \";\n $sqlkeys = '(';\n $sqlValues = 'VALUES(';\n foreach ($array as $key => $value) {\n $sqlkeys.=\"`\" . $key . \"`,\";\n $sqlValues.=\":\" . $key . \",\";\n $type = $this->rules()[$key]['type'];\n $this->placeHolderArray[\":$key\"] = $value;\n\n if ($this->validate($value, $type) == FALSE) {\n $this->errors[$key] = $this->errorMessage()[$type];\n }\n }\n $sqlkeys = trim($sqlkeys, \",\");\n $sqlValues = trim($sqlValues, \",\");\n $sqlkeys.=\") \";\n $sqlValues.=\") \";\n $sql.=$sqlkeys;\n $sql.=$sqlValues;\n $this->sql = $sql;\n }", "function array_to_sqladd($arr) {\n\t$s = '';\n\tforeach($arr as $k=>$v) {\n\t\t$v = addslashes($v);\n\t\t$op = substr($k, -1);\n\t\tif($op == '+' || $op == '-') {\n\t\t\t$k = substr($k, 0, -1);\n\t\t\t$s .= \"`$k`=`$k`$op'$v',\";\n\t\t} else {\n\t\t\t$s .= \"`$k`='$v',\";\n\t\t}\n\t}\n\treturn substr($s, 0, -1);\n}", "function insert($tablename,$arrayField) {\n $this->record = implode(' , ', $arrayField);\n $replace = implode(' , ', $this->recordValues($arrayField));\n $this->query = \"INSERT INTO $tablename($this->record) Values($replace)\";\n \n return $this->query;\n }", "function _set ($data_array, $o = TRUE) {\n\t\t$statement = $o ? ' SET ' : ' ';\n\t\t$count = count($data_array);\n\t\t$pointer = 0;\n\t\tforeach ($data_array as $column_name => $value) {\n\t\t\t$statement .= '`' . $column_name . '` = ';\n\t\t\tif ($pointer == $count - 1) {\n\t\t\t\t$statement .= $this->escape($data_array[$column_name]);\n\t\t\t} else {\n\t\t\t\t$statement .= $this->escape($data_array[$column_name]) . ', ';\n\t\t\t}\n\t\t\t$pointer ++;\n\t\t}\n\t\treturn $statement;\n\t}", "function prepare_insert($data = []){\n // if there is no data to set, then return an empty string\n if($data == []){\n return '';\n }\n $set_sql = $this->create_set($data);\n // check again to make sure there were proper columns listed in the SET\n if(strlen($set_sql) == 0){\n return '';\n }\n $return_string = \"INSERT INTO {$this->table_name} $set_sql;\";\n return $return_string;\n }", "private function generateSQLfromValuesInsert(array $values){\r\n //Initialisating vars\r\n $sql = \"(\";\r\n $params = array();\r\n \r\n //Processing values\r\n foreach($values as $name => $value){\r\n //We add a coma if it is not the first value\r\n $sql .= ((count($params) != 0) ? \", \" : \"\");\r\n \r\n //We add SQL for the name\r\n $sql .= $name;\r\n \r\n //Records the name parameters\r\n $params[] = $value;\r\n }\r\n \r\n //Continuing SQL\r\n $sql .= \") VALUES (\";\r\n \r\n //Adding ? for each value\r\n for($i = 0; $i<count($params); $i++){\r\n $sql .= ($i != 0 ? \", \" : \"\").\"?\";\r\n }\r\n \r\n //Finishing SQL\r\n $sql .= \") \";\r\n \r\n //Preparing return\r\n $return = array(\r\n \"sql\" => $sql,\r\n \"params\" => $params\r\n );\r\n \r\n //Returning values\r\n return $return;\r\n }", "private function create_update_sql($arr) {\n return implode(\" = ?, \\n\", array_keys($arr)).' = ?';\n }", "function insertArr($tableName, $insData, $mylink)\n {\n\t$columns = implode(\", \",array_keys($insData));\n\n array_walk(array_values($insData), function(&$string) use ($mylink) { \n $string = mysqli_real_escape_string($mylink, $string);\n });\n\t$escaped_values = array_values($insData);\n\n\tforeach ($escaped_values as $idx=>$data) $escaped_values[$idx] = '\"'.$data.'\"';\n\t$values = implode(\", \", $escaped_values);\n\treturn $query = \"INSERT INTO $tableName ($columns) VALUES ($values)\";\n }", "function array_to_insert_clause($a_vars) {\n\tif (count($a_vars) == 0)\n\t\t\treturn \"\";\n\t$a_keys = array();\n\tforeach($a_vars as $k=>$v)\n\t\t\t$a_keys[] = $k;\n\treturn \"(`\".implode(\"`,`\",$a_keys).\"`) VALUES ('[\".implode(\"]','[\",$a_keys).\"]')\";\n}", "function build_insert($table,$arr) {\n\t$keys = array_keys($arr);\n\tfor($a=0;$a<count($keys);$a++) {\n\t\t$values[] = str_replace(\"'\",\"''\",$arr[$keys[$a]]);\n\t}\n\n\t$str = \"INSERT INTO `\".$table.\"` (`\".implode('`,`',$keys).\"`) VALUES ('\".implode(\"','\",$values).\"')\";\n\n\treturn $str;\n}", "function getInsertUpdateDataString($dataArray, $tableName)\r\n\t{\r\n\t\t//INSERT INTO table (primarykeycol,col1,col2) VALUES (1,2,3) ON DUPLICATE KEY UPDATE col1=0, col2=col2+1\r\n\t\t$dataArray = get_object_vars($dataArray);\r\n\t\t$fieldArr = array();\r\n\t\t$dataArr = array();\r\n\t\tforeach($dataArray as $key=>$value)\r\n\t\t{\r\n\t\t\t$fieldArr[] = $key;\r\n\t\t\t$dataArr[] = \"'\".addslashes($value).\"'\";\r\n\t\t}\r\n\t\t$field = implode(\", \",$fieldArr);\r\n\t\t$data = implode(\", \",$dataArr);\r\n\t\t\r\n\t\t$updateDataArr = array();\r\n\t\tforeach($dataArray as $key=>$value)\r\n\t\t{\r\n\t\t\t$updateDataArr[] = $key.\" = '\".addslashes($value).\"'\";\r\n\t\t}\r\n\t\t$updateData = implode(\", \",$updateDataArr);\r\n\t\t\r\n\t\t$query = \"INSERT INTO \".$tableName.\" (\".$field.\") VALUES (\".$data.\") ON DUPLICATE KEY UPDATE \".$updateData.\";\";\r\n\t\treturn $query;\r\n\t}", "function arrayIntoString_sql(array $arr)\n {\n $str = \"\";\n foreach ($arr as $k => $v) {\n $str .= (count($arr) - 1 != $k)\n ? \"'\". $v . \"', \"\n : \"'\". $v . \"'\";\n }\n return $str;\n }", "static function sql_to_insert($table, $idname, $data)\n {\n $sql = \"INSERT INTO `$table` \";\n if (is_array($data)){\n $fields = \"`$idname`\";\n $values = \"NULL\";\n foreach ($data as $key=>$value)\n {\n $fields .= \", `\" . $key . \"`\";\n if (is_numeric($value)){\n $values .= \", \" . $value . \"\";\n } elseif (strpos($value, \"'\") !== false){//Tim thay '\n $values .= \", \\\"\" . $value . \"\\\"\";\n } else {\n $values .= \", '\" . $value . \"'\";\n }\n }\n $sql .= \"($fields) VALUES ($values)\";\n } else {\n $sql .= \" SET \" . $data;\n }\n return $sql;\n }", "function insert($table,$array)\n\t{\n\t\t$q=\"INSERT INTO `\".$table.\"` (`\";\n\t\t$q.=implode(\"`, `\",array_keys($array));\n\t\t$q.=\"`) VALUES (\";\n\t\t\n\t\tfor($y =0;$y<sizeof(array_values($array));$y++)\n\t\t{\n\t\t\t$cur = array_values($array);\n\t\t\t$cur=$cur[$y];\n\t\t\tif(is_array($cur))\n\t\t\t\t$fixedArray[]=\"'\".serialize($cur).\"'\";\n\t\t\telse\n\t\t\t\t$fixedArray[]=$cur;\n\t\t}\n\t\t$q.=implode(\",\",$fixedArray);\n\t\t$q.=\");\";\n\t\tmysql_query($q);\n\t}", "function generate_sql_batch_insert($table, $arr_field, $arr_row, $ignore='')\n {\n $num_field = count($arr_field);\n $num_row = count($arr_row);\n\n $sql = '';\n $sql .= \"INSERT {$ignore} INTO $table (\";\n for ($i=0; $i< $num_field; $i++)\n {\n $sql.= $arr_field[$i];\n if ($i != $num_field - 1)\n {\n $sql .= ', ';\n }\n }\n\n $sql .= ') VALUES ';\n\n for ($i = 0; $i < $num_row; $i ++)\n {\n $sql .= '(';\n for ($j =0; $j< $num_field; $j++)\n {\n // Lay thong tin cu the cua tung ban ghi de noi mang\n $sql .= \"'{$arr_row[$i][$j]}'\";\n if ($j != $num_field -1)\n {\n $sql .= ', ';\n }\n }\n\n $sql .= ')';\n if ($i != $num_row - 1)\n {\n $sql .= ', ';\n }\n }\n\n return $sql;\n }", "public function quoteDataForInsert(array $data): array\n {\n if (empty($data)) {\n return ['', ''];\n }\n\n $fields = '`' . implode('`, `', array_keys($data)) . '`';\n $values = '\"' . implode('\", \"', array_values($data)) . '\"';\n return [$fields, $values];\n }", "function buildSQLString($tempArray)\n{\n\t\n\t$builtString = \"CALL create_poll(1,\" . \"'\" . $tempArray[0][0] . \"',\" . \"NULL,\" . \"30,\";\n\t\n\tfor ($i = 0; $i < count($tempArray); $i++)\n\t{\n\t\tfor ($j = 1; $j < count($tempArray[$i]); $j++)\n\t\t{\n\t\t\t\t$builtString .= \"'\" . $tempArray[$i][$j] . \"',\";\n\t\t}\n\t\n\t$builtString .= \"NULL, NULL, NULL, NULL, NULL, NULL);\";\n\t\n\t\t\n\t}\n\treturn $builtString;\n}", "function db_array_to_update_sqladd( $arr ) {\n\t$s = '';\n\tif ( DB_TYPE == 'access' ) $arr = toutf( $arr );\n\tif ( is_array( $arr ) ) {\n\t\tforeach ( $arr as $k => $v ) {\n\t\t\t$v = ( $v );\n\t\t\t$op = substr( $k, -1 );\n\t\t\tif ( $op == '+' || $op == '-' ) {\n\t\t\t\t$k = substr( $k, 0, -1 );\n\t\t\t\t$v = ( is_int( $v ) || is_float( $v ) ) ? $v : \"'$v'\";\n\t\t\t\t$s .= \"`$k`=$k$op$v,\";\n\t\t\t} else {\n\t\t\t\t$v = ( is_int( $v ) || is_float( $v ) ) ? $v : \"'$v'\";\n\t\t\t\t$s .= \"`$k`=$v,\";\n\t\t\t}\n\t\t}\n\t\treturn substr( $s, 0, -1 );\n\t} else {\n\t\treturn $arr;\n\t}\n}", "public function insertSql(){\n\n $columnNames = implode(',', $this->params['columnNames']);\n $columnNamePdo = implode(',', $this->params['columnNamePdo']);\n $columnsValues = implode(',', $this->paramsValues);\n $sql = \"INSERT INTO {$this->table} ({$columnNames}) VALUES ({$columnNamePdo})\";\n \n return $sql;\n }", "function insert($tbl, $dataArray)\n\t{\n\t\tforeach($dataArray as $k=>$v){\n\t\t\t$keys .= \"$k, \";\n\t\t\t$values .= \"'\".$this->real_escape_string($v).\"', \";\n\t\t}\n\t\t$keys = substr ($keys, 0, strlen($keys) - 2);\n\t\t$values = substr ($values, 0, strlen($values) - 2);\n\t\t$sql = \"INSERT INTO {$tbl}($keys) VALUES({$values})\";\n\t\t$exeq = $this->query($sql);\n\t\treturn $exeq;\n\t}", "function insert($table_name,$column_array){\r\n\t\t\r\n\t\t/* column array format is array('column_name'=>'value','column_name'=>'value')*/\r\n\t\t$query = 'INSERT INTO ' . $table_name . ' (';\r\n\r\n\t\t//if we have a multi dimensional array, then we are inserting\r\n\t\t//several values to same table\r\n\t\tif(!empty($column_array[0]) && is_array($column_array[0])){\r\n\t\t\t$last = end(array_keys($column_array[0]));\r\n\t\t\t\r\n\t\t\t//create column name paren\r\n\t\t\tforeach($column_array[0] as $key=>$val){\r\n\t\t\t\t$query .= $key;\r\n\t\t\t\t\r\n\t\t\t\tif($key != $last)\r\n\t\t\t\t\t$query .= ',';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$query .= ') VALUES ';\r\n\t\t\t\r\n\t\t\t//create values statement\r\n\t\t\tfor($i = 0; $i < count($column_array); $i++){\r\n\t\t\t\t\r\n\t\t\t\t//open current value set\r\n\t\t\t\t$query .= '(';\r\n\t\t\t\tforeach($column_array[$i] as $key=>$val){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//if $val contains CURDATE or NULL no quotes around\r\n\t\t\t\t\tif(strpos($val,'CURDATE') !== false || \r\n\t\t\t\t\t\tstrpos($val,'NULL') !== false ||\r\n\t\t\t\t\t\tstrpos($val, '()') !== false ||\r\n\t\t\t\t\t\tstrpos($val, '@tid') !== false)\r\n\t\t\t\t\t\t$query .= $val;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$query .= \"'\" . $val . \"'\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($key != $last)\r\n\t\t\t\t\t\t$query .= ',';\r\n\t\t\t\t}\r\n\t\t\t\t//close current value set and append comma\r\n\t\t\t\t$query .= ')';\r\n\t\t\t\tif($i != (count($column_array)-1))\r\n\t\t\t\t\t$query .= ',';\r\n\t\t\t}\r\n\t\t}\t\t\t\t\r\n\t\telse{\t\t\t\t\t\r\n\t\t\r\n\t\t$val_addition = '';\r\n\t\t$last = end(array_keys($column_array));\r\n\t\t\r\n\t\t//loop through column array and create proper insert\r\n\t\t//statement for single row\r\n\t\tforeach($column_array as $key=>$val){\r\n\t\t\t$query .= $key;\r\n\t\t\t\r\n\t\t\t//if $val contains CURDATE or NULL no quotes around\r\n\t\t\tif(strpos($val,'CURDATE') !== false || \r\n\t\t\t\tstrpos($val,'NULL') !== false ||\r\n\t\t\t\tstrpos($val, '()') !== false ||\r\n\t\t\t\tstrpos($val, '@tid') !== false)\r\n\t\t\t\t$val_addition .= $val;\r\n\t\t\telse\r\n\t\t\t\t$val_addition .= \"'\" . $val . \"'\";\r\n\t\t\t\r\n\t\t\tif($key !== $last){\r\n\t\t\t\t$query .= ',';\r\n\t\t\t\t$val_addition .= ',';\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\t$query .= ') VALUES (' . $val_addition . ')';\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//prevent duplicate emails\r\n\t\t$query .= ' ON DUPLICATE KEY UPDATE name = \"' . $column_array[\"name\"] . '\", subscribed = \"1\";';\r\n\t\t\r\n\t\t$this->query .= $query;\r\n\r\n\t}", "private function formatInsertCommand( )\n {\n $data_buffer_length = @ count( $this->data_buffer );\n if ( $data_buffer_length == 0 )\n return false;\n\n $sql = 'INSERT INTO ' . $this->table_name . ' ';\n $sql_columns = '(';\n $sql_values = ' VALUE(';\n $this->quote( );\n $i = 0;\n foreach ( $this->data_buffer as $k => $v )\n {\n $sql_columns .= $k;\n $sql_values .= $v;\n if ( ( $i + 1 ) < $data_buffer_length )\n {\n $sql_columns .= ',';\n $sql_values .= ',';\n }\n $i++;\n }\n $sql_columns .= ')';\n $sql_values .= ')';\n $sql .= $sql_columns . $sql_values;\n return $sql;\n }", "function buildInsertQuery($insertTable, array $valueArray) //TODO use params!!\n {\n $valueArray = array_map(array($this->conn, \"real_escape_string\"),$valueArray);\n return \"INSERT INTO $insertTable(\".implode(\",\", array_keys($valueArray)).\") VALUES ('\".implode(\"','\", $valueArray).\"')\";\n }", "public function sql(): string\n {\n $columnsNames = array();\n $columnsValues = array();\n\n foreach ($this->parameters as $key => $val) {\n $arg = $this->getArgName($key);\n $columnsNames[] = $this->escape($key); \n $columnsValues[] = ':' . $arg;\n } \n return trim(sprintf(\n 'INSERT INTO %s (%s) VALUES (%s)',\n $this->escape($this->tableName),\n implode(', ', $columnsNames),\n implode(', ', $columnsValues)\n ));\n }", "public static function SQLInsertArray( $tConnection, $tArray, $tTable )\n\t{\n\t\t$tempQuery = \"\";\n\t\t\n\t\t$tempListLength = count( $tArray );\n\t\tif ( $tempListLength > 1 )\n\t\t{\n\t\t\t$tempQuery .= \"INSERT INTO \" . $tTable . \" \" . Utility::SQLKVPs( $tConnection, $tArray[0] ) . \";\";\n\n\t\t\tfor ( $i = 1; $i < $tempListLength; ++$i )\n\t\t\t{\n\t\t\t\t$tempQuery .= \" INSERT INTO \" . $tTable . \" \" . Utility::SQLKVPs( $tConnection, $tArray[$i] ) . \";\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $tempQuery;\n\t}", "function insert_into_db($elarray)\n {\n \n //print_r($elarray);\n $sql = \"\";\n $sql = $sql . \"INSERT INTO IMP_GO_xxxxxxxxx_ANALYTICS \";\n $sql = $sql . \"(\";\n $sql = $sql . \"elDeviceCategory,\";\n $sql = $sql . \"elCountry,\";\n $sql = $sql . \"elDate,\";\n $sql = $sql . \"elClickOutGoal2Completions,\";\n $sql = $sql . \"elSessions,\";\n $sql = $sql . \"elAvgSessionDuration,\";\n $sql = $sql . \"elPagesPerSession,\";\n $sql = $sql . \"elBounceRate,\";\n $sql = $sql . \"elUsers\";\n $sql = $sql . \")\";\n $sql = $sql . \"VALUES\";\n $sql = $sql . \"(\";\n $sql = $sql . \"'\" . $elarray[0] . \"',\"; //elDeviceCategory\n $sql = $sql . \"'\" . $elarray[1] . \"',\"; //elCountry\n $sql = $sql . \" STR_TO_DATE('\". $elarray[2].\"','%Y%m%d') ,\"; //elDate\n $sql = $sql . \"'\" . str_replace(\",\",\"\",$elarray[3]) . \"',\"; //elClickOutGoal2Completions\n $sql = $sql . \"'\" . str_replace(\",\",\"\",$elarray[4]) . \"',\"; //elSessions\n $duration = explode(\":\",$elarray[5]);\n $tiempo = 0;\n $tiempo = ($duration[0] * 60 * 60) + ($duration[1] * 60) + ($duration[2]);\n $sql = $sql . \"'\" . $tiempo . \"',\"; //elAvgSessionDuration\n $sql = $sql . \"'\" . $elarray[6] . \"',\"; //elPagesPerSession\n $sql = $sql . \"'\" . str_replace(\"%\",\"\",$elarray[7]) . \"',\"; //elBounceRate\n $sql = $sql . \"'\" . str_replace(\",\",\"\",$elarray[8]) . \"' \"; //elUsers\n $sql = $sql . \")\";\n\n //echo $sql .\"<br>\";\n $result = mysql_query ($sql,$GLOBALS['db_xxxxxxxxx']);\n }", "function insert($table_name,$data){\r\n$keys='';\r\n$values='';\r\nforeach($data as $k=>$v){\r\n\t$keys.='`'.$k.'`,';\r\n\t$values.=\"'\".$v.\"',\";\r\n}\r\n$keys=rtrim($keys,',');\r\n$values=rtrim($values,',');\r\n\r\n\t$query= \"INSERT INTO `{$table_name}` ({$keys}) VALUES ({$values})\";\r\n\t//echo $query;\r\n\t$this->query($query);\r\n}", "function dbEscapeArray($array) {\n\treturn(array_map(\"dbEscape\",$array));\n}", "protected function _insert()\n\t{\n\t\t// INSERT INTO 'table'\n\t\t$this->_query = 'INSERT INTO '.$this->_table.' (';\n\n\t\t// * / row1, row2\n\t\t$first = true;\n\t\t$vals = '';\n\t\tforeach($this->_set as $key => $value) {\n\t\t\t$this->_query .= ($first) ? ('') : (', '); \n\t\t\t$vals .= ($first) ? ('') : (', '); \n\t\t\t$first = false;\n\n\t\t\t$this->_query .= $key;\n\t\t\t$vals .= \"'$value'\";\n\t\t} // foreach\n\n\t\t$this->_query .= \") VALUES ($vals);\";\n\n\t\treturn $this->_query;\n\t}", "function sqlingData(array $data)\n{\n\n $keys = \"(\" . implode(\",\", array_keys($data)) . \")\";\n $values = \"('\" . implode(\"','\", array_values($data)) . \"')\";\n\n return $keys . 'Values' . $values;\n}", "function createQuery($arr) {\n $printArray = \"\";\n for ($i = 0; $i < sizeof($arr); $i++) {\n if ($i == sizeof($arr) - 1) $printArray = $printArray .'\\'' . $arr[$i] . '\\'';\n else $printArray = $printArray . '\\'' . $arr[$i] . '\\'' . \", \";\n } \n return $printArray;\n}", "function insert(string $table, array $datas) {\n $dataColumn = null;\n $dataValues = null;\n foreach($datas as $column => $values) {\n $dataColumn .= $column . \",\";\n $dataValues .= \"'\" . $values . \"',\";\n }\n\n $dataColumn = rtrim($dataColumn,',');\n $dataValues = rtrim($dataValues,',');\n\n $query = \"INSERT INTO {$table} ({$dataColumn}) VALUES({$dataValues})\";\n\n return run_query($query);\n}", "static private function insert($data) {\n $insert_stmt = new SQLExecutor($GLOBALS['cli']->dbconn);\n $insert_item = array();\n // loop over potential insert data\n foreach ($data as $tx) {\n // make sure each tx object has the right stuff\n if ( isset($tx->site_id) && isset($tx->tagid) && isset($tx->pid) ) {\n // build statement\n $insert_item[] = \"({$tx->site_id},{$tx->tagid},{$tx->pid})\";\n }\n }\n\n // complete insert statement if there are insert items\n if (count($insert_item) > 0) {\n $insert_list = implode(\",\",$insert_item);\n $insert_list = rtrim($insert_list,\",\");\n $insert_results = $insert_stmt->sql('INSERT INTO table (site_id, tagid, pid) VALUES ' . $insert_list)->run();\n }\n }", "protected static function _create(array $data) {\n global $db;\n //$arr_k = implode(\",\", array_keys($data));\n //$arr_v = implode(\"','\", $data);\n $arr_k = ''; $arr_v = '';\n foreach ($data as $k => $d) {\n $arr_k = mysql_prep_string($k).\",\";\n $arr_v = mysql_prep_string($d).\",\";\n }\n $arr_k = rtrim($arr_k, ','); $arr_v = rtrim($arr_v, ',');\n $q = \"INSERT INTO \".TABLE.\" ($arr_k) VALUES ('$arr_v')\";\n $res = $db->query($q);\n return $res;\n }", "private function setFields()\n\t{\t\n\t\t$sql = '';\n\t\t\n\t\tforeach (array_keys($this->data) as $key)\n\t\t{\n\t\t\t$sql .= '`' . $key . '` = ? , ';\n\t\t}\n\t\t\n\t\t$sql = rtrim($sql, ', ');\n\t\t\n\t\treturn $sql;\n\t}", "public function insert_data($tablename, $vararray) {\n try {\n $str = \"INSERT INTO `\".$tablename.\"` (\";\n $fixed = false;\n foreach($vararray as $key) {\n if ($fixed) $str .= \", \";\n if ($key['key'] == \"id\" || $key['key'] == \"status\") {\n $key['key'] = $tablename.\"_\".$key['key'];\n }\n $str .= \"`\".$key['key'].\"`\";\n $fixed = true;\n }\n $str .= \", `status`) VALUES (\";\n $fixed = false;\n foreach($vararray as $val) {\n if ($fixed) $str .= \", \";\n if ($val['val'] == \"CURRENT_TIME\") {\n $str .= $val['val'];\n } else if ($val['val'] == null) {\n $str .= \"null\";\n } else {\n $str .= \"'\".$val['val'].\"'\";\n }\n $fixed = true;\n }\n $str .= \", 'ACTIVE');\\nCOMMIT;\\n\";\n echo $str.\"<br>\";\n $result = $this->conn->query($str);\n } catch (PDOException $e) {\n die(\"DB ERROR: \".$e->getMessage());\n }\n }", "public function insert(array $array)\r\n {\r\n $keys = join(\",\", array_keys($array));\r\n $values = join(\",\", array_values($array));\r\n $sql = \"INSERT INTO $this->table ($keys) VALUES ($values)\";\r\n return $this->conn->prepare($sql)->execute();\r\n }", "public static function sqlInsert($params)\n\t{\t\n\t\tif(!$params) return \"\";\n\t $table = $params[\"table\"];\n\t\tunset($params[\"table\"]);\n\t\t$columns = array_keys($params);\n\t\t$columns = implode(\", \", $columns);\n\n\t \tforeach($params as $key => $param)\n\t\t\t$values[] = \"?\";\n\t\t$values = implode(\",\", $values);\n\t return \"INSERT INTO $table ($columns) VALUES ($values)\";\n\t}", "function db_insert($table, $data = array()){\n global $conn;\n $field = \"\";\n $value = \"\";\n foreach($data as $key => $var){\n $field .= $key.',';\n $value .= \"'\". mysqli_escape_string($conn, $var).\"'\".\",\";\n }\n $sql = 'INSERT INTO `'.$table.'` ('.trim($field,',').') VALUES('. trim($value, ',').')';\n return mysqli_query($conn, $sql);\n}", "function db_tableby_to_sqladd($arr){\t\n\tif ( is_array( $arr ) ) {\n\t\t$s='';\n\t\tforeach ( $arr as $k => $v ) {\n\t\t\t$s.=DB_PRE.$k.' as '.$v.',';\n\t\t}\n\t\treturn $s;\n\t}elseif(strpos( $arr,',' )>0) \t{\n\t\treturn DB_PRE.str_replace(',',','.DB_PRE,$arr);\t\t\n\t}else {\n\t\tif (strpos( $arr,DB_PRE )>0){\n\t\t\treturn $arr;\n\t\t}else{\n\t\t\treturn DB_PRE.$arr;\n\t\t}\t\t\n\t}\n}", "public static function SQLArray( $tConnection, $tArray )\n\t{\n\t\t$i = 0;\n\t\t$tempValues = \"(\" . $tConnection->escape_string( $tArray[$i] );\n\t\t++$i;\n\t\t\n\t\t$tempListLength = count( $tArray );\n\t\tfor ( ; $i < $tempListLength; ++$i )\n\t\t{\n\t\t\t$tempValues .= \",\" . $tConnection->escape_string( $tArray[$i] );\n\t\t}\n\t\t\n\t\treturn $tempValues . \")\";\n\t}", "function insertMultiples ($table, $cols, $arr, $delayed = '') {\r\n /**\r\n * preprocess $arr\r\n */\r\n foreach ($arr as &$item) {\r\n if (is_array($item) === TRUE) { // support array\r\n foreach ($item as &$t) {\r\n if ($t === NULL) { // support NULL value\r\n $t = NULL;\r\n } else {\r\n $t = \"'\" . $t . \"'\";\r\n }\r\n }\r\n unset($t);\r\n $item = implode(',', $item);\r\n }\r\n }\r\n unset($item);\r\n $cols = implode(\", \", $cols);\r\n $values = '(' . implode(\"), (\", $arr) . ')';\r\n $sql = \"insert \" . $delayed . \" into $table($cols) values $values\";\r\n if ($this->isGenerateSql === TRUE) {\r\n echo $sql . '<br/><br/>';\r\n }\r\n if ($this->dbReturnSql === TRUE) {\r\n return $sql;\r\n }\r\n $this->query($sql);\r\n return $this->lastInsertId($table, TRUE);\r\n }", "function str_values(){\n //\n //map the std objects inthe array to return an array of strings of this \n //format INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)\n //VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');\n\n $col_str= array_map(function($obj){\n //\n //Return the full description of the columns\n return \"`$obj->name`\"; \n }, $this->values);\n //\n //\n $values_str= array_map(function($obj){\n //\n //Trim the spaces\n $tvalue = trim($obj->value);\n //\n //Replace '' with null\n $value = $tvalue=='' ? 'null': \"'$tvalue'\";\n //\n return $value;\n \n }, $this->values);\n //\n //retun the imploded version of the array with a , separator\n $values= implode(\",\",$values_str);\n $cols= implode(\",\",$col_str);\n return \"($cols) VALUES ($values)\";\n }", "public function insert($array){\n\t\t$sql=\"INSERT into windows values(?,?,?,?,?)\";\n\t\t$data[0]=$array['season'] . ' ' . $array['year'];\n\t\t$data[1]=$array['appfrom'];\n\t\t$data[2]=$array['appto'];\n\t\t$data[3]=$array['commentfrom'];\n\t\t$data[4]=$array['commentto'];\n\t\t$bol=$this->db->query($sql,$data);\n\t\tif($bol)\n\t\t\treturn true;\n\t}", "function GenerateSqlInsert($data, $fields)\n{\n $loc = \"database.php->GenerateSqlInsert\";\n // First make an array that is an intersection of the two inputs.\n $final = array();\n foreach($fields as $f)\n {\n $fn = $f[0]; // Field name\n $ft = $f[1]; // Field type\n if(!isset($data[$fn])) continue;\n if(is_null($data[$fn])) continue;\n $v = $data[$fn];\n $final[] = array(\"FieldName\"=>$fn, \"FieldType\"=>$ft, \"Value\"=>$v);\n }\n if(count($final) <= 0) return false;\n\n // First, list the columns...\n $sql = ' (';\n $c = 0;\n foreach($final as $f)\n {\n if($c != 0) $sql .= ', ';\n $sql .= $f[\"FieldName\"];\n $c++;\n }\n $sql .= ') VALUES (';\n $c = 0;\n foreach($final as $f)\n {\n if($c != 0) $sql .= ', ';\n if($f[\"FieldType\"] == 'int') $sql .= intval($f[\"Value\"]);\n else if($f[\"FieldType\"] == 'str') $sql .= '\"' . SqlClean($f[\"Value\"]) . '\"';\n else if($f[\"FieldType\"] == 'bool') $sql .= TFstr($f[\"Value\"]);\n else \n {\n DieWithMsg($loc, \"Bad Sql type: \" . $f[\"FieldType\"] . \n \" for field \" . $f[\"FieldName\"] . '.'); \n }\n $c++;\n }\n $sql .= ') ';\n return $sql;\n}", "static public function BuildSQLInsert( $tableName, $valuesArray )\r\n\t{\r\n\t\t$columns = self::BuildSQLColumns( array_keys( $valuesArray ) );\r\n\t\t$values = self::BuildSQLColumns( $valuesArray, false, false );\r\n\t\t$sql = 'INSERT INTO `' . $tableName . '` (' . $columns . ') VALUES (' . $values . ')';\r\n\t\treturn $sql;\r\n\t}", "public function insertToDatabase($array) {\n foreach ($array as $key => $value) {\n if($value[\"target\"] === 0 && $value[\"movie_title\"] != '') {\n continue;\n } else {\n DB::table('tweet')->insertGetId(\n [\n 'id_tweet' => $value[\"id_tweet\"], \n 'user_tweet' => $value[\"user\"],\n 'tweet_user_id' => $value[\"user_id\"],\n 'target_tweet' => $value[\"target\"][\"profil\"],\n 'target_user_id' => $value[\"target\"][\"id\"],\n 'movie_title' => $value[\"movie\"],\n 'created_tweet_time' => $value[\"created_at\"],\n 'spoil' => '',\n 'isSpoiled' => $value['isSpoiled']\n ]\n );\n }\n }\n }", "private function prepareStatement()\n {\n $columns = '';\n $fields = '';\n foreach ($this->fields as $key => $f) {\n if ($key == 0) {\n $columns .= \"$f\";\n $fields .= \":$f\";\n continue;\n }\n\n $columns .= \", $f\";\n $fields .= \", :$f\";\n }\n\n $this->statement = $this->pdo->prepare(\n 'INSERT INTO `' . $this->table . '` (' . $columns . ') VALUES (' . $fields . ')'\n );\n }", "function mysqli_insert($table, $inserts, $dbc) {\n // $values = array_walk(array_values($inserts), 'escape');\n // TODO: fix escaping issue\n $values = array_values($inserts);\n $keys = array_keys($inserts);\n $sqlString = 'INSERT INTO `'.$table.'` (`'.implode('`,`', $keys).'`) VALUES (\\''.implode('\\',\\'', $values).'\\');';\n error_log(print_r($sqlString, true));\n return mysqli_query($dbc, $sqlString);\n}", "public function insert(array $data)\n {\n $query = \"INSERT INTO $this->table (\";\n foreach($data as $key=>$value){\n $queryKey[] = $key;\n }\n $query .= implode(', ', $queryKey);\n $query .= ') VALUES (:';\n $query .= implode(', :', $queryKey);\n $query .= ')';\n $statement = $this->pdoConnection->prepare($query);\n foreach($data as $key=>$value){\n $statement->bindValue($key, $value);\n }\n $statement->execute();\n }", "public function insertMultiple(array $param = array('table'=>'','columns'=>[],'data'=>[])) {\n\n // $db = new PDO(...);\n // $db->beginTransaction();\n // $stmt = $db->prepare('INSERT INTO `mytable` (a, b) VALUES (?, ?)');\n\n // foreach ($entries as $entry) {\n // $stmt->execute(array($entry['a'], $entry['b']));\n // $id = $db->lastInsertId();\n // }\n\n // $db->commit();\n\n // (REQUIRED) name of table\n $tableName = isset($param['table']) ? $param['table'] : '';\n // (REQUIRED) array of column e.g. ['column','column',...]\n $arrColumns = isset($param['columns']) ? $param['columns'] : [];\n // (REQUIRED) multi dimensional array e.g. [['data','data',...],['data','data',...],...]\n $arrData = isset($param['data']) ? $param['data'] : [];\n\n if( count( $arrColumns ) < 1 || count( $arrData ) < 1 ) {\n echo 'columns or data or both are missing';\n die;\n }\n\n if( empty($tableName) ) {\n echo 'please provide table name';\n die;\n }\n\n foreach( $arrData as $d ) {\n if( count( $arrColumns ) != count( $d ) ) {\n echo \"row count doesn't match with column count\";\n die;\n }\n }\n\n $insert_values = [];\n $question_marks = [];\n\n foreach($arrColumns as $c){\n array_push($question_marks,'?');\n }\n\n foreach($arrData as $d){\n array_push($insert_values, array_values($d));\n }\n\n $strQry = \"INSERT INTO `\".$tableName.\"` (`\" . implode(\"`,`\", $arrColumns ) . \"`) VALUES (\" . implode(',', $question_marks) . \");\";\n\n $pdo = $this->getConnection();\n $arrIds = [];\n $arrInserted = [];\n $arrFails = [];\n $recordSuccessCount = 0;\n \n foreach( $insert_values as $arrVal ) {\n $this->stmt = $pdo->prepare($strQry);\n $executed = $this->stmt->execute($arrVal);\n if( $executed ) {\n array_push( $arrIds, $pdo->lastInsertId() );\n array_push( $arrInserted, $arrVal );\n $recordSuccessCount++;\n } else {\n array_push( $arrFails, $arrVal );\n }\n $this->stmt = null;\n }\n\n $recordFailsCount = count($insert_values) - $recordSuccessCount;\n\n $res = [\n 'ids' => $arrIds,\n 'inserted-records' => $arrInserted,\n 'fails-records' => $arrFails,\n 'success-count' => $recordSuccessCount,\n 'fails-count' => $recordFailsCount\n ];\n\n echo '<pre>'; print_r( $res ); die;\n \n }", "function toSQL($mixed,$addslashes = false,$quotes = true){\n\tif (is_null($mixed)){\n\t\treturn 'NULL';\n\t}\n\tif (!is_array($mixed)){\n\t\treturn tosql_string($mixed,$addslashes,$quotes);\n\t}\n\t$string = '';\n\tforeach($mixed as $value){\n\t\tif ($string != ''){\n\t\t\t$string .= ',';\n\t\t}\n\t\t$string .= tosql_string($value,$addslashes,$quotes);\n\t}\n\treturn $string;\n}", "private function implodeWithPrepare($arr) {\r\n\t\t$result='';\r\n\t\t\r\n\t\t$first=true;\r\n\t\tforeach($arr as $tr) {\r\n\t\t\t//separate with commas\r\n\t\t\tif(!$first)\r\n\t\t\t\t$result.=\",\";\r\n\t\t\telse \r\n\t\t\t\t$first=false;\r\n\t\t\r\n\t\t\t//every entry in single quotes\r\n\t\t\t$result.=\"'\";\r\n\t\t\t$result.=$this->prepare($tr);\r\n\t\t\t$result.=\"'\";\r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "function db_quote_many($array) {\n $to_return = array();\n foreach($array as $value) {\n $to_return[] = db_quote($value);\n }\n return $to_return;\n}", "public function buildInsert()\n {\n $columns = array();\n $values = array();\n\n /* build sql arguments */\n\n if ( $this->driver->placeholder ) {\n foreach( $this->insert as $k => $v ) {\n if ( is_integer($k) )\n $k = $v;\n\n if ( is_array($v) ) {\n // just interpolate the raw value\n $columns[] = $this->driver->getQuoteColumn($k);\n $values[] = $v[0];\n } else {\n $columns[] = $this->driver->getQuoteColumn($k);\n $newK = $this->setPlaceHolderVar( $k , $v );\n $values[] = $this->driver->getPlaceHolder($newK);\n }\n }\n\n } else {\n foreach( $this->insert as $k => $v ) {\n if ( is_integer($k) ) {\n $k = $v;\n }\n $columns[] = $this->driver->getQuoteColumn( $k );\n $values[] = $this->driver->inflate($v);\n }\n }\n\n $sql = 'INSERT INTO ' . $this->getTableSql() \n . ' ( '\n . join(',',$columns) \n . ') VALUES (' \n . join(',', $values ) \n . ')';\n ;\n\n if ( $this->returning && ( 'pgsql' == $this->driver->type ) ) {\n $sql .= ' RETURNING ' . $this->driver->getQuoteColumn($this->returning);\n }\n\n if ( $this->driver->trim ) {\n return trim($sql);\n }\n return $sql;\n }", "function pdoMultiInsert($tableName, $schema, $data, $pdoObject, $arraychunk) {\n $columnNames = array_keys($data[0]);\n\n $data_chunked = array_chunk($data, $arraychunk); //chunk the large array into smaller pieces to prevent memory over allocation\n //Loop through our $data array.\n foreach ($data_chunked as $key => $value) {\n //Will contain SQL snippets.\n $rowsSQL = array();\n\n //Will contain the values that we need to bind.\n $toBind = array();\n\n foreach ($value as $arrayIndex => $row) {\n $params = array();\n foreach ($row as $columnName => $columnValue) {\n $param = \":\" . $columnName . $arrayIndex;\n $params[] = $param;\n if (empty($columnValue)) {\n $toBind[$param] = \"0\";\n } else {\n $toBind[$param] = $columnValue;\n }\n }\n $rowsSQL[] = \"(\" . implode(\", \", $params) . \")\";\n }\n\n //Construct our SQL statement\n $sql = \"INSERT IGNORE INTO `$schema` . `$tableName` (\" . implode(\", \", $columnNames) . \") VALUES \" . implode(\", \", $rowsSQL);\n\n //Prepare our PDO statement.\n $pdoStatement = $pdoObject->prepare($sql);\n\n //Bind our values.\n foreach ($toBind as $param => $val) {\n $pdoStatement->bindValue($param, $val);\n }\n\n //Execute our statement (i.e. insert the data).\n $pdoStatement->execute();\n }\n return;\n}", "function addDaysToQuery($array, $db) {\n\t\t$query = \"\";\n\t\tforeach($array as $value) {\n\t\t\t$value = $db->quote($value);\n\t\t\t$query .= \", $value\";\n\t\t}\n\t\treturn $query;\n\t}", "public function toSql()\n {\n if ($this->isEmpty()) {\n return '';\n }\n\n $params = $this->getParams();\n\n $sql = array('SET');\n $set = array();\n\n foreach ($params as $column => $value) {\n $set[] = implode(' = ', array(\n $column, $this->getBuilder()->getHelper()->toDbValue($value)\n ));\n }\n\n $sql[] = implode(', ', $set);\n\n return implode(' ', $sql);\n }", "function setGoodArrayAndGoodMysql ($array){\n $connect = $GLOBALS['connect'];\n $kode = $GLOBALS['kode'];\n $array = array_values ($array);\n $array = array_values ($array[0]);\n \n foreach ($array as $val)\n $data[] = mysqli_real_escape_string ( $connect , htmlspecialchars ( htmlentities ( strip_tags (trim ( $val ) ) ) ) );\n \n array_push ($data,$kode);\n return $data;\n}", "function insertArray($data) {\n\t\t$ar = array();\n\t\t$str = '';\n\t\t$str1 = '';\n\t\tforeach($data as $key=>$value)\n\t\t{\n\t\t\tif(empty($str))\n\t\t\t{\n\t\t\t\t$str1 = $key;\n\t\t\t\t$str = '\"'.strip_tags(trim($value)).'\"';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$str1 = ','.$key;\n\t\t\t\t$str .=' ,\"'.strip_tags(trim($value)).'\"';\n\t\t\t}\n\t\t}\n\t\t$ar['fields'] = $str1;\n\t\t$ar['values'] = $str;\n\t\treturn $ar;\n\t}", "function toSqlList($lista) {\n $sql = \"\";\n foreach( explode(\",\",$lista) as $opc) {\n $sql .= ($sql!=\"\" ? \",\" : \"\").\"'\".trim($opc).\"'\";\n }\n return $sql;\n }", "public function updateSql(){\n\n $sql = \"UPDATE {$this->table} SET \";\n $i = 0;\n $size = sizeof($this->requestUpdateValues);\n\n foreach ($this->requestUpdateValues as $key=>$value) {\n $sql .= \"{$key} = {$this->params['columnName_Pdo'][$key]} \";\n $i++;\n if($i < $size) { $sql .= ' , '; }\n }\n \n $sql .= \" WHERE id IN ({$this->updateIds}) \";\n \n return $sql;\n }", "private static function getInsertStatement(array $options) {\n $keys = array();\n $values = array();\n foreach ($options as $k=>$v) {\n $value = \"'${v}'\";\n $key = $k;\n if (substr($k, 0, 1) == '!') {\n $key = substr($k, 1);\n $value = $v;\n }\n\n $keys[] = $key;\n $values[] = $value;\n }\n\n $keys = implode(', ', $keys);\n $values = implode(', ', $values);\n\n return \"INSERT INTO \".TABLE_CONFIGURATION.\" (${keys}) VALUES (${values})\";\n }", "private function insertFromArray(array $data_array, string $table_name)\n {\n // データをひとつずつDB登録\n foreach ($data_array as $row) {\n DB::table($table_name)->insert($row);\n }\n }", "protected function prepare( array $values, $mode = 'INSERT' )\n {\n // create temporary array\n $columns = array_keys( $values );\n\t\t\n // begin creating sql statment\n $sql = $mode.' INTO `'.$this->name.'`';\n\t\t\n $count=0;\n $cols = '';\n $vals = '';\n\t\t\n foreach( $columns as $value ){\n $cols .= ( $count > 0 ? ', ' : '' ) . '`' . $value . '`';\n $vals .= ( $count > 0 ? ', ' : '' ) . '?';\n $count++;\n }\n\t\t\n $sql .= ' (' . $cols . ')';\n\t\t\n //$values = Database::quote( $values );\n $sql .= ' VALUES (' . $vals . ')';\n\n return $sql;\n \n }", "function array_to_set_clause($a_vars) {\n\tglobal $mysqli;\n\n\t$a_set = array();\n\t$a_values = array();\n\tforeach($a_vars as $k=>$v) {\n\t\t\t$k = $mysqli->real_escape_string($k);\n\t\t\t$v = $mysqli->real_escape_string($v);\n\t\t\t$a_set[] = $k;\n\t\t\t$a_values[] = $v;\n\t}\n\t$s_set = \"(`\".implode(\"`,`\", $a_set).\"`) VALUES ('\".implode(\"','\",$a_values).\"')\";\n\treturn $s_set;\n}", "private function _multiInsert($sql)\r\n {\r\n $sql = preg_replace('/\\)\\s*,\\s*\\(/i', ' union all select ', $sql);\r\n $sql = preg_replace('/values\\s*\\(/i', ' select ', $sql);\r\n $sql = preg_replace('/\\)\\s*$/i', '', $sql);\r\n\r\n return $sql;\r\n }", "public function insert($tableName, array $data) {\n $keys = array_keys($data);\n $querys = implode(', ', array_fill(0, count($data), '?'));\n $stmt = $this->con->prepare($q=\"INSERT INTO {$tableName} (\" . implode(', ', $keys) . \") VALUES ({$querys})\");\n $this->failIfFalse($stmt);\n foreach ($keys as $i => $key) {\n $stmt->bindValue($i + 1, $data[$key]);\n }\n return $stmt->execute();\n }", "private function setField()\n {\n $sql = '';\n $sql = rtrim($sql , ', ');\n\n foreach (array_keys($this->data) as $key){\n $sql .= '`' . $key . '` = ?, ';\n }\n\n $sql = rtrim($sql , ', ');\n return $sql;\n }", "public function toInterpolatedSql() {\n $query = $this->toSql();\n $params = $this->values;\n\n $keys = array();\n $values = $params;\n\n # build a regular expression for each parameter\n foreach ($params as $key => $value) {\n if (is_string($key)) {\n $keys[] = '/:'.$key.'/';\n } else {\n $keys[] = '/[?]/';\n }\n\n if (is_string($value))\n $values[$key] = \"'\" . self::quoteValue($value) . \"'\";\n\n if (is_array($value))\n $values[$key] = \"'\" . implode(\"','\", self::quoteValue($value)) . \"'\";\n\n if (is_null($value))\n $values[$key] = 'NULL';\n }\n\n $query = preg_replace($keys, $values, $query, 1, $count);\n\n return $query;\n }", "function genericinsert ($table, $data) {\n $names = '';\n $values = '';\n foreach ($data as $key => $value) {\n if (substr($key,0,1) == '@') {\n $names .= substr($key,1).',';\n $values .= $value.',';\n } else {\n $names .= $key.',';\n $values .= '\"'.mysql_real_escape_string($value).'\",';\n }\n }\n // INSERT INTO table (a,b,c) values (1,2,3)\n $query = 'INSERT INTO `'.mysql_real_escape_string($table).'` '.\n '('.substr($names ,0,strlen($names )-1).') values '.\n '('.substr($values,0,strlen($values)-1).')';\n return $query;\n}", "function addNewClientByArray($array){\n\t\t$keys = array_keys($array); //Return the keys of the array;\n\t\t$sql = \"INSERT INTO Client (\"; //Set the first part of the SQL query\n\t\tfor ($i=0;$i<count($keys);$i++){\n\t\t\tif ($i==(count($keys)-1)){//last value, do not include the comma\n\t\t\t\t$sql = $sql.$keys[$i];\n\t\t\t} else {\n\t\t\t\t$sql = $sql.$keys[$i].\",\";\n\t\t\t}\n\t\t}\n\t\t$sql = $sql.\") VALUES (\";\n\t\tfor ($i=0;$i<count($keys);$i++){\n\t\t\tif ($i==(count($keys)-1)){//last value, do not include the comma\n\t\t\t\t$sql = $sql.\"'\".$array[$keys[$i]].\"');\";\n\t\t\t} else {\n\t\t\t\t$sql = $sql.\"'\".$array[$keys[$i]].\"',\";\n\t\t\t}\n\t\t}\n\t\t//print $sql.\"<br />\";\n\t\tmysql_query($sql) or die(mysql_error());\n\t}", "public function insertSql()\n {\n $sql = \"INSERT INTO \" . $this->dbName . '.' . $this->table\n . \" (\" . implode($this->fields, \", \") . \")\n VALUES (:\" . implode($this->fields, \", :\") . \");\";\n\n $this->query = $sql;\n }", "function _query_insert_parse($query){\n $open_brace_first = strpos($query,\"(\",0)+1;\n $close_brace_first = strpos($query,\")\",0);\n $open_brace_second = strpos($query,\"(\",$open_brace_first)+1;\n $close_brace_second = strpos($query,\")\",$open_brace_second);\n \n $cols = substr($query,$open_brace_first,$close_brace_first-$open_brace_first);\n $cols_val = substr($query, $open_brace_second,$close_brace_second-$open_brace_second);\n \n $cols_arr = explode(\",\",$cols);\n $cols_val_arr = explode(\",\",$cols_val);\n \n $qmap = array();\n $len = count($cols_arr);\n for($i=0;$i<$len;$i++){\n $key = trim($cols_arr[$i]);\n $val = trim($cols_val_arr[$i],\"'\");\n $qmap[\"$key\"] = $val;\n }\n return $qmap;\n }", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "private function create_insert_sql($param) {\n $ques = array();\n foreach ($param as $key => $value) {\n $ques[] = '?';\n }\n\n return implode(', ', $ques);\n }", "protected function prepareSaveStatement() {\n $fields = implode(',', $this->columns);\n\n $placeholders = [];\n foreach ($this->columns as $column) {\n $placeholders[] = ':' . $column;\n }\n $placeholders = implode(',', $placeholders);\n\n // Prepare our statement.\n return $this->connection->prepare(\"INSERT INTO {$this->table} ($fields) VALUES ($placeholders)\");\n }", "public function bulkInsert()\n {\n DB::table($this->dbTable)\n ->insert($this->insertUpdateArray);\n }", "protected function insert($paramArray,$table_name)\n\t{\t\t\n\t\tif( count($paramArray) > 0 && $table_name != '')\t\t\t\n\t\t{\n\t\t\t$seperator = '';\n\t\t\t$column = '';\n\t\t\t$val = '';\n\t\t\tforeach($paramArray as $field => $value) {\t\t\t\n\t\t\t\t$column .= $seperator.\"`\".$field.\"`\";\n\t\t\t\t$val .= $seperator.\"'\".$this->db->escape($value).\"'\";\n\t\t\t\t$seperator = ',';\n\t\t\t}\n\t\t\t$column = '(' . $column . ')';\n\t\t\t$val = '(' . $val . ')';\n\t\t\t$query = \"INSERT INTO $table_name $column values $val \"; \n\t\t\t$this->db->query($query);\t\t\n\t\t\treturn $this->db->insert_id;\n\t\t} \n\t\treturn false;\t\t\n\t}", "function generateInsertQuery($tableName,$columns,$values)\n{\n $i = 0;\n $columnString = \"\";\n $valueString = \"\";\n\n for($i = 0; $i < count($columns); $i++)\n {\n\tif($i > 0)\n\t{\n\t $columnString = $columnString . \",\" . $columns[$i];\n\t \n\t $len = strlen($values[$i]);\n\t if( $len <= 1 || $values[$i][0] != \"'\" || $values[$i][$len-1] != \"'\" )\n\t\t$valueString = $valueString . \",'\" . $values[$i] . \"'\";\n\t else\n\t\t$valueString = $valueString . \",\" . $values[$i];\n\t}\n\telse\n\t{\n\t $columnString = $columns[0];\n\n\t $len = strlen($values[0]);\n\t if( $len <= 1 || $values[0][0] != \"'\" || $values[0][$len-1] != \"'\" )\n\t\t$valueString = \"'\" . $values[0] . \"'\";\n\t else\n\t\t$valueString = $values[0];\n\t}\n }\n \n //INSERT INTO table_name (column1, column2, column3,...)\n //VALUES (value1, value2, value3,...) \n return \"INSERT INTO $tableName ($columnString) VALUES ($valueString)\";\n}", "function buildInsert($params)\n {\n $fieldList = $this->getFieldList($params['table']);\n $fieldInsert = '';\n $valueInsert = '';\n\n reset($fieldList);\n while(current($fieldList))\n {\n if (in_array(current($fieldList), array_keys($params)))\n {\n $fieldInsert .= \"`\" . current($fieldList) . \"`, \";\n $valueInsert .= \"'\" . $params[current($fieldList)] . \"', \";\n }\n else\n {\n $this->setError(\"\", \"buildInsert #001\");\n return false;\n }\n $fieldInfo = next($fieldList);\n }\n\n $fieldInsert = preg_replace(\"/,\\s*$/\", \"\", $fieldInsert);\n $valueInsert = preg_replace(\"/,\\s*$/\", \"\", $valueInsert);\n\n $result = \"INSERT INTO `\"\n . $params[\"table\"]\n . \"` (\" . $fieldInsert . \") VALUES (\" . $valueInsert . \");\";\n return $result;\n }", "public function insertData($table, array $data)\n {\n $fieldCount = count($data);\n $sql = \"INSERT INTO \".$table.\" ( \";\n $i = 1;\n $inserts = '';\n foreach ($data as $field => $content) {\n if ($i == $fieldCount) {\n $separator = \" \";\n $insertSeparator = \"' \";\n } else {\n $separator = \", \";\n $insertSeparator = \"', \";\n }\n $sql .= $field . $separator;\n $inserts .= \"'\" . $content . $insertSeparator;\n\n $i++;\n }\n $sql .= \") VALUES ( \".$inserts.\")\";\n\n return $this->db->query($sql);\n\n }", "function escape_array($array) {\n global $our_db;\n\n $new_array = array();\n foreach ($array as $item) {\n $new_array[] = $our_db->real_escape_string($item);\n }\n return $new_array;\n}", "function insertRegs($db,$table,$data):bool \n {\n if (is_array($data)){\n $columns='';$bindv='';$values=null;\n foreach ($data as $column => $value) {\n $columns.='`'.$column.'`,';\n $bindv.='?,';\n $values[]=$value;\n }\n\n $columns=substr($columns,0,-1);\n $bindv=substr($bindv,0,-1);\n \n $sql=\"INSERT INTO {$table}({$columns}) VALUES ({$bindv})\";\n\n try{\n $stmt=$db->prepare($sql);\n \n $stmt->execute($values);\n }catch(PDOException $e){\n echo $e->getMessage();\n return false;\n }\n \n return true;\n }\n return false;\n }", "function insert($table,$data){\n\t\t$j=0;\n\t\t$c=count($data);\n\t\tforeach($data as $key=>$value){\n\t\t\t$j++;\n\t\t\tif($c==$j){\n\t\t\t\t$line_1.='`'.$key.'`';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"'\";\n\t\t\t} else {\n\t\t\t\t$line_1.='`'.$key.'`, ';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"', \";\n\t\t\t}\n\t\t}\n\t\t$r=mysql_query(\"\n\t\t\tINSERT INTO `$table`\n\t\t\t(\".$line_1.\") VALUES\n\t\t\t(\".$line_2.\")\n\t\t\");\n\t\treturn $r;\n\t}", "function query_array_insert($sqlstr) {\n\t\t$connection_parameters = array(I5_OPTIONS_JOBNAME=>'I5JOB',I5_OPTIONS_INITLIBL=>'PGMCOMET',I5_OPTIONS_LOCALCP=>'UTF-8;ISO8859-1'); //i5_OPTIONS_IDLE_TIMEOUT=>120,I5_OPTIONS_LOCALCP=>'CCSID'\n\t\tif ($conn = @i5_connect ( '127.0.0.1', 'hdh', 'hdh', $connection_parameters )) {\n\n\n\t\t\ti5_transaction(I5_ISOLEVEL_NONE,$conn);\n\n\t\t\tfor ($i=0;$i<count($sqlstr);$i++) {\n\n\t\t\t\ti5_query(utf8_decode($sqlstr[$i]));\n\t\t\t}\n\n\n\t\t\t$result = !(i5_commit($conn));\n\n\t\t\tif (!i5_close($conn)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t}", "function getInsert($table,$data)\n\t{\n\n\t\t$fields\t\t\t= array();\n\t\t$values\t\t\t= array();\n\n\t\tforeach ($data as $curdata)\n\t\t{\n\n\t\t\t$fields[]\t= $curdata['field'];\n\n\t\t\tswitch (strtolower($curdata['type']))\n\t\t\t{\n\t\t\t\tcase 'i'\t:\n\t\t\t\t\t$values[]\t= (int)$curdata['value'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's'\t:\n\t\t\t\t\t$values[]\t= '\\''.addslashes_mssql($curdata['value']).'\\'';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'd'\t:\n\t\t\t\t\t$values[]\t= 'CONVERT(datetime, \\''.date('Y-m-d H:i:s',(int)$curdata['value']).'\\', 120)';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\treturn 'INSERT INTO '.$table.' ('.implode(', ',$fields).') VALUES ('.implode(', ',$values).')';\n\n\t}", "function convert_array($in_array, $start_pos)\n{\n\t$string1 = \"\";\n\t$string2 = \"\";\n\t$total = count($in_array);\n\twhile ($start_pos < $total)\n\t{\n\t\t$string1 = $string1 . \"`\" . $in_array[$start_pos] . \"`\";\n\t\t$start_pos++;\n\t\t$string2 = $string2 . \"\\\"\" . $in_array[$start_pos] . \"\\\"\";\n\t\t$start_pos++;\n\t\tif ($start_pos < $total)\n\t\t{\n\t\t\t$string1 = $string1 . \", \";\n\t\t\t$string2 = $string2 . \", \";\n\t\t}\n\t}\n\tif ($start_pos == 2)\n\t{\t$return_string = \"(clanid, \" . $string1 . \") values (0, \" . $string2 . \")\";\t}\n\telse\n\t{\t$return_string = \"(\" . $string1 . \") values (\" . $string2 . \")\";\t}\n\treturn $return_string;\n}", "public function insert($table,$array)\n\t{\n\t\tif(empty($array))\n\t\t{\n\t\t\techo \"Array should be passed\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields = implode(',',array_keys($array));\n\t\t\t$values = implode(\"','\",array_values($array));\n\t\t\t $qry = \"INSERT INTO $table ($fields) VALUES('$values')\";\n\t\t\t$res = mysql_query($qry);\n\t\t\treturn $res;\n\t\t}\n\t}", "private static function genInsertRecordQuery($init_params) {\n $fully_qualified_table_name = static::getFullyQualifiedTableName();\n $database_name = \n $query = \"INSERT INTO {$fully_qualified_table_name} (\";\n\t\t$values_string = \") VALUES (\";\n\t\tforeach ($init_params as $name => $value) {\n $query .= $name . \", \";\n\n // Accumulate value specification string with PDO param bindings \n $transformed_key_name = self::transformForPreparedStatement($name);\n $values_string .= \"$transformed_key_name, \"; \n\t\t}\n \n // Trim redundant commas from strings\n\t\t$query = substr($query, 0, strlen($query) - 2);\n\t\t$values_string = substr($values_string, 0, strlen($values_string) - 2);\n \n // Assemble full query\n return $query . $values_string . \")\";\n\t}" ]
[ "0.76524454", "0.7577538", "0.7515403", "0.7390087", "0.7206968", "0.7112595", "0.70155007", "0.70139986", "0.6951629", "0.69034773", "0.6891097", "0.68838865", "0.68306696", "0.6820923", "0.67391145", "0.6728411", "0.670877", "0.6705099", "0.67012435", "0.6696875", "0.6677123", "0.66187096", "0.660913", "0.66090757", "0.65691346", "0.65506464", "0.65298295", "0.65196526", "0.65149665", "0.64986724", "0.64650965", "0.645949", "0.64165056", "0.6409463", "0.6397176", "0.63891697", "0.6378325", "0.6373295", "0.6353017", "0.63431114", "0.6328584", "0.6321891", "0.63062346", "0.6302101", "0.6293224", "0.62908065", "0.6283399", "0.6274042", "0.62671983", "0.6249105", "0.6225482", "0.61869925", "0.618558", "0.61758316", "0.6168809", "0.6160074", "0.61482763", "0.6099679", "0.60945946", "0.60661817", "0.60656387", "0.60651135", "0.6064859", "0.60619175", "0.6060027", "0.60469896", "0.6034711", "0.60338545", "0.6030893", "0.6020194", "0.60187596", "0.6015352", "0.6013853", "0.6013208", "0.60127604", "0.60039073", "0.5996139", "0.59954226", "0.5992389", "0.59913903", "0.59898007", "0.5985264", "0.59703726", "0.5964857", "0.59626085", "0.5955608", "0.5948299", "0.5939332", "0.59371346", "0.593198", "0.5925233", "0.59203756", "0.5918946", "0.59104776", "0.5906734", "0.5904379", "0.5904329", "0.5896515", "0.5896472", "0.589235", "0.5882258" ]
0.0
-1
/ \Peanut\Phalcon\Db::name('master')>sets( 'insert into test (a,b,c,d) values (:a,:b,:c,:d)', [ [ ':a' => 1, ':b' => 2, ':c' => 1, ':d' => 2, ], [ ':a' => 1, ':b' => 2, ':c' => 1, ':d' => 2, ], [ ':a' => 1, ':b' => 2, ':c' => 1, ':d' => 2, ], ] ); => insert into test(a,b,c,d) values(:a0, :b0, :c0, :d0),(:a1, :b1, :c1, :d1),(:a2, :b2, :c2, :d2) [ [:a0] => 1 [:b0] => 2 [:c0] => 1 [:d0] => 2 [:a1] => 1 [:b1] => 2 [:c1] => 1 [:d1] => 2 [:a2] => 1 [:b2] => 2 [:c2] => 1 [:d2] => 2 ]
public function sets($statement, $bindParameters) { if ( 0 < \count($bindParameters) && 1 === \preg_match('/(?P<control>.*)(?:[\s]+)values(?:[^\(]+)\((?P<holders>.*)\)/Us', $statement, $m) ) { $holders = \explode(',', \preg_replace('/\s/', '', $m['holders'])); $newStatements = []; $newBindParameters = []; foreach ($bindParameters as $key => $value) { $statements = []; foreach ($holders as $holder) { $statements[] = $holder . $key; $newBindParameters[$holder . $key] = $value[$holder]; } $newStatements[] = '(' . \implode(', ', $statements) . ')'; } $newStatement = $m['control'] . ' values ' . \implode(', ', $newStatements); try { if (self::execute($newStatement, $newBindParameters, true)) { return \count($bindParameters); } } catch (\PDOException $e) { throw $e; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testMultipleInserts()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'mult1',\n ],\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'mult2',\n ],\n ]\n )\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(2, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }", "public function testStore_InsertMultiple()\n {\n \t$this->conn->store('test', array('id', 'key', 'title', 'status'), array(null, 'new1', 'new row ONE', 'NEW'), array(null, 'new2', 'new row TWO', 'NEW'));\n \t$this->conn->store('test', null, array(null, 'new3', 'new row THREE', 'NEW'), array(null, 'new4', 'new row FOUR', 'NEW'));\n \t\n \t$result = $this->conn->query('SELECT * FROM test where status=\"NEW\"');\n \t$this->assertEquals(array(4, 'new1', 'new row ONE', 'NEW'), $result->fetchOrdered());\n \t$this->assertEquals(array(5, 'new2', 'new row TWO', 'NEW'), $result->fetchOrdered());\n \t$this->assertEquals(array(6, 'new3', 'new row THREE', 'NEW'), $result->fetchOrdered());\n \t$this->assertEquals(array(7, 'new4', 'new row FOUR', 'NEW'), $result->fetchOrdered());\n\t}", "public function testStore_InsertMultipleArgs()\n {\n \t$this->conn->store('test', array('id', 'key', 'title', 'status'), DB::arg('values', array(array(null, 'new1', 'new row ONE', 'NEW'), array(null, 'new2', 'new row TWO', 'NEW'))));\n \t\n \t$result = $this->conn->query('SELECT * FROM test where status=\"NEW\"');\n \t$this->assertEquals(array(4, 'new1', 'new row ONE', 'NEW'), $result->fetchOrdered());\n \t$this->assertEquals(array(5, 'new2', 'new row TWO', 'NEW'), $result->fetchOrdered());\n\t}", "public function insertMultiple(array $param = array('table'=>'','columns'=>[],'data'=>[])) {\n\n // $db = new PDO(...);\n // $db->beginTransaction();\n // $stmt = $db->prepare('INSERT INTO `mytable` (a, b) VALUES (?, ?)');\n\n // foreach ($entries as $entry) {\n // $stmt->execute(array($entry['a'], $entry['b']));\n // $id = $db->lastInsertId();\n // }\n\n // $db->commit();\n\n // (REQUIRED) name of table\n $tableName = isset($param['table']) ? $param['table'] : '';\n // (REQUIRED) array of column e.g. ['column','column',...]\n $arrColumns = isset($param['columns']) ? $param['columns'] : [];\n // (REQUIRED) multi dimensional array e.g. [['data','data',...],['data','data',...],...]\n $arrData = isset($param['data']) ? $param['data'] : [];\n\n if( count( $arrColumns ) < 1 || count( $arrData ) < 1 ) {\n echo 'columns or data or both are missing';\n die;\n }\n\n if( empty($tableName) ) {\n echo 'please provide table name';\n die;\n }\n\n foreach( $arrData as $d ) {\n if( count( $arrColumns ) != count( $d ) ) {\n echo \"row count doesn't match with column count\";\n die;\n }\n }\n\n $insert_values = [];\n $question_marks = [];\n\n foreach($arrColumns as $c){\n array_push($question_marks,'?');\n }\n\n foreach($arrData as $d){\n array_push($insert_values, array_values($d));\n }\n\n $strQry = \"INSERT INTO `\".$tableName.\"` (`\" . implode(\"`,`\", $arrColumns ) . \"`) VALUES (\" . implode(',', $question_marks) . \");\";\n\n $pdo = $this->getConnection();\n $arrIds = [];\n $arrInserted = [];\n $arrFails = [];\n $recordSuccessCount = 0;\n \n foreach( $insert_values as $arrVal ) {\n $this->stmt = $pdo->prepare($strQry);\n $executed = $this->stmt->execute($arrVal);\n if( $executed ) {\n array_push( $arrIds, $pdo->lastInsertId() );\n array_push( $arrInserted, $arrVal );\n $recordSuccessCount++;\n } else {\n array_push( $arrFails, $arrVal );\n }\n $this->stmt = null;\n }\n\n $recordFailsCount = count($insert_values) - $recordSuccessCount;\n\n $res = [\n 'ids' => $arrIds,\n 'inserted-records' => $arrInserted,\n 'fails-records' => $arrFails,\n 'success-count' => $recordSuccessCount,\n 'fails-count' => $recordFailsCount\n ];\n\n echo '<pre>'; print_r( $res ); die;\n \n }", "public function insert($params){\n\t\t$DB = Registry::getInstance()->DB;\n\t\t$prefix = \"INSERT \";\n\t\t$p = $this->clean($params);\t\n\t\t$statement = $prefix.\" \".$params['tables'][0].\" \".$this->genSet($p['set']);\t\n\t\t$DB->exec($statement);\t\n\t}", "function test_insert_bulk($urabe, $body)\n{\n $bulk = $body->insert_bulk;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert_bulk($table_name, $bulk->columns, $bulk->values);\n}", "public function inserts($params){\n\t\t$rdata=array();\n\t\t$data=array();\n\t\t$sql=array();\n\t\tif(!empty($params)){\n\t\t\t$sql=array();\n\t\t\tforeach($params as $tname=>$icount){\n\t\t\t\tforeach($icount as $ckey=>$cvalue){\n\t\t\t\t\t$data=array();\n\t\t\t\t\tforeach($cvalue as $field=>$value){\n\t\t\t\t\t\t$marray=array();\n\t\t\t\t\t\tif(preg_match('/^#(.*)$/',$field,$marray)){\n\t\t\t\t\t\t\t$field=$marray[1];\n\t\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`=\".$value;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`='\".$value.\"'\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->query(\"INSERT `\".$tname.\"` SET \".implode(',',$data).\" ;\");\n\t\t\t\t\t$rdata[$tname][$ckey]=$this->insert_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $rdata;\n\t}", "function batch_insert($datas)\n\t{\n\t\t$ci = &get_instance();\n\t\t$ci->db->trans_strict(TRUE);\n\t\t$ci->db->trans_start();\n\n\t\tif (IS_LOCAL) $ci->load->helper('logger');\n\n\t\tforeach($datas as $table => $data) {\n\t\t\t$ci->db->insert($table, $data);\n\n\t\t\tif (IS_LOCAL)\tlogme('INSERT_QUERY', 'info', $ci->db->last_query());\n\t\t}\n\n\t\t$ci->db->trans_complete();\n\t\tif ($ci->db->trans_status() === FALSE)\n\t\t{\n\t\t\tif (IS_LOCAL)\tlogme('ERROR_QUERY', 'info', 'Database Error: '.$ci->db->error()['message']);\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_commit_data')]];\n\t\t}\n\n\t\treturn [TRUE, NULL];\n\t}", "private function sqlstatements() {\n $this->select = array( );\n $this->insert = array( 'INSERT INTO :entity (xxx) VALUES (yyy)' );\n $this->update = array( );\n $this->delete = array( );\n }", "public function testInsertMulti()\n {\n $data = static::articleData();\n\n $result = Hash::insert($data, '{n}.Article.insert', 'value');\n $this->assertEquals('value', $result[0]['Article']['insert']);\n $this->assertEquals('value', $result[1]['Article']['insert']);\n\n $result = Hash::insert($data, '{n}.Comment.{n}.insert', 'value');\n $this->assertEquals('value', $result[0]['Comment'][0]['insert']);\n $this->assertEquals('value', $result[0]['Comment'][1]['insert']);\n\n $data = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth']],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $result = Hash::insert($data, '{n}.Item[id=/\\b2|\\b4/]', ['test' => 2]);\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second', 'test' => 2]],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth', 'test' => 2]],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n\n $data[3]['testable'] = true;\n $result = Hash::insert($data, '{n}[testable].Item[id=/\\b2|\\b4/].test', 2);\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth', 'test' => 2], 'testable' => true],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n }", "public function insert(array $sets, $escape = null)\n {\n is_bool($escape) || $escape = $this->conn->protectIdentifiers;\n\n $this->set($sets, null, $escape);\n\n $result = false;\n\n if (count($this->builderCache->sets)) {\n $sqlStatement = $this->platformInsertStatement(\n $this->conn->protectIdentifiers(\n $this->builderCache->from[ 0 ],\n true,\n $escape,\n false\n ),\n array_keys($this->builderCache->sets),\n array_values($this->builderCache->sets)\n );\n\n if ($this->testMode) {\n return $sqlStatement;\n }\n\n $result = $this->conn->query($sqlStatement, $this->builderCache->binds);\n }\n\n $this->builderCache->resetModifier();\n\n return $result;\n }", "public function testInsertSqlIsProperlyPrepared()\n {\n $batch_insert = $this->connection->batchInsert('writers', ['name', 'birthday']);\n\n $property = (new \\ReflectionClass(BatchInsert::class))->getProperty('sql_foundation');\n $property->setAccessible(true);\n\n $sql_foundation = $property->getValue($batch_insert);\n\n $this->assertEquals('INSERT INTO `writers` (`name`, `birthday`) VALUES ', $sql_foundation);\n }", "function insert($data)\n {\n return $this->db->insert('sets', $data);\n }", "public function testInsert()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'zzzz',\n ]\n )->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(11, $result);\n\n $statement = $this->getQueryBuilderConnection()\n ->insert(\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'yyyy',\n ]\n )\n ->into('querybuilder_tests')\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }", "public function insertBatch(array $sets, $batchSize = 1000, $escape = null)\n {\n is_bool($escape) || $escape = $this->conn->protectIdentifiers;\n\n $this->setInsertReplaceBatch($sets);\n\n // Batch this baby\n $affectedRows = 0;\n for ($i = 0, $total = count($sets); $i < $total; $i += $batchSize) {\n $Sql = $this->platformInsertBatchStatement(\n $this->conn->protectIdentifiers($this->builderCache->from[ 0 ], true, $escape, false),\n $this->builderCache->keys,\n array_slice($this->builderCache->sets, $i, $batchSize)\n );\n\n if ($this->testMode) {\n ++$affectedRows;\n } else {\n $this->conn->query($Sql, $this->builderCache->binds);\n $affectedRows += $this->conn->getAffectedRows();\n }\n }\n\n if ( ! $this->testMode) {\n $this->builderCache->resetModifier();\n }\n\n return $affectedRows;\n }", "public function testInsertStmt()\n {\n $insert = $this->getConnection()\n ->insert()\n ('dummy_posts')\n (['blog_id', 'blog_title'])\n ([':id', ':title']);\n return $this->assertEquals($insert, \"INSERT INTO dummy_posts(blog_id, blog_title) VALUES (:id, :title)\");\n }", "#[@test]\n public function insertViaQuery() {\n $this->createTable();\n $this->assertTrue($this->db()->query('insert into unittest values (1, \"kiesel\")'));\n }", "public function testInsertWithOneElementArrayParameter()\n {\n $this->db->insert(\"test\", [\n 'id' => 1\n ]);\n $this->assertEquals(\"INSERT INTO test (`id`) VALUES ('1')\", (string) $this->db);\n }", "public function testInsertWithTwoElementArrayParameter()\n {\n $this->db->insert(\"test\", [\n 'id' => 1,\n 'name' => 'Ed'\n ], true);\n $this->assertEquals(\"INSERT IGNORE INTO test (`id`,`name`) VALUES ('1','Ed')\", (string) $this->db);\n }", "public function testIncrementalSet()\n {\n $method = $this->builder_reflection->getMethod('sql_set');\n $method->setAccessible(TRUE);\n\n $property = $this->builder_reflection->getProperty('set');\n $property->setAccessible(TRUE);\n\n $method->invokeArgs($this->builder, array( array('column1' => 'value1')));\n $method->invokeArgs($this->builder, array( array('column2' => 'value2')));\n\n $string = 'SET column1 = value1, column2 = value2';\n\n $this->assertEquals($string, $property->getValue($this->builder));\n }", "public function testStore_UpdateMultiple()\n {\n \t$this->conn->store('test', array('id', 'key', 'title', 'status'), array(1, 'one', 'updated row ONE', 'PASSIVE'), array(2, 'two', 'updated row TWO', 'ACTIVE'), array(null, 'new1', 'new row ONE', 'NEW'));\n \t\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertEquals(array(1, 'one', 'updated row ONE', 'PASSIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(2, 'two', 'updated row TWO', 'ACTIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(4, 'new1', 'new row ONE', 'NEW'), $result->fetchOrdered());\n }", "public function testInsert(){\n $goodsData = array(\n 'type'=>array(\n 'type_id'=>'2'\n ),\n 'products'=>'1',\n // 'goods_id'=>'',\n 'title'=>'just a goods',\n 'url'=>'http://234',\n 'status'=>'true',\n 'goods_type'=>'normal',\n 'unit' => 'lit',\n // 'link'=>array(\n // 'url'=>'http://afeggg',\n // 'type'=>'',\n // 'option'=>''\n // ),\n 'last_modified'=>time(),\n 'keywords' => array(\n array(\n 'keyword'=>'aabbcc1',\n 'res_type'=>'goods'\n ),\n array(\n 'keyword'=>'aabbcc21',\n 'res_type'=>'goods'\n ),\n ),\n 'brief'=>'goods brief',\n 'props'=>array(\n 'p_1'=>array(\n 'key'=>'jkljlkj',\n 'value'=>2,\n 'desc'=>'redww'\n ),\n 'p_2'=>array(\n 'key'=>'fefe',\n 'value'=>3,\n 'desc'=>'gegeg'\n ),\n 'p_21'=>array(\n 'key'=>'gge',\n 'value'=>'alialialialialialia'\n )\n ),\n /*\n 'orderinfo'=>array(\n \n ),\n */\n 'adjunct'=>array(\n array(\n 'title'=>'adj title',\n 'min'=>'',\n 'max'=>'',\n 'adj_filter'=>'',\n 'adj_include'=>'',\n 'ajd_exclude'=>''\n ),\n array(\n 'title'=>'adj title',\n 'min'=>'',\n 'max'=>'',\n 'adj_filter'=>'',\n 'adj_include'=>'',\n 'ajd_exclude'=>''\n ),\n ),\n 'description'=>'goods des',\n 'category'=>array(\n 'cat_id'=>'3',\n ),\n 'brand'=>array(\n //brand 外键\n 'brand_id'=>3,\n 'brand_name'=> 'fred perry'\n ),\n 'defalut_image'=>array(\n 'gimage_id'=>1,\n 'is_remote'=>'true',\n 'default'=>1,\n 'width'=>'320',\n 'height'=>'480',\n 'source'=>array(\n 'storager'=>'',\n 'url'=>'http://wfewf'\n ),\n 'thumbnail'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'small'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'big'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n ),\n 'adjunct' => array(\n 'gwag'=>array(\n 'gewgew'\n ),\n ),\n 'spec'=>array(\n array(\n 'spec_name'=>'color',\n 'spec_id'=>'1',\n 'option'=>array(\n array(\n 'private_spec_value_id'=>'12345678901',\n 'spec_value_id'=>'2',\n 'spec_value'=>'aaaa',\n 'spec_image'=>'http://fefe',\n 'spec_goods_images'=>'23,124'\n ),\n array(\n 'private_spec_value_id'=>'12345678902',\n 'spec_value_id'=>'4',\n 'spec_value'=>'',\n 'spec_image'=>'',\n 'spec_goods_images'=>''\n ),\n ),\n ),\n array(\n 'spec_name'=>'size',\n 'spec_id'=>'2',\n 'option'=>array(\n array(\n 'private_spec_value_id'=>'12345678912',\n 'spec_value_id'=>'12',\n 'spec_value'=>'aaaaccc',\n 'spec_image'=>'',\n 'spec_goods_images'=>'23,124'\n ),\n array(\n 'private_spec_value_id'=>'12345678934',\n 'spec_value_id'=>'42',\n 'spec_value'=>'',\n 'spec_image'=>'',\n 'spec_goods_images'=>''\n ),\n ),\n )\n ),\n /*\n 'image'=>array(\n array(\n 'gimage_id'=>1,\n 'is_remote'=>'true',\n 'default'=>1,\n 'width'=>'320',\n 'height'=>'480',\n 'source'=>array(\n 'storager'=>'',\n 'url'=>'http://wfewf'\n ),\n 'thumbnail'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'small'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'big'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n ),\n array(\n 'gimage_id'=>2,\n 'is_remote'=>'true',\n 'width'=>'320',\n 'height'=>'480',\n 'source'=>array(\n 'storager'=>'',\n 'url'=>'http://wfewf'\n ),\n 'thumbnail'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'small'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'big'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n ),\n ),\n */\n 'product'=>array(\n array(\n 'title'=>'asfee',\n 'default'=>1,\n 'bn'=>'abacc'.time(),\n 'barcode'=>'fe',\n 'unit'=>'lit',\n 'freez'=>'0',\n 'status'=>'true',\n 'price'=>array(\n 'mktprice'=>array(\n 'title'=>'市场价',\n 'price'=>100.00\n ),\n 'cost'=>array(\n 'title'=>'成本价',\n 'price'=>'50.00'\n ),\n 'price'=>array(\n 'title'=>'销售价',\n 'price'=>'180.00'\n ),\n\n ),\n 'spec_info'=>'fefe,fefe',\n 'spec_desc'=>'',\n 'store'=>10,\n 'weight'=>100,\n 'last_modifie'=>1234567890\n ),\n\n ),\n );\n// $subsdf = array(\n// 'product'=>array(\n// '*',\n// ),\n// );\n// print_r( $this->model->dump(20,'*',$subsdf) );\n $this->model->save($goodsData);\n// $row = $this->model->db->selectrow('select * from sdb_members');\n// $this->assertEquals($row['member_lv_id'],$memberArr['member_group_id']);\n// $this->assertEquals($row['lang'],$memberArr['lang']);\n// $this->assertEquals($row['cur'],$memberArr['currency']);\n }", "public function testStore_Insert()\n {\n \t$id1 = $this->conn->store('test', array(null, 'new1', 'new row ONE', 'NEW'));\n \t$id2 = $this->conn->store('test', array('key'=>'new2', 'title'=>'new row TWO'));\n \t\n \t$result = $this->conn->query('SELECT * FROM test where status=\"NEW\"');\n \t$this->assertEquals(array($id1, 'new1', 'new row ONE', 'NEW'), $result->fetchOrdered());\n \t$this->assertEquals(array($id2, 'new2', 'new row TWO', 'NEW'), $result->fetchOrdered());\n\t}", "public function testInsertSaftRegressionTest3()\n {\n $this->fixture->query(\n 'INSERT INTO <http://localhost/Saft/TestGraph/> {<http://localhost/Saft/TestGraph/> <http://localhost/Saft/TestGraph/> <http://localhost/Saft/TestGraph/> . }'\n );\n $this->fixture->query(\n 'INSERT INTO <http://second-graph/> {<http://second-graph/0> <http://second-graph/1> <http://second-graph/2> . }'\n );\n $this->fixture->query(\n 'DELETE FROM <http://localhost/Saft/TestGraph/>'\n );\n\n $res = $this->fixture->query('SELECT * FROM <http://second-graph/> WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res['result']['rows']));\n }", "protected abstract function getInsertStatement(array $columnSets);", "public function insert_multiple($data){\n $this->db->insert_batch('murid', $data);\n }", "public function testExecuteUpdateBatchDependentStatements()\n {\n $id = $this->randId();\n\n $db = self::$database;\n $res = $db->runTransaction(function ($t) {\n $id = $this->randId();\n $res = $t->executeUpdateBatch([\n [\n 'sql' => 'INSERT INTO ' . self::TABLE_NAME . ' (id, intField) VALUES (@id, @int)',\n 'parameters' => [\n 'id' => $id,\n 'int' => 0\n ]\n ], [\n 'sql' => 'UPDATE ' . self::TABLE_NAME . ' SET intField = intField+1 WHERE id = @id',\n 'parameters' => [\n 'id' => $id\n ]\n ]\n ]);\n\n $t->commit();\n\n return $res;\n });\n\n $this->assertEquals([1, 1], $res->rowCounts());\n }", "public function addToInsertSQLArray();", "public function execute()\n {\n $insertedEntities = array();\n foreach ($this->quantities as $class => $number) {\n for ($i=0; $i < $number; $i++) {\n $insertedEntities[$class][]= $this->entities[$class]->execute($this->mandango, $insertedEntities);\n }\n }\n $this->mandango->flush();\n\n return $insertedEntities;\n }", "function insert_on_duplicate_update_batch($table = '', $set = NULL)\n\t{\n\t\t\n\t\tif ( ! is_null($set))\n\t\t{\n\t\t\t$this->set_insert_batch($set);\n\t\t}\n\n\t\tif (count($this->ar_set) == 0)\n\t\t{\n\t\t\tif ($this->db_debug)\n\t\t\t{\n\t\t\t\t//No valid data array. Folds in cases where keys and values did not match up\n\t\t\t\treturn $this->display_error('db_must_use_set');\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ($table == '')\n\t\t{\n\t\t\tif ( ! isset($this->ar_from[0]))\n\t\t\t{\n\t\t\t\tif ($this->db_debug)\n\t\t\t\t{\n\t\t\t\t\treturn $this->display_error('db_must_set_table');\n\t\t\t\t}\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t$table = $this->ar_from[0];\n\t\t}\n\n\t\t// Batch this baby\n\t\tfor ($i = 0, $total = count($this->ar_set); $i < $total; $i = $i + 100)\n\t\t{\n\n\t\t\t$sql = $this->_insert_on_duplicate_update_batch($this->_protect_identifiers($table, TRUE, NULL, FALSE), $this->ar_keys, array_slice($this->ar_set, $i, 100));\n\n\t\t\t// echo $sql;\n\n\t\t\t$this->query($sql);\n\t\t}\n\n\t\t$this->_reset_write();\n\n\n\t\treturn TRUE;\n\t}", "public function testInsertSaftRegressionTest2()\n {\n $res = $this->fixture->query('INSERT INTO <http://localhost/Saft/TestGraph/> {<http://foo/1> <http://foo/2> <http://foo/3> . }');\n\n $res1 = $this->fixture->query('SELECT * FROM <http://localhost/Saft/TestGraph/> WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res1['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT ?s ?p ?o WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n }", "public function insert_multiple($data){\n $this->db->insert_batch('guru', $data);\n }", "public function testExecuteUpdateBatchSingleStatement()\n {\n $id = $this->randId();\n $randStr = base64_encode(random_bytes(500));\n\n $db = self::$database;\n $res = $db->runTransaction(function ($t) use ($id, $randStr) {\n $res = $t->executeUpdateBatch([\n [\n 'sql' => 'INSERT INTO ' . self::TABLE_NAME . ' (id, stringField) VALUES (@id, @string)',\n 'parameters' => [\n 'id' => $id,\n 'string' => $randStr\n ]\n ]\n ]);\n\n $t->commit();\n\n return $res;\n });\n\n $this->assertEquals([1], $res->rowCounts());\n }", "function fillTable(): void\n{\n $sql = '\n SET autocommit=0; \n SET unique_checks=0;\n SET foreign_key_checks=0;\n INSERT INTO `products` (name, price, color) VALUES ' . generateTableData(1000001) . ';\n SET unique_checks=1;\n SET foreign_key_checks=1;\n COMMIT;\n ';\n\n DB::getInstance()->query($sql);\n}", "public function findSets() {\n $select = $this->getDatabase()\n ->select()\n ->from($this->getTableName());\n\n $data = $select->fetchAll();\n\n $result = array();\n foreach ($data as $item) {\n $item['id'] = (int)$item['id'];\n\n $result[] = new Entity\\Set($item);\n }\n\n return $result;\n }", "public function insert_multiple($data){\n\t\t$this->db->insert_batch('siswa', $data);\n\t}", "public function testEInsert()\n {\n $this->db->extendedInsert(\"test\", [\n 'id',\n 'name'\n ], [\n [\n 1,\n 'Ed'\n ],\n [\n 2,\n 'Frank'\n ]\n ]);\n $this->assertEquals(\"INSERT INTO test (`id`,`name`) VALUES ('1','Ed'),('2','Frank')\", (string) $this->db);\n }", "function pdoMultiInsert($tableName, $schema, $data, $pdoObject, $arraychunk) {\n $columnNames = array_keys($data[0]);\n\n $data_chunked = array_chunk($data, $arraychunk); //chunk the large array into smaller pieces to prevent memory over allocation\n //Loop through our $data array.\n foreach ($data_chunked as $key => $value) {\n //Will contain SQL snippets.\n $rowsSQL = array();\n\n //Will contain the values that we need to bind.\n $toBind = array();\n\n foreach ($value as $arrayIndex => $row) {\n $params = array();\n foreach ($row as $columnName => $columnValue) {\n $param = \":\" . $columnName . $arrayIndex;\n $params[] = $param;\n if (empty($columnValue)) {\n $toBind[$param] = \"0\";\n } else {\n $toBind[$param] = $columnValue;\n }\n }\n $rowsSQL[] = \"(\" . implode(\", \", $params) . \")\";\n }\n\n //Construct our SQL statement\n $sql = \"INSERT IGNORE INTO `$schema` . `$tableName` (\" . implode(\", \", $columnNames) . \") VALUES \" . implode(\", \", $rowsSQL);\n\n //Prepare our PDO statement.\n $pdoStatement = $pdoObject->prepare($sql);\n\n //Bind our values.\n foreach ($toBind as $param => $val) {\n $pdoStatement->bindValue($param, $val);\n }\n\n //Execute our statement (i.e. insert the data).\n $pdoStatement->execute();\n }\n return;\n}", "public function run()\n {\n $this->connection->table('heroes')->insert([\n [\"id\" => \"1\",\"name\" => \"Abathur\",\"short_name\" => \"abathur\",\"alt_name\" => NULL,\"role\" => \"Specialist\",\"new_role\" => \"Support\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Abat\",\"build_copy_name\" => \"Abathur\"],[\"id\" => \"2\",\"name\" => \"Alarak\",\"short_name\" => \"alarak\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2016-09-13 00:00:00\",\"rework_date\" => \"2017-05-16 00:00:00\",\"attribute_id\" => \"Alar\",\"build_copy_name\" => \"Alarak\"],[\"id\" => \"3\",\"name\" => \"Anub'arak\",\"short_name\" => \"anubarak\",\"alt_name\" => \"Anubarak\",\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2014-10-07 00:00:00\",\"rework_date\" => \"2017-03-14 00:00:00\",\"attribute_id\" => \"Anub\",\"build_copy_name\" => \"Anubarak\"],[\"id\" => \"4\",\"name\" => \"Artanis\",\"short_name\" => \"artanis\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2015-10-20 00:00:00\",\"rework_date\" => \"2016-12-14 00:00:00\",\"attribute_id\" => \"Arts\",\"build_copy_name\" => \"Artanis\"],[\"id\" => \"5\",\"name\" => \"Arthas\",\"short_name\" => \"arthas\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-03-14 00:00:00\",\"attribute_id\" => \"Arth\",\"build_copy_name\" => \"Arthas\"],[\"id\" => \"6\",\"name\" => \"Auriel\",\"short_name\" => \"auriel\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2016-08-09 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Auri\",\"build_copy_name\" => \"Auriel\"],[\"id\" => \"7\",\"name\" => \"Azmodan\",\"short_name\" => \"azmodan\",\"alt_name\" => NULL,\"role\" => \"Specialist\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-10-07 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Azmo\",\"build_copy_name\" => \"Azmodan\"],[\"id\" => \"8\",\"name\" => \"Brightwing\",\"short_name\" => \"brightwing\",\"alt_name\" => \"FaerieDragon\",\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2014-04-15 00:00:00\",\"rework_date\" => \"2018-09-25 00:00:00\",\"attribute_id\" => \"Faer\",\"build_copy_name\" => \"Brightwing\"],[\"id\" => \"9\",\"name\" => \"Cassia\",\"short_name\" => \"cassia\",\"alt_name\" => \"Amazon\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2017-04-04 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Amaz\",\"build_copy_name\" => \"Cassia\"],[\"id\" => \"10\",\"name\" => \"Chen\",\"short_name\" => \"chen\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2014-09-10 00:00:00\",\"rework_date\" => \"2016-09-27 00:00:00\",\"attribute_id\" => \"Chen\",\"build_copy_name\" => \"Chen\"],[\"id\" => \"11\",\"name\" => \"Cho\",\"short_name\" => \"cho\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2015-11-17 00:00:00\",\"rework_date\" => \"2017-03-14 00:00:00\",\"attribute_id\" => \"CCho\",\"build_copy_name\" => \"Chogall\"],[\"id\" => \"12\",\"name\" => \"Chromie\",\"short_name\" => \"chromie\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2016-05-17 00:00:00\",\"rework_date\" => \"2018-08-07 00:00:00\",\"attribute_id\" => \"Chro\",\"build_copy_name\" => \"Chromie\"],[\"id\" => \"13\",\"name\" => \"D.Va\",\"short_name\" => \"dva\",\"alt_name\" => \"DVa\",\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Ranged\",\"release_date\" => \"2017-05-16 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"DVA0\",\"build_copy_name\" => \"DVa\"],[\"id\" => \"14\",\"name\" => \"Dehaka\",\"short_name\" => \"dehaka\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2016-03-29 00:00:00\",\"rework_date\" => \"2016-12-14 00:00:00\",\"attribute_id\" => \"Deha\",\"build_copy_name\" => \"Dehaka\"],[\"id\" => \"15\",\"name\" => \"Diablo\",\"short_name\" => \"diablo\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2018-05-14 00:00:00\",\"attribute_id\" => \"Diab\",\"build_copy_name\" => \"Diablo\"],[\"id\" => \"16\",\"name\" => \"E.T.C.\",\"short_name\" => \"etc\",\"alt_name\" => \"L90ETC\",\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2016-09-27 00:00:00\",\"attribute_id\" => \"L90E\",\"build_copy_name\" => \"ETC\"],[\"id\" => \"17\",\"name\" => \"Falstad\",\"short_name\" => \"falstad\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Fals\",\"build_copy_name\" => \"Falstad\"],[\"id\" => \"18\",\"name\" => \"Gall\",\"short_name\" => \"gall\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2015-11-17 00:00:00\",\"rework_date\" => \"2017-03-14 00:00:00\",\"attribute_id\" => \"Gall\",\"build_copy_name\" => \"Gall\"],[\"id\" => \"19\",\"name\" => \"Garrosh\",\"short_name\" => \"garrosh\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2017-08-08 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Garr\",\"build_copy_name\" => \"Garrosh\"],[\"id\" => \"20\",\"name\" => \"Gazlowe\",\"short_name\" => \"gazlowe\",\"alt_name\" => \"Tinker\",\"role\" => \"Specialist\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-03-14 00:00:00\",\"attribute_id\" => \"Tink\",\"build_copy_name\" => \"Gazlowe\"],[\"id\" => \"21\",\"name\" => \"Genji\",\"short_name\" => \"genji\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2017-04-25 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Genj\",\"build_copy_name\" => \"Genji\"],[\"id\" => \"22\",\"name\" => \"Greymane\",\"short_name\" => \"greymane\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2016-01-12 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Genn\",\"build_copy_name\" => \"Greymane\"],[\"id\" => \"23\",\"name\" => \"Gul'dan\",\"short_name\" => \"guldan\",\"alt_name\" => \"Guldan\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2016-07-12 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Guld\",\"build_copy_name\" => \"Guldan\"],[\"id\" => \"24\",\"name\" => \"Illidan\",\"short_name\" => \"illidan\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Illi\",\"build_copy_name\" => \"Illidan\"],[\"id\" => \"25\",\"name\" => \"Jaina\",\"short_name\" => \"jaina\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-12-02 00:00:00\",\"rework_date\" => \"2017-09-05 00:00:00\",\"attribute_id\" => \"Jain\",\"build_copy_name\" => \"Jaina\"],[\"id\" => \"26\",\"name\" => \"Johanna\",\"short_name\" => \"johanna\",\"alt_name\" => \"Crusader\",\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2015-06-02 00:00:00\",\"rework_date\" => \"2017-09-26 00:00:00\",\"attribute_id\" => \"Crus\",\"build_copy_name\" => \"Johanna\"],[\"id\" => \"27\",\"name\" => \"Kael'thas\",\"short_name\" => \"kaelthas\",\"alt_name\" => \"Kaelthas\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2015-05-12 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Kael\",\"build_copy_name\" => \"Kaelthas\"],[\"id\" => \"28\",\"name\" => \"Kerrigan\",\"short_name\" => \"kerrigan\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2018-09-25 00:00:00\",\"attribute_id\" => \"Kerr\",\"build_copy_name\" => \"Kerrigan\"],[\"id\" => \"29\",\"name\" => \"Kharazim\",\"short_name\" => \"kharazim\",\"alt_name\" => \"Monk\",\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Melee\",\"release_date\" => \"2015-08-18 00:00:00\",\"rework_date\" => \"2016-11-15 00:00:00\",\"attribute_id\" => \"Monk\",\"build_copy_name\" => \"Kharazim\"],[\"id\" => \"30\",\"name\" => \"Leoric\",\"short_name\" => \"leoric\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2015-07-21 00:00:00\",\"rework_date\" => \"2017-09-05 00:00:00\",\"attribute_id\" => \"Leor\",\"build_copy_name\" => \"Leoric\"],[\"id\" => \"31\",\"name\" => \"Li Li\",\"short_name\" => \"lili\",\"alt_name\" => \"LiLi\",\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2014-04-15 00:00:00\",\"rework_date\" => \"2017-11-14 00:00:00\",\"attribute_id\" => \"LiLi\",\"build_copy_name\" => \"LiLi\"],[\"id\" => \"32\",\"name\" => \"Li-Ming\",\"short_name\" => \"liming\",\"alt_name\" => \"Wizard\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2016-02-02 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Wiza\",\"build_copy_name\" => \"LiMing\"],[\"id\" => \"33\",\"name\" => \"Lt. Morales\",\"short_name\" => \"ltmorales\",\"alt_name\" => \"Medic\",\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2015-10-06 00:00:00\",\"rework_date\" => \"2017-09-05 00:00:00\",\"attribute_id\" => \"Medi\",\"build_copy_name\" => \"LtMorales\"],[\"id\" => \"34\",\"name\" => \"Lúcio\",\"short_name\" => \"lucio\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2017-02-14 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Luci\",\"build_copy_name\" => \"Lucio\"],[\"id\" => \"35\",\"name\" => \"Lunara\",\"short_name\" => \"lunara\",\"alt_name\" => \"Dryad\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2015-12-15 00:00:00\",\"rework_date\" => \"2018-05-14 00:00:00\",\"attribute_id\" => \"Drya\",\"build_copy_name\" => \"Lunara\"],[\"id\" => \"36\",\"name\" => \"Malfurion\",\"short_name\" => \"malfurion\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2018-01-02 00:00:00\",\"attribute_id\" => \"Malf\",\"build_copy_name\" => \"Malfurion\"],[\"id\" => \"37\",\"name\" => \"Malthael\",\"short_name\" => \"malthael\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2017-06-13 00:00:00\",\"rework_date\" => \"2018-02-06 00:00:00\",\"attribute_id\" => \"MALT\",\"build_copy_name\" => \"Malthael\"],[\"id\" => \"38\",\"name\" => \"Medivh\",\"short_name\" => \"medivh\",\"alt_name\" => NULL,\"role\" => \"Specialist\",\"new_role\" => \"Support\",\"type\" => \"Ranged\",\"release_date\" => \"2016-06-14 00:00:00\",\"rework_date\" => \"2018-07-10 00:00:00\",\"attribute_id\" => \"Mdvh\",\"build_copy_name\" => \"Medivh\"],[\"id\" => \"39\",\"name\" => \"Muradin\",\"short_name\" => \"muradin\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-10-17 00:00:00\",\"attribute_id\" => \"Mura\",\"build_copy_name\" => \"Muradin\"],[\"id\" => \"40\",\"name\" => \"Murky\",\"short_name\" => \"murky\",\"alt_name\" => NULL,\"role\" => \"Specialist\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2014-05-22 00:00:00\",\"rework_date\" => \"2017-02-14 00:00:00\",\"attribute_id\" => \"Murk\",\"build_copy_name\" => \"Murky\"],[\"id\" => \"41\",\"name\" => \"Nazeebo\",\"short_name\" => \"nazeebo\",\"alt_name\" => \"WitchDoctor\",\"role\" => \"Specialist\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2016-09-27 00:00:00\",\"attribute_id\" => \"Witc\",\"build_copy_name\" => \"Nazeebo\"],[\"id\" => \"42\",\"name\" => \"Nova\",\"short_name\" => \"nova\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-12-12 00:00:00\",\"attribute_id\" => \"Nova\",\"build_copy_name\" => \"Nova\"],[\"id\" => \"43\",\"name\" => \"Probius\",\"short_name\" => \"probius\",\"alt_name\" => NULL,\"role\" => \"Specialist\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2017-03-14 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Prob\",\"build_copy_name\" => \"Probius\"],[\"id\" => \"44\",\"name\" => \"Ragnaros\",\"short_name\" => \"ragnaros\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2016-12-14 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Ragn\",\"build_copy_name\" => \"Ragnaros\"],[\"id\" => \"45\",\"name\" => \"Raynor\",\"short_name\" => \"raynor\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2018-07-10 00:00:00\",\"attribute_id\" => \"Rayn\",\"build_copy_name\" => \"Raynor\"],[\"id\" => \"46\",\"name\" => \"Rehgar\",\"short_name\" => \"rehgar\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Melee\",\"release_date\" => \"2014-07-23 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Rehg\",\"build_copy_name\" => \"Rehgar\"],[\"id\" => \"47\",\"name\" => \"Rexxar\",\"short_name\" => \"rexxar\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Ranged\",\"release_date\" => \"2015-09-08 00:00:00\",\"rework_date\" => \"2017-01-24 00:00:00\",\"attribute_id\" => \"Rexx\",\"build_copy_name\" => \"Rexxar\"],[\"id\" => \"48\",\"name\" => \"Samuro\",\"short_name\" => \"samuro\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2016-10-18 00:00:00\",\"rework_date\" => \"2017-12-12 00:00:00\",\"attribute_id\" => \"Samu\",\"build_copy_name\" => \"Samuro\"],[\"id\" => \"49\",\"name\" => \"Sgt. Hammer\",\"short_name\" => \"sgthammer\",\"alt_name\" => \"SgtHammer\",\"role\" => \"Specialist\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-11-29 00:00:00\",\"attribute_id\" => \"Sgth\",\"build_copy_name\" => \"SgtHammer\"],[\"id\" => \"50\",\"name\" => \"Sonya\",\"short_name\" => \"sonya\",\"alt_name\" => \"Barbarian\",\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2018-03-06 00:00:00\",\"attribute_id\" => \"Barb\",\"build_copy_name\" => \"Sonya\"],[\"id\" => \"51\",\"name\" => \"Stitches\",\"short_name\" => \"stitches\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Stit\",\"build_copy_name\" => \"Stitches\"],[\"id\" => \"52\",\"name\" => \"Stukov\",\"short_name\" => \"stukov\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Melee\",\"release_date\" => \"2017-07-11 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"STUK\",\"build_copy_name\" => \"Stukov\"],[\"id\" => \"53\",\"name\" => \"Sylvanas\",\"short_name\" => \"sylvanas\",\"alt_name\" => NULL,\"role\" => \"Specialist\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2015-03-24 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Sylv\",\"build_copy_name\" => \"Sylvanas\"],[\"id\" => \"54\",\"name\" => \"Tassadar\",\"short_name\" => \"tassadar\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-01-24 00:00:00\",\"attribute_id\" => \"Tass\",\"build_copy_name\" => \"Tassadar\"],[\"id\" => \"55\",\"name\" => \"The Butcher\",\"short_name\" => \"thebutcher\",\"alt_name\" => \"Butcher\",\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2015-06-30 00:00:00\",\"rework_date\" => \"2016-09-13 00:00:00\",\"attribute_id\" => \"Butc\",\"build_copy_name\" => \"TheButcher\"],[\"id\" => \"56\",\"name\" => \"The Lost Vikings\",\"short_name\" => \"thelostvikings\",\"alt_name\" => \"LostVikings\",\"role\" => \"Specialist\",\"new_role\" => \"Support\",\"type\" => \"Melee\",\"release_date\" => \"2015-02-10 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Lost\",\"build_copy_name\" => \"LostVikings\"],[\"id\" => \"57\",\"name\" => \"Thrall\",\"short_name\" => \"thrall\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2015-01-13 00:00:00\",\"rework_date\" => \"2017-06-13 00:00:00\",\"attribute_id\" => \"Thra\",\"build_copy_name\" => \"Thrall\"],[\"id\" => \"58\",\"name\" => \"Tracer\",\"short_name\" => \"tracer\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2016-04-19 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Tra0\",\"build_copy_name\" => \"Tracer\"],[\"id\" => \"59\",\"name\" => \"Tychus\",\"short_name\" => \"tychus\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-18 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Tych\",\"build_copy_name\" => \"Tychus\"],[\"id\" => \"60\",\"name\" => \"Tyrael\",\"short_name\" => \"tyrael\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2018-01-16 00:00:00\",\"attribute_id\" => \"Tyrl\",\"build_copy_name\" => \"Tyrael\"],[\"id\" => \"61\",\"name\" => \"Tyrande\",\"short_name\" => \"tyrande\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2018-08-27 00:00:00\",\"attribute_id\" => \"Tyrd\",\"build_copy_name\" => \"Tyrande\"],[\"id\" => \"62\",\"name\" => \"Uther\",\"short_name\" => \"uther\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-04-25 00:00:00\",\"attribute_id\" => \"Uthe\",\"build_copy_name\" => \"Uther\"],[\"id\" => \"63\",\"name\" => \"Valeera\",\"short_name\" => \"valeera\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2017-01-24 00:00:00\",\"rework_date\" => \"2017-12-12 00:00:00\",\"attribute_id\" => \"VALE\",\"build_copy_name\" => \"Valeera\"],[\"id\" => \"64\",\"name\" => \"Valla\",\"short_name\" => \"valla\",\"alt_name\" => \"DemonHunter\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2016-09-13 00:00:00\",\"attribute_id\" => \"Demo\",\"build_copy_name\" => \"Valla\"],[\"id\" => \"65\",\"name\" => \"Varian\",\"short_name\" => \"varian\",\"alt_name\" => NULL,\"role\" => \"Multiclass\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2016-11-15 00:00:00\",\"rework_date\" => \"2018-03-19 00:00:00\",\"attribute_id\" => \"Vari\",\"build_copy_name\" => \"Varian\"],[\"id\" => \"66\",\"name\" => \"Xul\",\"short_name\" => \"xul\",\"alt_name\" => \"Necromancer\",\"role\" => \"Specialist\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2016-03-01 00:00:00\",\"rework_date\" => \"2017-07-11 00:00:00\",\"attribute_id\" => \"Necr\",\"build_copy_name\" => \"Xul\"],[\"id\" => \"67\",\"name\" => \"Zagara\",\"short_name\" => \"zagara\",\"alt_name\" => NULL,\"role\" => \"Specialist\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2014-06-25 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Zaga\",\"build_copy_name\" => \"Zagara\"],[\"id\" => \"68\",\"name\" => \"Zarya\",\"short_name\" => \"zarya\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Support\",\"type\" => \"Ranged\",\"release_date\" => \"2016-09-27 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Zary\",\"build_copy_name\" => \"Zarya\"],[\"id\" => \"69\",\"name\" => \"Zeratul\",\"short_name\" => \"zeratul\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2014-03-13 00:00:00\",\"rework_date\" => \"2017-12-12 00:00:00\",\"attribute_id\" => \"Zera\",\"build_copy_name\" => \"Zeratul\"],[\"id\" => \"70\",\"name\" => \"Zul'jin\",\"short_name\" => \"zuljin\",\"alt_name\" => \"Zuljin\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2017-01-04 00:00:00\",\"rework_date\" => \"2017-10-17 00:00:00\",\"attribute_id\" => \"ZULJ\",\"build_copy_name\" => \"Zuljin\"],[\"id\" => \"71\",\"name\" => \"Kel'Thuzad\",\"short_name\" => \"kelthuzad\",\"alt_name\" => \"KelThuzad\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2017-09-05 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"KelT\",\"build_copy_name\" => \"KelThuzad\"],[\"id\" => \"72\",\"name\" => \"Ana\",\"short_name\" => \"ana\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2017-09-26 00:00:00\",\"rework_date\" => \"2018-03-06 00:00:00\",\"attribute_id\" => \"HANA\",\"build_copy_name\" => \"Ana\"],[\"id\" => \"73\",\"name\" => \"Junkrat\",\"short_name\" => \"junkrat\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2017-10-17 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Junk\",\"build_copy_name\" => \"Junkrat\"],[\"id\" => \"74\",\"name\" => \"Alexstrasza\",\"short_name\" => \"alexstrasza\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2017-11-14 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Alex\",\"build_copy_name\" => \"Alexstrasza\"],[\"id\" => \"75\",\"name\" => \"Hanzo\",\"short_name\" => \"hanzo\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2017-12-12 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Hanz\",\"build_copy_name\" => \"Hanzo\"],[\"id\" => \"77\",\"name\" => \"Blaze\",\"short_name\" => \"blaze\",\"alt_name\" => \"Firebat\",\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Ranged\",\"release_date\" => \"2018-01-09 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Fire\",\"build_copy_name\" => \"Blaze\"],[\"id\" => \"78\",\"name\" => \"Maiev\",\"short_name\" => \"maiev\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2018-02-06 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"Maie\",\"build_copy_name\" => \"Maiev\"],[\"id\" => \"79\",\"name\" => \"Fenix\",\"short_name\" => \"fenix\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2018-03-27 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"FENX\",\"build_copy_name\" => \"Fenix\"],[\"id\" => \"80\",\"name\" => \"Deckard\",\"short_name\" => \"deckard\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Melee\",\"release_date\" => \"2018-04-24 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"DECK\",\"build_copy_name\" => \"Deckard\"],[\"id\" => \"81\",\"name\" => \"Yrel\",\"short_name\" => \"yrel\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2018-06-12 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"YREL\",\"build_copy_name\" => \"Yrel\"],[\"id\" => \"82\",\"name\" => \"Whitemane\",\"short_name\" => \"whitemane\",\"alt_name\" => NULL,\"role\" => \"Support\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2018-08-05 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"WHIT\",\"build_copy_name\" => \"Whitemane\"],[\"id\" => \"83\",\"name\" => \"Mephisto\",\"short_name\" => \"mephisto\",\"alt_name\" => NULL,\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2018-09-03 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"MEPH\",\"build_copy_name\" => \"Mephisto\"],[\"id\" => \"84\",\"name\" => \"Mal'Ganis\",\"short_name\" => \"malganis\",\"alt_name\" => \"MalGanis\",\"role\" => \"Warrior\",\"new_role\" => \"Tank\",\"type\" => \"Melee\",\"release_date\" => \"2018-10-16 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"MalG\",\"build_copy_name\" => \"MalGanis\"],[\"id\" => \"85\",\"name\" => \"Orphea\",\"short_name\" => \"orphea\",\"alt_name\" => \"\",\"role\" => \"Assassin\",\"new_role\" => \"Ranged Assassin\",\"type\" => \"Ranged\",\"release_date\" => \"2018-11-13 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"ORPH\",\"build_copy_name\" => \"Orphea\"],[\"id\" => \"86\",\"name\" => \"Imperius\",\"short_name\" => \"imperius\",\"alt_name\" => NULL,\"role\" => \"Warrior\",\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2019-01-08 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"IMPE\",\"build_copy_name\" => \"Imperius\"],[\"id\" => \"87\",\"name\" => \"Anduin\",\"short_name\" => \"anduin\",\"alt_name\" => \"\",\"role\" => \"Healer\",\"new_role\" => \"Healer\",\"type\" => \"Ranged\",\"release_date\" => \"2019-04-30 00:00:00\",\"rework_date\" => \"2019-04-23 11:58:16\",\"attribute_id\" => \"Andu\",\"build_copy_name\" => \"Anduin\"],[\"id\" => \"88\",\"name\" => \"Qhira\",\"short_name\" => \"qhira\",\"alt_name\" => NULL,\"role\" => NULL,\"new_role\" => \"Melee Assassin\",\"type\" => \"Melee\",\"release_date\" => \"2019-08-06 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"NXHU\",\"build_copy_name\" => \"Qhira\"],[\"id\" => \"89\",\"name\" => \"Deathwing\",\"short_name\" => \"deathwing\",\"alt_name\" => NULL,\"role\" => NULL,\"new_role\" => \"Bruiser\",\"type\" => \"Melee\",\"release_date\" => \"2019-12-03 00:00:00\",\"rework_date\" => NULL,\"attribute_id\" => \"DEAT\",\"build_copy_name\" => \"Deathwing\"]\n ]);\n\n }", "function prepare_insert($data = []){\n // if there is no data to set, then return an empty string\n if($data == []){\n return '';\n }\n $set_sql = $this->create_set($data);\n // check again to make sure there were proper columns listed in the SET\n if(strlen($set_sql) == 0){\n return '';\n }\n $return_string = \"INSERT INTO {$this->table_name} $set_sql;\";\n return $return_string;\n }", "public function testDumpBulkinsert()\n {\n $table = new \\Phinx\\Db\\Table('table1', [], $this->adapter);\n $table->addColumn('string_col', 'string')\n ->addColumn('int_col', 'integer')\n ->save();\n\n $inputDefinition = new InputDefinition([new InputOption('dry-run')]);\n $this->adapter->setInput(new ArrayInput(['--dry-run' => true], $inputDefinition));\n\n $consoleOutput = new BufferedOutput();\n $this->adapter->setOutput($consoleOutput);\n\n $this->adapter->bulkinsert($table->getTable(), [\n [\n 'string_col' => 'test_data1',\n 'int_col' => 23,\n ],\n [\n 'string_col' => null,\n 'int_col' => 42,\n ],\n ]);\n\n $expectedOutput = <<<'OUTPUT'\nINSERT INTO `table1` (`string_col`, `int_col`) VALUES ('test_data1', 23), (null, 42);\nOUTPUT;\n $actualOutput = $consoleOutput->fetch();\n $this->assertStringContainsString($expectedOutput, $actualOutput, 'Passing the --dry-run option doesn\\'t dump the bulkinsert to the output');\n\n $countQuery = $this->adapter->query('SELECT COUNT(*) FROM table1');\n $this->assertTrue($countQuery->execute());\n $res = $countQuery->fetchAll();\n $this->assertEquals(0, $res[0]['COUNT(*)']);\n }", "private function fill(){\n\n try {\n\n $sql = \"INSERT INTO `test` (`script_name`, `start_time`, `end_time`, `result`) VALUES (:sname, :start, :tend, :res)\" ;\n\n $params = [\n ['sname' => 'index', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'normal'],\n ['sname' => 'about', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'illegal'],\n ['sname' => 'contact', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'failed'],\n ['sname' => 'login', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'success'],\n ['sname' => 'register', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'normal'],\n ['sname' => 'logout', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'illegal'],\n ['sname' => 'item', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'failed'],\n ['sname' => 'cart', 'start' => time(), 'tend' => time()+mt_rand(3600, 86000), 'res' => 'success']\n ];\n\n $this->beginTransaction();\n\n $stmt = $this->prepare($sql);\n\n foreach($params as $row)\n {\n foreach($row as $column => $value)\n {\n $stmt->bindValue(\":{$column}\", $value);\n }\n $stmt->execute();\n }\n\n $this->commit();\n\n } catch(PDOException $e) {\n $this->rollBack();\n }\n }", "public function insertar(){\n /* $data = array(\n 'nombre' => 'roberto',\n 'apellido' => 'aguilar'\n );\n\n $data = capitalizar_todo($data);\n\n $this->db->insert('test', $data);\n\n $respuesta = array(\n 'err' => FALSE,\n 'id_insertado ' =>$this->db->insert_id()\n );\n\n echo json_encode($respuesta); */\n\n //insertar multiples registros\n\n $data = array(\n array( \n 'nombre' => 'roberto',\n 'apellido' => 'aguilar'),\n array( \n 'nombre' => 'antonio',\n 'apellido' => 'martinez')\n \n );\n\n /* $data = capitalizar_todo($data); */\n\n $this->db->insert_batch('test', $data);\n\n /* $respuesta = array(\n 'err' => FALSE,\n 'id_insertado ' =>$this->db->insert_id()\n ); */\n\n /* echo json_encode($respuesta); */\n echo $this->db->affected_rows();\n\n\n }", "public function insert_multiple($data){\n $this->db->insert_batch('nilai_kelas10', $data);\n }", "function insert($table_name,$data){\r\n$keys='';\r\n$values='';\r\nforeach($data as $k=>$v){\r\n\t$keys.='`'.$k.'`,';\r\n\t$values.=\"'\".$v.\"',\";\r\n}\r\n$keys=rtrim($keys,',');\r\n$values=rtrim($values,',');\r\n\r\n\t$query= \"INSERT INTO `{$table_name}` ({$keys}) VALUES ({$values})\";\r\n\t//echo $query;\r\n\t$this->query($query);\r\n}", "public function insert( $table, $set, $shutdown=false );", "public function MultiInsert($table, $data){\n $this->openConnection();\n $queries = $this->prepareForTransaction($table, $data);\n $this->db->beginTransaction();\n\n try{\n foreach ($queries as $item){\n // Attemnt to insert data record\n $q= $this->db->prepare($item);\n $q->execute();\n }\n\n $this->db->commit();\n }catch(Exception $e){\n print_r($e->getMessage());\n //Rollback the transaction.\n $this->db->rollBack(); exit;\n }\n return true;\n }", "function insertMultiples ($table, $cols, $arr, $delayed = '') {\r\n /**\r\n * preprocess $arr\r\n */\r\n foreach ($arr as &$item) {\r\n if (is_array($item) === TRUE) { // support array\r\n foreach ($item as &$t) {\r\n if ($t === NULL) { // support NULL value\r\n $t = NULL;\r\n } else {\r\n $t = \"'\" . $t . \"'\";\r\n }\r\n }\r\n unset($t);\r\n $item = implode(',', $item);\r\n }\r\n }\r\n unset($item);\r\n $cols = implode(\", \", $cols);\r\n $values = '(' . implode(\"), (\", $arr) . ')';\r\n $sql = \"insert \" . $delayed . \" into $table($cols) values $values\";\r\n if ($this->isGenerateSql === TRUE) {\r\n echo $sql . '<br/><br/>';\r\n }\r\n if ($this->dbReturnSql === TRUE) {\r\n return $sql;\r\n }\r\n $this->query($sql);\r\n return $this->lastInsertId($table, TRUE);\r\n }", "public function testInsert(): void\n {\n $this->_insert();\n $query = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->orderBy('id')\n ->setDefaultTypes(['id' => 'ordered_uuid']);\n\n $query->setSelectTypeMap($query->getTypeMap());\n $results = $query->execute()->fetchAll('assoc');\n\n $this->assertEquals(new UuidValue('419a8da0482b7756b21f27da40cf8569'), $results[0]['id']);\n $this->assertEquals(new UuidValue('43e0b920481fc6d0a40d6d1740cf8569'), $results[1]['id']);\n $this->assertEquals(new UuidValue('4c2681c048298a29a7fb413140cf8569'), $results[2]['id']);\n }", "public function insert_multiple($data){\n $this->db->insert_batch('ac_product', $data);\n }", "public function testInsertWithSelectStatement()\n {\n $this->db->insert(\"test\", \"SELECT id FROM settings\");\n $this->assertEquals(\"INSERT INTO test SELECT id FROM settings\", (string) $this->db);\n }", "public function testInsert()\n {\n $newData = array('username' => 'newroot', 'password' => 'password');\n $mockPDO = $this->getMock('\\\\PDOMock', array('perform', 'lastInsertId'));\n $mockPDO\n ->expects($this->once())\n ->method('perform')\n ->will($this->returnCallback(function($arg1, $arg2) use ($newData) {\n $sql = 'INSERT INTO `users` (\n `username`,\n `password`\n) VALUES (\n :username,\n :password\n)';\n if($arg1 == $sql && $arg2 == $newData) {\n return 1;\n } else {\n return array();\n }\n }))\n ;\n $mockPDO\n ->expects($this->once())\n ->method('lastInsertId')\n ->will($this->returnValue(1));\n ;\n $storage = new AuraExtendedPdo($mockPDO, new QueryFactory('mysql'));\n\n $id = $storage->save($newData, 'users');\n\n $this->assertEquals(1, $id);\n }", "private function getCreatedSet() {\n \n $new_array = array ();\n \n foreach ( $this->getSet() as $key => $value ) {\n $new_array[] = \"$key = $value\";\n }\n \n return \"SET \" . implode( \", \", $new_array );\n \n }", "public function testInsert()\n {\n $this->assertDatabaseCount(\"animals\", 100000);\n }", "public function insert_batch($table, $set = NULL, $escape = NULL, $batch_size = 100)\n\t{\n\t\tif ($set === NULL)\n\t\t{\n\t\t\tif (empty($this->qb_set))\n\t\t\t{\n\t\t\t\treturn ($this->db_debug) ? $this->display_error('db_must_use_set') : FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (empty($set))\n\t\t\t{\n\t\t\t\treturn ($this->db_debug) ? $this->display_error('insert_batch() called with no data') : FALSE;\n\t\t\t}\n\n\t\t\t$this->set_insert_batch($set, '', $escape);\n\t\t}\n\n\t\tif (strlen($table) === 0)\n\t\t{\n\t\t\tif ( ! isset($this->qb_from[0]))\n\t\t\t{\n\t\t\t\treturn ($this->db_debug) ? $this->display_error('db_must_set_table') : FALSE;\n\t\t\t}\n\n\t\t\t$table = $this->qb_from[0];\n\t\t}\n\n\t\t// Batch this baby\n\t\t$affected_rows = 0;\n\t\tfor ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size)\n\t\t{\n\t\t\tif ($this->query($this->_insert_batch($this->protect_identifiers($table, TRUE, $escape, FALSE), $this->qb_keys, array_slice($this->qb_set, $i, $batch_size))))\n\t\t\t{\n\t\t\t\t$affected_rows += $this->affected_rows();\n\t\t\t}\n\t\t}\n\n\t\t$this->_reset_write();\n\t\treturn $affected_rows;\n\t}", "public function insert_multiple($data){\n $this->db->insert_batch('ruang_kelas', $data);\n }", "public function insert_multiple($data){\n\t\t $this->db->insert_batch('tbl_siswa', $data);\n\t\t}", "function GenerateSqlSet_ParamList($param_list, $fields)\n{\n // Generate a data set.\n $data = array();\n foreach($param_list as $param_spec)\n {\n if(!isset($param_spec[\"FieldName\"])) continue;\n if(!isset($param_spec[\"Value\"])) continue;\n $fn = $param_spec[\"FieldName\"];\n $v = $param_spec[\"Value\"];\n $data[$fn] = $v;\n }\n return GenerateSqlSet($data, $fields);\n}", "function add_Batch($params){\n $this->company_db = $this->load->database('company_db', TRUE);\n // print_r($params);exit();\n $this->company_db->set('data_created', 'NOW()', FALSE);\n $this->company_db->insert('tbl_mdist_batch', $params);\n // echo $this->company_db->last_query();exit;\n return $this->company_db->insert_id();\n }", "public function insertRecords(){\n // Get the sql statement\n $sql = $this->insertSql();\n // Prepare the query\n $stmt = $this->db->prepare($sql);\n\n foreach ($this->paramsValues as $key=>$value) {\n $stmt->bindParam($this->params['columnNamePdo'][$key], $this->paramsValues[$key]);\n }\n \n $stmt->execute();\n \n return true;\n \n }", "function insertArrayOfHashes($a,$table,$skipcols,$do_query = true){\n // would be nice to be able to query\n // Hmmmm, this fails on gem (cricess db)... So then we have no columns to enter...\n $r = $this->getTableDescriptionHash($table);\n $dbcols = array();\n \n // go through the table schema description to determine the primary key of the table\n foreach($r as $v){\n if( $v['pk'] == 1 ) $primary_key = $v['name'];\n \n if( ! in_array($v['name'],$skipcols)) $dbcols[] = $v['name'];\n $type[$v['name']] = $v['type'];\n }\n //print_pre($r,\"pragma result (table schema)\"); \n \n // now that we have a list of column names, we need to compare to the hash\n $datacols = array_keys($a[0]);\n \n $exportcols = array_intersect($dbcols,$datacols);\n $skippedcols = array_diff($dbcols,$datacols);\n $this->mesgs .= print_pre($skippedcols,\"skipped columns\",true);\n $this->mesgs .= print_pre($exportcols,\"export columns\",true);\n\n $this->query(\"BEGIN TRANSACTION\");\n\n // prepare a PDOStatement for doing multiple executes while looping through hash\n $pq = \"insert into $table (\";\n $pq .= implode(\",\",$exportcols);\n $pq .= \") values (\" . implode(\",\",array_fill(0,count($exportcols),\"?\")) . \")\";\n \n $stm = $this->dbh->prepare($pq);\n if( $stm === false ){\n print \"prepare set error code: \" . $this->dbh->errorCode() . \"<br>\\n\";\n print \"prepare set error info: \" . print_r($this->dbh->errorInfo()) . \"<br>\\n\";\n print \"prepared query: $pq <br>\\n\";\n print \"Prepare failed<br>\\n\";\n }\n else {\n $this->mesgs .= \"Prepare succeeded<br>\\n\";\n }\n \n foreach($a as $row){\n $pqvals = array();\n foreach($exportcols as $col){\n $pqvals[] = $row[$col];\n }\n\n if( $do_query ){\n if( $stm->execute($pqvals) === true ){\n $this->mesgs .= \"statement execution succeeded<br>\\n\";\n }\n else {\n $this->mesgs .= \"statement execution failed<br>\\n\";\n $this->mesgs .= print_pre($stm->errorInfo(),\"error info\",true);\n }\n }\n else {\n print \"TEST MODE: \";\n }\n $pqvstr = implode(\",\",$pqvals);\n $this->mesgs .= \"insertArrayOfHashes(): prepared query: $pq : valstr: $pqvstr<br>\\n\";\n }\n $this->query(\"END TRANSACTION\");\n\n // return the rowid of this entry, (0 if it fails), should be last primary key...\n return $this->getLastInserted($primary_key,$table);\n // should return last primary key....\n }", "function insertManyAndExecute ($table_into, array $records = array(), $chunk_size = 1)\n\t{\t\t\n\t\tif (empty($table_into))\n\t\t\tthrow new Exception(\"Table not specified in call to 'insertManyAndExecute'.\");\n\t\t\n\t\tif (count($records) == 0)\n\t\t\treturn false;\n\t\t\t\n\t\tif ($chunk_size < 1)\n\t\t\treturn false;\n\t\t\t\n\t\t// Get the columns list\n\t\tforeach ($records[0] as $column => $value)\n\t\t\t$columns_list[] = \"$column\";\n\t\t$columns_string = implode(', ', $columns_list);\n\t\t\n\t\t$into = \"$table_into ($columns_string)\";\n\t\t$index = 1;\n\t\t$first_chunk = true;\n\t\t$to_bind = array();\n\t\t$record_count = count($records);\n\t\t\n\t\t// Execute all the queries using this prepared statement\n\t\t$row_of_chunk = 1;\n\t\tforeach ($records as $record) {\n\t\t\tif ($first_chunk) {\n\t\t\t\t// Prepare statement from first query\n\t\t\t\t$values_list = array();\n\t\t\t\tforeach ($record as $column => $value) {\n\t\t\t\t\tif ($value instanceof Db_Expression) {\n\t\t\t\t\t\t$values_list[] = \"$value\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$values_list[] = \":$column\" . $row_of_chunk;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$values_string = implode(', ', $values_list);\n\t\t\t\tif ($index == 1) {\n\t\t\t\t\t$q = \"INSERT INTO $into VALUES ($values_string) \";\n\t\t\t\t} else {\n\t\t\t\t\t$q .= \"\\n\\t ($values_string) \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($record as $column => $value)\n\t\t\t\t$to_bind[$column . $row_of_chunk] = $value;\n\t\t\t\t\n\t\t\t++$row_of_chunk;\n\t\t\tif ($row_of_chunk % $chunk_size == 1\n\t\t\tor $index == $record_count) {\n\t\t\t\tif ($first_chunk) {\n\t\t\t\t\t$q .= ';';\n\t\t\t\t\t$this->pdoConnect();\n\t\t\t\t\t$stmt = $this->pdo->prepare($q);\n\t\t\t\t\t$first_chunk = false;\n\t\t\t\t}\n\t\t\t\tforeach ($to_bind as $key => $value) {\n\t\t\t\t\t$stmt->bindValue($key, $value);\n\t\t\t\t}\n\t\t\t\t$stmt->execute();\n\t\t\t\t$to_bind = array();\n\t\t\t\t$row_of_chunk = 1;\n\t\t\t}\n\t\t\t++$index;\n\t\t}\n\t}", "public function batchInsert(string $table, array $columns, iterable|Generator $rows, array &$params = []): string;", "public static function multiInsert(&$objects, $batchSize=10000, $JSONConvert=false) {\n if (DB::$engine === 'oracle' || DB::$engine === 'oci') JSONResponse::Error('Lolok Model multiInsert does not support oracle yet');\n $count=count($objects);\n if ($count === 0) throw new \\Exception('No object to insert.');\n //cols sesuai kiriman di $objects, dan ndak dijson_encode di sini. Ke depan perlu dipertimbangkan untuk encode di sini.\n $columnList = array_keys(self::getPublicProps()); //TODO: Later when getPublicProps is a flat array (no keys), remove array_keys\n// $temp_cols = [];\n// foreach ($objects[0] as $k=>$v) $temp_cols[]=$k;\n $sql = \"INSERT INTO \\\"\".static::tableName().\"\\\" (\\\"\".implode(\"\\\",\\\"\", $columnList).\"\\\") VALUES \";\n if (DB::$engine === 'mysql') $sql = str_replace ('\"', '`', $sql);\n \n if (DB::$engine == 'pgsql') {\n foreach ($objects as &$obj) {\n foreach ($obj as &$val) if (gettype($val) == \"boolean\") $val = ($val) ? 'true' : '0';\n }\n } elseif (DB::$engine == 'mysql') {\n foreach ($objects as &$obj) {\n foreach ($obj as &$val) if (gettype($val) == \"boolean\") $val = ($val) ? 1 : 0;\n }\n }\n \n $idx=0; $sqls=[]; $vals=[];\n $strVals = [];\n while ($idx < $count) {\n $o = $objects[$idx++];\n if ($JSONConvert) foreach (static::jsonColumns() as $col) $o->$col = json_encode($o->$col);\n $vals = [];\n foreach ($columnList as $col) $vals[]=($o->$col === null) ? 'NULL' : DB::nqq($o->$col);\n $strVals[]='('. implode(',', $vals). ')';\n if ($JSONConvert) foreach (static::jsonColumns() as $col) $o->$col = json_decode($o->$col);\n if ($idx % $batchSize == 0) {\n if ($idx == $count) break;\n $sqls[] = $sql.implode(',', $strVals);\n $strVals=[];\n }\n }\n $sqls[] = $sql.implode(',', $strVals);\n try {\n foreach ($sqls as $s) { \\Fandisus\\Lolok\\DB::exec($s,[]); }\n } catch (\\Exception $ex) {\n throw $ex;\n }\n }", "public function testCanInsertAndRetrieveData(){\n $cleanPDO = new cleanPDO($this->goodConfig);\n $cleanPDO->beginTransaction();\n $cleanPDO->query(\"INSERT INTO test_table VALUES(null, 1)\");\n\n $id = $cleanPDO->lastInsertId();\n $this->assertTrue($id != 0);\n $stmt = $cleanPDO->query(\"SELECT * FROM `test_table` WHERE `key` = $id\");\n\n $this->assertTrue($cleanPDO->commit());\n $stmt->execute();\n $res = $stmt->fetch();\n $this->assertTrue($res['value'] == 1);\n\n }", "function db_get_set_statement($mysqli, $items)\n{\n\t$escape = function($item) use ($mysqli) {\n\t\treturn array('name' => $item['name'],\n\t\t 'value' => __db_escape_values($mysqli, $item['type'], $item['value']));\n\t};\n\n\t$set = function($item) {\n\t\treturn $item['name'] . '=' . $item['value'];\n\t};\n\n\t$items = array_map($escape, $items);\n\t$items = array_map($set, $items);\n\treturn implode(',', $items);\n}", "protected function _insert()\n\t{\n\t\t// INSERT INTO 'table'\n\t\t$this->_query = 'INSERT INTO '.$this->_table.' (';\n\n\t\t// * / row1, row2\n\t\t$first = true;\n\t\t$vals = '';\n\t\tforeach($this->_set as $key => $value) {\n\t\t\t$this->_query .= ($first) ? ('') : (', '); \n\t\t\t$vals .= ($first) ? ('') : (', '); \n\t\t\t$first = false;\n\n\t\t\t$this->_query .= $key;\n\t\t\t$vals .= \"'$value'\";\n\t\t} // foreach\n\n\t\t$this->_query .= \") VALUES ($vals);\";\n\n\t\treturn $this->_query;\n\t}", "public function testDumpInsert()\n {\n $table = new \\Phinx\\Db\\Table('table1', [], $this->adapter);\n $table->addColumn('string_col', 'string')\n ->addColumn('int_col', 'integer')\n ->save();\n\n $inputDefinition = new InputDefinition([new InputOption('dry-run')]);\n $this->adapter->setInput(new ArrayInput(['--dry-run' => true], $inputDefinition));\n\n $consoleOutput = new BufferedOutput();\n $this->adapter->setOutput($consoleOutput);\n\n $this->adapter->insert($table->getTable(), [\n 'string_col' => 'test data',\n ]);\n\n $this->adapter->insert($table->getTable(), [\n 'string_col' => null,\n ]);\n\n $this->adapter->insert($table->getTable(), [\n 'int_col' => 23,\n ]);\n\n $expectedOutput = <<<'OUTPUT'\nINSERT INTO `table1` (`string_col`) VALUES ('test data');\nINSERT INTO `table1` (`string_col`) VALUES (null);\nINSERT INTO `table1` (`int_col`) VALUES (23);\nOUTPUT;\n $actualOutput = $consoleOutput->fetch();\n $actualOutput = preg_replace(\"/\\r\\n|\\r/\", \"\\n\", $actualOutput); // normalize line endings for Windows\n $this->assertStringContainsString($expectedOutput, $actualOutput, 'Passing the --dry-run option doesn\\'t dump the insert to the output');\n\n $countQuery = $this->adapter->query('SELECT COUNT(*) FROM table1');\n $this->assertTrue($countQuery->execute());\n $res = $countQuery->fetchAll();\n $this->assertEquals(0, $res[0]['COUNT(*)']);\n }", "function test1()\r\n\t{\r\n//\t\t$this->where(array('id'=>12))->find();\r\n//\r\n//\t\t$this->set( array('name'=>'测试MS') )->insert();\r\n//\t\techo $this->insert_id();\r\n\r\n//\t\t$ret = $this->findPage();\r\n//\t\t$this->count();\r\n\r\n//\t\t$this->where( array('id'=>12) )->delete();\r\n//\t\t$this->set( array('name'=>'测试MS') )->where('id=22')->update();\r\n\r\n//\t\t$this->trans_start();\r\n\t\t$this->query('select * from t_test')->find();\r\n\t\t$this->query('delete from t_test where id=22');\r\n//\t\t$this->trans_rollback();\r\n\r\n\t\tdump($this->db->db->thread_id);\r\n\t}", "public function testMultipleResultQueryWithDuplicateColumns() {\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n // Write data to the database\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n $query = 'select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE, STRING_VALUE as UUID from POTEST';\r\n $result = $this->getPersistenceAdapter()->executeMultipleResultQuery($query);\r\n $this->assertEquals(count($records), count($result), 'Wrong number of database records found.');\r\n for($i = 0; $i < count($result); $i++) {\r\n $this->assertEquals($records[$i]['string'], $result[$i]->UUID, 'Uuid should contain the string value but it does not.');\r\n $this->assertEquals($records[$i]['bool'] ? 1 : 0, $result[$i]->BOOLEAN_VALUE, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n $this->assertEquals($records[$i]['int'], $result[$i]->INT_VALUE, 'Integer value from persistent object differs from the int value of the database.');\r\n $this->assertEquals($records[$i]['string'], $result[$i]->STRING_VALUE, 'String value from persistent object differs from the string value of the database.');\r\n }\r\n }", "function pp_run_query($query_set)\n{\n global $debug;\n $sql_exeq_words = array(\"CREATE\", \"UPDATE\", \"INSERT\", \"DELETE\");\n $d = getDBLink();\n if (!is_array($query_set)) {\n if (in_array(substr($query_set,0,6), $sql_exeq_words)) {\n $res = $d->ExecuteSQL($query_set);\n } else {\n $res = $d->FetchAll($query_set, null);\n }\n } else {\n $format_str = '';\n $params = array($query_set[0]);\n foreach($query_set[1] as $p) $format_str .= $p[0];\n if ($format_str != \"\") {\n $params[] = $format_str;\n }\n foreach($query_set[1] as $p) $params[] = $p[1];\n if(in_array(substr($query_set[0],0,6), $sql_exeq_words)) $func='ExecuteSQL';\n else {\n $func='FetchAll';\n }\n $res = call_user_func_array(array($d, $func), $params);\n }\n return $res;\n}", "function db_multi_insert($table, $columns=array(),$values){\n if($table==\"\" || $values==\"\")return false;\n $columnstr=\"\";\n if(count($columns)>0){\n //add comma after each value in tghe column array\n $columnstr=implode(\",\", $columns);\n $columnstr=\"(\".$columnstr.\")\";\n }\n $sql = \"INSERT INTO \".$table.\" \".$columnstr.\" VALUES \";\n $valuesArr = array();\n foreach($values as $k=>$vald){\n $valuestr = '';\n foreach($vald as $key=>$val){\n if($valuestr !=\"\"){\n $valuestr.=\", '\".$this->con->real_escape_string($val).\"'\";\n }else{\n $valuestr=\"'\".$this->con->real_escape_string($val).\"'\";\n }\n }\n $valuesArr[] = '('.$valuestr.')';\n }\n $valuesData = implode(',',$valuesArr);\n $sql .= $valuesData;\n\n // print $sql;\n\n // In this line we will get the first inserted id of the last updated table\n if($this->con->query($sql)){\n return $this->con->insert_id;\n }else{\n return false;\n }\n }", "public function bulkInsert()\n {\n DB::table($this->dbTable)\n ->insert($this->insertUpdateArray);\n }", "public function testSelectStatementAddTable()\n {\n\n $query = new Query(\"SELECT id, description FROM `test` WHERE xy > 10\", 'mysql');\n $query->from(\"abc\", Query::APPEND);\n $this->assertEquals(\"SELECT id, description FROM `test` , `abc` WHERE xy > 10\", (string)$query);\n }", "public function testSelectDistinctStatementAddTable()\n {\n\n $query = new Query(\"SELECT DISTINCT id, description FROM `test` WHERE xy > 10\", 'mysql');\n $query->from(\"abc\", Query::APPEND);\n $this->assertEquals(\"SELECT DISTINCT id, description FROM `test` , `abc` WHERE xy > 10\", (string)$query);\n }", "private function insertTestLocations() {\n\n \t// get the database connection\n\t\t$db = connectReuseDB();\n\n $tempIds = array();\n\n $queries = [\n \"INSERT INTO Reuse_Locations (name, address_line_1, city, state_id, zip_code)\n VALUES ('Test Business 1', '123 6th Ave', 'Indialantic', 9, 32903);\",\n \"INSERT INTO Reuse_Locations (name, address_line_1, city, state_id, zip_code)\n VALUES ('Test Business 2', '5530 Wisconsin Ave', 'Chevy Chase', 20, 20815);\",\n \"INSERT INTO Reuse_Locations (name, address_line_1, city, state_id, zip_code)\n VALUES ('Test Business 3', '1625 E 75th St', 'Chicago', 13, 60649);\",\n \"INSERT INTO Reuse_Locations (name, address_line_1, city, state_id, zip_code)\n VALUES ('Test Business 4', '1111 W 11th St', 'Austin', 43, 78703);\"\n ];\n\n foreach ($queries as $query) {\n $db->query($query);\n $tempIds[] = $db->insert_id;\n }\n\n return $tempIds;\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n Model::insert([\n ['id' => 1, 'name' => 'foo', 'value' => 's:6:\"foobar\";'],\n ['id' => 2, 'name' => 'hello', 'value' => 's:5:\"world\";'],\n ]);\n }", "public function testPersist()\n {\n $suiteCollection = new SuiteCollection([\n TestUtil::createSuite([\n 'uuid' => '1',\n 'subjects' => ['benchOne', 'benchTwo'],\n 'groups' => ['one', 'two'],\n 'parameters' => [\n 'one' => 'two',\n 'three' => ['one', 'two'],\n ],\n 'env' => [\n 'system' => [\n 'os' => 'linux',\n 'memory' => 8096,\n 'distribution' => 'debian',\n ],\n 'vcs' => [\n 'system' => 'git',\n 'branch' => 'foo',\n ],\n ],\n ]),\n TestUtil::createSuite([\n 'uuid' => '2',\n 'subjects' => ['benchThree'],\n 'groups' => ['five'],\n ]),\n ]);\n\n $this->persister->persist($suiteCollection);\n\n $this->assertEquals(2, $this->sqlCount('SELECT * FROM run'));\n $this->assertEquals(3, $this->sqlCount('SELECT * FROM subject'));\n $this->assertEquals(6, $this->sqlCount('SELECT * FROM iteration'));\n $this->assertEquals(5, $this->sqlCount('SELECT * FROM environment'));\n $this->assertEquals(5, $this->sqlCount('SELECT * FROM sgroup_subject'));\n $this->assertEquals(3, $this->sqlCount('SELECT * FROM parameter'));\n }", "public function testSaveDataTableInsertNewRows() {\r\n\t\t// Prepare some database contents via SQL\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n\t\t$nonullvaluerecord = ['UUID' => 'uuid2nvr1', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3'];\r\n\t\t$nullvaluerecord = ['UUID' => 'uuid2nvr2', 'bool' => null, 'int' => null, 'string' => null];\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n\t\t// Prepare datatable\r\n\t\t$datatable = new avorium_core_data_DataTable(1, 4);\r\n\t\t$datatable->setHeader(0, 'UUID');\r\n\t\t$datatable->setHeader(1, 'BOOLEAN_VALUE');\r\n\t\t$datatable->setHeader(2, 'INT_VALUE');\r\n\t\t$datatable->setHeader(3, 'STRING_VALUE');\r\n\t\t// Store a new record without any null values\r\n\t\t$datatable->setCellValue(0, 0, $nonullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nonullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nonullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nonullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record\r\n\t\t$resultwithoutnullvalues = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(4, count($resultwithoutnullvalues), 'Wrong row count');\r\n\t\t$this->assertEquals($nonullvaluerecord['UUID'], $resultwithoutnullvalues[3]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['bool']?1:0, $resultwithoutnullvalues[3]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['int'], $resultwithoutnullvalues[3]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['string'], $resultwithoutnullvalues[3]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t\t// Store a new record with null values\r\n\t\t$datatable->setCellValue(0, 0, $nullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record, must contain null values, because when inserting the parameter is irrelevant\r\n\t\t$resultwithnullvaluesignoring = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(5, count($resultwithnullvaluesignoring), 'Wrong row count');\r\n\t\t$this->assertEquals($nullvaluerecord['UUID'], $resultwithnullvaluesignoring[4]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['bool'], $resultwithnullvaluesignoring[4]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['int'], $resultwithnullvaluesignoring[4]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['string'], $resultwithnullvaluesignoring[4]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t}", "public function testMultipleResultQuery() {\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n // Write data to the database\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n // Read data out and cast it to persistent object\r\n $query = 'select * from POTEST where UUID in (\\'uuid1tRMR1\\',\\'uuid1tRMR2\\',\\'uuid1tRMR3\\')';\r\n $pos = $this->getPersistenceAdapter()->executeMultipleResultQuery($query, 'test_persistence_AbstractPersistenceAdapterTestPersistentObject');\r\n $this->assertEquals(count($records), count($pos), 'Wrong number of database records found.');\r\n for($i = 0; $i < count($pos); $i++) {\r\n $this->assertEquals($records[$i]['UUID'], $pos[$i]->uuid, 'Uuid value from persistent object differs from the UUID value of the database.');\r\n $this->assertEquals($records[$i]['bool'], $pos[$i]->booleanValue, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n $this->assertEquals($records[$i]['int'], $pos[$i]->intValue, 'Integer value from persistent object differs from the int value of the database.');\r\n $this->assertEquals($records[$i]['string'], $pos[$i]->stringValue, 'String value from persistent object differs from the string value of the database.');\r\n }\r\n }", "function mysqli_insert($table, $inserts, $dbc) {\n // $values = array_walk(array_values($inserts), 'escape');\n // TODO: fix escaping issue\n $values = array_values($inserts);\n $keys = array_keys($inserts);\n $sqlString = 'INSERT INTO `'.$table.'` (`'.implode('`,`', $keys).'`) VALUES (\\''.implode('\\',\\'', $values).'\\');';\n error_log(print_r($sqlString, true));\n return mysqli_query($dbc, $sqlString);\n}", "function pdoMultiInsert_duplicate($tableName, $schema, $data, $pdoObject, $arraychunk, $updatecols) {\n $columnNames = array_keys($data[0]);\n\n $data_chunked = array_chunk($data, $arraychunk); //chunk the large array into smaller pieces to prevent memory over allocation\n//Loop through our $data array.\n foreach ($data_chunked as $key => $value) {\n//Will contain SQL snippets.\n $rowsSQL = array();\n $updateCols = array();\n//Will contain the values that we need to bind.\n $toBind = array();\n\n foreach ($value as $arrayIndex => $row) {\n $params = array();\n foreach ($row as $columnName => $columnValue) {\n $param = \":\" . $columnName . $arrayIndex;\n $params[] = $param;\n if (empty($columnValue)) {\n $toBind[$param] = \"0\";\n //$updateCols[] = $columnName . \" = VALUES($columnName)\";\n } else {\n $toBind[$param] = $columnValue;\n //$updateCols[] = $columnName . \" = VALUES($columnName)\";\n }\n }\n $rowsSQL[] = \"(\" . implode(\", \", $params) . \")\";\n \n }\n\n\n //setup the ON DUPLICATE column names\n// $updateCols = array();\n foreach ($updatecols as $curCol) {\n $updateCols[] = $curCol . \" = VALUES($curCol)\";\n }\n $onDup = implode(', ', $updateCols);\n//Construct our SQL statement\n $sql = \"INSERT INTO `$schema` . `$tableName` (\" . implode(\", \", $columnNames) . \") VALUES \" . implode(\", \", $rowsSQL) . \" ON DUPLICATE KEY UPDATE $onDup\";\n\n//Prepare our PDO statement.\n $pdoStatement = $pdoObject->prepare($sql);\n\n//Bind our values.\n foreach ($toBind as $param => $val) {\n $pdoStatement->bindValue($param, $val);\n }\n\n//Execute our statement (i.e. insert the data).\n $pdoStatement->execute();\n }\n return;\n}", "public function testSingleResultQueryWithMultipleResultStatement() {\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n // Write data to the database\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n $this->setExpectedException('Exception', 'Single result statement returned more than one result.');\r\n $this->getPersistenceAdapter()->executeSingleResultQuery('select * from POTEST');\r\n }", "function insertData($array, $table,$db_conn)\n{\n\n try {\n\n $fields = array_keys($array);\n $values = array_values($array);\n $fieldlist = implode(',', $fields);\n $qs = str_repeat(\"?,\", count($fields) - 1);\n $firstfield = true;\n\n $sql = \"INSERT INTO `$table` SET\";\n\n for ($i = 0; $i < count($fields); $i++) {\n if (!$firstfield) {\n $sql .= \", \";\n }\n $sql .= \" \" . $fields[$i] . \"=?\";\n $firstfield = false;\n }\n\n $sth = $db_conn->prepare($sql);\n return $sth->execute($values);\n\n return $sth;\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n}", "function array_to_set_clause($a_vars) {\n\tglobal $mysqli;\n\n\t$a_set = array();\n\t$a_values = array();\n\tforeach($a_vars as $k=>$v) {\n\t\t\t$k = $mysqli->real_escape_string($k);\n\t\t\t$v = $mysqli->real_escape_string($v);\n\t\t\t$a_set[] = $k;\n\t\t\t$a_values[] = $v;\n\t}\n\t$s_set = \"(`\".implode(\"`,`\", $a_set).\"`) VALUES ('\".implode(\"','\",$a_values).\"')\";\n\treturn $s_set;\n}", "public function testExecuteUpdateBatchSingleUpdateThenBatchUpdate()\n {\n $db = self::$database;\n $res = $db->runTransaction(function ($t) {\n $id = $this->randId();\n\n $t->executeUpdate('INSERT INTO ' . self::TABLE_NAME . ' (id, intField) VALUES (@id, @int)', [\n 'parameters' => [\n 'id' => $id,\n 'int' => 0\n ]\n ]);\n\n $res = $t->executeUpdateBatch([\n [\n 'sql' => 'UPDATE ' . self::TABLE_NAME . ' SET intField = intField+1 WHERE id = @id',\n 'parameters' => [\n 'id' => $id\n ]\n ]\n ]);\n\n $t->commit();\n\n return $res;\n });\n\n $this->assertEquals([1], $res->rowCounts());\n }", "private function insertRows(PersistentCollection $coll, array $options)\n {\n $mapping = $coll->getMapping();\n list($propertyPath, $parent) = $this->getPathAndParent($coll);\n if ($mapping['strategy'] === 'set') {\n $setData = array();\n $insertDiff = $coll->getInsertDiff();\n if ($insertDiff) {\n foreach ($insertDiff as $key => $document) {\n if (isset($mapping['reference'])) {\n $documentUpdates = $this->pb->prepareReferencedDocumentValue($mapping, $document);\n } else {\n $documentUpdates = $this->pb->prepareEmbeddedDocumentValue($mapping, $document);\n }\n\n if (is_int($key)) {\n $setData[$propertyPath][] = $documentUpdates;\n } else {\n foreach ($documentUpdates as $currFieldName => $currFieldValue) {\n $setData[$propertyPath. '.' .$key . '.' . $currFieldName] = $currFieldValue;\n }\n }\n }\n\n $query = array($this->cmd.'set' => $setData);\n $this->executeQuery($parent, $query, $options);\n }\n } else {\n $strategy = isset($mapping['strategy']) ? $mapping['strategy'] : 'pushAll';\n $insertDiff = $coll->getInsertDiff();\n if ($insertDiff) {\n $query = array($this->cmd.$strategy => array());\n foreach ($insertDiff as $document) {\n if (isset($mapping['reference'])) {\n $query[$this->cmd.$strategy][$propertyPath][] = $this->pb->prepareReferencedDocumentValue($mapping, $document);\n } else {\n $query[$this->cmd.$strategy][$propertyPath][] = $this->pb->prepareEmbeddedDocumentValue($mapping, $document);\n }\n }\n $this->executeQuery($parent, $query, $options);\n }\n }\n }", "public function insert_prepared_records($shipment_map_id,$sample_id,$test_kit_name_1,$lot_no_1,$exp_date_1,$test_result_1,$test_kit_name_2,$lot_no_2,$exp_date_2,$test_result_2,$test_kit_name_3,$lot_no_3,$exp_date_3,$test_result_3,$reported_result,$calculated_score,$created_by,$created_on,$updated_by,$updated_on,$redundancy_check= false, $printSQL = false) {\n\t\t$columns = array('shipment_map_id','sample_id','test_kit_name_1','lot_no_1','exp_date_1','test_result_1','test_kit_name_2','lot_no_2','exp_date_2','test_result_2','test_kit_name_3','lot_no_3','exp_date_3','test_result_3','reported_result','calculated_score','created_by','created_on','updated_by','updated_on');\n\t\t$records = array($shipment_map_id,$sample_id,$test_kit_name_1,$lot_no_1,$exp_date_1,$test_result_1,$test_kit_name_2,$lot_no_2,$exp_date_2,$test_result_2,$test_kit_name_3,$lot_no_3,$exp_date_3,$test_result_3,$reported_result,$calculated_score,$created_by,$created_on,$updated_by,$updated_on);\n\t\treturn $this->insert_records_to_response_result_dts ( $columns, $records,$redundancy_check, $printSQL );\n\t}", "public function testMergeMassViaInsertBefore()\n {\n $this->generateAndCompareTest('MergeMassViaInsertBefore');\n }", "public function insert($params){\n\t\t$rdata=0;\n\t\t$data=array();\n\t\t$sql=array();\n\t\tif(!empty($params)){\n\t\t\t$sql=array();\n\t\t\tforeach($params as $tname=>$cvalue){\n\t\t\t\t$data=array();\n\t\t\t\tforeach($cvalue as $field=>$value){\n\t\t\t\t\t$marray=array();\n\t\t\t\t\tif(preg_match('/^#(.*)$/',$field,$marray)){\n\t\t\t\t\t\t$field=$marray[1];\n\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`=\".$value;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`='\".$value.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$tname=trim($tname,'`');\n\t\t\t\t$this->query(\"INSERT `\".$tname.\"` SET \".implode(',',$data).\" ;\");\n\t\t\t\t$rdata=$this->insert_id;\n\t\t\t}\n\t\t}\n\t\treturn $rdata;\n\t}", "public function run()\n {\n Product::upsert([\n [\n 'id' => 1,\n 'name' => 'Product 1',\n 'state' => 'Weapon', //'Weapon', 'Accessories', 'Other'\n 'price' => 2000,\n 'is_disable' => 0,\n 'product_categories_id' => 8,//must be use valid category id\n 'product_types_id' => 3,//must be use valid product types id, which is connected with given category id\n 'product_brands_id' => 5,//must be use valid product brand id, which is connected with given category id\n ],\n [\n 'id' => 2,\n 'name' => 'Product 2',\n 'state' => 'Weapon', //'Weapon', 'Accessories', 'Other'\n 'price' => 1000,\n 'is_disable' => 0,\n 'product_categories_id' => 10,//must be use valid category id\n 'product_types_id' => 18,//must be use valid product types id, which is connected with given category id\n 'product_brands_id' => 65,//must be use valid product brand id, which is connected with given category id\n ],\n\n ], [], ['id']);\n\n ProductAttribute::upsert([\n [\n 'id' => 1,\n 'attributes_id' => 1,\n 'products_id' => 1,\n 'values' => json_encode([2,3])\n ],\n [\n 'id' => 2,\n 'attributes_id' => 2,\n 'products_id' => 2,\n 'values' => json_encode([55])\n ],\n\n ],[],['id']);\n\n /*ProductTag::upsert([ //use if needed\n [\n 'id' => 1,\n 'tags_id' => 2,\n 'products_id' => 2\n ]\n ],[],['id']);*/\n }", "function test_insert($urabe, $body)\n{\n $insert_params = $body->insert_params;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert($table_name, $insert_params);\n}", "public function run()\n {\n \\DB::table('capitals')->insert(array(\n array('id' => '1','activo' => '475615518','into21' => '-116551773','into1' => '0','into2' => '0','into3' => '116551773','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-224754738','pasivoexigi1' => '140834363','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '36274318','pasivoexigi6' => '0','pasivoexigi7' => '38154394','pasivoexigi8' => '6553094','pasivoexigi9' => '2938569','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '134309007','ano' => '2017','empresas_id' => '3','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-09 17:48:09','updated_at' => '2020-01-09 17:50:32'),\n array('id' => '2','activo' => '562342005','into21' => '-116551773','into1' => '0','into2' => '0','into3' => '116551773','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-365352554','pasivoexigi1' => '320113110','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '21535778','pasivoexigi6' => '0','pasivoexigi7' => '16007122','pasivoexigi8' => '4966299','pasivoexigi9' => '2730245','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '80437678','ano' => '2018','empresas_id' => '3','notas' => '<p>Hay diferencia en la validacion de $ 2.033.021.-</p>\n\n<p>La nota de contabilidad por la revalorizacion es la N| 973 del 2018 por $ 7.024.102.</p>','deleted_at' => NULL,'created_at' => '2020-01-09 17:56:26','updated_at' => '2020-07-01 16:39:31'),\n array('id' => '3','activo' => '7932644','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-5384091','pasivoexigi1' => '1604174','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '1676499','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '530688','pasivoexigi9' => '1572730','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '2548553','ano' => '2009','empresas_id' => '2','notas' => '<p>ALGUNA NOTA</p>','deleted_at' => NULL,'created_at' => '2020-01-10 16:38:52','updated_at' => '2020-06-22 09:41:10'),\n array('id' => '4','activo' => '43072776','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-24278997','pasivoexigi1' => '4120692','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '8670416','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '8237736','pasivoexigi9' => '2249104','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '1001049','capitaltri' => '18793779','ano' => '2010','empresas_id' => '2','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-10 16:43:50','updated_at' => '2020-01-10 16:48:47'),\n array('id' => '5','activo' => '775007843','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-720293546','pasivoexigi1' => '312458878','pasivoexigi2' => '0','pasivoexigi3' => '5060371','pasivoexigi4' => '0','pasivoexigi5' => '22252115','pasivoexigi6' => '0','pasivoexigi7' => '379422198','pasivoexigi8' => '0','pasivoexigi9' => '1099983','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '54714297','ano' => '2009','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-10 18:51:22','updated_at' => '2020-01-27 14:52:24'),\n array('id' => '6','activo' => '136703185','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-85453939','pasivoexigi1' => '4209353','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '2365826','pasivoexigi6' => '0','pasivoexigi7' => '73000000','pasivoexigi8' => '4160707','pasivoexigi9' => '1718053','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '51249246','ano' => '2017','empresas_id' => '8','notas' => '<p>Cuadra la validacion del a&ntilde;o anterior con el capital actual</p>','deleted_at' => NULL,'created_at' => '2020-01-27 15:06:50','updated_at' => '2020-06-23 12:49:03'),\n array('id' => '7','activo' => '116173153','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-82347795','pasivoexigi1' => '1960116','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '1476799','pasivoexigi6' => '0','pasivoexigi7' => '73000000','pasivoexigi8' => '4405742','pasivoexigi9' => '1505138','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '33825358','ano' => '2018','empresas_id' => '8','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-28 14:05:47','updated_at' => '2020-01-28 14:05:47'),\n array('id' => '8','activo' => '116735811','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-87198122','pasivoexigi1' => '1955466','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '6925335','pasivoexigi6' => '0','pasivoexigi7' => '73000000','pasivoexigi8' => '3853264','pasivoexigi9' => '1464057','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '29537689','ano' => '2019','empresas_id' => '8','notas' => '<p>Ok con cuadratura e SII.</p>\n\n<p>No cuadra con la contabilidad o Balance 2019&nbsp; el activo es de $ 115.102.632.-</p>\n\n<p>En este calculo el activo es de&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116.735.811.-</p>\n\n<p>La diferencia es por un castigo de ctas. ctes efectuado con posterioridad y otro de deudores trabajadores</p>','deleted_at' => NULL,'created_at' => '2020-01-28 14:16:48','updated_at' => '2020-06-23 13:14:35'),\n array('id' => '9','activo' => '43221501','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-16422818','pasivoexigi1' => '862572','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '5290582','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '5830367','pasivoexigi9' => '2730007','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '1709290','capitaltri' => '26798683','ano' => '2011','empresas_id' => '2','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-30 12:15:43','updated_at' => '2020-01-30 12:15:43'),\n array('id' => '10','activo' => '46558232','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-15606387','pasivoexigi1' => '4819490','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '3866313','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '2279514','pasivoexigi9' => '2337682','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '2303388','capitaltri' => '30951845','ano' => '2012','empresas_id' => '2','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-30 15:26:36','updated_at' => '2020-01-30 15:26:36'),\n array('id' => '11','activo' => '46624774','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-14403203','pasivoexigi1' => '4054621','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '2889209','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '1957719','pasivoexigi9' => '2557651','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '2944003','capitaltri' => '32221571','ano' => '2013','empresas_id' => '2','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-31 14:38:29','updated_at' => '2020-01-31 14:38:29'),\n array('id' => '12','activo' => '52759761','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-7602850','pasivoexigi1' => '624118','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '3493670','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '1321947','pasivoexigi9' => '2163115','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '45156911','ano' => '2014','empresas_id' => '2','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-01-31 15:07:06','updated_at' => '2020-01-31 15:07:06'),\n array('id' => '13','activo' => '57805664','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-11594998','pasivoexigi1' => '4288335','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '1866288','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '118791','pasivoexigi9' => '2117173','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '3204411','capitaltri' => '46210666','ano' => '2015','empresas_id' => '2','notas' => '<p>La comprobacion del a&ntilde;o siguiente esta ingresada aqui y cuadra con lo&nbsp; contabilizado</p>','deleted_at' => NULL,'created_at' => '2020-02-03 12:15:59','updated_at' => '2020-06-23 11:49:26'),\n array('id' => '14','activo' => '41111596','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-7957697','pasivoexigi1' => '672967','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '2470100','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '1822381','pasivoexigi9' => '2992249','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '33153899','ano' => '2016','empresas_id' => '2','notas' => '<p>ok con validacion</p>','deleted_at' => NULL,'created_at' => '2020-02-03 12:25:47','updated_at' => '2020-06-23 11:52:59'),\n array('id' => '15','activo' => '61249242','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-16734981','pasivoexigi1' => '764854','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '9039046','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '1500','pasivoexigi9' => '3707994','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '3221587','capitaltri' => '44514261','ano' => '2017','empresas_id' => '2','notas' => '<p>Este a&ntilde;o se produce una diferencia de $ 247.414.-</p>\n\n<p>Es por cuanto la correccion monetaria suma $ 877.339.- en estos formularios.</p>\n\n<p>En la contabilidad la nota 261 de diciembre de 2017 es por $ 627.924.-</p>','deleted_at' => NULL,'created_at' => '2020-02-03 12:36:39','updated_at' => '2020-06-23 11:40:47'),\n array('id' => '16','activo' => '589668156','into21' => '-44928970','into1' => '0','into2' => '0','into3' => '44928970','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-359200348','pasivoexigi1' => '292403173','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '38215144','pasivoexigi6' => '0','pasivoexigi7' => '26162647','pasivoexigi8' => '18014','pasivoexigi9' => '2401370','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '185538838','ano' => '2019','empresas_id' => '3','notas' => '<p>Se informo al SII s/form 22&nbsp; $ 185.399.520.-- CPI</p>','deleted_at' => NULL,'created_at' => '2020-02-12 14:36:22','updated_at' => '2020-07-01 16:37:30'),\n array('id' => '17','activo' => '20000000','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '0','pasivoexigi1' => '0','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '0','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '0','pasivoexigi9' => '0','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '20000000','ano' => '2009','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-13 20:44:22','updated_at' => '2020-02-13 20:44:22'),\n array('id' => '18','activo' => '775927460','into21' => '-1000000','into1' => '0','into2' => '0','into3' => '1000000','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-706922100','pasivoexigi1' => '221433542','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '25671015','pasivoexigi6' => '0','pasivoexigi7' => '456023020','pasivoexigi8' => '174618','pasivoexigi9' => '3323997','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '295908','capitaltri' => '68005360','ano' => '2010','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-13 20:59:10','updated_at' => '2020-02-13 20:59:10'),\n array('id' => '19','activo' => '1106197952','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-942327989','pasivoexigi1' => '478396107','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '53098125','pasivoexigi6' => '0','pasivoexigi7' => '407595114','pasivoexigi8' => '132938','pasivoexigi9' => '3032164','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '73541','capitaltri' => '163869963','ano' => '2011','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-13 21:16:34','updated_at' => '2020-02-13 21:16:34'),\n array('id' => '20','activo' => '1420221522','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-1184568723','pasivoexigi1' => '747823305','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '30637466','pasivoexigi6' => '0','pasivoexigi7' => '400505654','pasivoexigi8' => '481533','pasivoexigi9' => '5120765','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '235652799','ano' => '2012','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 13:34:45','updated_at' => '2020-02-14 13:34:45'),\n array('id' => '21','activo' => '1515122206','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-1181835476','pasivoexigi1' => '597520911','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '62374524','pasivoexigi6' => '0','pasivoexigi7' => '513150351','pasivoexigi8' => '232000','pasivoexigi9' => '7218199','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '1339491','capitaltri' => '333286730','ano' => '2013','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 14:09:21','updated_at' => '2020-02-14 14:09:21'),\n array('id' => '22','activo' => '1713251543','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-1333950737','pasivoexigi1' => '738078996','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '40085961','pasivoexigi6' => '0','pasivoexigi7' => '548037276','pasivoexigi8' => '324875','pasivoexigi9' => '7423629','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '379300806','ano' => '2014','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 14:19:23','updated_at' => '2020-02-14 14:19:23'),\n array('id' => '23','activo' => '2559042679','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-1964035702','pasivoexigi1' => '1138647245','pasivoexigi2' => '0','pasivoexigi3' => '86600000','pasivoexigi4' => '0','pasivoexigi5' => '127580708','pasivoexigi6' => '0','pasivoexigi7' => '599303581','pasivoexigi8' => '791800','pasivoexigi9' => '11112368','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '595006977','ano' => '2015','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 14:37:13','updated_at' => '2020-02-14 14:37:13'),\n array('id' => '24','activo' => '3062161659','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-2061726980','pasivoexigi1' => '1155318765','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '159858194','pasivoexigi6' => '0','pasivoexigi7' => '733512432','pasivoexigi8' => '1029570','pasivoexigi9' => '12008019','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '1000434679','ano' => '2016','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 14:53:50','updated_at' => '2020-02-14 14:53:50'),\n array('id' => '25','activo' => '3585386203','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-2309355909','pasivoexigi1' => '1263340645','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '124122684','pasivoexigi6' => '0','pasivoexigi7' => '907015966','pasivoexigi8' => '729498','pasivoexigi9' => '14147116','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '1276030294','ano' => '2017','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 15:22:08','updated_at' => '2020-02-14 15:22:08'),\n array('id' => '26','activo' => '4403852215','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-3017141563','pasivoexigi1' => '1926842766','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '102041813','pasivoexigi6' => '0','pasivoexigi7' => '970523446','pasivoexigi8' => '697998','pasivoexigi9' => '17035540','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '1386710652','ano' => '2018','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 15:32:32','updated_at' => '2020-02-14 15:34:01'),\n array('id' => '27','activo' => '4781355911','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-2953101212','pasivoexigi1' => '1906352825','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '256998031','pasivoexigi6' => '0','pasivoexigi7' => '91132870','pasivoexigi8' => '280000','pasivoexigi9' => '18574067','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '679763419','capitaltri' => '1828254699','ano' => '2019','empresas_id' => '6','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-02-14 15:53:45','updated_at' => '2020-07-15 14:19:05'),\n array('id' => '28','activo' => '76359193','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-28397139','pasivoexigi1' => '7040177','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '0','pasivoexigi6' => '8294658','pasivoexigi7' => '0','pasivoexigi8' => '7857379','pasivoexigi9' => '4214925','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '990000','capitaltri' => '47962054','ano' => '2018','empresas_id' => '2','notas' => '<p>ok con validacion</p>','deleted_at' => NULL,'created_at' => '2020-06-22 16:26:51','updated_at' => '2020-06-23 11:52:39'),\n array('id' => '29','activo' => '66607455','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-14362950','pasivoexigi1' => '3801804','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '6178115','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '3000','pasivoexigi9' => '4283640','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '96391','capitaltri' => '52244505','ano' => '2019','empresas_id' => '2','notas' => '<p>ok con validacion</p>','deleted_at' => NULL,'created_at' => '2020-06-22 16:50:24','updated_at' => '2020-06-23 11:52:45'),\n array('id' => '30','activo' => '163581976','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-78708364','pasivoexigi1' => '1215247','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '0','pasivoexigi6' => '2162100','pasivoexigi7' => '0','pasivoexigi8' => '150000','pasivoexigi9' => '2181017','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '73000000','capitaltri' => '84873612','ano' => '2016','empresas_id' => '8','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-23 12:35:45','updated_at' => '2020-06-23 12:35:45'),\n array('id' => '31','activo' => '524913899','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-501463087','pasivoexigi1' => '92192686','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '28015388','pasivoexigi6' => '0','pasivoexigi7' => '19970000','pasivoexigi8' => '0','pasivoexigi9' => '1028728','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '360256285','capitaltri' => '23450812','ano' => '2010','empresas_id' => '7','notas' => '<p>Hay diferencia entre la validacion y el valor del capital propio de $ 106.906.-</p>','deleted_at' => NULL,'created_at' => '2020-06-30 14:03:27','updated_at' => '2020-06-30 14:05:43'),\n array('id' => '32','activo' => '575898180','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-540566265','pasivoexigi1' => '90567222','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '25184815','pasivoexigi6' => '0','pasivoexigi7' => '57071785','pasivoexigi8' => '92949','pasivoexigi9' => '1311652','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '366337842','capitaltri' => '35331915','ano' => '2011','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-30 14:16:27','updated_at' => '2020-06-30 14:16:27'),\n array('id' => '33','activo' => '704739487','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-618042738','pasivoexigi1' => '55815342','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '40702999','pasivoexigi6' => '0','pasivoexigi7' => '49970000','pasivoexigi8' => '235664','pasivoexigi9' => '1514154','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '469804579','capitaltri' => '86696749','ano' => '2012','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-30 14:27:04','updated_at' => '2020-06-30 14:27:04'),\n array('id' => '34','activo' => '905717160','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-716379710','pasivoexigi1' => '79313152','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '46800831','pasivoexigi6' => '0','pasivoexigi7' => '77791755','pasivoexigi8' => '65870','pasivoexigi9' => '2042814','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '510365288','capitaltri' => '189337450','ano' => '2013','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-30 14:45:14','updated_at' => '2020-06-30 14:47:07'),\n array('id' => '35','activo' => '1016554089','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-955277856','pasivoexigi1' => '191204314','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '33293067','pasivoexigi6' => '0','pasivoexigi7' => '29000000','pasivoexigi8' => '7650923','pasivoexigi9' => '2297582','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '691831970','capitaltri' => '61276233','ano' => '2014','empresas_id' => '7','notas' => '<p>Hay una diferencia entre el capiat y la validacion de $ 60.641.-</p>','deleted_at' => NULL,'created_at' => '2020-06-30 14:59:51','updated_at' => '2020-06-30 15:18:11'),\n array('id' => '36','activo' => '995318114','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-927224400','pasivoexigi1' => '112889271','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '16973693','pasivoexigi6' => '0','pasivoexigi7' => '22408000','pasivoexigi8' => '13324242','pasivoexigi9' => '2006635','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '759622559','capitaltri' => '68093714','ano' => '2015','empresas_id' => '7','notas' => '<p>Diferencia entre al capital propio $ 68.093.714.- y su validacion $ 43.882.577.-&nbsp; diferencia $ 24.211.137.-</p>\n\n<p>En el reajuste de CPI hay dis de $ 908.792.-</p>','deleted_at' => NULL,'created_at' => '2020-06-30 15:31:53','updated_at' => '2020-06-30 15:38:14'),\n array('id' => '37','activo' => '969938866','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-867298999','pasivoexigi1' => '82473714','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '33614529','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '0','pasivoexigi9' => '2161315','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '749049441','capitaltri' => '102639867','ano' => '2016','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-30 15:46:02','updated_at' => '2020-06-30 15:46:51'),\n array('id' => '38','activo' => '958827457','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-827784412','pasivoexigi1' => '35182441','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '30821703','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '151717','pasivoexigi9' => '2579110','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '759049441','capitaltri' => '131043045','ano' => '2017','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-30 16:01:58','updated_at' => '2020-06-30 16:01:58'),\n array('id' => '39','activo' => '1049873328','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-874482994','pasivoexigi1' => '35568524','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '50141626','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '896772','pasivoexigi9' => '2440522','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '785435550','capitaltri' => '175390334','ano' => '2018','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-30 16:12:15','updated_at' => '2020-06-30 16:12:15'),\n array('id' => '40','activo' => '1159587737','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-1055048693','pasivoexigi1' => '42095516','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '32622721','pasivoexigi6' => '0','pasivoexigi7' => '233993443','pasivoexigi8' => '3115602','pasivoexigi9' => '2531033','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '740690378','capitaltri' => '104539044','ano' => '2019','empresas_id' => '7','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-06-30 16:23:09','updated_at' => '2020-06-30 16:23:09'),\n array('id' => '41','activo' => '1394629986','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-723375212','pasivoexigi1' => '566677458','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '82619637','pasivoexigi6' => '0','pasivoexigi7' => '55000000','pasivoexigi8' => '12832975','pasivoexigi9' => '6245142','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '671254774','ano' => '2016','empresas_id' => '5','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-07-21 12:05:09','updated_at' => '2020-07-21 12:05:09'),\n array('id' => '42','activo' => '1397007221','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-608987564','pasivoexigi1' => '521824683','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '60801818','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '19626221','pasivoexigi9' => '6734842','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '788019657','ano' => '2017','empresas_id' => '5','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-07-21 12:08:23','updated_at' => '2020-07-21 12:08:23'),\n array('id' => '43','activo' => '1577091254','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-615251293','pasivoexigi1' => '527002032','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '64745050','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '16774867','pasivoexigi9' => '6729344','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '961839961','ano' => '2018','empresas_id' => '5','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-07-21 12:19:24','updated_at' => '2020-07-21 12:19:24'),\n array('id' => '44','activo' => '150766941','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-25160060','pasivoexigi1' => '13123442','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '7356565','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '3579416','pasivoexigi9' => '1100637','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '125606881','ano' => '2015','empresas_id' => '4','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-08-31 14:54:56','updated_at' => '2020-08-31 14:54:56'),\n array('id' => '45','activo' => '171917767','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-22477359','pasivoexigi1' => '4694363','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '10875515','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '5410546','pasivoexigi9' => '1496935','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '149440408','ano' => '2016','empresas_id' => '4','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-08-31 15:00:16','updated_at' => '2020-08-31 15:00:16'),\n array('id' => '46','activo' => '213109899','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-46491758','pasivoexigi1' => '29395181','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '9550693','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '6001972','pasivoexigi9' => '1543912','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '166618141','ano' => '2017','empresas_id' => '4','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-08-31 15:08:32','updated_at' => '2020-08-31 15:08:32'),\n array('id' => '47','activo' => '217778128','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-42560796','pasivoexigi1' => '30898147','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '4343334','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '6043799','pasivoexigi9' => '1275516','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '175217332','ano' => '2018','empresas_id' => '4','notas' => '<p>La validacion de capiatl propio tiene una diferencia de $ 996.102.- por el siguiente error</p>\n\n<p>La revalorizacion del capiatl anterior es por 4.665.308.- y se contabiliza 3.669.205.-</p>\n\n<p>En nota de contabilidad 724 del 30/12/2018</p>','deleted_at' => NULL,'created_at' => '2020-08-31 15:26:24','updated_at' => '2020-09-01 11:09:47'),\n array('id' => '48','activo' => '217695953','into21' => '0','into1' => '0','into2' => '0','into3' => '0','into4' => '0','into5' => '0','into6' => '0','into7' => '0','into8' => '0','into9' => '0','into22' => '0','complementa1' => '0','complementa2' => '0','complementa3' => '0','valfinanciero31' => '0','valfinanciero1' => '0','valfinanciero2' => '0','valfinanciero3' => '0','valfinanciero4' => '0','valfinanciero5' => '0','valfinanciero6' => '0','valfinanciero7' => '0','valfinanciero8' => '0','valfinanciero9' => '0','valtributario32' => '0','valtributario1' => '0','valtributario2' => '0','valtributario3' => '0','valtributario4' => '0','valtributario5' => '0','valtributario6' => '0','valtributario7' => '0','valtributario8' => '0','pasivo51' => '-23698295','pasivoexigi1' => '5248925','pasivoexigi2' => '0','pasivoexigi3' => '0','pasivoexigi4' => '0','pasivoexigi5' => '10399040','pasivoexigi6' => '0','pasivoexigi7' => '0','pasivoexigi8' => '6509138','pasivoexigi9' => '1541192','pasivoexigi10' => '0','pasivoexigi11' => '0','pasivoexigi12' => '0','pasivoexigi13' => '0','capitaltri' => '193997658','ano' => '2019','empresas_id' => '4','notas' => NULL,'deleted_at' => NULL,'created_at' => '2020-08-31 15:33:54','updated_at' => '2020-08-31 15:33:54')\n\n ));\n }", "function insert_element_set($elementSetMetadata = array(), array $elements = array())\n{\n // Set the element set name if a string is provided.\n if (is_string($elementSetMetadata)) {\n $elementSetMetadata = array('name' => $elementSetMetadata);\n }\n\n $builder = new Builder_ElementSet(get_db());\n $builder->setRecordMetadata($elementSetMetadata);\n $builder->setElements($elements);\n return $builder->build();\n}", "public function testQueryBuilder()\n {\n $table = new \\Phinx\\Db\\Table('table1', [], $this->adapter);\n $table->addColumn('string_col', 'string')\n ->addColumn('int_col', 'integer')\n ->save();\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->insert(['string_col', 'int_col'])\n ->into('table1')\n ->values(['string_col' => 'value1', 'int_col' => 1])\n ->values(['string_col' => 'value2', 'int_col' => 2])\n ->execute();\n\n $this->assertEquals(2, $stm->rowCount());\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->select('*')\n ->from('table1')\n ->where(['int_col >=' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n $this->assertEquals(\n ['id' => 2, 'string_col' => 'value2', 'int_col' => '2'],\n $stm->fetch('assoc')\n );\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->delete('table1')\n ->where(['int_col <' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n }", "public function save($params, $duplicates = array()) {\n\n\t\tif (isset($params[\"id\"]) && !empty($params[\"id\"]) && intval($params[\"id\"])) {\n\t\t\t$returnType = \"update\";\n\n\t\t\t$_id = $params['id'];\n\t\t\tunset($params[\"id\"]);\n\n\t\t\t// We need to build a list of parameter place-holders of values that are bound\n\t\t\t// to the query. Each insert should have the exact same amount of parameter\n\t\t\t// bindings so we will loop through the record and parameterize them all.\n\t\t\t$sets = collect($params)->map(function ($val, $key) {\n\t\t\t\t$this->builder->addBinding($val);\n\t\t\t\treturn $this->builder->columnize([$key]).'='.$this->builder->parameterize([$val]);\n\t\t\t})->implode(', ');\n\n\t\t\t$this->builder->addBinding($_id);\n\n\t\t\t$query = \"UPDATE `\" . $this->table . \"` SET $sets WHERE `id`= ?\";\n\n\t\t}\n\t\telse {\n\t\t\t$returnType = \"insert\";\n\t\t\tunset($params[\"id\"]);\n\n\t\t\tif (! is_array(reset($params))) {\n\t\t\t\t$params = [$params];\n\t\t\t}\n\n\t\t\t$fields = $this->builder->columnize(array_keys(reset($params)));\n\n\t\t\t// We need to build a list of parameter place-holders of values that are bound\n\t\t\t// to the query. Each insert should have the exact same amount of parameter\n\t\t\t// bindings so we will loop through the record and parameterize them all.\n\t\t\t$values = collect($params)->map(function ($record) {\n\t\t\t\t$this->builder->addBinding($record);\n\t\t\t\treturn '('.$this->builder->parameterize($record).')';\n\t\t\t})->implode(', ');\n\n\t\t\t$dup = collect($duplicates)->map(function ($dupli) {\n\t\t\t\treturn $this->builder->columnize([$dupli]) . '=VALUES('.$this->builder->columnize([$dupli]).')';\n\t\t\t})->implode(', ');\n\n\t\t\tif ($dup != \"\"){\n\t\t\t\t$query = \"INSERT IGNORE INTO `\" . $this->table . \"` (\".$fields.\") VALUES \".$values.\" ON DUPLICATE KEY UPDATE $dup\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$query = \"INSERT INTO `\" . $this->table . \"` (\".$fields.\") VALUES \".$values.\"\";\n\t\t\t}\n\n\t\t}\n\n\t\t$this->statement = $this->connectionDriver->prepare($query);\n\n\t\tif (collect($this->builder->bindings)->count() > 0){\n\t\t\t$this->bindValues();\n\t\t}\n\n\t\ttry {\n\t\t\t$this->statement->execute();\n\t\t}\n\t\tcatch (\\PDOException $e) {\n\n\t\t\tif (config('app.debug') == TRUE){\n\t\t\t\techo \"<pre>PDO::errorInfo():<br>\";\n\t\t\t\tprint_r($this->statement->errorInfo());\n\t\t\t\tvar_dump($e);\n\t\t\t\techo '<br> ' . $query . '</pre><br><br>';\n\t\t\t}\n\t\t\treturn FALSE;\n\n\t\t}\n\n\t\t$datas = $this->getReturn($returnType);\n\t\t$this->statement->closeCursor();\n\n\t\treturn $datas;\n\t}", "protected function insertBuildSQLSetValues(&$data, &$insert){\n $insert = parent::insertBuildSQLSetValues($data, $insert);\n $billingData = new BillingDataEntity($data->billingdata);\n // We get our own hydrator for billing data\n $hydrator = $this->insertGetHydratorInstance($billingData);\n $billingValues = $hydrator->extract($billingData);\n $insert->values($billingValues, \\Zend\\Db\\Sql\\Insert::VALUES_MERGE);\n return $insert;\n }", "private static function test_db( $params_array ) {\n $table_name = ( isset( $params_array[ 'prefix' ] ) ? $params_array[ 'prefix' ] : '' ) . self::DUMMY_TABLE_NAME;\n $dummy_data = str_repeat ( 'Z' , 256 );\n $str_data = sprintf( '(\"%s\")', $dummy_data );\n for ( $i = 1; $i < 63; $i++) {\n $str_data .= sprintf( ',(\"%s\")', $dummy_data );\n }\n call_user_func(array( $params_array[ 'query_object' ], $params_array[ 'query_method' ] ), \"CREATE TABLE if not exists $table_name (dummydata text NOT NULL DEFAULT '')\" );\n call_user_func(array( $params_array[ 'query_object' ], $params_array[ 'query_method' ] ), \"insert into $table_name (dummydata) values \" . $str_data . \";\" );\n call_user_func(array( $params_array[ 'query_object' ], $params_array[ 'query_method' ] ), \"select * from $table_name;\" );\n call_user_func(array( $params_array[ 'query_object' ], $params_array[ 'query_method' ] ), \"update $table_name set dummydata = '\" . __CLASS__ . \"';\" );\n call_user_func(array( $params_array[ 'query_object' ], $params_array[ 'query_method' ] ), \"delete from $table_name;\" );\n call_user_func(array( $params_array[ 'query_object' ], $params_array[ 'query_method' ] ), \"DROP TABLE if exists $table_name;\" );\n }", "public function testMultipleResultQueryWithSingleResultStatement() {\r\n $uuid = 'abcdefg';\r\n $bool = true;\r\n $int = 1234567;\r\n $string = 'avorium';\r\n // Write data to the database\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$uuid.'\\','.($bool ? 1:0).','.$int.', \\''.$string.'\\')');\r\n // Read data out and cast it to persistent object\r\n $query = 'select * from POTEST where UUID = \\'abcdefg\\'';\r\n $pos = $this->getPersistenceAdapter()->executeMultipleResultQuery($query);\r\n $this->assertEquals(1, count($pos), 'Wrong number of database records found.');\r\n }", "function create($table, $data){\n\n global $conn;\n // $sql = \"INSERT INTO users SET (username=?, admin=?, email=?, password=?)\"\n$sql = \"INSERT INTO $table SET \";\n\n$i = 0;\n foreach ($data as $key => $value){\n if($i === 0){\n $sql = $sql . \" $key=?\"; \n } else{\n $sql = $sql . \", $key=?\";\n }\n$i++;\n}\n\n$stmt = executeQuery($sql, $data);\n$id = $stmt->insert_id;\nreturn $id;\n}", "public function bulkStore( Request $request ){ \n\n //dd('3');\n // Validate User Inputs ===========================================\n $this->validate( $request, [\n 'sample_ids' => 'required',\n 'test_date' => 'required|date_format:Y-m-d',\n ] );\n\n DB::beginTransaction();\n try {\n // User Inputs ====================================================\n $sample_ids = trim( $request->input('sample_ids') );\n $sample_ids = explode(',', $sample_ids);\n $test_date = $request->input('test_date');\n $result = $request->input('result');\n\n // Get Samples from $sample_ids ===================================\n // $samples = Sample::query()->findMany( $sample_ids);\n // dd($sample_ids );\n $data = array();\n foreach($sample_ids as $sample_id){ \n // dd( $sample_id); \n\n $data['sample'][$sample_id] = ServiceLog::select('s.id as sample_id', 't_service_log.updated_at as ID','t_service_log.enroll_label',\n 't_service_log.enroll_id','t_service_log.sample_label as samples', 't_service_log.stage as stage','t_service_log.status',\n DB::raw('date_format(d.test_date,\"%d-%m-%y\") as date'),'s.test_reason','m.result','s.fu_month','t_service_log.tag',\n 't_service_log.status as STATUS','t_service_log.sample_id','t_service_log.service_id','t_service_log.rec_flag','d.sent_for AS Deconta_sent_for')\n ->leftjoin('t_microscopy as m','m.sample_id','=','t_service_log.sample_id')\n ->leftjoin('t_decontamination as d','d.sample_id','t_service_log.sample_id')\n ->leftjoin('sample as s','s.id','t_service_log.sample_id')\n ->whereIn('t_service_log.status',[1]) // ->whereIn('t_service_log.status',[1,2,0])\n //->where('t_service_log.service_id',3)\n ->where('t_service_log.id',$sample_id)\n ->orderBy('t_service_log.enroll_label','desc')\n ->distinct()\n ->get(); \n //dd($data['sample']); \n }\n //dd(count($data['sample']));\n if(count($data['sample']) > 0){ \n // die(count($data['sample']));\n foreach($data['sample'] as $key => $value){\n //dd($value);\n // Update if exists or create new if not, in Decontamination ==\n /** @var Sample $sample */\n Microscopy::create([\n 'enroll_id' => $value[0]['enroll_id'],\n 'sample_id' => $value[0]['sample_id'],\n 'status' => '1', \n //'status' => Microscopy::STATUS_ACTIVE, \n //'test_date' => $test_date,\n 'result' => $result,\n 'created_by' => Auth::user()->id,\n 'updated_by' => Auth::user()->id\n ]);\n // Log this change to ServiceLog ==============================\n ServiceLog::where([\n 'id' => $key,\n // 'enroll_id' => $data['sample'][0]['enroll_id'],\n // 'sample_label' => $data['sample'][0]['enroll_label'],\n //'service_id' => $data['sample'][0]['service_id'],\n \n //'service_id' => ServiceLog::TYPE_DECONTAMINATION,\n ])->update([\n 'tag'=> $value[0]['tag'],\n 'stage'=> $result,\n 'status' => '2',\n //'status' => Microscopy::SERVICE_STATUS_ACTIVE,\n 'created_by' => Auth::user()->id,\n 'updated_by' => Auth::user()->id,\n ]); \n\n\n /*ServiceLog::create([\n 'enroll_id' => $value[0]['enroll_id'],\n 'sample_id' => $value[0]['sample_id'],\n 'service_id' => $value[0]['service_id'], \n 'status' => '2', \n 'enroll_label' => $value[0]['enroll_label'], \n 'sample_label' => $value[0]['samples'],\n 'tag' => $value[0]['tag'],\n //'tag' => $value->tag, \n //'stage' => $value[0]['stage'], \n 'stage'=> $result,\n 'created_by' => Auth::user()->id,\n 'updated_by' => Auth::user()->id\n ]);*/\n } \n } \n DB::commit();\n }catch(\\Exception $e){\n //dd($e->getMessage()); \n DB::rollback();\n /*return redirect('/dash_decontamination')->withErrors(['Sorry!! Action already taken of the selected Sample']);*/\n return back(); // Return back from where the request has come.\n } \n return back(); // Return back from where the request has come.\n\n}" ]
[ "0.663163", "0.64041233", "0.62730074", "0.6219013", "0.59546626", "0.58772254", "0.5745428", "0.5741173", "0.5672622", "0.5654515", "0.56194955", "0.56147915", "0.5599889", "0.5578452", "0.5576814", "0.556198", "0.55512154", "0.5547503", "0.5542283", "0.5532702", "0.5530291", "0.55043685", "0.5481829", "0.5478023", "0.5466452", "0.54500794", "0.54500383", "0.54348963", "0.54250133", "0.54043347", "0.5393429", "0.53915817", "0.53914493", "0.5390123", "0.5389428", "0.53443104", "0.5342954", "0.53400046", "0.53389037", "0.53355587", "0.5319732", "0.5315057", "0.52939385", "0.5292564", "0.52850366", "0.52843434", "0.5278386", "0.5278353", "0.5247595", "0.5243379", "0.5234023", "0.5231746", "0.5230678", "0.52276534", "0.52272624", "0.5219764", "0.5219271", "0.5217181", "0.52115065", "0.5203672", "0.52022046", "0.5199555", "0.51962525", "0.5185355", "0.517984", "0.51791275", "0.5164099", "0.5159851", "0.5159344", "0.5158117", "0.51520896", "0.5137841", "0.5125483", "0.5123039", "0.51206136", "0.51002014", "0.50983644", "0.50952566", "0.50862414", "0.50709444", "0.5062305", "0.50613266", "0.5060649", "0.5057527", "0.50557095", "0.5048542", "0.5041121", "0.50366426", "0.50357556", "0.50330114", "0.50297797", "0.5028294", "0.5027142", "0.5022101", "0.50212824", "0.50188226", "0.5017669", "0.501752", "0.5013424", "0.50119185", "0.5011498" ]
0.0
-1
Display a listing of the resource.
public function index() { $result = Artical::where('is_delete','1') ->orderby('id','desc') ->with('user') ->paginate(); return view('artical.index', compact('result')); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // return view('artical.new'); }
{ "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) { $todate = date("Y-m-d-H-i-s"); $this->validate($request, [ 'title' => 'required|min:10', 'body' => 'required|min:20', ]); // $request->artical_image->store('image_name'); $check_has = $request->hasFile('image_name'); $file_name = $request->file('image_name'); $name = $todate.'.'.$file_name->getClientOriginalExtension(); $path_url = public_path('/uploads/articals'); //file uploads $save_data = [ 'title'=>$request->title, 'body'=>$request->body, 'image_name'=>$name, 'image_path'=>$path_url, ]; $data = $request->user()->articals()->create($save_data); if($data->toarray()){ $path = $path_url.'/'.$data->id; File::makeDirectory($path, $mode = 0777, true, true); FileUploadComponent::upload($check_has,$file_name, $path, $name); $request->session()->flash('success', 'Record successfully added!'); }else{ $request->session()->flash('warning', 'Record not added!'); } return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Artical $artical) { // }
{ "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 }", "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 }", "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 $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 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 edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\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 show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "public function display() {\n echo $this->render();\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}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "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()\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.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Artical $artical) { $artical = Artical::findorFail($artical->id); return view('artical.edit',compact('artical')); }
{ "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, Artical $artical) { $todate = date("Y-m-d-H-i-s"); $this->validate($request, [ 'title' => 'required|min:10', 'body' => 'required|min:20', 'image_name' => 'required', ]); $me = $request->user(); if( $me->hasRole('Admin') ) { $artical = Artical::findOrFail($artical->id); } else { $artical = $me->articals()->findOrFail($artical->id); } $check_has = $request->hasFile('image_name'); $file_name = $request->file('image_name'); $name = $todate.'.'.$file_name->getClientOriginalExtension(); $path_url = public_path('/uploads/articals'); $path = $path_url.'/'.$artical->id; $imagename = FileUploadComponent::upload($check_has,$file_name, $path, $name); $save_data = [ 'title'=>$artical->title, 'body'=>$artical->body, 'image_name'=>$imagename, ]; $data = $artical->update($save_data); if($data){ $request->session()->flash('success', 'Record successfully added!'); }else{ $request->session()->flash('warning', 'Record not added!'); } return redirect()->route('articals.index'); }
{ "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(Artical $artical) { $me = Auth::user(); if($me->hasRole('admin')){ $post = Artical::findorFail($artical->id); }else{ $post = $me->artical()->findorFail($artical->id); } Artical::where('id',$post->id) ->update([ 'is_delete'=>'0', 'delete_by'=>$post->user_id, ]); flash()->success('Post has been deleted.'); return redirect()->route('articals.index'); }
{ "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
Save a new entity in repository
public function create(array $attributes);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save($entity);", "public function save($entity);", "public function save($entity);", "public function saveEntity($entity)\n\t{\n\t\t$entityManager = $this->getDoctrine()->getManager();\n\t $entityManager->persist($entity);\n\t $entityManager->flush();\n\t}", "public function saveModel($entity){\n $this->entityManager->persist($entity);\n $this->entityManager->flush();\n }", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function persist($entity)\n {\n }", "protected function saveNew($entity)\n {\n $this->em->persist($entity);\n $this->update();\n }", "public function save($entity) : bool;", "public function save() {\n return $this->entity->save();\n }", "public function save(): void\n {\n $this->em->persist($this->model);\n $this->em->flush();\n }", "public function save($entity) {\n throw new NotImplementedException;\n }", "protected function saveEntity($entity)\n {\n $this->om->persist($entity);\n $this->om->flush($entity);\n }", "public function postPersist($entity);", "public function save(){\n if($this->id == 0) {\n // Object is new and needs to be created\n return $this->insert();\n }\n }", "public function save( LogEntity $logEntity );", "public function testSaveNewEntity() {\n\t\t$entity = new Entity([\n\t\t\t'username' => 'superuser',\n\t\t\t'password' => 'root',\n\t\t\t'created' => self::date(),\n\t\t\t'updated' => self::date(),\n\t\t], ['className' => 'UserEntity']);\n\n\t\t$table = TableRegistry::get('users');\n\t\t$this->assertSame($entity, $table->save($entity));\n\t\t$this->assertEquals(self::$nextUserId, $entity->id);\n\n\t\t$row = $table->find('first', [\n\t\t\t'conditions' => ['id' => self::$nextUserId],\n\t\t\t'entity' => true,\n\t\t]);\n\t\t$this->assertEquals($entity->toArray(), $row->toArray());\n\t}", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "public function persist();", "public function save(Entity $entity): void\n {\n $this->db->save($entity);\n }", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function save($entity)\n {\n $this->model->save($entity);\n return $this->findOne($entity->id);\n }", "public function save($entity, $context) {\n unset($entity->id);\n $entity->is_new = TRUE;\n entity_save($this->entityType, $entity);\n }", "public function saveHokodoEntity(HokodoEntityInterface $hokodoEntity): void;", "public function add($entity)\n {\n $this->getObjectManager()->persist($entity);\n $this->getObjectManager()->flush();\n }", "public function save()\n {\n $this->persist($this->state);\n }", "public function save() {}", "public function save() {}", "public function save() {}", "public function save($object)\n {\n $this->entityManager->persist($object);\n $this->entityManager->flush();\n }", "public function persist($data);", "public abstract function save();", "public function save()\n {\n return $this->address_srl ? $this->repo->update($this) : $this->repo->insert($this);\n }", "public function testPersistSavesEntityToDatabase(): void\n {\n $entityFactoryManager = $this->getEntityFactoryManager([\n 'Tests\\EoneoPay\\Externals\\ORM\\Stubs\\Factories\\\\' => 'Tests\\EoneoPay\\Externals\\ORM\\Stubs'\n ]);\n\n $entity = $entityFactoryManager->create(EntityStub::class);\n self::assertNull($entity->getEntityId());\n\n $entity = $entityFactoryManager->persist(EntityStub::class);\n self::assertNotNull($entity->getEntityId());\n }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function create($entity);", "public function save(GameLocation $entity)\n {\n $em = $this->getEntityManager();\n\n $em->persist($entity);\n $em->flush();\n }", "public function persist() {}", "public function persist($data)\n {\n dd($data);\n $this->entityManager->persist($data);\n $this->entityManager->flush();\n }", "public function persist($object);", "public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}", "public function save($object);", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save()\n {\n $this->_validateModifiable();\n\n if($this->isNew())\n {\n $this->_getDataSource()->create($this);\n }\n else\n {\n $this->_getDataSource()->update($this);\n }\n\n $this->_saveRelations();\n $this->_setNew(false);\n }", "abstract public function store(Entity $oMappedEntity);", "public function persist()\n {\n //\n }", "public function persist($entity)\n {\n $visited = [];\n $this->doPersist($entity, $visited);\n }", "public function save($oneOrManyEntities): void;", "protected function persist($entity)\n {\n if (!$this->em()->isOpen()) {\n $this->getDoctrine()->resetManager();\n }\n\n $this->em()->persist($entity);\n $this->em()->flush();\n\n }", "public function save() {\n\t\t$args = func_get_args();\n\t\t\n\t\t// no argument, so save current object\n\t\tif (empty($args))\n\t\t\t$o = $this;\n\t\t// argument given, so save that object\n\t\telse\n\t\t\t$o = $args[0];\n\n\t\t// ID is set, so update existing object\n\t\tif (isset($o->id))\n\t\t\treturn $this->update($o->id, $o);\n\n\t\t// ID is not set, so create new object\n\t\treturn $this->add($o);\n\t}", "public function persist()\n {\n }", "function save(iEntityComment $entity);", "function create($entity);", "public function update($entity)\n {\n $this->getObjectManager()->persist($entity);\n $this->getObjectManager()->flush();\n }", "public function onEntityRepositoryAttach(IEntity $entity): void;", "public function store(EntityRequest $request)\n {\n\n\n $dataForm = $request->all();\n $dataForm['active'] = filter_var($dataForm['active'], FILTER_VALIDATE_BOOLEAN);\n $dataForm['access_application'] = filter_var($dataForm['access_application'], FILTER_VALIDATE_BOOLEAN);\n\n $dataForm['created_by'] = auth()->user()->id;\n $dataForm['updated_by'] = auth()->user()->id;\n\n $entity = Entity::create($dataForm);\n\n return redirect()->route('entity.show', $entity->id);\n }", "public function persist($obj)\r\n {\r\n }", "public function save() {\n }", "public function save() {\n }", "public function pushEntity($entity): void\n {\n /** @var EntityRepository $repository */\n $repository = Prime::repository($entity);\n $mapper = $repository->mapper();\n\n $isReadOnly = $mapper->isReadOnly();\n $mapper->setReadOnly(false);\n\n $repository->disableEventNotifier();\n $repository->insert($entity);\n $repository->enableEventNotifier();\n\n $mapper->setReadOnly($isReadOnly);\n }", "public function create(Entity $entity);", "public function add($entity);", "public function save()\n {\n }", "public function save() {\n }", "public function insert(stubObject $entity);", "public function persist(IEntity $entity): void\n\t{\n\t\t$this->beginTransaction();\n\t\t$data = $this->entityToArray($entity);\n\t\t$data = $this->getConventions()->convertEntityToStorage($data);\n\n\t\tif (!$entity->isPersisted()) {\n\t\t\t$this->processInsert($entity, $data);\n\n\t\t} else {\n\t\t\t$primary = [];\n\t\t\t$id = (array) $entity->getPersistedId();\n\t\t\tforeach ($entity->getMetadata()->getPrimaryKey() as $key) {\n\t\t\t\t$primary[$key] = array_shift($id);\n\t\t\t}\n\t\t\t$primary = $this->getConventions()->convertEntityToStorage($primary);\n\n\t\t\t$this->processUpdate($entity, $data, $primary);\n\t\t}\n\t}", "public function createEntity();", "public function save($data);", "public function save($data);", "public function save($data);", "public function save()\r\n {\r\n //\r\n }", "public function save()\n {\n // Given\n $entity = Test::createEntity();\n\n $sampleReturn = new \\StdClass;\n $sampleReturn->n = 1;\n $mock = \\Mockery::mock('Freddymu\\Phpnotif\\Models\\PhpNotifModel');\n $mock\n ->shouldReceive('save')\n ->andReturn([\n $sampleReturn\n ]);\n\n // When\n $result = $mock->save($entity->toArray());\n\n // Then\n self::assertEquals(1, $result[0]->n);\n }", "function time_tracker_activity_save(&$entity) {\n return entity_get_controller('time_tracker_activity')->save($entity);\n}", "public function save()\n {\n //\n }", "public function save(EntityInterface $entity) {\n return SAVED_NEW;\n }", "public function save()\n {\n // datos obligatorios para la insercion/modificacion\n $data = [\n \"propietario\" => $this->owner,\n \"estado\" => $this->state,\n \"nombre\" => $this->name\n ];\n\n // datos opcionales, que pueden no estar establecidos para la \n // insercion/modificacion\n if (isset($this->description)) $data[\"descripcion\"] = $this->description;\n\n // si idProduct no es null, entonces es un update\n if (isset($this->idProduct))\n return $this->dao->update($data, [\"idProducto\" => $this->idProduct]);\n\n // sino, es un insert\n return $this->dao->insert($data);\n }", "function save()\n {\n $this->form_validation->set_rules($this->_get_rules());\n\n if($this->form_validation->run()){\n $entity = $this->_from_form();\n $this->data['save'] = $this->model->insert_entry($entity);\n $this->data['action_performed'] = 'save';\n $this->success($entity);\n }\n else {\n $this->create();\n }\n }", "public function save() {\n\n }" ]
[ "0.7721987", "0.7721987", "0.7721987", "0.72997355", "0.7240121", "0.70330256", "0.70183027", "0.6965358", "0.6887411", "0.685511", "0.6836253", "0.6811672", "0.6758604", "0.6739007", "0.670642", "0.66952485", "0.6689463", "0.6615146", "0.6613949", "0.6612068", "0.65979916", "0.6585793", "0.65087396", "0.6457624", "0.64562106", "0.64444923", "0.6424888", "0.64084256", "0.6408182", "0.6408182", "0.63522416", "0.6349164", "0.6335863", "0.6328982", "0.63249856", "0.6319947", "0.6319947", "0.6319947", "0.6319947", "0.6319947", "0.63105756", "0.63075644", "0.6306497", "0.62842095", "0.62834954", "0.62669075", "0.625474", "0.62408406", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.62392515", "0.6204196", "0.61882675", "0.6187745", "0.6182957", "0.6180985", "0.6178812", "0.6165478", "0.6164176", "0.6151161", "0.61509305", "0.61331683", "0.61295754", "0.61186826", "0.6117655", "0.6117547", "0.6117547", "0.6104469", "0.6097876", "0.60959476", "0.6085505", "0.6082559", "0.60791254", "0.60777754", "0.60759145", "0.60554296", "0.60554296", "0.60554296", "0.6043019", "0.60387355", "0.6038233", "0.60222125", "0.60202163", "0.60188496", "0.60019183", "0.5998528" ]
0.0
-1
Delete a entity in repository by model
public function delete($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteModel($entity){\n $this->entityManager->remove($entity);\n $this->entityManager->flush();\n }", "public function delete(Identifiable $model);", "public function delete($entity);", "public function delete($model);", "public function delete(Model $model);", "public function delete(Model $model);", "public function delete($entity)\n {\n \n }", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "public abstract function deleteModel(\\MPF\\Db\\Model $model);", "public function delete($model) {\n $repositoryClass = get_class($this->_model);\n\n if (!($model instanceof $repositoryClass)) {\n throw new InvalidArgumentException(\"The model is not an instance of {$repositoryClass}.\");\n }\n\n return $model->delete();\n }", "public function Delete($entity) {\n }", "public function delete($entity) {\r\n\t\tif($entity instanceof Model_Abstract) {\r\n\t\t\t$id = $entity->getIdentityValue();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$id = $entity;\r\n\t\t}\r\n\t\t// Need to unset the entity in the identity map if it exists\r\n\t\t$this->_unsetIdentity($id);\r\n\t\t \r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif($rowset->count() > 0) {\r\n\t\t\t$row = $rowset->current();\r\n\t\t\t$result = $row->delete();\r\n\t\t}\r\n\t}", "public function deleteByModel(Model $model): bool;", "public function delete(Model $model)\n {\n }", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "function delete(IContract $entity);", "public function deleting($model)\n\t{\n\t}", "public function delete(EntityInterface $Entity);", "public function delete(DataObject $entity){\n }", "public function delete($entity) : bool;", "public function deleteById($entityId);", "public function deleteById($entityId);", "public function delete(DimeEntityInterface $entity);", "public function destroy(Request $request, object $model): bool;", "public function delete($entity){\n\n if(is_numeric($entity))\n {\n $entity = $this->findOrFail($entity);\n }\n $entity->delete();\n return $entity;\n }", "public function deleteEntity($entity)\n {\n return $this->model->destroy($entity->id);\n\n }", "public abstract function delete($model, $useTransaction);", "public function delete($model)\n {\n $this->search->delete($model);\n }", "public function delete($entity) {\n $this->deleteRecord([\n 'id' => $entity->getId(),\n ]);\n }", "abstract public function delete(Entity $oMappedEntity);", "public function delete(IndexableEntity $entity);", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "protected function performDeleteOnModel()\n {\n $this->getApi()->{'delete'.ucfirst($this->getEntity())}(\n $this->{$this->primaryKey},\n array_merge(...array_values($this->getGlobalScopes()))\n );\n\n $this->exists = false;\n }", "public function delete(OrmModelInterface $model): bool\n {\n }", "public function deleted(Request $model)\n {\n $models = [\n 'engagement',\n 'address',\n ];\n\n foreach($models as $relation){\n $model->$relation()->delete();\n }\n }", "public function delete($entity)\n {\n $this->getObjectManager()->remove($entity);\n $this->getObjectManager()->flush();\n }", "public static function DeleteById($entity)\n {\n //When the precedent is GetById\n if(isset(StorageManager::$entities[$entity->Alias]))\n {\n unset(StorageManager::$entities[$entity->Alias][$entity->IdEntite]);\n }\n\n //When the precedent request is getByArg\n $stores = StorageManager::Find($entity);\n\n if(count($store) > 0 )\n {\n foreach($stores as $store)\n {\n if(isset($store::$entities))\n {\n unset($store::$entities[$entity->Alias][$entity->IdEntite]);\n }\n }\n }\n }", "public function deletedModel(Model &$model)\n {\n }", "public function deleteEntity($entity): void\n {\n /** @var EntityRepository $repository */\n $repository = Prime::repository($entity);\n $mapper = $repository->mapper();\n\n $isReadOnly = $mapper->isReadOnly();\n $mapper->setReadOnly(false);\n\n $repository->disableEventNotifier();\n $repository->delete($entity);\n $repository->enableEventNotifier();\n\n $mapper->setReadOnly($isReadOnly);\n }", "protected function performDestroy(Model $entity): void\n {\n $entity->delete();\n }", "public function deleteModel(Model &$model)\n {\n }", "public static function DeleteByArg($entity)\n {\n //When the precedent request is getByArg\n $stores = StorageManager::Find($entity);\n\n foreach($stores as $store)\n {\n unset($store::$entities[$entity->Alias][$entity->IdEntite]);\n }\n }", "public function delete(Model $model)\n {\n $model->delete();\n }", "public function remove(Builder $query, Model $model) {}", "public function delete($model){\n\t\t// define que o comando só utilizará o 'id' do registro\n\t\t$valores = ['id'];\n\n\t\t// cria um comando sql para fazer a exclusão\n\t\t$sql = $this->geraSQL('delete', $valores);\n\n\t\t// cria uma instancia do banco e prepara um comando\t\t\n\t\t$pdo = Connection::getInstance()->prepare($sql);\n\n\t\t// define os valores de cada coluna\n\t\tforeach($valores as $valor)\n\t\t\t$pdo->bindValue(\":$valor\",$model->{'get'.ucfirst($valor)}());\n\n\t\t// executa o comando, se der certo retorna TRUE, se não, retorna FALSE\n\t\treturn $pdo->execute();\n\t}", "public function delete(Iris_Model_Abstract $model) {\n return $this->find($model->id)->current()->delete();\n }", "public static function delete($entity)\n {\n return static::mapper()->delete($entity);\n }", "public function deleteProcuct($productModel) {\n\n }", "public function postRemove($entity);", "public function delete(Model $model): ?bool;", "public function deleted($model)\n {\n if (static::syncingDisabledFor($model)) {\n return;\n }\n $model->unsearchable();\n }", "public function delete(Model $model)\n {\n // TODO: Implement delete() method.\n }", "public function delete(Model $model): void\n {\n $model->delete();\n }", "public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }", "public function delete(Model $model)\n {\n return $model->delete();\n }", "public function deleteById(int $modelId): bool;", "public function delete(string $entityId): void;", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\n }", "public function delete(PhpORM_Entity $entity)\n {\n $table = $this->getTable();\n return $table->delete($table->getAdapter()->quoteInto('id = ?',$entity->id));\n }", "public function delete($entity)\n {\n $statement = \"DELETE FROM contact WHERE id = :id\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n }", "public function destroy(IModel $target);", "public function delete(Model $parent);", "public function delete($Enterprise) { ; }", "public function deleteAction($id)\n{\n $em=$this->getDoctrine()->getManager();\n $Articles_especes=$em->getRepository(Articles_especes::class)->find($id);\n //the remove() method notifies Doctrine that you'd like to remove the given object from the database\n $em->remove($Articles_especes);\n //The flush() method execute the DELETE query.\n $em->flush();\n //redirect our function to the read page to show our table\n return $this->redirectToRoute('articles_afficher');\n\n}", "public function deleteObject(){\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n //$this->removeFromParentCollection();\n }", "public function delete($data=null,$model=null){\n if($this->model==null){\n $this->model=$model;\n }\n\n return $this->allMethodProcess(function() use($data){\n return $this->querySqlFormatter->getDeleteQueryFormatter([],['where'=>$this->where,'execute'=>$this->execute,'model'=>$this->subClassOf]);\n },\"no--autoscope\");\n\n }", "public function delete($model)\n {\n $this->loadModel($model);\n\n return $this->activeModelInstance\n ? $this->activeModelInstance->delete()\n : null;\n }", "public function deleteEntity($obj)\n\t{\n\t\t$this->db->deleteEntity($obj);\n\t}", "public function destroy(Request $request, string $model, string $id): Response\n {\n //\n }", "public function deleted($model)\n {\n if (static::syncingDisabledFor($model)) {\n return;\n }\n\n if (! $model->wasSearchableBeforeDelete()) {\n return;\n }\n\n if ($this->usingSoftDeletes && $this->usesSoftDelete($model)) {\n $this->whileForcingUpdate(function () use ($model) {\n $this->saved($model);\n });\n } else {\n $model->unsearchable();\n }\n }", "function delete($model_or_collection) {\n if (is_subclass_of($model_or_collection, \\Illuminate\\Database\\Eloquent\\Model::class)) {\n if ($model_or_collection) {\n $model_or_collection->delete();\n }\n } elseif (is_subclass_of($model_or_collection, \\Illuminate\\Support\\Collection::class)) {\n foreach ($model_or_collection as $model) {\n $model->delete();\n }\n }\n\n throw new \\Exception(\"Unknown type of object\");\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "function time_tracker_activity_delete($entity) {\n entity_get_controller('time_tracker_activity')->delete($entity);\n}", "public function delete(User $user, User $model)\n {\n }", "public function delete( One_Model $model )\n\t{\n\t\treturn null;\n\t}", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function delete(User $user, User $model)\n {\n //\n }", "abstract public function deleteById($id);", "public function deleted($model)\n {\n $latestPost = $this->post->latestIn($model->forum_id)->first();\n\n $model->forum->update([\n 'latest_post_id' => ($latestPost == null) ? null : $latestPost->id,\n ]);\n }", "public function delete()\n {\n $conn = $this->getConnection();\n\n if (!isset($this->attributes->{$this->primaryKey})) {\n $trace = debug_backtrace()[0];\n throw new ModelException(\n 'No object has been loaded',\n 8000,\n $trace['file'],\n $trace['line']\n );\n }\n $key = $this->attributes->{$this->primaryKey};\n\n $bind = $this->getNamedParam();\n\n $statement = $this->getStatement();\n $statement->setWhere($this->primaryKey, '=', $bind);\n $statement->setBindings($bind, $key);\n\n $this->query = $statement->getDelete();\n $delete = $conn->prepare($this->query);\n\n return $this->execute($delete, $statement);\n }", "public static function destroyEstudiante($idEstu)\n{\n $estudiante = Estudiante::find($idEstu);\n $estudiante->delete();\n}", "protected function performDeleteOnModel()\n {\n $this->newQuery()->delete($this->fileName);\n }", "public function delete(Model $instance)\n {\n // TODO: Implement delete() method.\n }", "public function deleteByPrimaryKeys(stubObject $entity);", "public function delete($oneOrManyEntities): void;", "public function delete($where);", "public function destroy(UserRepository $model ,$id)\n {\n $model->destroy($id);\n return redirect()->back()->with('success', 'Contato apagado!');\n }", "public function destroy(User $model);", "public function delete() {\n\t\t$args = func_get_args();\n\n\t\t// no argument, so delete current object\n\t\tif (empty($args))\n\t\t\treturn $this->db->where('id', $this->id)->delete($this->table);\n\n\t\t// argument given, so delete that object\n\t\treturn $this->db->where('id', $args[0])->delete($this->table);\n\t}", "public function delete(AbstractEntity $entity)\n\t{\n\t\tif(!$this->isValidEntity($entity))\n\t\t{\n\t\t\tthrow new \\Exception('The specified entity is not allowed for this mapper. (' . get_class($entity) . ')');\n\t\t}\n\t\t\n\t\t$aCriterias['id'][] = array(\n\t\t\t'operator'\t=> '=',\n\t\t\t'value'\t\t=> $entity->id\n\t\t);\n\t\t\n\t\t$aTableSource = array_merge($this->_acceptedFields, $this->_cascadeFields);\n\t\t\n\t\t$aTables\t= $this->extractTables($aTableSource);\t\n\t\t$sWhere\t\t= $this->compileClauseStrings(array(\n\t\t\t\t\t\t\t$this->getClauseStrings($aCriterias),\n\t\t\t\t\t\t\t$this->compileClauseStrings($this->_cascadeFields)\n\t\t\t\t\t));\n\t\t\t\t\t\n\t\treturn $this->_adapter->delete($aTables, $sWhere);\n\t}", "public function delete(DataObject $obj){\n\n //Vérifie si l'objet entré en paramètre est instance de Album\n if($obj instanceof Album){\n\n //Récupère la méthode de connection à la BDD\n $dbc = Application::getInstance()->getDBConnection();\n\n //Prépare la requête SQL\n $query = \"DELETE FROM Album WHERE IdAlbum = :IdAlbum\";\n\n //Prépare la requête en dur avec la BDD et la requête correspondante\n $stmt = $dbc->prepare($query);\n\n //Remplace les paramètres \":IdAlbum\" par la valeur de l'objet\n $stmt->bindValue(':IdAlbum',$obj->getIDAlbum(),PDO::PARAM_STR);\n\n //Exécute finallement la requête\n $stmt->execute($data);\n }\n}", "function getDeleteStatement($model,&$args);", "public function deleted(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('deleted'));\n }", "public function delete( UserEntityInterface $user ): bool;" ]
[ "0.78725386", "0.7590369", "0.7589358", "0.746357", "0.74503756", "0.74503756", "0.73578537", "0.7321317", "0.7295291", "0.7205994", "0.71555907", "0.7140213", "0.7120578", "0.7114568", "0.7109538", "0.7034707", "0.70044404", "0.70030516", "0.6989801", "0.6891775", "0.6823149", "0.6823149", "0.68208116", "0.6810683", "0.67886895", "0.6753118", "0.6749362", "0.67336494", "0.6727783", "0.67198026", "0.6710283", "0.6691882", "0.66895324", "0.6668806", "0.66600263", "0.6629199", "0.6613395", "0.6606875", "0.65898836", "0.6586548", "0.65775996", "0.65663356", "0.65615517", "0.6543773", "0.65182805", "0.6500923", "0.64973724", "0.64924663", "0.64864767", "0.6481288", "0.64778227", "0.646145", "0.64606965", "0.6438914", "0.6435064", "0.64163435", "0.6413944", "0.6403177", "0.63879037", "0.63546956", "0.63308066", "0.6328104", "0.63224554", "0.6287642", "0.6257766", "0.6216896", "0.61986923", "0.6174474", "0.61719394", "0.6171713", "0.616156", "0.61175066", "0.6113031", "0.60965747", "0.6084667", "0.6079667", "0.60735923", "0.60673743", "0.60673743", "0.60673743", "0.60673743", "0.60673743", "0.60673743", "0.60544604", "0.6042871", "0.6039039", "0.6031185", "0.6028387", "0.60183746", "0.6009451", "0.60076195", "0.6007134", "0.5998428", "0.5996299", "0.5995665", "0.5993714", "0.5991431", "0.5953541", "0.5946722", "0.5941843", "0.59321916" ]
0.0
-1
Find data by id
public function find($id, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function find($id);", "public static function findById($id);", "function findById($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "abstract public function find($id);", "function find($id);", "public function findByID($id){\n return $this->Find(self::TABLE,$id);\n }", "public function returnDetailFindByPK($id);", "public function find( $id );", "public static function findById($id)\n\t{\n\t\n\t}", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public function find(int $id) ;", "public static function findById($id)\n {\n }", "public function findById ($id);", "function findById($id)\n {\n }", "public function find($id)\n\t{\n\t\t// TODO: Implement find() method.\n\t}", "public function find($id)\n {\n }", "public function find($id)\n {\n }", "public function find($id)\n {\n }", "public static function find($id, $key = 'id');", "public function find($id){\n return $this->db->find($this->table,$id);\n }", "public function findById($id) {\n $data = $this->model->find($id);\n return $data;\n }", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}", "public function search($id);", "abstract function find($id): array;", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function returnFindByPK($id);", "public function find($id){\n return parent::find($this->table, $id);\n }", "static function find($id) {\n return self::findBy(\"id\", $id);\n }", "static public function find($id) {\n return static::getMapper()->find($id);\n }", "public function findById() {\n // TODO: Implement findById() method.\n }", "public function whereId($id);", "public function findById ( $id )\n\t{\n\t\treturn $this->abstractFindById(self::RETURNTYPE,$id);\n\t}", "public function returnMoreFindByPK($id);", "public function findEntity($id);", "public function packingFind($id);", "public function find(int $id)\n {\n }", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "public function findById($id)\n {\n return $this->model->find($id);\n //return $this->model->whereId($id)->get();\n }", "public static function find($id) {\n\t\treturn self::find_by('id', $id);\n\t}", "public function find($id) {\n $data = $this->db->fetchAssoc(\"SELECT * FROM $this->table WHERE id = ?\", [ $id ]);\n return $data ? $this->build($data) : FALSE;\n }", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);" ]
[ "0.79497033", "0.78082377", "0.7724701", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.7718439", "0.7715903", "0.77119184", "0.76880145", "0.7668465", "0.7655876", "0.76420397", "0.76420397", "0.76420397", "0.7599321", "0.75214964", "0.74364007", "0.7405618", "0.739667", "0.7344527", "0.7344527", "0.7344527", "0.7319641", "0.7306401", "0.7262991", "0.7245644", "0.7245644", "0.7245644", "0.7245644", "0.72161716", "0.7213807", "0.7212748", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71985507", "0.71964043", "0.7194477", "0.71929663", "0.7187038", "0.7184293", "0.71678615", "0.7157657", "0.7151538", "0.71327066", "0.7126216", "0.7115786", "0.7113628", "0.7104785", "0.708092", "0.7077342", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991", "0.7064991" ]
0.0
-1
Find data by field and value
public function firstByField($field, $value, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findBy($field, $value);", "public static function get_data_by($field, $value)\n {\n }", "public function findEquals($field, $value);", "public function find($value);", "public function findBy($field, $value, $operator = '=');", "function _get_by($field, $value = array())\r\n\t{\r\n\t\tif (isset($value[0]))\r\n\t\t{\r\n\t\t\t$this->where($field, $value[0]);\r\n\t\t}\r\n\r\n\t\treturn $this->get();\r\n\t}", "public function returnFindByField($field);", "public function findBy($value, $field = 'id')\n {\n return call_user_func_array([$this->modelClass, 'where'], [$field, $value])->first();\n }", "public function getByField($field, $value)\n {\n }", "public function getByField($field, $value)\n {\n }", "function match($field, $value);", "function getByField ( $field,$value){\n\t\t $result=$this->fetchRow(\"$field= '$value' \"); //order by id?\n\t\t if($result==null)\n\t\t\t return;\n\t\t if(is_array($result))\n\t\t\t return $result[0];\n\t\t return $result;\n\t}", "function find_field_value($field, $value, $separator = null){\n\t\tif($separator){\n\t\t\t$results = $this -> model -> find_arrayfield_value($field, $value, $separator);\n\t\t\treturn $results;\n\t\t}\n\t\t$results = $this -> model -> find_field_value($field, $value);\n\t\treturn $results;\n\t}", "public function findAllBy($field, $value){\n\t\treturn $this->find(array('conditions' => $field.\" = '$value'\"));\n\t}", "public function findBy($value);", "public function find($primaryValue);", "public function find($data);", "public function findByField($field, $value, $columns = array('*'))\n {\n $this->applyCriteria();\n $result = $this->query->where($field,'=',$value)->get();\n return $this->parserResult( $result );\n }", "public function findEntry($path, $country, $field, $value);", "public function find_by($field = null, $value = null, $type = 'and')\n {\n\n return parent::find_by($field, $value, $type);\n }", "protected function search_by($field, $value = ''){\n\n\t\tif(! $this->_default_model)\n\t\t\tdie(\"This class default model doesnt exist\");\n\n\t\t$search_result = $this->{$this->_default_model}->search($field, $value);\n\n\t\tdie(json_encode($search_result));\n\n\t}", "public function findBy($field, $value)\n {\n return $this->model->where($field, $value)->firstOrFail();\n }", "function find_by_val($field,$value)\n {\n $arr1=[];\n $found=[];\n $seek = scan_students();\n foreach ($seek as $student => $id) {\n $dir = \"students/\".substr($id,0,2);\n $arr1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . $dir .\"/\". $id. \".json\"),true);\n if($arr1[$field] == $value) { $found = $arr1;}\n }\n if(!empty($found))\n echo print_r($found);\n else\n err(\"Student Not Found.\\00[0m This student doesn't exist.\");\n return $found;\n }", "public function findBy(string $field, string $value)\n {\n return $this->makeQuery()->where(\"$field = :field\")->params(['field' => $value])->fetchOrException();\n }", "public function getValue($field) {\n if (array_key_exists($field, $this->data)) {\n return $this->data[$field];\n } else {\n die(\"Campo no encontrado\");\n }\n}", "public function planFindByField($field,$condition,$value,$orderBy= 'asc');", "public function findBy($field, $value, $perPage = null);", "public function findOneBy( $value = NULL, $field = 'id', array $columns = ['*'] );", "public function findByField($field, $value = null)\n {\n $table = $this->getDbTable();\n $select = $table->select();\n $result = array();\n\n if (is_array($field)) {\n // Check if $field is an associative array\n if (isset($field[0]) && is_array($value)) {\n // If field and value are arrays, match them up\n foreach ($field as $column) {\n if (isset($value[$column])) {\n $select->where(\"{$column} = ?\", $value[$column]);\n } else {\n $select->where(\"{$column} = ?\", array_shift($value));\n }\n }\n } else {\n // field is an associative array, use the values from the field\n foreach ($field as $column => $value) {\n $select->where(\"{$column} = ?\", $value);\n }\n }\n } else {\n $select->where(\"{$field} = ?\", $value);\n }\n\n $rows = $table->fetchAll($select);\n foreach ($rows as $row) {\n $model = $this->loadModel($row, null);\n $result[] = $model;\n }\n\n return $result;\n }", "function MyMod_Data_Fields_Sql_Search_Select($data,$rdata,$value)\n {\n if\n (\n $this->ItemData[ $data ][ \"GETSearchVarName\" ]\n &&\n !preg_match('/^Admin$/',$this->Profile())\n )\n {\n $getvalue=$this->CGI_GETint($this->ItemData[ $data ][ \"GETSearchVarName\" ]);\n if (!empty($getvalue))\n {\n if (empty($value))\n {\n $value=$getvalue;\n }\n }\n }\n\n //Where clause in module sql table\n $where=$this->MyMod_Data_Fields_Sql_Where($data,$value);\n\n if (!is_array($where)) { $where=$this->Hash2SqlWhere($where); }\n\n //Get values present in table.\n $colvalues=$this->Sql_Select_Unique_Col_Values\n (\n $data,\n $where\n );\n $colvalues=preg_grep('/^\\d+$/',$colvalues);\n \n if (!empty($colvalues))\n {\n $where[ \"ID\" ]=$colvalues;\n }\n\n $datas=$this->MyMod_Data_Fields_Module_Datas($data);\n $datas=preg_grep('/^ID$/',$datas,PREG_GREP_INVERT);\n array_push($datas,\"ID\");\n\n $hashes=array();\n if (!empty($this->ItemData[ $data ][ \"SqlTables_Regex\" ]))\n {\n $class=$this->ItemData[ $data ][ \"SqlClass\" ];\n \n $hashes=\n $this->Module2Object($data)->Sql_Tables_Select_Hashes\n (\n $this->ItemData[ $data ][ \"SqlTables_Regex\" ],\n $where,\n $datas\n );\n }\n elseif (!empty($this->ItemData[ $data ][ \"Search_Vars\" ]))\n {\n $class=$this->ItemData[ $data ][ \"SqlClass\" ];\n $sqltable=$this->ApplicationObj()->SubModulesVars[ $class ][ \"SqlTable\" ];\n\n foreach ($this->ItemData[ $data ][ \"Search_Vars\" ] as $searchvar)\n {\n $sqltable=\n preg_replace\n (\n '/#'.$searchvar.'/',\n $this->MyMod_Search_CGI_Value($searchvar),\n $sqltable\n );\n }\n $hashes=\n $this->Module2Object($data)->Sql_Select_Hashes\n (\n $where,\n $datas,\n \"\",FALSE,\n $sqltable\n );\n }\n else\n {\n if (!empty($where[ $data ]))\n {\n #$where[ \"ID\" ]=$where[ $data ];\n unset($where[ $data ]);\n }\n $class=$this->ItemData[ $data ][ \"SqlClass\" ];\n if (\n !empty($this->ItemData[ $data ][ \"SqlClass\" ])\n &&\n method_exists($this->Module2Object($data),\"SqlWhere\")\n )\n {\n if (!is_array($where))\n {\n $where=$this->SqlClause2Hash($where);\n }\n\n $where=\n array_merge\n (\n $where,\n $this->Module2Object($data)->SqlWhere(array($data => $value))\n );\n }\n\n $hashes=\n $this->Module2Object($data)->Sql_Select_Hashes\n (\n $where,\n $datas,\n join(\",\",$this->ApplicationObj()->SubModulesVars[ $class ][ \"SqlDerivedData\" ])\n );\n }\n\n $rvalue=$this->Html_Select_Hashes2Field\n (\n $this->MyMod_Search_CGI_Name($data),\n $this->MyMod_Data_Fields_Module_SubItems_2Options\n (\n $data,\n $this->MyMod_Sort_List($hashes,$datas)\n ),\n $value\n );\n\n if ($this->ItemData[ $data ][ \"SqlTextSearch\" ] && ($value==\"\" || $value==0))\n {\n $rvalue=\n array\n (\n $value,\n $this->MyMod_Search_Field_Text($data)\n );\n }\n else\n {\n $rvalue=preg_replace\n (\n '/NAME=\\''.$data.'\\'/',\n \"NAME='\".$rdata.\"'\",\n $rvalue\n );\n }\n \n return $rvalue;\n }", "function get_field($field, $where_field, $where_value, $debug = FALSE)\r\n {\r\n \t\r\n \t$this->db->select($field)->from($this->table)->where($where_field, $where_value);\r\n \t$query_db = $this->db->get();\r\n \t\r\n \tif($debug)\r\n \t{\r\n \t\tprint_a('Arguments~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($field);\r\n \t\tprint_a($where_field);\r\n \t\tprint_a($where_value);\r\n \t\t\r\n \t\tprint_a('SQL returned handle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db);\r\n \t\t\r\n \t\tprint_a('DB data~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db->row_array());\r\n \t}\r\n \telse\r\n \t{\r\n \t\tif($query_db->num_rows)\r\n \t\t{\r\n \t\t\t$results = $query_db->row_array(); \r\n \t\t\treturn $results[$field];\r\n \t\t\t\r\n \t\t}\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n }", "abstract protected function filterFieldvalue();", "function get_user_by($field, $value)\n {\n }", "abstract public function findBy($attributes, $value);", "public function where($field, $value) {\n\t$this->parseQuery->where($field, $value);\n }", "public function findBy($field, $value, $columns = ['*'])\n {\n return $this->model->where($field, '=', $value)->first($columns);\n }", "public static function findBy($field, $value)\n {\n return static::select()\n ->where($field, $value)\n ->fetchOne();\n }", "public function findAllBy( $value = NULL, $field = NULL, array $columns = ['*'] );", "function find ($fld, $val, $strict = false)\n {\n return array_find ($this->A, $fld, $val, $key, $strict);\n }", "function getfilteredrec($data)\n\t{\n\t\t$this->db->like($data[\"field\"], $data[\"value\"]);\n\n\t\treturn $this->db->get(\"tblteman\");\n\t}", "public abstract function extractValue($data, $search);", "public function findBy($field, $value, $columns = array('*'))\n {\n return $this->model->where($field, '=', $value)->first($columns);\n }", "function getRecordByField($fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "function getRecordByField($fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "function my_browse_data( $table_name , $datas ){\r\n\t\r\n\tglobal $connection;\r\n\t\r\n\t$primary_field = my_get_field_list($table_name);\r\n\tforeach($datas as $field => $value){\r\n\t\t$fieldname = $field ;\r\n\t\t$fieldvalue = $value;\r\n\t}\r\n\t\r\n\t$query = \" SELECT `\".$primary_field. \"` FROM `\".$table_name.\"` WHERE `\".$fieldname.\"` = \". $fieldvalue ;\r\n\t \r\n\t$result = my_query( $query );\r\n\tif( my_num_rows($result) > 0 ){\r\n\t\t\r\n\t\t$data = array();\r\n\t\t\r\n\t\twhile(\t$row = my_fetch_array($result) ){\r\n\t\t\t$data[] = $row[$primary_field];\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t\r\n\t}\r\n\t\r\n\treturn false;\r\n\t\r\n}", "public function fetchSingleByField( $field, $value )\n\t{\n\t\t$select = $this->table->select()->where( $field . ' = ?', $value );\n\t\t\n\t\tif (! $row = $this->table->fetchRow( $select ))\n\t\t\treturn false;\n\t\n\t\t$this->_dataMerge($row);\n\n\t\treturn $row->toArray();\n\t}", "function getFieldValue($field);", "public function findBy(string $column, $value)\n {\n return CustomField::where($column, $value)->get();\n }", "static function get_record_byapproximateField($table, $field, $value) {\r\n $rekete = \"SELECT * FROM \" . $table . \" WHERE \" . $field . \" LIKE ? ORDER BY created DESC\";\r\n $param = array(\"%$value%\");\r\n $result = Functions::commit_sql($rekete, $param);\r\n if (Functions::is_void($result))\r\n return false;\r\n else\r\n return $result;\r\n }", "public function findByField($field, $value = null, $columns = array('*'))\n {\n $model = $this->model->where($field, '=', $value)->get($columns)->first();\n\n return $this->parserResult($model);\n }", "function getDBData($field, $search = ID, $where = 'user_id', $table = 'users')\n{\n\tglobal $db;\n\n\t$ret = $db->query('select ' . $field . ' from ' . $table . ' where ' . $where . '=\\'' . $search . '\\'');\n\n\tif(count($ret) > 0)\n\t\treturn $ret[0][$field];\n\telse\n\t\treturn '';\n}", "public function fetchBy($field, $value) {\n // $sql = 'SELECT * FROM ' . $this->tableName . ' WHERE ' . $field . ' = ?';\n // $statement = $this->pdo->prepare($sql);\n // $statement->bindValue(1, $value);\n // $statement->execute();\n // return $statement->fetchAll();\n\n // $sql = 'SELECT * FROM ' . $this->tableName . ' WHERE ' . $field . ' = ?';\n // $statement = $this->pdo->prepare($sql);\n // $statement->execute([$value]);\n // return $statement->fetchAll();\n\n // PREPARED STATEMENT: NAMED PARAMS\n $sql = 'SELECT * FROM ' . $this->tableName . ' WHERE ' . $field . ' = :value';\n $statement = $this->pdo->prepare($sql);\n $statement->execute(['value' => $value]);\n\n // ROW COUNT\n $rowCount = $statement->rowCount();\n\n return $statement->fetchAll();\n }", "public function fetchField();", "public function fetchByField($field_name, $field_value) {\n\t\t$queryBuilder = $this->db->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t->select('*')\n\t\t\t->from($this->table_name, 't1')\n\t\t\t->where('t1.'.$field_name.' = :val')\n\t\t\t->setParameter(':val', $field_value)\n\t\t;\n\t\t$result = $queryBuilder->execute()->fetchAll();\n\n\t\treturn $result;\n\t}", "function getByID($table,$field,$value);", "public function find_by($field=null, $value=null)\n\t{\n\t\t$this->db->join('news_categories', 'news_categories.id = news_articles.category_id', 'left');\n\t\t$this->db->join('news_status', 'news_status.id = news_articles.status_id', 'left');\n\n\t\tif (empty($this->selects))\n\t\t{\n\t\t\t$this->select($this->table_name .'.*, category');\n\t\t}\n\t\t\n\t\t$this->from($this->table_name);\n\t\treturn parent::find_by($field, $value);\n\t}", "public function findByField($field, $value = null, $columns = ['*'])\n {\n return $this->model->where($field, '=', $value)->get($columns);\n }", "public function GetIn($field,$id)\r\n {\r\n $query = mysql_query(\"SELECT * FROM info WHERE id_info = '$id' \");\r\n $row = mysql_fetch_array($query);\r\n if($field == $field)\r\n return $row[$field];\r\n }", "public function testByFieldValue()\n\t{\n\t\t$container = $this->containerFactory();\n\t\t//Create one entry for unknown user\n\t\t$this->createEntryWithEmail( rand(). 'email.com' );\n\n\t\t//Create two entries for a known user.\n\t\t$email = '[email protected]';\n\t\t$userId = $this->factory()->user->create(\n\t\t\t[ 'user_email' => $email ]\n\t\t);\n\t\twp_set_current_user( $userId );\n\t\t$this->createEntryWithEmail( $email );\n\t\t$this->createEntryWithEmail( $email );\n\n\t\t$results = $container->selectByFieldValue(\n\t\t\t$this->getEmailFieldSlug(),\n\t\t\t$email\n\t\t);\n\t\t$this->assertSame(2, count($results));\n\t\t$this->assertSame( $email,$results[0]['values'][1]->value );\n\t\t$this->assertSame( $email,$results[1]['values'][1]->value );\n\n\t}", "public function findAllBy($value, $field = 'id')\n {\n return call_user_func_array([$this->modelClass, 'where'], [$field, $value])->get();\n }", "public static function findBy($field, $value = null, $columns = ['*'])\n {\n return static::where($field, '=', $value)->first($columns);\n }", "public function findOneBy($column, $value, array $where = array());", "function find($table, $value, $pk = null)\n {\n if(is_null($pk)){\n $pk = \"id\";\n }\n $this->query(\"SELECT * FROM $table WHERE $pk = '$value'\");\n return oci_fetch_array($this->result);\n }", "public function find();", "public function where($field, $operator, $value);", "public function getBy($fname,$ival)\n {\n if(!in_array($fname,$this->table_fields_names[$this->table_name]))\n return false;\n\n if(in_array($fname,$this->string_fields))\n $value = \"'\".$ival.\"'\";\n else\n $value = $ival;\n\n $this->select('*','WHERE '.$fname.' = '.$value);\n if($this->count() == 0)\n return false;\n\n return true;\n\n }", "function callByFiled($method = NULL, $value = NULL)\n {\n if (($field = str_replace(\"findallby\", \"\", strtolower($method))) != strtolower($method)) {\n return $this->findAll(\"$field = '$value'\");\n }\n else if (($field = str_replace(\"findby\", \"\", strtolower($method))) != strtolower($method)) {\n $data = $this->find(\"$field = '$value'\");\n return $data;\n }\n else if (($field = str_replace(\"deleteby\", \"\", strtolower($method))) != strtolower($method)) {\n $data = $this->delete(\"$field = '$value'\");\n return $data;\n }\n else {\n show_debug(\" Model: Invalid call of $method\", \"1+2\");\n }\n }", "public function findData($data = null){ \n \n }", "function FetchOneRowDataByTwoField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}", "public function findBy(string $field, $value, array $columns = ['*'])\n {\n return $this->model\n ->where($field, '=', $value)\n ->get($columns);\n }", "function MyMod_Data_Fields_Sql_Where($data,$value)\n {\n $where=array();\n if (!empty($this->SqlWhere[ $data ]))\n {\n $where[ $data ]=$this->SqlWhere[ $data ];\n }\n return $where;\n }", "public function findRecord($id, $value, $collection)\n {\n foreach ($collection as $record)\n {\n if ($record->{'get'.ucfirst($id)}() == $value)\n {\n return $record;\n }\n }\n }", "function FetchOneRowDataByOneField($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}", "public function findOneByField($field, $value = null, $model = null)\n {\n $table = $this->getDbTable();\n $select = $table->select();\n\n if (is_array($field)) {\n // Check if $field is an associative array\n if (isset($field[0]) && is_array($value)) {\n // If field and value are arrays, match them up\n foreach ($field as $column) {\n if (isset($value[$column])) {\n $select->where(\"{$column} = ?\", $value[$column]);\n } else {\n $select->where(\"{$column} = ?\", array_shift($value));\n }\n }\n } else {\n // field is an associative array, use the values from the field\n foreach ($field as $column => $value) {\n $select->where(\"{$column} = ?\", $value);\n }\n }\n } else {\n $select->where(\"{$field} = ?\", $value);\n }\n\n $row = $table->fetchRow($select);\n if (count($row) === 0) {\n return null;\n }\n\n $model = $this->loadModel($row, $model);\n\n return $model;\n }", "public function fetchByField( $field, $value )\n\t{\n\t\t$select = $this->table->select()->where( $field . ' = ?', $value );\n\n\t\t$rowSet = $this->table->fetchAll( $select );\n\n\t\treturn $rowSet->toArray();\n\t}", "function getValue(int $field);", "function FetchDataByOneField($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->result_array();\n }\n \n}", "public abstract function find();", "public function getRecordWhere($table_name, $table_field_name_with_value) {\n return $this->db->where($table_field_name_with_value)->get($table_name)->result();\n }", "public function entitySearch($type, $field, $value) {\n return $this->typeManager->getStorage($type)\n ->getQuery()\n ->condition($field, $value)\n ->accessCheck(FALSE)\n ->execute();\n }", "function getRecordByField($fieldName, $searchKey, $searchStatus='', $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $searchStatus, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "public function where($field, $value, $comparison = '==', $logical = 'and');", "function lookup($prj_id, $field, $value)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->lookup($field, $value);\n }", "static function find($args) {\n\t\t// Por ejemplo la siguiente consulta SQL:\n\t\t// SELECT usuario FROM usuarios WHERE $args['campo'] = $args['valor']\n\t}", "public function findByField($field, $value, $cls)\n {\n $table = $this->getDbTable();\n $select = $table->select();\n $result = array();\n\n $rows = $table->fetchAll($select->where(\"{$field} = ?\", $value));\n foreach ($rows as $row) {\n $cls=new Petolio_Model_PoProducts();\n $result[]=$cls;\n $cls->setId($row->id)\n\t\t\t\t\t\t->setUserId($row->user_id)\n\t\t\t\t\t\t->setAttributeSetId($row->attribute_set_id)\n\t\t\t\t\t\t->setDateCreated($row->date_created)\n\t\t\t\t\t\t->setDateModified($row->date_modified)\n\t\t\t\t\t\t->setFlagged($row->flagged)\n\t\t\t\t\t\t->setGpsLatitude($row->gps_latitude)\n\t\t\t\t\t\t->setGpsLongitude($row->gps_longitude)\n\t\t\t\t\t\t->setFolderId($row->folder_id)\n\t\t\t\t\t\t->setPrimaryCurrencyId($row->primary_currency_id)\n\t\t\t\t\t\t->setLinks($row->links)\n\t\t\t\t\t\t->setViews($row->views)\n\t\t\t\t\t\t->setArchived($row->archived);\n }\n return $result;\n }", "public function whereEqualTo($field, $value) {\n\t$this->parseQuery->whereEqualTo($field, $value);\n }", "private function fetchSearchData($objectType, $searchNamespace, $searchValue, array $fields = [])\n {\n \t$object = (is_null($searchNamespace) ? '' : $searchNamespace . '\\\\') . $objectType;\n \t$mapObject = '\\Map\\\\' . $object . 'TableMap';\n \t$tableName = $mapObject::getTableMap()->getName();\n \t$queryObject = $object . 'Query';\n \t\n \t$values = $queryObject::create()->addSelfSelectColumns();\n \t\t\n \t$fieldCount = count($fields);\n \t$fieldIndex = 0;\n \tforeach($fields as $fieldKey => $fieldName)\n \t{\n \t\t$values->where($tableName . \".\" . $fieldName . \" LIKE '%\" . $searchValue . \"%'\");\n \t\t$fieldIndex++;\n \t\tif ($fieldIndex < $fieldCount)\n \t\t{\n \t\t\t$values->_or();\n \t\t}\n \t}\n \t$values->find();\n \n \treturn $values;\n }", "public function get($field);", "public function get($field);", "public abstract function FetchField();", "public function getFieldValue($table, $fields=\"\", $condition=\"\") //$condition is array \n\t{\n\t\tif($fields != \"\")\n\t\t{\n\t\t\t$this->db->select($fields);\n\t\t}\n\n\t\tif($condition != \"\")\n\t\t{\n\t\t\t$rs = $this->db->get_where($table,$condition);\n\t\t}\n\t\t$result = $rs->row_array();\n\t\treturn $result[$fields];\n\n\t}", "public function findWhere(String $column, $value, String $operator = '=');", "public function findBy(string $field, $value)\n {\n $entities = $this->model->select($this->columns)\n ->where($field, $value)\n ->take($this->limit)\n ->skip($this->offset)\n ->orderBy($this->order, $this->sort)\n ->with($this->relationships)\n ->get();\n\n if ($entities->isEmpty()) {\n return false;\n }\n\n return $entities;\n }", "public function addFindCriterion($fieldName, $value)\n {\n $fieldType = $this->getFieldResult($fieldName);\n if ($this->fm->useDateFormatInRequests\n && $this->fm->dateFormat !== null\n && ($fieldType == \"date\" || $fieldType == \"datetime\")\n ) {\n $value = DateFormat::convertSearchCriteria($value, $this->fm->dateFormat, 'm/d/Y');\n }\n $this->findCriteria[$fieldName] = $value;\n return $this;\n }", "public function getValueByField($fieldName, $where){\n\t\t$orderDataVo = new OrderDataVo();\n\t\t$whereLog = [];\n\t\tforeach ($where as $k => $v){\n\t\t\t$orderDataVo->{$k} = $v;\n\t\t\t$whereLog[] = \"$k -> $v\"; \n\t\t}\n\t\t\n\t\t//debug\n LogUtil::sql('(getValueByField) ... where = ' . '(' .join(', ', $whereLog). ')');\n \n\t\t$orderDataVos = $this->selectByFilter($orderDataVo);\n \n\t\tif($orderDataVos){\n\t\t\t$orderDataVo = $orderDataVos[0];\n\t\t\treturn $orderDataVo->$fieldName;\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "public function retrieveFieldValue(Field $field, $model);", "static function findField($collection, $field, $query = array(), $options = array()) {\r\n\t\t$options['fields'] = array($field => 1);\r\n\t\t$result = self::find($collection, $query, $options);\r\n\t\t$array = array();\r\n\t\tforeach ($result as $val) {\r\n\t\t\t$array[] = $val[$field];\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "public function findWhere(string $field, $value, string $operator = '=')\n {\n $entities = $this->model->select($this->columns)\n ->where($field, $operator, $value)\n ->take($this->limit)\n ->skip($this->offset)\n ->orderBy($this->order, $this->sort)\n ->with($this->relationships)\n ->get();\n\n if ($entities->isEmpty()) {\n return false;\n }\n\n return $entities;\n }", "public function propfind($key=null,$value=null){\n return $this->methodsData(\"propfind\",$key,$value);\n }", "public function search($value, $strict = false);" ]
[ "0.76875156", "0.72457445", "0.7052904", "0.6899644", "0.6848747", "0.6725298", "0.6681301", "0.6663246", "0.658952", "0.658952", "0.65888345", "0.6581572", "0.6561277", "0.6549663", "0.6521565", "0.65203655", "0.650544", "0.64730877", "0.6463947", "0.64623547", "0.64389515", "0.64163876", "0.640667", "0.62892604", "0.6288776", "0.6275154", "0.62588125", "0.6227717", "0.62268686", "0.618374", "0.6150923", "0.614371", "0.6124002", "0.6117475", "0.6095379", "0.60872483", "0.604507", "0.60286176", "0.6005883", "0.6004935", "0.5992272", "0.59919804", "0.598602", "0.598602", "0.5982267", "0.59620357", "0.5959628", "0.59546024", "0.5930672", "0.5906791", "0.5899244", "0.58989507", "0.5895297", "0.58861965", "0.58844256", "0.5884265", "0.58827645", "0.58769685", "0.5875498", "0.5866579", "0.5862486", "0.5855988", "0.5853729", "0.58520603", "0.5849991", "0.5847641", "0.58425087", "0.58399445", "0.5821599", "0.5806638", "0.5801947", "0.58002126", "0.5795591", "0.57950413", "0.57891744", "0.57858366", "0.5776797", "0.5775781", "0.5771543", "0.57690775", "0.57690406", "0.5758724", "0.5741086", "0.5740761", "0.5738803", "0.5734932", "0.5712415", "0.5710643", "0.5710643", "0.5710062", "0.56984794", "0.56940275", "0.56649965", "0.56540936", "0.56435615", "0.56313664", "0.5629803", "0.5623909", "0.5610932", "0.5608949" ]
0.5923856
49
Find data by multiple fields
public function firstWhere(array $where, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findByData($a,$b=null,$c=null, $d=null, $e=null, $f=null) {\n\t\tif (!is_array($a) && $b !== null) {\n\t\t\t$keyValues = array($a=>$b);\n\t\t\tif ($c) {\n\t\t\t\t$multipleResults = $c;\n\t\t\t}\n\t\t\tif ($d!==null) {\n\t\t\t\t$neededMatches = $d;\n\t\t\t} \n\t\t\tif ($e!==null) {\n\t\t\t\t$contains = $e;\n\t\t\t} \n\t\t\tif ($f!==null) {\n\t\t\t\t$limit = $f;\n\t\t\t} \n\t\t\t\n\t\t} \n\t\t\n\t\t// if arguments are keyValue, multipleresults, needed matches, contains\n\t\telse if (is_array($a)) {\n\t\t\t$keyValues = $a;\n\t\t\tif ($b) {\n\t\t\t\t$multipleResults = $b;\n\t\t\t}\n\t\t\tif ($c!==null) {\n\t\t\t\t$neededMatches = $c;\n\t\t\t} \n\t\t\tif ($d!==null) {\n\t\t\t\t$contains = $d;\n\t\t\t} \n\t\t\tif ($e!==null) {\n\t\t\t\t$limit = $e;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (!isset($multipleResults))\n\t\t\t$multipleResults=false;\n\t\t\n\t\tif (!isset($contains))\n\t\t\t$contains=false;\n\t\t\t\n\t\tif (!isset($limit))\n\t\t\t$limit=false;\n\t\t\t\n\t\t// If needed matches is not set or set to all (0) then needed matches is number of key value pairs\n\t\tif (!isset($neededMatches) || $neededMatches === 'all' || $neededMatches === null) {\n\t\t\t$neededMatches = count($keyValues);\n\t\t} \n\t\t\n\t\t// Needed matches cannot not be more than specified key value pairs\n\t\tif ($neededMatches > count($keyValues)) {\n\t\t\t$neededMatches = count($keyValues);\n\t\t}\n\t\t\n\t\t// Start the query\n\t\t$dataTable = $this->getMapper()->getDbDataTable();\n\t\t$query = $dataTable->select();\n\t\t\n\t\t// We only need the row_id\n\t\t$query->from($dataTable, array('row_id'));\n\t\t\n\t\t// Add where conditions\n\t\tforeach($keyValues as $key => $value) {\n\t\t\t$value = addslashes($value);\n\t\t\tif ($contains) {\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value` LIKE '%$value%'\");\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value` LIKE '%\".serialize($value).\"%'\");\n\t\t\t} else {\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value`='$value'\");\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value`='\".serialize($value).\"'\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Group rows by row_id\n\t\t$query->group('row_id');\n\t\t\n\t\t// Having the minimum conditions\n\t\t$query->having('count(*) >= ?',$neededMatches);\n\t\t\n\t\t// order by key matches\n\t\t$query->order('count(*)');\n\t\t\n\t\t// limit the results\n\t\tif ($limit)\n\t\t\t$query->limit($limit);\n\t\t\n\t\t// Perform query\n\t\t$results = $dataTable->fetchAll($query);\n\n\t\tif (count($results)==0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($multipleResults) {\n\t\t\t// Get results as array\n\t\t\t$return = array();\n\t\t\tforeach($results as $result) {\n\t\t\t\t$return[] = $this->getByID($result->row_id);\n\t\t\t}\n\t\t} else {\n\t\t\t$return = $this->getByID($results[0]->row_id);\n\t\t}\n\n\t\treturn $return;\n\t\t\n\t\t//SELECT l.row_id, count(*) FROM list_data l WHERE ((l.key = \"title\" AND l.value = \"Macroeconomics\") OR (l.key = \"code\" AND l.value = \"EC502\")) GROUP BY l.row_id HAVING count(*) = 2\n\t\t\t\t\n\t}", "public function find($data);", "abstract public function searchFields(): array;", "public function findBy($field, $value);", "abstract public function getFieldsSearchable();", "function FetchDataByThreeField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2,$fieldName3,$fieldValue3)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' and $fieldName3='\".$fieldValue3.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->result_array();\n }\n \n}", "function search($id, $allPatients, $sameSite, $searchParams) \n {\n $query = $this->getAccessiblePatientsQuery($id, $allPatients, \n\t $sameSite);\n $searchWhere = '';\n \n foreach($searchParams['User'] as $paramName => $paramVal){\n if ($paramVal != ''){\n $searchWhere .= \" AND User.$paramName LIKE '%$paramVal%'\";\n }\n }\n foreach($searchParams['Patient'] as $paramName => $paramVal){\n if ($paramVal != ''){\n $searchWhere .= \" AND Patient.$paramName LIKE '%$paramVal%'\";\n }\n }\n $phone = $searchParams['Phone']['phone'];\n if ($phone != ''){\n $searchWhere .= \" AND (Patient.phone1 LIKE '%$phone%' OR \"\n . \"Patient.phone2 LIKE '%$phone%')\";\n }\n\t \n if ($searchWhere == ''){\n return array();\n }\n $results = $this->query($query[0] . $query[1] . $searchWhere);\n return $this->afterFind($results);\n }", "function _search($criteria, $fields)\n {\n $results = array();\n $results = $this->_getAddressBook($fields);\n if (is_a($results, 'PEAR_Error')) {\n return $results;\n }\n\n foreach ($results as $key => $contact) {\n $found = !isset($criteria['OR']);\n foreach ($criteria as $op => $vals) {\n if ($op == 'AND') {\n foreach ($vals as $val) {\n if (isset($contact[$val['field']])) {\n switch ($val['op']) {\n case 'LIKE':\n if (stristr($contact[$val['field']], $val['test']) === false) {\n continue 4;\n }\n $found = true;\n break;\n }\n }\n }\n } elseif ($op == 'OR') {\n foreach ($vals as $val) {\n if (isset($contact[$val['field']])) {\n switch ($val['op']) {\n case 'LIKE':\n if (empty($val['test']) ||\n stristr($contact[$val['field']], $val['test']) !== false) {\n $found = true;\n break 3;\n }\n }\n }\n }\n }\n }\n if ($found) {\n $results[$key] = $contact;\n }\n }\n return $results;\n }", "function findSurfersByDynamicData($criteria, $mode = 'AND') {\n // Check mode (set to 'AND' if it's not 'OR')\n if ($mode != 'OR') {\n $mode = 'AND';\n }\n // Check whether field names or ids were used\n $fieldKeys = array_keys($criteria);\n $ids = TRUE;\n foreach ($fieldKeys as $key) {\n if (!is_int($key)) {\n $ids = FALSE;\n }\n }\n if ($ids) {\n $fields = $criteria;\n } else {\n // For field names, we need to get the dynamic data field ids\n $nameCond = str_replace(\n '%',\n '%%',\n $this->databaseGetSQLCondition('surferdata_name', array_keys($criteria))\n );\n $sql = \"SELECT surferdata_name, surferdata_id\n FROM %s\n WHERE \".$nameCond;\n $sqlParams = array($this->tableData);\n $fields = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $fields[$row['surferdata_id']] = $criteria[$row['surferdata_name']];\n }\n }\n }\n // Now get the surfers that match each of the criteria\n $totalResult = array();\n foreach ($fields as $id => $value) {\n $sql = \"SELECT surfercontactdata_surferid,\n surfercontactdata_property,\n surfercontactdata_value\n FROM %s\n WHERE surfercontactdata_property = %d\n AND surfercontactdata_value LIKE '%s'\";\n $sqlParams = array($this->tableContactData, $id, $value);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[] = $row['surfercontactdata_surferid'];\n }\n }\n // Check whether there is a current result\n if (!empty($result)) {\n if (empty($totalResult)) {\n // If there is no combined result yet, create it\n $totalResult = $result;\n } else {\n // Otherwise combine the results according to mode\n if ($mode == 'AND') {\n $totalResult = array_intersect($totalResult, $result);\n } else {\n $totalResult = array_unique(array_merge($totalResult, $result));\n }\n }\n } else {\n // If the current result is empty,\n // we can safely return an empty array in AND mode\n if ($mode == 'AND') {\n return array();\n }\n }\n }\n return $totalResult;\n }", "function FetchDataByTwoField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->result_array();\n }\n \n}", "public function findAllByData(array $data);", "public function search(array $data)\n {\n// $this->searchWhere($data);\n// ver($this->entity, d);\n }", "public function getSearchFields();", "public function searchWhere(array $data)\n {\n $this->populateEntity($data);\n\n $where = array();\n\n foreach($data as $key => $value){\n if(strripos($key , '_begin')){\n $dateColumn = str_replace('_begin' , '', $key);\n $dateBegin = $key;\n } else if(strripos($key , '_end')) {\n $dateEnd = $key;\n }\n }\n\n if($dateBegin && $dateEnd && !empty($data[$dateBegin]) && !empty($data[$dateEnd])){\n $dataWhere[] = \" ({$dateColumn} BETWEEN TO_DATE('{$data[$dateBegin]}' , 'DD/MM/YYYY') AND TO_DATE('{$data[$dateEnd]}' , 'DD/MM/YYYY'))\";\n }\n\n foreach($this->entity as $nameColumn => $entity){\n if(!empty($entity['value']) ){\n if($entity['type'] == 'integer' || $entity['type'] == 'numeric'){\n $dataWhere[] = \"{$nameColumn} = '{$entity['value']}'\";\n } else if ($entity['type'] == 'date' || $entity['type'] == 'timestamp with time zone'){\n $dataWhere[] = \"TO_CHAR({$nameColumn} , 'DD/MM/YYYY') = '{$entity['value']}'\";\n } else {\n $dataWhere[] = \"{$nameColumn} ILIKE '%{$entity['value']}%'\";\n }\n }\n }\n\n if( $dataWhere && count($dataWhere) > 0 ) {\n $where = implode(' AND ' , $dataWhere );\n } else {\n $where = '';\n }\n\n $this->clearEntity();\n\n return $where;\n }", "public function findBy(array $where = []);", "function FetchOneRowDataByTwoField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}", "abstract protected function getWhereForRow($data);", "function FetchDataByFourField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2,$fieldName3,$fieldValue3,$fieldName4,$fieldValue4)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' and $fieldName3='\".$fieldValue3.\"' and $fieldName4='\".$fieldValue4.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->result_array();\n }\n \n}", "public abstract function queryModelFields($fields, \\MPF\\Db\\Page $page = null);", "public function find(array $where);", "abstract public function findBy($attributes, $value);", "function find($table, $where=\"1=1\", $fields=\"*\", $orderBy=\"1\"){\n\t\tActiveRecord::sql_item_sanizite($table);\n\t\tActiveRecord::sql_sanizite($fields);\n\t\tActiveRecord::sql_sanizite($orderBy);\n\t\t$q = $this->query(\"select $fields from $table where $where order by $orderBy\");\n\t\t$results = array();\n\t\twhile($row=$this->fetch_array($q)){\n\t\t\t$results[] = $row;\n\t\t}\n\t\treturn $results;\n\t}", "function getfilteredrec($data)\n\t{\n\t\t$this->db->like($data[\"field\"], $data[\"value\"]);\n\n\t\treturn $this->db->get(\"tblteman\");\n\t}", "public function getSelectData($fields, $parameter=\"\") {\n\t$qb = new \\Doctrine\\ORM\\QueryBuilder($this->getEntityManager());\n\t$companyObj = new PhvCompany();\n\t$studyObj = new PhvStudy();\n\t$query = $qb->select('s.id', 'c.company_name','c.id as comId')\n\t\t ->from($this->getTableName(), 's')\n\t\t ->leftJoin($companyObj->getTableName(), 'c', \"ON\", 'c.id=s.cro_id');\n\tif($parameter != \"\") {\n\t $currentUser = $this->getCurrentUser();\n\t $query->leftJoin($studyObj->getTableName(), 'st', \"ON\", 'st.id=s.study_id')\n\t\t->where($query->expr()->like('c.company_name', $query->expr()->literal('%' . $parameter . '%')))\n\t\t->andWhere($query->expr()->eq('st.sponser_id', intval($currentUser->getCompany()->getId())));\n\t}\n\t$result = $this->getEntityManager()->getConnection()->executeQuery($query)->fetchAll();\n $tempArr = array();\n foreach ($result as $val) {\n\t \n $tempArr[$val['comId']] = $val['company_name'];\n }\n return array_unique($tempArr);\n }", "public function queryAll($campos=\"*\",$criterio=\"\");", "public function find(array $conditions = []);", "public function fetchFields();", "public function find(array $criteria);", "public function search();", "public function search();", "public function searchData () {\n\t\treturn array (\n\t\t\t// Test 0 - Find column_string that contains 'Nothing'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_string' => 'Nothing',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isEmpty (),\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Test 1 - Find column_boolean that quals 1 and column_string contains 'Le'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_boolean' => '1',\n\t\t\t\t\t'column_string' => 'Le',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isType ('array'),\n\t\t\t\t\t'search_results_count' => 1,\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Test 2 - Find column_regex that contains '2'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_regex' => '2',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isType ('array'),\n\t\t\t\t\t'search_results_count' => 2,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "static function find($args) {\n\t\t// Por ejemplo la siguiente consulta SQL:\n\t\t// SELECT usuario FROM usuarios WHERE $args['campo'] = $args['valor']\n\t}", "function my_browse_data( $table_name , $datas ){\r\n\t\r\n\tglobal $connection;\r\n\t\r\n\t$primary_field = my_get_field_list($table_name);\r\n\tforeach($datas as $field => $value){\r\n\t\t$fieldname = $field ;\r\n\t\t$fieldvalue = $value;\r\n\t}\r\n\t\r\n\t$query = \" SELECT `\".$primary_field. \"` FROM `\".$table_name.\"` WHERE `\".$fieldname.\"` = \". $fieldvalue ;\r\n\t \r\n\t$result = my_query( $query );\r\n\tif( my_num_rows($result) > 0 ){\r\n\t\t\r\n\t\t$data = array();\r\n\t\t\r\n\t\twhile(\t$row = my_fetch_array($result) ){\r\n\t\t\t$data[] = $row[$primary_field];\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t\r\n\t}\r\n\t\r\n\treturn false;\r\n\t\r\n}", "public function returnFindByField($field);", "public function findBy(array $criteria);", "public function findAllBy( $value = NULL, $field = NULL, array $columns = ['*'] );", "public function findBy($field, $value, $operator = '=');", "public function search($params = []);", "abstract public function findBy($criteria);", "public function find();", "public function findAllBy($field, $value){\n\t\treturn $this->find(array('conditions' => $field.\" = '$value'\"));\n\t}", "public function select($fields);", "function Select_Record_By_Two_Filter($data, $table_name) {\r\n global $con;\r\n $key = array_keys($data);\r\n $value = array_values($data);\r\n $sql = \"select * from $table_name where $key[0] = '$value[0]' AND $key[1] = '$value[1]'\";\r\n try {\r\n $stmt = $con->query($sql);\r\n return $stmt;\r\n } catch (PDOException $e) {\r\n print $e->getMessage();\r\n }\r\n}", "public function whereIn($field, $data = array()){\n return $this->model->whereIn($field, $data);\n }", "public function searchDefault2($data = array())\r\n {\r\n $filter = $data['search_all2'];\r\n $cond = array(\r\n 'OR' => array(\r\n\r\n $this->alias . '.id' => $filter,\r\n $this->alias . '.first_name like' => '%' . $filter . '%',\r\n $this->alias . '.last_name like' => '%' . $filter . '%',\r\n $this->alias . '.phone like' => '%' . $filter . '%',\r\n $this->alias . '.mobile like' => '%' . $filter . '%',\r\n $this->alias . '.email like' => '%' . $filter . '%',\r\n $this->alias . '.condition like' => '%' . $filter . '%',\r\n $this->alias . '.year like' => '%' . $filter . '%',\r\n $this->alias . '.make like' => '%' . $filter . '%',\r\n $this->alias . '.model like' => '%' . $filter . '%',\r\n $this->alias . '.type like' => '%' . $filter . '%',\r\n $this->alias . '.condition_trade like' => '%' . $filter . '%',\r\n $this->alias . '.year_trade like' => '%' . $filter . '%',\r\n $this->alias . '.make_trade like' => '%' . $filter . '%',\r\n $this->alias . '.model_trade like' => '%' . $filter . '%',\r\n $this->alias . '.type_trade like' => '%' . $filter . '%',\r\n $this->alias . '.status like' => '%' . $filter . '%',\r\n $this->alias . '.gender like' => '%' . $filter . '%',\r\n $this->alias . '.best_time like' => '%' . $filter . '%',\r\n $this->alias . '.buying_time like' => '%' . $filter . '%',\r\n $this->alias . '.source like' => '%' . $filter . '%',\r\n $this->alias . '.contact_status_id like' => '%' . $filter . '%',\r\n $this->alias . '.created like' => '%' . $filter . '%',\r\n $this->alias . '.modified like' => '%' . $filter . '%',\r\n $this->alias . '.unit_color like' => '%' . $filter . '%',\r\n $this->alias . '.usedunit_color like' => '%' . $filter . '%',\r\n $this->alias . '.lead_status like' => '%' . $filter . '%',\r\n $this->alias . '.sales_step like' => '%' . $filter . '%',\r\n $this->alias . '.stock_num like' => '%' . $filter . '%',\r\n $this->alias . '.stock_num_trade like' => '%' . $filter . '%',\r\n\r\n ));\r\n return $cond;\r\n }", "function test_field_specific_search_on_user_id_field() {\n\n\t\t// Username. Three matching entries should be found.\n\t\t$search_string = 'admin';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'user_id' );\n\t\t$msg = 'A search for ' . $search_string . ' in UserID field';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'jamie_entry_key', 'jamie_entry_key_2' ) );\n\n\t\t// UserID number. Three matching entries should be found.\n\t\t$search_string = '1';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'user_id' );\n\t\t$msg = 'A search for ' . $search_string . ' in UserID field';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'jamie_entry_key', 'jamie_entry_key_2' ) );\n\n\t\t// UserID number. No matching entries should be found.\n\t\t$search_string = '7';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'user_id' );\n\t\t$msg = 'A search for ' . $search_string . ' in UserID field';\n\t\tself::run_entries_not_found_tests( $msg, $items );\n\t}", "public function findWhere(array $conditions);", "function getDataListWhereOr($table,$fields = null,$where = null) {\r\n\t\t\r\n\t\tif (!$table) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$db\t\t= JFactory::getDbo();\r\n\t\t$query\t= $db->getQuery(true);\r\n\t\t\r\n\t\t$query->select('a.id');\r\n\r\n\t\tif (is_array($fields)) {\r\n\t\t\tforeach($fields as $field) {\r\n\t\t\t\t$query->select('a.'.$field);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query->from($table.' as a');\r\n\t\t\t\r\n\t\t$query_where = '';\r\n\t\tif ( is_array($where) ) {\r\n\t\t\t\r\n\t\t\tforeach($where as $where_item) {\r\n\t\t\t\t//$query->where('a.'.$where_key.' = '.$where_item );\r\n\t\t\t\t\r\n\t\t\t\tif ($query_where) { $query_where .= ' OR '; }\r\n\t\t\t\t\r\n\t\t\t\tforeach($where_item as $key_foo => $foo) {\r\n\t\t\t\t\t$query_where .= 'a.'.$key_foo.' = '.$foo;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\t\t\r\n\r\n\t\t\r\n\t\t$query->where($query_where);\r\n\r\n\t\tif (!$db->query()) {\r\n\t\t\tJError::raiseError(500, $db->getErrorMsg());\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t\tif ( !$data = self::getCacheData((string)$query) ) {\r\n\t\t\t\r\n\t\t\techo ' load ';\r\n\t\t\r\n\t\t\r\n\t\t\t$db->setQuery( (string)$query );\r\n\t\t\tif (!$db->query()) {\r\n\t\t\t\tJError::raiseError(500, $db->getErrorMsg());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$data = $db->loadAssocList();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tself::setCacheData($query,$data);\r\n\t\t} else {\r\n\t\t\techo 'cache';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tprint_r($data);\r\n\t\tif ( $data ) {\r\n\t\t\techo ' istOOP! ';\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n//\t\treturn $data;\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadAssocList();\r\n\t}", "function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);", "function test_field_specific_search_on_entry_id() {\n\t\t$jamie_id = FrmEntry::get_id_by_key( 'jamie_entry_key' );\n\t\t$steph_id = FrmEntry::get_id_by_key( 'steph_entry_key' );\n\n\t\t// Single ID. One matching entry should be found.\n\t\t$search_string = $jamie_id;\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'id' );\n\t\t$msg = 'A search for ' . $search_string . ' in entry ID column';\n\t\tself::run_entries_found_tests( $msg, $items, 1, array( 'jamie_entry_key' ) );\n\n\t\t// Two IDs. Two entries should be found.\n\t\t$search_string = $jamie_id . ' ' . $steph_id;\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'id' );\n\t\t$msg = 'A search for ' . $search_string . ' in entry ID column';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'jamie_entry_key', 'steph_entry_key' ) );\n\n\t\t// Two IDs separated with comma and space. Two entries should be found.\n\t\t$search_string = $jamie_id . ', ' . $steph_id;\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'id' );\n\t\t$msg = 'A search for ' . $search_string . ' in entry ID column';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'jamie_entry_key', 'steph_entry_key' ) );\n\n\t\t// Two IDs separated with comma. Two entries should be found.\n\t\t$search_string = $jamie_id . ',' . $steph_id;\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'id' );\n\t\t$msg = 'A search for ' . $search_string . ' in entry ID column';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'jamie_entry_key', 'steph_entry_key' ) );\n\n\t\t// Fake ID. No entry should be found\n\t\t$search_string = 'nalsndo83';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'id' );\n\t\t$msg = 'A search for ' . $search_string . ' in entry ID column';\n\t\tself::run_entries_not_found_tests( $msg, $items );\n\t}", "abstract public function filterFields();", "public abstract function find();", "public function searchQuery($searchParams=false){\t\t\n\t\t//$searchParams=array(array(\"lg_name\",'text'), array(\"lg_country\",'text'), array(\"lg_desc\",'text'));\n\t\t//var_dump($searchParams);\n\t\tif(count($searchParams) > 1){\n\t\t\tforeach ($searchParams as $key => $row) { \n\t \t$fieldName=$searchParams[$key][0];\n\t \t$fieldValue=$this->input->post(\"\".$fieldName.\"\");\n\t \t//var_dump($fieldValue);\n\t \tif(isset($fieldValue) && !empty($fieldValue)){\n\t \t\t$this->db->where(\"\".$fieldName.\" LIKE '%$fieldValue%'\");\n\t\t\t\t\t//$this->db->where(\"\".$fieldName.\"\", $fieldValue);\n\t\t\t\t}\n\t \t}\n\t\t}\n\t}", "public function findData($data = null){ \n \n }", "public function Search($objeto);", "public function search(){}", "function getDataListWhere($table,$fields = null,$where = null,$order = null,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadAssocList();\r\n\t}", "public function findEquals($field, $value);", "public function testFindWithMultiValuedAttribute(): void\n {\n $soup = new Soup(\"<div class='a b'>1</div><div class='a c'>2</div><div class='a d'>3</div>\");\n $r1 = $soup->find('div', 'a d');\n $this->assertEquals('3', (string) $r1?->string);\n\n $r2 = $soup->findAll('div', ['a b', 'a d']);\n $this->assertSelects(['1', '3'], $r2);\n }", "public function findBy($params)\n\t{\n\t}", "function _get_by($field, $value = array())\r\n\t{\r\n\t\tif (isset($value[0]))\r\n\t\t{\r\n\t\t\t$this->where($field, $value[0]);\r\n\t\t}\r\n\r\n\t\treturn $this->get();\r\n\t}", "public function findBy($value);", "public function findContactsBy(array $criteria);", "public static function find($parameters=null) {}", "public function where_elemMatch($fields, array $list = []): self\n\t{\n\t\tif (isset($fields, $list) && is_string($fields) && $fields != '' && !empty($list))\n\t\t{\n\t\t\t$this->push_where_field($fields, $this->elemMatch($list));\n\t\t}\n\t\telseif (isset($fields) && is_array($fields) && !empty($fields))\n\t\t{\n\t\t\tforeach ($fields as $field => $list)\n\t\t\t{\n\t\t\t\tif (is_string($field) && $field != '' && is_array($list) && !empty($list))\n\t\t\t\t{\n\t\t\t\t\t$this->push_where_field($field, $this->elemMatch($list));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->error('Each field name in list must not be an empty string, value must be not an empty array', __METHOD__);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error('No specified or valid arguments were given', __METHOD__);\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "function GetAllDataSupplier($param = [])\n {\n if (isset($param['search_value']) && $param['search_value'] != '') {\n $this->db->group_start();\n $i = 0;\n foreach ($param['search_field'] as $row => $val) {\n if ($val['searchable'] == 'true') {\n if ($i == 0) {\n $this->db->like('LCASE(`'.$val['data'].'`)', strtolower($param['search_value']));\n } else {\n $this->db->or_like('LCASE(`'.$val['data'].'`)', strtolower($param['search_value']));\n }\n $i++;\n }\n }\n $this->db->group_end();\n }\n if (isset($param['row_from']) && isset($param['length'])) {\n $this->db->limit($param['length'], $param['row_from']);\n }\n if (isset($param['order_field'])) {\n if (isset($param['order_sort'])) {\n $this->db->order_by($param['order_field'], $param['order_sort']);\n } else {\n $this->db->order_by($param['order_field'], 'desc');\n }\n } else {\n $this->db->order_by('id', 'desc');\n }\n $data = $this->db\n ->select('*')\n ->where('is_delete',0)\n ->get('master_supplier')\n ->result_array();\n\n return $data;\n }", "static function find($data = 'all') {\n $db = self::getDbConnection();\n $table = static::getTable();\n $resalt = array();\n\n if ($data == 'all') {\n $query = $db->prepare(\"SELECT * FROM $table ORDER BY id ASC\");\n $query->execute();\n\n while ($obj = $query->fetchObject()) {\n $resalt[] = $obj;\n }\n } else {\n $query = $db->prepare(\"SELECT * FROM $table WHERE id = :id\");\n $query->execute(array(':id' => (int) $data));\n\n $resalt = $query->fetchObject();\n }\n\n return $resalt;\n }", "public function findAllWhereIn( array $value, $field, array $columns = ['*'] );", "static function find(array $params) {\n return array_filter(self::all(), function ($row) use ($params) {\n\n $ok = TRUE;\n foreach ($params as $prop => $value) {\n if ($row->{$prop} != $value) {\n $ok = FALSE;\n }\n }\n\n return $ok; // return TRUE if all params matched\n });\n }", "function search() {\n\t$clauses = [];\n\t$params = [];\n\n // When searching for fire/last name, we use like clauses for fuzzy searching.\n buildLikeClause('first_name', 'first_name', $params, $clauses);\n buildLikeClause('last_name', 'last_name', $params, $clauses);\n\n // Do an equality search for the dept.\n if (isset($_GET['dept'])) {\n $dept = trim($_GET['dept']);\n if (strlen($dept)) {\n $clauses[] = \"dept = ?\";\n $params[] = $dept;\n }\n }\n\n // Use equality searching for courses and p_langs.\n buildAlternationSubClause('courses', 'courses', $params, $clauses);\n buildAlternationSubClause('p_langs', 'p_langs', $params, $clauses);\n\n // Connect to the db.\n $db = new PDO(\"mysql:host=localhost;dbname=cmpe226\", \"root\", \"\");\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n // Finish constructing our sql.\n $sql = 'SELECT * FROM studentrecord_assignment1';\n if ($clauses) {\n $sql .= ' where ' . join(' and ', $clauses);\n }\n\n // Execute and fetch.\n $stmt = $db->prepare($sql);\n $stmt->execute($params);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "public function search($params)\n {\n $query = SLUserData::find()-with('avatarUploadF','slUsers')->all();\n print_r($query);\n die();\n return $query;\n }", "public function find($data = array(), $limit = false, $limit_no = 1)\n {\n if (isset($data['fields'])):\n foreach ($data['fields'] as $key => $val):\n if ($val != 'id'):\n if (!in_array($val, $this->_fields))\n unset($data['fields'][$key]);\n endif;\n endforeach;\n $fields = implode(',',$data['fields']);\n else:\n $fields = '*';\n endif;\n \n //where\n $replacements = $conditions_array = $or_conditions_array = array();\n \n if (isset($data['conditions'])):\n\t\t\t\t\t//allow for OR\n\t\t\t\t\tif (isset($data['conditions']['OR'])):\n\t\t\t\t\t\t$or_conditions = '(';\n\t\t\t\t\t\tforeach ($data['conditions']['OR'] as $key => $value):\n\t\t\t\t\t\t\tif (is_array($value)):\n\t\t\t\t\t\t\t\t$replacements[$key] = $value[1];\n\t\t\t\t\t\t\t\t$or_conditions_array[] = '`' . $key . '` ' . $value[0] . ' :' . $key; \n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\t$replacements[$key] = $value;\n\t\t\t\t\t\t\t\t$or_conditions_array[] = '`' . $key . '` = :' . $key; \n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t$or_conditions .= implode(' OR ',$or_conditions_array);\n\t\t\t\t\t\t$or_conditions .= ')';\n\t\t\t\t\t\tunset($data['conditions']['OR']);\n\t\t\t\t\tendif;\n\t\t\t\t\t//allow for AND\n foreach ($data['conditions'] as $key => $value):\n if (is_array($value)):\n\t\t\t\t\t\t\t$replacements[$key] = $value[1];\n $conditions_array[] = '`' . $key . '` ' . $value[0] . ' :' . $key; \n else:\n $replacements[$key] = $value;\n $conditions_array[] = '`' . $key . '` = :' . $key; \n endif;\n endforeach;\n $conditions = implode(' AND ',$conditions_array);\n\t\t\t\t\t//Add OR if present\n\t\t\t\t\tif (isset($or_conditions)):\n\t\t\t\t\t\t$conditions .= ' AND ' . $or_conditions;\n\t\t\t\t\tendif;\n else:\n $conditions = \"1\";\n endif;\n \n //order\n $order = '';\n if (isset($data['order']))\n $order = ' ORDER BY ' . $data['order'];\n else if (isset($data['group']))\n $order = ' GROUP BY ' . $data['group'];\n \n //limit\n $limited = '';\n if ($limit)\n {\n $limited = \" LIMIT $limit_no\";\n } \n \n $sth = $this->pdo_select( 'SELECT ' . $fields . ' FROM `' . $this->_table . '` WHERE ' . $conditions . $order . $limited, $replacements );\n \n if (is_array($sth) && count($sth) > 0):\n foreach ($sth as $key => $model):\n foreach ($model as $mkey => $value):\n $sth[$key][$mkey] = html_entity_decode($value);\n endforeach;\n endforeach;\n endif;\n return $sth;\n\n }", "public function query($fields)\n {\n $res = [];\n $patterns = [];\n $limit = -1;\n if (isset($fields['limit'])) {\n $limit = array_pop($fields);\n }\n foreach ($fields as $field => $pattern) {\n $pattern = preg_quote($pattern, '@');\n $pattern = str_replace('\\*', '.*?', $pattern);\n $patterns[$field] = $pattern;\n }\n\n foreach ($this->elts as $id => &$elt) {\n $ok = true;\n\n\n foreach ($patterns as $field => $pattern) {\n $ok = preg_match('@^' . $patterns[$field] . '$@i', $elt->$field);\n if (!$ok) break;\n }\n\n if ($ok) {\n $res[] = &$elt;\n $limit--;\n if ($limit === 0) break;\n }\n }\n return $res;\n }", "function searchByInfo($array){\n\t\t$sql = \"SELECT * FROM Client WHERE\";\n\t\t$keys = array_keys($array);\n\t\tfor ($i = 0; $i< count($keys); $i++){\n\t\t\tif ($i==0){\n\t\t\t\t$sql = $sql.\" \".$keys[$i].\" LIKE '\".$array[$keys[$i]].\"'\";\n\t\t\t} else {\n\t\t\t\t$sql = $sql.\" AND \".$keys[$i].\" LIKE '\".$array[$keys[$i]].\"'\";\n\t\t\t}\n\t\t}\n\t\t$result = mysql_query($sql) or die(mysql_error());\n\t\t$i = 0;\n\t\twhile ($info = mysql_fetch_array($result,MYSQL_ASSOC)){//While more results\n\t\t\t$toReturn[$i] = $info;\n\t\t\t$i++;\n\t\t}\n\t\treturn $toReturn;\n\t}", "function get_customer_list_search($terms)\n {\n $this->company_db->select(\"c.*, CONCAT(c.tele_country_code, ' ', c.telephone_number) as telephone_number, CONCAT(c.cell_country_code , ' ', c.cellphone_number) as cellphone_number, CONCAT(c.fname, ' ', c.lname) as name\");\n $this->company_db->from('tbl_customer c');\n //$this->company_db->where('c.void', 'No');\n $column_search = array(\"c.address_line1\", \"CONCAT(c.tele_country_code, ' ', c.telephone_number)\", \"CONCAT(c.cell_country_code , ' ', c.cellphone_number)\", \"CONCAT(c.fname, ' ', c.lname)\");\n\n if(isset($terms) && !empty($terms)) // if datatable send POST for search\n {\n $i = 0;\n foreach ($column_search as $item) // loop column \n { \n if($i===0) // first loop\n {\n $this->company_db->group_start(); // open bracket. query Where with OR clause better with bracket. because maybe can combine with other WHERE with AND.\n $this->company_db->like($item, $terms);\n }\n else\n {\n $this->company_db->or_like($item, $terms);\n }\n \n if(count($column_search) - 1 == $i) //last loop\n $this->company_db->group_end(); //close bracket\n \n $i++;\n }\n }\n\n $query = $this->company_db->get();\n\n if($query->num_rows() >= 1)\n {\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "public function getSaleData($conditions,$fields) {\t\r\n return $this->find('all', array('fields' => $fields,'conditions'=>$conditions));\r\n }", "public function all($fields='*', $where_str='', $data=array(), $key='id') {\n\t\t$tb = $this->attr('tb');\n\n\t\treturn $this->db()->get_records($fields, $tb, $where_str, $data, $key);\n\t}", "function searchEmployeeData( Request $request )\n\t\t\t{\n\t\t\t\t$result = Employee::leftJoin( 'employee_metas', 'employees.id', '=', 'employee_metas.employee_id' )->where( 'employees.username', 'like', '%' . $request->search_query . '%' )->\n\t\t\t\torWhere( 'employees.name', 'like', '%' . $request->search_query . '%' )->orWhere( 'employee_metas.address', 'like', '%' . $request->search_query . '%' )->orWhere( 'employee_metas.contact', 'like', '%' . $request->search_query . '%' )->select( 'employees.name' )->get();\n\n\t\t\t\tif ( ! empty( $result ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->finalResponse( 'success', 'Records found!', 'Following are the results', [ 'emp_names' => $result ] );\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->finalResponse( 'error', 'No records found!', 'No matching employee records found for ' );\n\t\t\t\t\t}\n\t\t\t}", "public function findBy($fields)\n {\n /** @var SFModel $model */\n foreach ($this as $model) {\n $valid = true;\n\n foreach ($fields as $fieldKey => $fieldValue) {\n if ($model->$fieldKey != $fieldValue) {\n $valid = false;\n break;\n }\n }\n\n if ($valid) {\n return $model;\n }\n }\n\n return null;\n }", "function getMatches($Field = '', $Where = array(), $multiRecords = FALSE, $PageNo = 1, $PageSize = 15)\n {\n $Params = array();\n if (!empty($Field)) {\n $Params = array_map('trim', explode(',', $Field));\n $Field = '';\n $FieldArray = array(\n 'SeriesID' => 'S.SeriesID',\n 'SeriesGUID' => 'S.SeriesGUID',\n 'StatusID' => 'E.StatusID',\n 'SeriesIDLive' => 'S.SeriesIDLive',\n 'SeriesName' => 'S.SeriesName',\n 'SeriesStartDate' => 'DATE_FORMAT(CONVERT_TZ(S.SeriesStartDate,\"+00:00\",\"' . DEFAULT_TIMEZONE . '\"), \"' . DATE_FORMAT . '\") SeriesStartDate',\n 'SeriesEndDate' => 'DATE_FORMAT(CONVERT_TZ(S.SeriesEndDate,\"+00:00\",\"' . DEFAULT_TIMEZONE . '\"), \"' . DATE_FORMAT . '\") SeriesEndDate',\n 'MatchID' => 'M.MatchID',\n 'MatchIDLive' => 'M.MatchIDLive',\n 'MatchTypeID' => 'M.MatchTypeID',\n 'MatchNo' => 'M.MatchNo',\n 'SportsType' => 'M.SportsType',\n 'MatchLocation' => 'M.MatchLocation',\n 'IsPreSquad' => 'M.IsPreSquad',\n 'IsPlayerPointsUpdated' => 'M.IsPlayerPointsUpdated',\n 'MatchScoreDetails' => 'M.MatchScoreDetails',\n 'MatchClosedInMinutes' => 'M.MatchClosedInMinutes',\n 'MatchStartDateTime' => 'DATE_FORMAT(CONVERT_TZ(M.MatchStartDateTime,\"+00:00\",\"' . DEFAULT_TIMEZONE . '\"), \"' . DATE_FORMAT . '\") MatchStartDateTime',\n 'CurrentDateTime' => 'DATE_FORMAT(CONVERT_TZ(Now(),\"+00:00\",\"' . DEFAULT_TIMEZONE . '\"), \"' . DATE_FORMAT . ' \") CurrentDateTime',\n 'MatchDate' => 'DATE_FORMAT(CONVERT_TZ(M.MatchStartDateTime,\"+00:00\",\"' . DEFAULT_TIMEZONE . '\"), \"%Y-%m-%d\") MatchDate',\n 'MatchTime' => 'DATE_FORMAT(CONVERT_TZ(M.MatchStartDateTime,\"+00:00\",\"' . DEFAULT_TIMEZONE . '\"), \"%H:%i:%s\") MatchTime',\n 'MatchStartDateTimeUTC' => 'M.MatchStartDateTime AS MatchStartDateTimeUTC',\n 'ServerDateTimeUTC' => 'UTC_TIMESTAMP() AS ServerDateTimeUTC',\n 'TeamIDLocal' => 'TL.TeamID AS TeamIDLocal',\n 'TeamIDVisitor' => 'TV.TeamID AS TeamIDVisitor',\n 'TeamGUIDLocal' => 'TL.TeamGUID AS TeamGUIDLocal',\n 'TeamGUIDVisitor' => 'TV.TeamGUID AS TeamGUIDVisitor',\n 'TeamIDLiveLocal' => 'TL.TeamIDLive AS TeamIDLiveLocal',\n 'TeamIDLiveVisitor' => 'TV.TeamIDLive AS TeamIDLiveVisitor',\n 'TeamNameLocal' => 'TL.TeamName AS TeamNameLocal',\n 'TeamNameVisitor' => 'TV.TeamName AS TeamNameVisitor',\n 'TeamNameShortLocal' => 'TL.TeamNameShort AS TeamNameShortLocal',\n 'TeamNameShortVisitor' => 'TV.TeamNameShort AS TeamNameShortVisitor',\n 'TeamFlagLocal' => 'IF(TL.TeamFlag IS NULL,CONCAT(\"' . BASE_URL . '\",\"uploads/TeamFlag/\",\"team.png\"), CONCAT(\"' . BASE_URL . '\",\"uploads/TeamFlag/\",TL.TeamFlag)) TeamFlagLocal',\n 'TeamFlagVisitor' => 'IF(TV.TeamFlag IS NULL,CONCAT(\"' . BASE_URL . '\",\"uploads/TeamFlag/\",\"team.png\"), CONCAT(\"' . BASE_URL . '\",\"uploads/TeamFlag/\",TV.TeamFlag)) TeamFlagVisitor',\n 'MyTotalJoinedContest' => '(SELECT COUNT(DISTINCT sports_contest_join.ContestID)\n FROM sports_contest_join\n WHERE sports_contest_join.MatchID = M.MatchID AND UserID= ' . @$Where['SessionUserID'] . ') MyTotalJoinedContest',\n 'Status' => 'CASE E.StatusID\n when \"1\" then \"Pending\"\n when \"2\" then \"Running\"\n when \"3\" then \"Cancelled\"\n when \"5\" then \"Completed\" \n when \"8\" then \"Abandoned\" \n when \"9\" then \"No Result\" \n when \"10\" then \"Reviewing\" \n END as Status',\n 'MatchType' => 'MT.MatchTypeName AS MatchType',\n 'LastUpdateDiff' => 'IF(M.LastUpdatedOn IS NULL, 0, TIME_TO_SEC(TIMEDIFF(\"' . date('Y-m-d H:i:s') . '\", M.LastUpdatedOn))) LastUpdateDiff',\n 'TotalUserWinning' => '(SELECT IFNULL(SUM(UserWinningAmount),0) FROM sports_contest_join WHERE MatchID = M.MatchID AND UserID=' . @$Where['SessionUserID'] . ') TotalUserWinning',\n 'isJoinedContest' => '(SELECT COUNT(EntryDate) FROM sports_contest_join WHERE MatchID = M.MatchID AND UserID = \"' . @$Where['SessionUserID'] . '\" AND E.StatusID=' . @$Where['StatusID'] . ') JoinedContests',\n 'IsPlayingXIAnnounced' => '(SELECT IF( EXISTS(SELECT COUNT(PlayerID) PlayingCount FROM `sports_team_players` WHERE `MatchID` = M.MatchID AND `IsPlaying` = \"Yes\" HAVING PlayingCount >= 11), \"Yes\", \"No\")) IsPlayingXIAnnounced'\n );\n if ($Params) {\n foreach ($Params as $Param) {\n $Field .= (!empty($FieldArray[$Param]) ? ',' . $FieldArray[$Param] : '');\n }\n }\n }\n $this->db->select('M.MatchGUID,TL.TeamName AS TeamNameLocal,TV.TeamName AS TeamNameVisitor,TL.TeamNameShort AS TeamNameShortLocal,TV.TeamNameShort AS TeamNameShortVisitor');\n if (!empty($Field))\n $this->db->select($Field, FALSE);\n $this->db->from('tbl_entity E, sports_matches M, sports_teams TL, sports_teams TV');\n if (array_keys_exist($Params, array('SeriesID', 'SeriesGUID', 'SeriesIDLive', 'SeriesName', 'SeriesStartDate', 'SeriesEndDate')) || !empty($Where['SeriesID'])) {\n $this->db->from('sports_series S');\n $this->db->where(\"M.SeriesID\", \"S.SeriesID\", FALSE);\n }\n if (array_keys_exist($Params, array('MatchType'))) {\n $this->db->from('sports_set_match_types MT');\n $this->db->where(\"M.MatchTypeID\", \"MT.MatchTypeID\", FALSE);\n }\n $this->db->where(\"M.MatchID\", \"E.EntityID\", FALSE);\n $this->db->where(\"M.TeamIDLocal\", \"TL.TeamID\", FALSE);\n $this->db->where(\"M.TeamIDVisitor\", \"TV.TeamID\", FALSE);\n if (!empty($Where['Keyword'])) {\n $this->db->group_start();\n $this->db->or_like(\"M.MatchNo\", $Where['Keyword']);\n $this->db->or_like(\"M.MatchLocation\", $Where['Keyword']);\n $this->db->or_like(\"TL.TeamName\", $Where['Keyword']);\n $this->db->or_like(\"TV.TeamName\", $Where['Keyword']);\n $this->db->or_like(\"TL.TeamNameShort\", $Where['Keyword']);\n $this->db->or_like(\"TV.TeamNameShort\", $Where['Keyword']);\n $this->db->group_end();\n }\n if (!empty($Where['SeriesID'])) {\n $this->db->where(\"S.SeriesID\", $Where['SeriesID']);\n }\n if (!empty($Where['SeriesEndDate'])) {\n $this->db->where(\"S.SeriesEndDate\", $Where['SeriesEndDate']);\n }\n if (!empty($Where['MatchID'])) {\n $this->db->where(\"M.MatchID\", $Where['MatchID']);\n }\n if (!empty($Where['PlayerStatsUpdate'])) {\n $this->db->where(\"M.PlayerStatsUpdate\", $Where['PlayerStatsUpdate']);\n }\n if (!empty($Where['MatchCompleteDateTime'])) {\n $this->db->where(\"M.MatchCompleteDateTime <\", $Where['MatchCompleteDateTime']);\n }\n if (!empty($Where['MatchTypeID'])) {\n $this->db->where(\"M.MatchTypeID\", $Where['MatchTypeID']);\n }\n if (!empty($Where['SportsType'])) {\n $this->db->where(\"M.SportsType\", $Where['SportsType']);\n }\n if (!empty($Where['TeamIDLocal'])) {\n $this->db->where(\"M.TeamIDLocal\", $Where['TeamIDLocal']);\n }\n if (!empty($Where['TeamIDVisitor'])) {\n $this->db->where(\"M.TeamIDVisitor\", $Where['TeamIDVisitor']);\n }\n if (!empty($Where['TeamID'])) {\n $this->db->group_start();\n $this->db->where(\"M.TeamIDLocal\", $Where['TeamID']);\n $this->db->or_where(\"M.TeamIDVisitor\", $Where['TeamID']);\n $this->db->group_end();\n }\n if (!empty($Where['IsPreSquad'])) {\n $this->db->where(\"M.IsPreSquad\", $Where['IsPreSquad']);\n }\n if (!empty($Where['IsPlayerPointsUpdated'])) {\n $this->db->where(\"M.IsPlayerPointsUpdated\", $Where['IsPlayerPointsUpdated']);\n }\n if (!empty($Where['MatchStartDateTime'])) {\n $this->db->where(\"M.MatchStartDateTime <=\", $Where['MatchStartDateTime']);\n }\n if (!empty($Where['Filter']) && $Where['Filter'] == 'Today') {\n $this->db->where(\"DATE(M.MatchStartDateTime)\", date('Y-m-d'));\n }\n if (!empty($Where['Filter']) && $Where['Filter'] == 'Yesterday') {\n $this->db->where(\"M.MatchStartDateTime <=\", date('Y-m-d H:i:s'));\n }\n if (!empty($Where['Filter']) && $Where['Filter'] == 'MyJoinedMatch') {\n $this->db->where('EXISTS (select 1 from sports_contest_join J where J.MatchID = M.MatchID AND J.UserID=' . $Where['SessionUserID'] . ')');\n }\n if (!empty($Where['MatchStartFrom'])) {\n $this->db->where(\"DATE(M.MatchStartDateTime) >=\", $Where['MatchStartFrom']);\n }\n if (!empty($Where['MatchEndTo'])) {\n $this->db->where(\"DATE(M.MatchStartDateTime) <=\", $Where['MatchEndTo']);\n }\n if (!empty($Where['StatusID'])) {\n $this->db->where_in(\"E.StatusID\", ($Where['StatusID'] == 2) ? array(2, 10) : $Where['StatusID']);\n }\n if (!empty($Where['CronFilter']) && $Where['CronFilter'] == 'OneDayDiff') {\n $this->db->having(\"LastUpdateDiff\", 0);\n $this->db->or_having(\"LastUpdateDiff >=\", 86400); // 1 Day\n }\n if (!empty($Where['OrderBy']) && !empty($Where['Sequence'])) {\n $this->db->order_by($Where['OrderBy'], $Where['Sequence']);\n } else if (!empty($Where['OrderByToday']) && $Where['OrderByToday'] == 'Yes') {\n $this->db->order_by('DATE(M.MatchStartDateTime)=\"' . date('Y-m-d') . '\" DESC', null, FALSE);\n $this->db->order_by('E.StatusID=1 DESC', null, FALSE);\n } else {\n $this->db->order_by('E.StatusID', 'ASC');\n $this->db->order_by('M.MatchStartDateTime', 'ASC');\n }\n\n /* Total records count only if want to get multiple records */\n if ($multiRecords) {\n $TempOBJ = clone $this->db;\n $TempQ = $TempOBJ->get();\n $Return['Data']['TotalRecords'] = $TempQ->num_rows();\n if ($PageNo != 0) {\n $this->db->limit($PageSize, paginationOffset($PageNo, $PageSize)); /* for pagination */\n }\n } else {\n $this->db->limit(1);\n }\n $Query = $this->db->get();\n if ($multiRecords) {\n if ($Query->num_rows() > 0) {\n $Records = array();\n foreach ($Query->result_array() as $key => $Record) {\n $Records[] = $Record;\n if (in_array('MatchScoreDetails', $Params)) {\n $Records[$key]['MatchScoreDetails'] = (!empty($Record['MatchScoreDetails'])) ? json_decode($Record['MatchScoreDetails'], TRUE) : new stdClass();\n }\n }\n $Return['Data']['Records'] = $Records;\n }\n if (!empty($Where['MyJoinedMatchesCount']) && $Where['MyJoinedMatchesCount'] == 'Yes') {\n $Return['Data']['Statics'] = $this->db->query(\n 'SELECT (\n SELECT COUNT(DISTINCT J.MatchID) FROM `sports_contest_join` J,`tbl_entity` E WHERE J.MatchID = E.EntityID AND E.StatusID = 1 AND J.UserID =\"' . @$Where['SessionUserID'] . '\" \n ) UpcomingJoinedContest,\n ( SELECT COUNT(DISTINCT J.MatchID) FROM `sports_contest_join` J,`tbl_entity` E WHERE J.MatchID = E.EntityID AND E.StatusID IN (2,10) AND J.UserID =\"' . @$Where['SessionUserID'] . '\" \n ) LiveJoinedContest,\n ( SELECT COUNT(DISTINCT J.MatchID) FROM `sports_contest_join` J,`tbl_entity` E WHERE J.MatchID = E.EntityID AND E.StatusID = 5 AND J.UserID =\"' . @$Where['SessionUserID'] . '\" \n ) CompletedJoinedContest'\n )->row();\n }\n return $Return;\n } else {\n if ($Query->num_rows() > 0) {\n $Record = $Query->row_array();\n if (in_array('MatchScoreDetails', $Params)) {\n $Record['MatchScoreDetails'] = (!empty($Record['MatchScoreDetails'])) ? json_decode($Record['MatchScoreDetails'], TRUE) : new stdClass();\n }\n return $Record;\n }\n }\n return FALSE;\n }", "public function find($params=''){\n\t\t$this->_connect();\n\t\t$numberArguments = func_num_args();\n\t\t$params = Utils::getParams(func_get_args(), $numberArguments);\n\t\t$select = $this->_createSQLSelect($params);\n\t\t$resultResource = $this->_db->query($select['sql']);\n\t\treturn $this->_createResultset($select, $resultResource);\n\t}", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function cpSearch($tablename,$value1=0,$value2=0) {\n\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1 like '%$value1[$key1]%'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}", "function search() {}", "private function filter_results($fields = NULL)\n\t{\n\t\tif (!empty($fields)){\n\t\t\t// Filter by the fields\n\t\t\tforeach($fields as $column => $value){\n\t\t\t\t$this->db->where($column, $value);\n\t\t\t}\n\t\t}\n\t}", "function _search($field, $key)\n\t{\n\t\tswitch ($field)\n\t\t{\n\t\t\tcase 'name':\n\t\t\t{\n\t\t\t\t$this->db->where('MATCH(tag.name) AGAINST(\\'\"'.$this->db->escape_str($key).'\"\\' IN BOOLEAN MODE)');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function find_by_val($field,$value)\n {\n $arr1=[];\n $found=[];\n $seek = scan_students();\n foreach ($seek as $student => $id) {\n $dir = \"students/\".substr($id,0,2);\n $arr1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . $dir .\"/\". $id. \".json\"),true);\n if($arr1[$field] == $value) { $found = $arr1;}\n }\n if(!empty($found))\n echo print_r($found);\n else\n err(\"Student Not Found.\\00[0m This student doesn't exist.\");\n return $found;\n }", "public function search_in_table (string $id, array $data = null) {\n\n $value = '';\n if ($data){\n // shell array $data\n foreach($data as $key => $val){\n\n if (count($data)> 1){\n\n if($val == null){\n\n $value .= \"$key IS NULL AND \";\n }else{\n\n $value .= \"$key = '$val' AND \";\n }\n\n \n }else {\n\n if($val == null){\n\n $value .= \"$key IS NULL\";\n }else{\n\n $value .= \"$key = '$val'\";\n }\n\n //$value .= \"$key = '$val'\";\n }\n }\n \n // // remove the last AND\n $words = explode( \" \", $value );\n $cnt = count($words);\n if($words[$cnt-2] == \"AND\") {\n\n array_splice( $words, -2 );\n }\n \n $value = implode( \" \", $words );\n }\n // construct the syntax sql and store it in variable $sql\n if($data == null){\n $sql = \"SELECT \".$id.\" FROM \".$this->_table;\n }else {\n $sql = \"SELECT \".$id.\" FROM \".$this->_table.\" WHERE \".$value;\n //echo $sql; die();\n \n }\n // send $sql to function sql to executate\n $res = $this->_pdo->query($sql);\n \n $result = $res->fetchAll();\n \n if($result){\n\n return $result;\n }\n }", "public function findBy($criteria);", "public function findBy($criteria);", "public static function searchByName($q)\n {\n // //->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['name', 'notes']]])\n // ->query(['multi_match' => ['query' => $q, 'fields' => ['name', 'notes']]], ['term' => ['user_id' => UserUtil::getBrockerIds()]])\n // ->source(['user_id', 'name', 'notes'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n\n $searchResult = Deal::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['name', 'notes']]]\n ]\n ]\n ])\n ->source(['user_id'])\n ->from(0)\n ->size(10000)\n ->raw();\n\n\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $dealResult = array_map('intval', Arr::pluck($results, '_id'));\n\n //-----------\n\n // $searchResult = DealContact::rawSearch()\n // ->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['firstname', 'lastname', 'company', 'email', 'address1', 'address2', 'suburb', 'state', 'postcode', 'notes', 'phone']]])\n // ->source(['deal_id'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n // $results = [];\n // if($searchResult['hits']['total']['value'] == 0)\n // return [];\n // else\n // $results = $searchResult['hits']['hits'];\n\n $searchResult = DealContact::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['firstname', 'lastname', 'company', 'email', 'address1', 'address2', 'suburb', 'state', 'postcode', 'notes', 'phone']]]\n ]\n ]\n ])\n ->source(['deal_id', 'phone'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n\n $dealcontactResult = Arr::pluck($results, '_source.deal_id');\n\n //--------------\n\n // $searchResult = Reminder::rawSearch()\n // ->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['details', 'tags']]])\n // ->source(['deal_id','details', 'tags'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n // $results = [];\n // if($searchResult['hits']['total']['value'] == 0)\n // return [];\n // else\n // $results = $searchResult['hits']['hits'];\n\n $searchResult = Reminder::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['details', 'tags']]]\n ]\n ]\n ])\n ->source(['deal_id','details', 'tags'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $reminderResult = Arr::pluck($results, '_source.deal_id');\n\n $searchResult = JournalEntry::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['notes', 'tags']]]\n ]\n ]\n ])\n ->source(['deal_id','notes', 'tags'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $journalentryResult = Arr::pluck($results, '_source.deal_id');\n\n\n return array_values(Arr::sort(array_values(array_unique(Arr::collapse([$dealResult, $dealcontactResult, $reminderResult, $journalentryResult])))));\n }", "abstract public function findRelatedRecordsByEmail(): array;", "private function fetchSearchData($objectType, $searchNamespace, $searchValue, array $fields = [])\n {\n \t$object = (is_null($searchNamespace) ? '' : $searchNamespace . '\\\\') . $objectType;\n \t$mapObject = '\\Map\\\\' . $object . 'TableMap';\n \t$tableName = $mapObject::getTableMap()->getName();\n \t$queryObject = $object . 'Query';\n \t\n \t$values = $queryObject::create()->addSelfSelectColumns();\n \t\t\n \t$fieldCount = count($fields);\n \t$fieldIndex = 0;\n \tforeach($fields as $fieldKey => $fieldName)\n \t{\n \t\t$values->where($tableName . \".\" . $fieldName . \" LIKE '%\" . $searchValue . \"%'\");\n \t\t$fieldIndex++;\n \t\tif ($fieldIndex < $fieldCount)\n \t\t{\n \t\t\t$values->_or();\n \t\t}\n \t}\n \t$values->find();\n \n \treturn $values;\n }", "function getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\tif (!$table) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$db\t\t= JFactory::getDbo();\r\n\t\t$query\t= $db->getQuery(true);\r\n\t\t\r\n\t\t$query->select('a.id');\r\n\t\t//$query->select('a.'.$key.' ,a.'.$label.'');\r\n\t\tif (is_array($fields)) {\r\n\t\t\tforeach($fields as $field) {\r\n\t\t\t\t$query->select('a.'.$field);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query->from($table.' as a');\r\n\r\n\t\tif ( is_array($where) ) {\r\n\t\t\tforeach($where as $where_key => $where_item) {\r\n\t\t\t\t$query->where('a.'.$where_key.' = \"'.$where_item.'\"' );\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif (is_array($order)) {\r\n\t\t\tforeach($order as $order_item) {\r\n\t\t\t\t$query->order('a.'.$order_item);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif ( is_int($limit_start) && is_int($limit_limit) ) { \r\n\t\t\t$db->setQuery((string)$query,$limit_start, $limit_limit);\r\n\t\t} else {\r\n\t\t\t$db->setQuery((string)$query);\r\n\t\t}\r\n\r\n\t\tif (!$db->query()) {\r\n\t\t\tJError::raiseError(500, $db->getErrorMsg());\r\n\t\t}\r\n\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db;\r\n\t}", "public function where($arr){//ex of $arr : ['name' => 'LIKE A%','email' => '= [email protected]']\n $c = \"\";\n $x = 0;\n foreach($arr as $key => $v){//for each param, translate to SQL language\n if($x != 0){\n $c .= \" AND\";\n }\n $x++;\n $c .= \" $key $v\";\n }\n $this->params[\"WHERE\"] = $c;//adding the conditions to the query\n return $this;\n }", "public function multiple_field_search($term, $fields, $verify = false) {\n\t\t$term = mysql_real_escape_string($term);\n\t\tif(strlen($term) == 0)\n\t\t\treturn $verify ? '' : $this;\n\t\t\n\t\t$like = '`' . implode('` LIKE \"%'.$term.'%\" OR `', explode(' ', $fields)). '` LIKE \"%'.$term.'%\"';\n\t\t$fields = '`' . implode('`,`', explode(' ', $fields)). '`';\n\t\t\n\t\tif($verify) return \"($like OR MATCH($fields) AGAINST('$term'))\";\n\t\t$this->_query_cond[] = \"($like OR MATCH($fields) AGAINST('$term'))\";\n\t\t\n\t\treturn $this;\n\t}", "function getDataRowWhere($table,$fields = null,$where = null,$order = null) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadObject();\r\n\t}", "protected function search_by($field, $value = ''){\n\n\t\tif(! $this->_default_model)\n\t\t\tdie(\"This class default model doesnt exist\");\n\n\t\t$search_result = $this->{$this->_default_model}->search($field, $value);\n\n\t\tdie(json_encode($search_result));\n\n\t}", "function dbWhereVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->where($this->model.'.'.$f,$this->$f);\n }\n\n }", "public function getSearchFields($class);", "function MyMod_Data_Fields_Sql_Search_Select($data,$rdata,$value)\n {\n if\n (\n $this->ItemData[ $data ][ \"GETSearchVarName\" ]\n &&\n !preg_match('/^Admin$/',$this->Profile())\n )\n {\n $getvalue=$this->CGI_GETint($this->ItemData[ $data ][ \"GETSearchVarName\" ]);\n if (!empty($getvalue))\n {\n if (empty($value))\n {\n $value=$getvalue;\n }\n }\n }\n\n //Where clause in module sql table\n $where=$this->MyMod_Data_Fields_Sql_Where($data,$value);\n\n if (!is_array($where)) { $where=$this->Hash2SqlWhere($where); }\n\n //Get values present in table.\n $colvalues=$this->Sql_Select_Unique_Col_Values\n (\n $data,\n $where\n );\n $colvalues=preg_grep('/^\\d+$/',$colvalues);\n \n if (!empty($colvalues))\n {\n $where[ \"ID\" ]=$colvalues;\n }\n\n $datas=$this->MyMod_Data_Fields_Module_Datas($data);\n $datas=preg_grep('/^ID$/',$datas,PREG_GREP_INVERT);\n array_push($datas,\"ID\");\n\n $hashes=array();\n if (!empty($this->ItemData[ $data ][ \"SqlTables_Regex\" ]))\n {\n $class=$this->ItemData[ $data ][ \"SqlClass\" ];\n \n $hashes=\n $this->Module2Object($data)->Sql_Tables_Select_Hashes\n (\n $this->ItemData[ $data ][ \"SqlTables_Regex\" ],\n $where,\n $datas\n );\n }\n elseif (!empty($this->ItemData[ $data ][ \"Search_Vars\" ]))\n {\n $class=$this->ItemData[ $data ][ \"SqlClass\" ];\n $sqltable=$this->ApplicationObj()->SubModulesVars[ $class ][ \"SqlTable\" ];\n\n foreach ($this->ItemData[ $data ][ \"Search_Vars\" ] as $searchvar)\n {\n $sqltable=\n preg_replace\n (\n '/#'.$searchvar.'/',\n $this->MyMod_Search_CGI_Value($searchvar),\n $sqltable\n );\n }\n $hashes=\n $this->Module2Object($data)->Sql_Select_Hashes\n (\n $where,\n $datas,\n \"\",FALSE,\n $sqltable\n );\n }\n else\n {\n if (!empty($where[ $data ]))\n {\n #$where[ \"ID\" ]=$where[ $data ];\n unset($where[ $data ]);\n }\n $class=$this->ItemData[ $data ][ \"SqlClass\" ];\n if (\n !empty($this->ItemData[ $data ][ \"SqlClass\" ])\n &&\n method_exists($this->Module2Object($data),\"SqlWhere\")\n )\n {\n if (!is_array($where))\n {\n $where=$this->SqlClause2Hash($where);\n }\n\n $where=\n array_merge\n (\n $where,\n $this->Module2Object($data)->SqlWhere(array($data => $value))\n );\n }\n\n $hashes=\n $this->Module2Object($data)->Sql_Select_Hashes\n (\n $where,\n $datas,\n join(\",\",$this->ApplicationObj()->SubModulesVars[ $class ][ \"SqlDerivedData\" ])\n );\n }\n\n $rvalue=$this->Html_Select_Hashes2Field\n (\n $this->MyMod_Search_CGI_Name($data),\n $this->MyMod_Data_Fields_Module_SubItems_2Options\n (\n $data,\n $this->MyMod_Sort_List($hashes,$datas)\n ),\n $value\n );\n\n if ($this->ItemData[ $data ][ \"SqlTextSearch\" ] && ($value==\"\" || $value==0))\n {\n $rvalue=\n array\n (\n $value,\n $this->MyMod_Search_Field_Text($data)\n );\n }\n else\n {\n $rvalue=preg_replace\n (\n '/NAME=\\''.$data.'\\'/',\n \"NAME='\".$rdata.\"'\",\n $rvalue\n );\n }\n \n return $rvalue;\n }" ]
[ "0.64155215", "0.6295917", "0.6271706", "0.62248236", "0.62094456", "0.60870945", "0.6078204", "0.59798265", "0.5959787", "0.5950257", "0.5932757", "0.58885247", "0.5873576", "0.58387613", "0.58340204", "0.5829027", "0.5801688", "0.5796202", "0.5783644", "0.5781686", "0.5781259", "0.5760527", "0.5745235", "0.57439715", "0.57419914", "0.5731546", "0.57241327", "0.5723176", "0.5707341", "0.5707341", "0.5705446", "0.5701045", "0.5689179", "0.5688879", "0.56501895", "0.5649502", "0.56481457", "0.56365114", "0.5631653", "0.556624", "0.5562883", "0.5555185", "0.555183", "0.55427265", "0.55400085", "0.5536634", "0.5532064", "0.55309445", "0.55258423", "0.5524038", "0.55240256", "0.55215555", "0.55212444", "0.55107075", "0.5509101", "0.54870903", "0.5483999", "0.5470909", "0.5469364", "0.5469274", "0.5467932", "0.54674816", "0.5461784", "0.54447055", "0.54413384", "0.5437924", "0.54365367", "0.5436211", "0.54296076", "0.54243654", "0.54092574", "0.540515", "0.53973156", "0.5388827", "0.5388604", "0.53881687", "0.5386718", "0.5377592", "0.53774554", "0.53765553", "0.5374661", "0.53719974", "0.5371009", "0.5363219", "0.536307", "0.5362831", "0.53608716", "0.5358149", "0.53564453", "0.53564453", "0.5348858", "0.53487754", "0.5344265", "0.53309155", "0.53296053", "0.5315084", "0.5310974", "0.5307114", "0.5304031", "0.5298421", "0.5297938" ]
0.0
-1
Retrieve first data of repository, or create new Entity
public function firstOrCreate(array $attributes = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findOneEntity()\n {\n $company = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Test Company'\n ]);\n\n if ($company instanceof Company) {\n return $company;\n }\n\n return $this->createEntity();\n }", "public function first()\n {\n return $this->retrieveOrCreateQueryInstance()->firstOrFail();\n }", "public function fetch(): ?IEntity;", "abstract protected function getNewEntityInstance();", "function getEntity() {\n if (!empty($this->entity_id) && !empty($this->entity_type) && entity_get_info($this->entity_type)) {\n // Create an array because array_shift passes in by reference.\n $entities = entity_load($this->entity_type, array($this->entity_id));\n return array_shift($entities);\n }\n }", "public function createEntity();", "public function getFirst()\n {\n return parent::getFirst() ?: $this->getRepo()->newVoidModel();\n }", "public function getEntity();", "public function getEntity();", "public function getEntity();", "abstract protected function getEntity();", "function CreateDefaultResourceEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultResourceEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }", "public function newEmptyEntity(): EntityInterface;", "public function create(): Entity\n {\n $entity = $this->newEntity();\n $body = $this->transaction->getBody();\n $entity->fromSource($body);\n $entityId = $entity->getEntityId();\n\n if ($entityId) {\n $key = $entityId->getPrimitiveValue();\n $this->enumerable[$key] = $entity->toArray();\n } else {\n $this->enumerable[] = $entity->toArray();\n $entity->setEntityId($this->enumerable->count() - 1);\n }\n\n return $entity;\n }", "public function testFindFist() : void\n {\n /** @var EntityManager $em */\n $em = $this->getApplicationServiceLocator()->get(EntityManager::class);\n $postRepository = $em->getRepository(Post::class);\n /** @var Post $post */\n $post = $postRepository->find(1);\n static::assertNotNull($post);\n static::assertEquals('Test 1', $post->getName());\n }", "abstract public function toEntity(array $data): ?EntityInterface;", "public function getById($id): ?IEntity;", "abstract function getEntity();", "public function createEntity($data = array());", "private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }", "public function getEntity()\n\t{\n\t\treturn $this->hasKey() ? $this->database->find($this->key) : null;\n\t}", "public function getEntity()\n\t{\n\t\treturn new $this->entity();\n\t}", "protected function _getEntity($data) {\n\t\treturn new Entity($data);\n\t}", "public function create()\n {\n return $this->get();\n }", "public function testSaveNewEntity() {\n\t\t$entity = new Entity([\n\t\t\t'username' => 'superuser',\n\t\t\t'password' => 'root',\n\t\t\t'created' => self::date(),\n\t\t\t'updated' => self::date(),\n\t\t], ['className' => 'UserEntity']);\n\n\t\t$table = TableRegistry::get('users');\n\t\t$this->assertSame($entity, $table->save($entity));\n\t\t$this->assertEquals(self::$nextUserId, $entity->id);\n\n\t\t$row = $table->find('first', [\n\t\t\t'conditions' => ['id' => self::$nextUserId],\n\t\t\t'entity' => true,\n\t\t]);\n\t\t$this->assertEquals($entity->toArray(), $row->toArray());\n\t}", "public function fresh()\n {\n return $this->repository->find($this->id);\n }", "protected function createEntity($data) {\n\n if(!empty($this->model_class)) {\n \n $this->createModelInstance($data);\n\n } else {\n \n $this->entity = $data;\n\n }\n \n }", "public function execute() {\n $this->query->filter($this->filter);\n $data = $this->query->execute();\n $results = $data['results'];\n\n if (!$results) {\n return;\n }\n\n return entity_load($this->EntityType, array_keys($results));\n }", "public function getBy(array $where): ?IEntity;", "abstract public function createEntity(array $record): ?object;", "public function create()\n {\n $entityClassName = $this->getEntityClassName();\n return $entityClassName::create($this, null);\n }", "public function firstOrCreate($data)\n {\n return $this->model->firstOrCreate($data);\n }", "public function withoutData(): EntityInterface;", "public function create($data = array()) { \r\n \tforeach(array_keys($data) as $name) {\r\n \t\t$this->_checkAttributesValue($data, $name);\r\n \t}\r\n \t\r\n \treturn $entity = new $this->_entityClass($this, $this->_getPrimary(), $data);\r\n }", "public function getOneByEntityFetcher(PersistentEntityFetcher $entityFetcher)\n {\n return $this->getEntityManager()->find($entityFetcher);\n }", "abstract protected function createEntityInstance();", "public function testFindOne(): void\n {\n $this->repository->getDbAdapter()->setUseDeleted(true);\n\n $this->repository->getDbAdapter()->setDefaultOrder(['id']);\n\n // Verifica os itens que existem\n $this->assertInstanceOf(ArrayObject::class, $this->repository->findOne(1));\n $this->assertEquals($this->defaultValues[0], $this->repository->findOne(1)->getArrayCopy());\n $this->assertInstanceOf(ArrayObject::class, $this->repository->findOne(2));\n $this->assertEquals($this->defaultValues[1], $this->repository->findOne(2)->getArrayCopy());\n $this->assertInstanceOf(ArrayObject::class, $this->repository->findOne(3));\n $this->assertEquals($this->defaultValues[2], $this->repository->findOne(3)->getArrayCopy());\n $this->assertEmpty($this->repository->findOne(4));\n\n // Verifica o item removido\n $this->repository->getDbAdapter()->setShowDeleted(true);\n $findOne = $this->repository->findOne(4);\n $this->assertInstanceOf(ArrayObject::class, $findOne);\n $this->assertEquals($this->defaultValues[3], $findOne->getArrayCopy());\n $this->repository->getDbAdapter()->setShowDeleted(false);\n }", "public function current()\n\t{\n\t\t$row = $this->databaseResult->current();\n\n\t\tif ($row === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$entity = clone $this->baseEntity;\n\n\t\t$tableName = $entity->getEntityTableName();\n\n\t\t$entityData = $this->getValuesByKeyPrefix($row, \"{$tableName}:\");\n\n\t\t$entity->hydrateEntity($entityData);\n\t\t$entity->setDatabase($this->databaseConnection);\n\n\t\tif ($entity instanceof RelatedEntity) {\n\n\t\t\t$relationships = $entity->getEntityRelationships();\n\n\t\t\tforeach ($relationships as $relationship) {\n\t\t\t\t\n\t\t\t\t$data = $this->getValuesByKeyPrefix($row, \"{$relationship['name']}:\");\n\n\t\t\t\tif (empty($data)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$relatedEntity = new $relationship['class'];\n\t\t\t\t$relatedEntity->hydrateEntity($data);\n\t\t\t\t$relatedEntity->setDatabase($this->databaseConnection);\n\t\t\t\t\n\t\t\t\t$entity->setRelatedEntity($relationship['name'], $relatedEntity);\n\n\t\t\t\t// TODO: link related entity back to entity\n\t\t\t}\n\n\t\t}\n\n\t\treturn $entity;\n\t}", "abstract public function repository();", "public function preRetrieve();", "abstract protected function getEntitySetWithDefaults();", "public function findOne() {\n return parent::findOne();\n }", "public function findOne($query = []){\n\t\t$cursor = $this->collection->find($query);\n\t\t$retour = $this->createEntity($cursor->toArray()[0]);\n\t\treturn $retour;\n\t}", "public function save(){\n if($this->id == 0) {\n // Object is new and needs to be created\n return $this->insert();\n }\n }", "final public function first()\n {\n $queryBuilder = $this->createQueryBuilder();\n $queryBuilder->selectAll();\n $queryBuilder->limit(1);\n\n return $this->fetchOne($queryBuilder);\n }", "protected function entityCreate(Array $data){\n // TODO: deal with errors\n // insert new items\n $inserted = $this->resourceService()->create($data);\n if(isset($inserted['message'])){\n \\Log::error(\"Error \".$inserted['status_code'].\": \".$inserted['message']);\n }\n // return item\n return new LaravelCollection($inserted['data']);\n }", "public function getRepository(): EntityRepository;", "public function create($data)\n\t{\n\t\treturn $this->entity->create($data);\n\t}", "public function findOneById( int $int ): UserEntityInterface;", "abstract public function retrieve();", "public function selectOne(Query\\Select $query): ?Entity\n {\n return $this->db->selectOne($this->klass, $query);\n }", "protected function getNewEntity()\n {\n $entityName = $this->getEntityName();\n\n $instantiator = new Instantiator();\n return $instantiator->instantiate($entityName);\n }", "public function testCreateEntityAndGetDefaultDataSuccessfully(): void\n {\n $entityFactoryManager = $this->getEntityFactoryManager([\n 'Tests\\EoneoPay\\Externals\\ORM\\Stubs\\Factories\\\\' => 'Tests\\EoneoPay\\Externals\\ORM\\Stubs'\n ]);\n\n $entity1 = $entityFactoryManager->get(EntityStub::class);\n $entity2 = $entityFactoryManager->get(EntityStub::class);\n $entity3 = $entityFactoryManager->create(EntityStub::class, ['string' => 'different']);\n\n foreach ([$entity1, $entity2, $entity3] as $entity) {\n self::assertInstanceOf(EntityStub::class, $entity);\n }\n\n self::assertEquals(\\spl_object_hash($entity1), \\spl_object_hash($entity2));\n self::assertNotEquals(\\spl_object_hash($entity1), \\spl_object_hash($entity3));\n\n /** @noinspection UnnecessaryAssertionInspection Create returns EntityInterface */\n self::assertInstanceOf(EntityWithRulesStub::class, $entityFactoryManager->create(EntityWithRulesStub::class));\n\n self::assertEquals(\n ['integer' => 1, 'string' => 'string'],\n $entityFactoryManager->getDefaultData(EntityStub::class)\n );\n }", "public function first()\n {\n $data = parent::first();\n\n // For singletons, wrap them as a one-item array and then unwrap on return\n $data = $this->addRelations([$data]);\n\n return reset($data);\n }", "public function create(array $data)\n {\n try {\n $entity = $this->model->create($data);\n } catch (Exception $e) {\n Log::error($e->getMessage());\n\n return false;\n }\n\n $this->id = $entity->id;\n\n return $entity;\n }", "public function createEntity($resource)\n {\n return $this->createEntities($resource);\n }", "protected function create()\n {\n return new $this->entityClass();\n }", "private function hasOne($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$this->_db()->select($priKey)->from($table)->where($forKey,$this->id)->limit(1)->get();\n\t\t$result = $this->_db()->result();\n\t\t$priId = $result[$priKey];\n\t\t$entity = new $model($priId);\n\t\treturn $entity;\n\t}", "abstract protected function getRepository();", "public function create()\n {\n return $this->repository->create($this->repository->all());\n }", "public function getEntity($name);", "public function create(\\stdClass $data)\n {\n // Determine entity name\n $entity = $this->getRepository()->getClassName();\n\n /**\n * Create new entity\n *\n * @var Entity $entity\n */\n $entity = new $entity();\n\n // Before callback method call\n if (method_exists($this, 'beforeCreate')) {\n $this->beforeCreate($data, $entity);\n }\n\n // Create or update entity\n $this->persistEntity($entity, $data);\n\n // After callback method call\n if (method_exists($this, 'afterCreate')) {\n $this->afterCreate($data, $entity);\n }\n\n return $entity;\n }", "function create($entity);", "abstract public function getRepository();", "abstract public function getRepository();", "public function NewObject()\n {\n $id = (int)$this->request->requestVar('new');\n if ($id) {\n $item = DataObject::get_by_id($this->CreateType, $id);\n if (!$item) {\n $item = Versioned::get_by_stage($this->CreateType, 'Stage')->byID($id);\n }\n return $item;\n }\n\n return null;\n }", "protected function retrieveEntities()\n {\n return NULL;\n }", "public function return_existing_if_exists()\n {\n $author = factory( Author::class )->create();\n $data = array_add( $this->authorDataFormat, 'data.id', $author->id );\n\n $newAuthor = $this->dispatch( new StoreAuthor( $data ) );\n\n $this->assertEquals( $author->id, $newAuthor->id );\n }", "function CreateDefaultWebPanelEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultWebPanelEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }", "public function findEntity($id);", "protected function createEntity()\n {\n return new $this->entityClass();\n }", "public function create()\n {\n return ShopEmployeeEntry::orderBy('shopEmployeeEntryId','desc')->get();\n }", "public function findOne(int $id): ?Entity\n {\n return $this->findOneBy([\n 'id' => $id,\n ]);\n }", "function CreateDefaultSaleTypeEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultSaleTypeEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }", "public function create(array $data): ?Model;", "public abstract function getRepository();", "abstract protected function createEntities();", "protected function getEntityFromStorage() {\n $entity_type = $this->store->get('entity_type');\n $entity_id = $this->store->get('entity_id');\n\n /** @var \\Drupal\\Core\\Entity\\EntityInterface $entity */\n $entity = $this->entityTypeManager()->getStorage($entity_type)\n ->load($entity_id);\n\n return $entity;\n }", "public function createEntity()\n {\n $createdCompany = new Company();\n $createdCompany->setTitle('Test Company')\n ->setIco('11025848744')\n ->setDic('1258745968444')\n ->setStreet('Cesta 125')\n ->setZip('021478')\n ->setCity('Bratislava')\n ->setCountry('Slovenska Republika');\n\n $this->em->persist($createdCompany);\n $this->em->flush();\n\n return $createdCompany;\n }", "public function createEntity() {\r\n\t\t$entity = $this->getAnnotation('entity');\r\n\t\tif($entity) {\r\n\t\t\treturn new $entity;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function GenerateEntity() {\n return $this->entity->Generate();\n }", "public function withData(iterable $data): EntityInterface;", "public function getEntity() {\n\t\treturn get_entity($this->entity_guid);\n\t}", "public static function first()\n\t{\n\t\treturn self::new_instance_records()->first();\n\t}", "public function createAndStore(ParameterBag $data) {\n $entity = $this->create($data);\n $this->persistAndFlush($entity);\n\n return $entity;\n }", "public function getEntity( )\n {\n\n return $this->entity;\n\n }", "public function findById($id =''){\n\t\t$id = new MongoId($id);\n\t\t$cursor = $this->collection->find(['_id'=>$id]);\n\t\t$retour = $this->createEntity($cursor->toArray()[0]);\n\t\treturn $retour;\n\t}", "public function newEntity(array $data, array $options = []): EntityInterface;", "function CreateDefaultListItemEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultListItemEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }", "public function asDomainEntity()\n {\n return $this->app['company.repository']->find($this->getUID());\n }", "public function retrieve($entityName, $id);", "public static function hydrate($entity, array $data): ?object\n {\n return self::getServiceHydrator()->hydrate($entity, $data);\n }", "public function first() {}", "public function get($primary)\r\n\t{\r\n\t\t$row = $this->connection->select('*')\r\n\t\t\t->from($this->getTable())\r\n\t\t\t->where('[id] = ?', $primary)\r\n\t\t\t->fetch();\r\n\r\n\t\tif (!$row) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $this->createEntity($row);\r\n\t}", "public function getEntity()\n {\n if (empty($this->_data['entity'])) {\n Mage::throwException(Mage::helper('storelocator')->__('Entity is unknown'));\n }\n\n return $this->_data['entity'];\n }", "public function getOneByName(string $name)\n {\n $starship = DB::table($this->tableName)->where('name',$name)->first();\n if ($starship) {\n return new VehicleEntity(get_object_vars($starship));\n }\n throw new Exception('No records for the passed name');\n }", "function first_time_init($uid) {\n $q = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.uid = ?', $uid)\n ->limit(1);\n $me = $q->fetchOne();\n if (empty($me)) {\n $me = new Zim_Model_User();\n $me['status'] = 1;\n $me->save();\n }\n //return the user\n return $me;\n }", "public function findById($id)\n {\n $data = $this->adapter->select(array($this->entityIdColumnName => $id));\n\n if (isset($data[0])) {\n // Create new entity and populate data\n $entity = new $this->entityClass();\n $entity->setData($data[0]);\n\n // Return entity object\n return $entity;\n }\n\n return null;\n }", "function CreateDefaultSaleStageEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultSaleStageEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }", "public function findOne($id)\n {\n // Before callback method call\n if (method_exists($this, 'beforeFindOne')) {\n $this->beforeFindOne($id);\n }\n\n $entity = $this->getRepository()->find($id);\n\n // After callback method call\n if (method_exists($this, 'afterFindOne')) {\n $this->afterFindOne($id, $entity);\n }\n\n return $entity;\n }", "public function getEntity()\n {\n return isset($this->entity) ? $this->entity : null;\n }" ]
[ "0.69085836", "0.6349321", "0.6272332", "0.6013648", "0.6005854", "0.59974056", "0.5992053", "0.5964169", "0.5964169", "0.5964169", "0.59245723", "0.58984715", "0.5878729", "0.5856606", "0.58538646", "0.5825818", "0.5805329", "0.57861966", "0.5742425", "0.57242286", "0.57141656", "0.5705139", "0.5694617", "0.5618135", "0.561059", "0.5607018", "0.5606241", "0.55959356", "0.5595654", "0.55813307", "0.5578327", "0.5569514", "0.5563005", "0.55624986", "0.5553149", "0.5547315", "0.5542773", "0.55340207", "0.5532787", "0.5526958", "0.5524986", "0.551737", "0.5514727", "0.55097055", "0.55063397", "0.54991585", "0.548318", "0.54685175", "0.54535806", "0.5451901", "0.5451596", "0.54436225", "0.54374486", "0.5436541", "0.5428709", "0.5427251", "0.54148376", "0.54142267", "0.5404162", "0.5401002", "0.53999186", "0.539239", "0.53877294", "0.538605", "0.538605", "0.5380951", "0.5376947", "0.5376841", "0.5369557", "0.53611016", "0.5360014", "0.53538764", "0.53517604", "0.53488964", "0.53298354", "0.53281885", "0.53223807", "0.53142875", "0.5312307", "0.5311227", "0.5309638", "0.5308015", "0.53060234", "0.5302944", "0.5296636", "0.5290772", "0.5282439", "0.5281889", "0.5275661", "0.5272926", "0.5270322", "0.5270253", "0.5259998", "0.5255553", "0.5252872", "0.52479815", "0.52447826", "0.52350014", "0.52306086", "0.5217752", "0.5214626" ]
0.0
-1
Insert new record into database
public function insert($attributes);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// insert\n\t\t\t\t$this->getHandler()->create($record);\n\n\n\t\t\t\t$msg = new Message('You have successful create a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function insert($data);", "function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}", "public function insert(){\r\n\t\tif (!$this->new){\r\n\t\t\tMessages::msg(\"Cannot insert {$this->getFullTableName()} record: already exists.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\t$vals[\"`$name`\"] = $value->getSQLValue();\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = 'INSERT INTO '.$this->getFullTableName().' ('.implode(', ',array_keys($vals)).') VALUES ('.implode(', ',$vals).')';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to insert record into '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t// Get this here, because getPrimaryKey can call other SQL queries and thus override this value\r\n\t\t$auto_id = SQL::getInsertId();\r\n\t\t\r\n\t\t$table = $this->getTable();\r\n\t\t// Load the AUTO_INCREMENT value, if any, before marking record as not new (at which point primary fields cannot be changed)\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\tif ($table->getColumn($name)->isAutoIncrement()){\r\n\t\t\t\t$this->$name = $auto_id;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->new = false;\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}", "protected function saveInsert()\n {\n }", "protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "public function insert()\n {\n $this->id = insert($this);\n }", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function save_new_record() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$db_data = $this->get_db_data();\r\n\r\n\t\t$table_name = $wpdb->prefix . CTF_POSTS_TABLE;\r\n\t\t$data = array(\r\n\t\t\t'twitter_id' => $db_data['twitter_id'],\r\n\t\t\t'created_on' => $db_data['created_on'],\r\n\t\t\t'last_requested' => $db_data['last_requested'],\r\n\t\t\t'time_stamp' => $db_data['time_stamp'],\r\n\t\t\t'json_data' => $db_data['json_data'],\r\n\t\t\t'media_id' => $db_data['media_id'],\r\n\t\t\t'sizes' => $db_data['sizes'],\r\n\t\t\t'aspect_ratio' => $db_data['aspect_ratio'],\r\n\t\t\t'images_done' => $db_data['images_done']\r\n\t\t);\r\n\t\t$format = array(\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%d',\r\n\t\t\t'%d'\r\n\t\t);\r\n\t\t$error = $wpdb->insert( $table_name, $data, $format );\r\n\r\n\t\tif ( $error !== false ) {\r\n\t\t\t$insert_id = $wpdb->insert_id;\r\n\r\n\t\t\t$this->db_id = $insert_id;\r\n\t\t\t$this->insert_ctf_feeds_posts();\r\n\t\t} else {\r\n\t\t\t// log error\r\n\t\t}\r\n\t}", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "public function insert()\n\t{\n\t\t$crud = $this->crud->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->insert();\n\t\t$this->redirect('crud');\n\t}", "public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }", "function insert($data)\n {\n $this->db->insert($this->table, $data);\n }", "public function insertAction()\r\n\t{\r\n\t\tif ($this->request->getPost('submit')) {\r\n\t\t\t$name = $this->request->getPost('name');\r\n\t\t\t$phone = $this->request->getPost('phone');\r\n\t\t\t$arrPost = array('name' => $name, 'phone' => $phone);\r\n\t\t\t$room = new Room();\r\n\t\t\tif ($room->save($arrPost)) {\r\n\t\t\t\t$this->response->redirect(\"/users/index\", true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public function insert()\n {\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $columlList = \" (\";\n $valuelList = \" (\";\n foreach ($this->attributes as $column => $value) {\n $columlList .= $column . \", \";\n $valuelList .= \":\".$column . \", \";\n }\n $columlList = str_last_replace(\", \", \")\", $columlList);\n $valuelList = str_last_replace(\", \", \")\", $valuelList);\n $sqlQuery = \"INSERT INTO \" . $this->table . $columlList . \" VALUES\" . $valuelList;\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n #println($sqlQuery, \"blue\");\n }\n }", "protected function insert()\n {\n $insert = 'INSERT INTO users (first_name, last_name, email, password)\n VALUES (:first_name, :last_name, :email, :password)';\n $statement = self::$dbc->prepare($insert);\n unset($this->attributes['id']);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n $this->attributes['id'] = self::$dbc->lastInsertId();\n }", "public function insertRecord ($sqlString);", "function insert_record($data){\n\t$this->db->insert('tblname', $data);\n\t}", "public function insert($data)\r\n {\r\n \r\n }", "public function insert() {\n\t\t$this->insert_user();\n\t}", "function insert() {\n\t\t$sql = \"INSERT INTO cost_detail (cd_fr_id, cd_seq, cd_start_time, cd_end_time, cd_hour, cd_minute, cd_cost, cd_update, cd_user_update)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq, $this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update));\n\t\t$this->last_insert_id = $this->ffm->insert_id();\n\t}", "function insert() {\n\t \t \n\t \t$sql = \"INSERT INTO evs_database.evs_identification (idf_identification_detail_en, idf_identification_detail_th, idf_pos_id, idf_ctg_id)\n\t \t\t\tVALUES(?, ?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id));\n\t\n\t }", "abstract public function insertRecord($tableName, $record);", "public function insert() {\n \n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function _insert($data)\n {\n $this->insert($data);\n }", "protected function _insert()\n\t{\n\t}", "public function insert(){\n\n global $db;\n\n /** Insert sql query */\n $sql = \"INSERT INTO tbl_calculator (num1, num2, oper, answer)\n VALUES (\" . $this->num1 .\", \" . $this->num2 . \", '\" .$this->oper. \"', \" .$this->answer. \" )\";\n\n /** insert result maintain in log file */ \n error_log($sql);\n\n if ($db->query($sql) === TRUE) {\n error_log(\"New record created successfully\");\n } else {\n error_log(\"Error: \" . $sql . \"<br>\" . $db->error);\n }\n return;\n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function insert()\n {\n \n }", "public function insert()\n {\n # code...\n }", "function insert($data)\n {\n $this->db->insert($this->table, $data);\n }", "public function insert_entry()\r\n\t{\r\n\t\t$this->db->insert(\"email_workflow\", $this);\r\n\t}", "public abstract function insert();", "public function insert() {\r\n\r\n\t\t// Does the Genre object already have an ID?\r\n\t\tif ( !is_null( $this->id ) ) trigger_error ( \"Genre::insert(): Attempt to insert an Genre object that already has its ID property set (to $this->id).\", E_USER_ERROR );\r\n\r\n\t\t// Insert the Genre\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$sql = \"INSERT INTO :table ( id, name ) VALUES ( :id, :name )\";\r\n\t\t$st = $conn->prepare ( $sql );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->bindValue( \":name\", $this->name, PDO::PARAM_STR );\r\n\t\t$st->execute();\r\n\t\t$this->id = $conn->lastInsertId();\r\n\t\t$conn = null;\r\n\t}", "public abstract function Insert();", "public static function insert()\n {\n if (isset($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid'])) {\n ContactDAO::create($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid']);\n }\n }", "public function insert(){\n\n }", "abstract public function insert();", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "public function add(){\n $tab = DB::table('student');\n $res = $tab -> insert(['name' => '小黑', 'age' => '18']);\n }", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function Do_insert_Example1(){\n\n\t}", "function insert_record () {\n // validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // insert data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"INSERT INTO customers (name,email,mobile) values(?, ?, ?)\";\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->create_record();\n }\n }", "public function insert() {\n\n // Does the Course object already have an ID?\n if ( !is_null( $this->courseId ) ) trigger_error ( \"Course::insert(): Attempt to insert course object that already has its ID property set (to $this->courseId).\", E_USER_ERROR );\n\n // Insert the course\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"INSERT INTO course ( courseCode, courseName, description, headTeacher )\n VALUES (:courseCode,:courseName,:description,:headTeacher)\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":courseCode\", $this->courseCode, PDO::PARAM_STR );\n $st->bindValue( \":courseName\", $this->courseName, PDO::PARAM_STR );\n $st->bindValue( \":description\", $this->description, PDO::PARAM_STR );\n $st->bindValue( \":headTeacher\", $this->headTeacher, PDO::PARAM_STR );\n\n $st->execute();\n $this->courseId = $conn->lastInsertId();\n $conn = null;\n }", "public static function insert()\n {\n }", "public function insert($post);", "public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "protected function create() {\n $this->db->insertRow($this->table_name, $this->update);\n storeDbMsg($this->db,\"New \" . $this->form_ID . \" successfully created!\");\n }", "protected function insert() {\n $dbh = $this->getDbh();\n $table = $this->tableName;\n $data = [];\n\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n\n $query = 'INSERT INTO `' . $table . '` VALUES (NULL,';\n $first = true;\n foreach ($data AS $k => $value) {\n if (!$first)\n $query .= ', ';\n else\n $first = false;\n $query .= ':'.$k;\n }\n $query .= ')';\n\n $msc = microtime(true);\n\n $sth = $dbh->prepare($query);\n $sth->execute($data);\n\n $msc = microtime(true) - $msc;\n $line = \"insert() => \" . $query . \" with \" . implode(\"', '\", $data);\n $this->writeRequestLog($line, $msc);\n\n return true;\n }", "public function insert($data)\n {\n if (isset($this->columns[\"created\"])) {\n $data[\"created\"] = date(\"Y-m-d H:i:s\");\n }\n return $this->schema->insert($this->name, $data);\n }", "public function insertProduct(Product $product);", "public static function Insert(){\r\n }", "public function insert()\n\t{\n\t\treturn $this->getModel()->insert($this);\n\t}", "public function insert()\n {\n $sql = new Sql();\n $result = $sql->select(\"CALL sp_usuario_insert(:LOGIN, :PASSWORD)\", array(\n \":LOGIN\"=>$this->getDeslogin(),\n \":PASSWORD\"=>$this->getDessenha()\n ));\n\n if(count($result) > 0){\n $row = $result[0];\n $this->setIdusuario($row['idusuario']);\n $this->setDeslogin($row['deslogin']);\n $this->setDessenha($row['dessenha']);\n $this->setDataCadastro(new DateTime($row['dataCadastro']));\n }\n }", "function insert($sql){\n\n\t\tglobal $way;\n\t\t$way -> query($sql);\n\n\t}", "public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "public function insert() {\n $sql = \"INSERT INTO contratos (numero_contrato, objeto_contrato, presupuesto, fecha_estimada_finalizacion)\n VALUES (:numero_contrato, :objeto_contrato, :presupuesto, :fecha_estimada_finalizacion)\";\n $args = array(\n \":numero_contrato\" => $this->numeroContrato,\n \":objeto_contrato\" => $this->objetoContrato,\n \":presupuesto\" => $this->presupuesto,\n \":fecha_estimada_finalizacion\" => $this->fechaEstimadaFinalizacion,\n );\n $stmt = $this->executeQuery($sql, $args);\n\n if ($stmt) {\n $this->id = $this->getConnection()->lastInsertId();\n }\n\n return !$stmt ? false : true;\n }", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function insertDatabase();", "public function insert($insertConnection,$title,$description,$dueDate,$addDate,$editDate,$isDone){\n try {\n $query =\"INSERT INTO $this->tableName (title,description,dueDate,addDate,editDate,isDone)\n VALUES ('$title','$description','$dueDate','$addDate','$editDate','$isDone')\";\n $insertConnection->exec($query);\n echo json_encode(\"New record created successfully\");\n $insertConnection = null;\n } catch (PDOException $e) {\n echo json_encode(\"Execute failed: \".$e->getMessage());\n }\n }", "public function insert() {\n\t\t$insert_array = $this->toDbArray(true, true);\n\t\tif (array_key_exists('_id', $insert_array)) { unset($insert_array['_id']); }\n\t\t$ret_val = $this->getCollection()->save($insert_array);\n\t\tif (isset($insert_array['_id'])) {\n\t\t\t$this->setId($insert_array['_id']);\n\t\t}\n\t\treturn $this->getId();\n\t}", "public function insert($tblUpdate);", "public function insert() {\n if($this->id != 0){\n return null;\n }\n // Connect to db\n $db = Db::instance();\n\n // Build query\n $q = sprintf(\"INSERT INTO `%s` (`user_id`, `story_id`, `comment`) VALUES (%d, %d, %s);\", self::DB_TABLE, $db->escape($this->user_id), $db->escape($this->story_id), $db->escape($this->comment));\n\n // Execute query\n $db->query($q);\n\n // Set the ID for the new object\n $this->id = $db->getInsertID();\n return $this->id;\n }", "public function insert() {\r\n // Rôle : insérer l'objet courant dans la base de données\r\n // Retour : true / false\r\n // Paramètre : aucun\r\n \r\n // Vérification de l'id\r\n if (!empty($this->getId())) {\r\n debug(get_class($this).\"->insert() : l'objet courant a déjà un id\");\r\n return false;\r\n }\r\n \r\n // Construction de la requête\r\n $sql = \"INSERT INTO `\".$this->getTable().\"` SET \";\r\n $param = [];\r\n $start = true;\r\n \r\n foreach ($this->getChamps() as $nom => $champs) {\r\n if ($nom === $this->getPrimaryKey() or !$champs->getAttribut(\"inBdd\")) {\r\n continue;\r\n }\r\n if ($start) {\r\n $sql .= \"`$nom` = :$nom\";\r\n $start = false;\r\n } else {\r\n $sql .= \", `$nom` = :$nom\";\r\n }\r\n \r\n $param[\":$nom\"] = $champs->getValue();\r\n }\r\n \r\n $sql .= \";\";\r\n \r\n // Préparation de la requête\r\n $req = self::getBdd()->prepare($sql);\r\n \r\n // Exécution de la requête\r\n if (!$req->execute($param)) {\r\n debug(get_class($this).\"->insert() : échec de la requête $sql\");\r\n return false;\r\n }\r\n \r\n // Assignation de l'id\r\n if ($req->rowCount() === 1) {\r\n $this->set($this->getPrimaryKey(), self::getBdd()->lastInsertId());\r\n return true;\r\n } else {\r\n debug(get_class($this).\"->insert() : aucune entrée, ou bien plus d'une entrée, créée\");\r\n return false;\r\n }\r\n }", "public function insert() {\n\t\t$db = self::getDB();\n\t\t$sql = \"INSERT INTO posts\n\t\t\t\t\t(nome, conteudo, fk_idUsuario, fk_idTopico)\n\t\t\t\tVALUES\n\t\t\t\t\t(:nome, :conteudo, :fk_idUsuario, :fk_idTopico)\";\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute([\n\t\t\t':nome' => $this->getNome(),\n\t\t\t':conteudo' => $this->getConteudo(),\n\t\t\t':fk_idUsuario' => $this->getFkIdUsuario(),\n\t\t\t':fk_idTopico' => $this->getFkIdTopico()\n\t\t]);\n\t\t$this->idPost = $db->lastInsertId();\n\t}", "public function insert() {\n\n // Does the program object already have an ID?\n if ( !is_null( $this->programID ) ) trigger_error ( \"program::insert(): Attempt to insert an program object that already has its ID property set (to $this->id).\", E_USER_ERROR );\n\n // Insert the program\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"INSERT INTO programs ( programName, programStart, programFrequency ) VALUES ( :programName, :programStart, :programFrequency )\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":programName\", $this->programName, PDO::PARAM_STR );\n $st->bindValue( \":programStart\", $this->programStart, PDO::PARAM_STR );\n\t$st->bindValue( \":programFrequency\", $this->programFrequency, PDO::PARAM_STR );\n $st->execute();\n $this->programID = $conn->lastInsertId();\n $conn = null;\n }", "function form_insert($data){\n\t\t$this->db->insert('annonce', $data);\n\t}", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function insertRequestToDb()\n\t\t{\n\t\t\t$this->columnsInfo->data_seek(0);\n\t\t\t$columns = \"\";\n\t\t\t$values = \"\";\n\t\t\twhile($rowColumn = $this->columnsInfo->fetch_assoc())//$info->fetch_row\n\t\t\t{\n\t\t\t\tif($rowColumn[\"EXTRA\"] == \"auto_increment\")\n\t\t\t\t\tcontinue;\n\t\t\t\t$columns = $columns.\", \".$rowColumn[\"COLUMN_NAME\"];\n\t\t\t\t$val = \"\";\n\t\t\t\tif($rowColumn[\"COLUMN_NAME\"] == \"sid_a\")\n\t\t\t\t\t$val = $_SESSION[\"sid\"];\n\t\t\t\telse if($rowColumn[\"COLUMN_NAME\"] == \"date_a\")\n\t\t\t\t\t$val = \"now()\";\n\t\t\t\telse $val = $this->insertColumnValue($_REQUEST[$rowColumn[\"COLUMN_NAME\"]], $rowColumn[\"IS_NULLABLE\"], $rowColumn[\"DATA_TYPE\"], $rowColumn[\"CHARACTER_MAXIMUM_LENGTH\"]);\n\t\t\t\t$values = \"$values, $val\";\n\t\t\t}\n\t\t\t$columns = substr($columns, 2, strlen($columns));\n\t\t\t$values = substr($values, 2, strlen($values));\n\n\t\t\t$query = \"INSERT INTO $this->table ($columns) values($values);\";\n\t\t\t$GLOBALS[\"db\"]->query($query);\n\t\t\t//$info->free();\n\t\t}", "public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "public function insert($tableName, $data);", "public function insert(){\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_insert_usuario(:LOGIN, :PASS)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASS'=>$this->getDessenha()\n\t\t));\n\n\t\tif (isset($results[0])) {\n\t\t\t\n\t\t\t$this->setData($results[0]);\n\n\t\t}\n\t}", "function dbInsert($edit)\r\n\t{\r\n\r\n\t}", "public function insert(){\n\t\t// $post->title = 'A post from the insert method';\n\t\t// $post->body = 'Some random ghibberrish';\n\t\t// $post->save();\n\n\t\t$data = array(\n\t\t\t'title' => 'A post from the insert method, using the data array',\n\t\t\t'body' => 'Some random ghibberrish, using the data array',\n\t\t\t'user_id' => 1\n\t\t);\n\n\t\tPost::create($data);\n\n\t\tdd('post inserted');\n\t}", "public function createRecord()\n {\n $sql = sprintf(\n \"INSERT INTO %s (%s) values (%s)\", \"Cubans\",\n implode(\", \", array_keys($this->arrayKeysValues())),\n \":\" . implode(\", :\", array_keys($this->arrayKeysValues()))\n );\n $statement = $this->connect->prepare($sql);\n\t\t$statement->execute($this->arrayKeysValues());\n }", "public function recInsert($record) {\n $conn = Query::connect();\n $col = $conn->SelectLimit(\"select*from \".static::getTable(),1);\n $sql = $conn->GetInsertSQL($col,$record);\n $rs = $conn->Execute($sql);\n return $conn->ErrorNo();\n }", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "public function insert(){\n $sql = \"INSERT INTO author(\n name,\n job,\n created_at\n )\n VALUES(\n 'tgedf', 'sdvsdv', NOW())\";\n return $this->pdo->exec($sql);\n\n }", "function insert() {\n if(!$this->valid):\n return;\n endif;\n \n $this->name = mysql_real_escape_string($this->name);\n $this->brief = mysql_real_escape_string($this->brief);\n $this->description = mysql_real_escape_string($this->description);\n $this->games = mysql_real_escape_string($this->games);\n $this->headquarter = mysql_real_escape_string($this->headquarter);\n \n $sql = \"INSERT INTO companies\n (name, brief, description, date_founded, headquarter, website, imageURL, games, num_likes)\n VALUES\n ('$this->name', '$this->brief', '$this->description', '$this->date_founded', '$this->headquarter', '$this->website', '$this->imageURL', '$this->games', '$this->num_likes')\";\n \n if(!mysqli_query($this->con, $sql)) {\n die('Error: ' . mysqli_error($this->con));\n }\n \n //mysqli_close($con);\n \n echo \"<br>Insertion Successful!<br>\";\n }", "public function testInsert()\n {\n // todo create this in other database or maybe create mockup\n \n /*\n $arr = array (\n 'head' => 'Hello World!!',\n 'body' => 'Hello this is my world..',\n 'created' => date('Y-m-d H:i:s')\n );\n\n $this->noteTable->insert($arr);\n */\n }", "public function insertRow($row);", "protected function insertRow()\n { \n $assignedValues = $this->getAssignedValues();\n\n $columns = implode(', ', $assignedValues['columns']);\n $values = '\\''.implode('\\', \\'', $assignedValues['values']).'\\'';\n\n $tableName = $this->getTableName($this->className);\n\n $connection = Connection::connect();\n\n $insert = $connection->prepare('insert into '.$tableName.'('.$columns.') values ('.$values.')');\n var_dump($insert);\n if ($insert->execute()) { \n return 'Row inserted successfully'; \n } else { \n var_dump($insert->errorInfo()); \n } \n }", "public function insert(array $params);", "public function insert($loyPrg);", "public function save(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Find the columns from the model\n\t\t$columns = static::$columns;\n\n\t\t//because ID is AI we dont want to put a value in it\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//Same with timestamp\n\t\tunset($columns[array_search('timestamp', $columns)]);\n\n\t\t//Create an insert query which gets linked to the database\n\t\t$query = \"INSERT INTO \" . static::$tableName . \" (\". implode(\",\", $columns) . \") VALUES (\";\n\n\t\t//create a variable called insesrtcols. This is where we put the values\n\t\t$insertcols = [];\n\t\t//For each of the columns in the columns array, add that column into the insert cols array, and seperate it with a :\n\t\tforeach ($columns as $column) {\n\t\t\tarray_push($insertcols, \":\" . $column);\n\t\t}\n\t\t//turn the insertcols array into 1 string and put a , between each entry\n\t\t$query .= implode(\",\", $insertcols);\n\t\t//close the query\n\t\t$query .= \")\";\n\n\t\t//Prepare the query\n\t\t$statement = $db->prepare($query);\n\n\t\t//Foreach of the columns run this function\n\t\tforeach ($columns as $column) {\n\t\t\t//Attach the value to each of the columns\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\" . $column , $this->$column);\n\t\t}\n\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Get the id of the query which was just added\n\t\t$this->id = $db->lastInsertID();\n\t}", "public function insert(Table $table, $row);", "private function _insert($data){\n \t\n \tif(isset($data['date_established'] )){\n \t\t$data['date_established'] = Application_Core_Utilities::ukDateToMysql($data['date_established']);\n \t}\n \t\n if($lastId = $this->insert($data)){\n return $lastId;\n }else{\n // Error\n Application_Core_Logger::log(\"Could not insert into table {$this->_name}\", 'Error');\n return false;\n } \t\n }", "public function insert($mambot);", "public function insert_student($row)\n\t\t{\n\t\t\t$this->conn->insert($this->create_student($row));\n\t\t}" ]
[ "0.7519285", "0.74086577", "0.7300573", "0.72487354", "0.7213725", "0.7169047", "0.7165296", "0.7108887", "0.7078733", "0.7057451", "0.70544875", "0.7054119", "0.70453686", "0.70348287", "0.6979119", "0.6963362", "0.6917416", "0.68957126", "0.6874601", "0.6865012", "0.6856195", "0.6849328", "0.68397355", "0.6829174", "0.6827486", "0.68262136", "0.6796902", "0.6792931", "0.679041", "0.67846215", "0.67846215", "0.67835104", "0.6761262", "0.6758172", "0.675489", "0.675489", "0.67535913", "0.67493254", "0.67440176", "0.6740849", "0.6732177", "0.67090315", "0.67031014", "0.6701262", "0.6681877", "0.66730976", "0.6660747", "0.6660511", "0.66565645", "0.6652687", "0.66432554", "0.66307276", "0.6630073", "0.66268766", "0.66204596", "0.66187733", "0.66140836", "0.6612541", "0.6589945", "0.65866953", "0.65829676", "0.6580614", "0.6569892", "0.65687096", "0.6567814", "0.6565375", "0.6548661", "0.6547028", "0.6539039", "0.65381014", "0.6536851", "0.6531446", "0.65300107", "0.65140754", "0.6502436", "0.6501236", "0.64961237", "0.649546", "0.64837027", "0.64832467", "0.6474907", "0.6473504", "0.6469676", "0.64694417", "0.6466755", "0.64656675", "0.6447285", "0.64448863", "0.6436477", "0.6433861", "0.64315784", "0.643129", "0.6426433", "0.6420508", "0.6419692", "0.64121485", "0.6402436", "0.63964003", "0.6394439", "0.6389583", "0.6386645" ]
0.0
-1
Update a entity in repository by model
public function update($id, array $attributes);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($entity);", "public function update($entity);", "public function update($entity)\n {\n \n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function update(stubObject $entity);", "public function update(Entity $entity);", "public function Update($entity) {\n }", "public function update(IEntity $entity);", "public function update(Model $entity, array $data){\n $entity->fill($data);\n $entity->save();\n return $entity;\n\n }", "abstract protected function updateModel();", "public function update(DataObject $entity){\n }", "public function update($id, Model $model);", "function update(IContract $entity);", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "public function update(Request $request, object $model): bool;", "public function updating($model)\n\t{\n\t}", "public function postUpdate($entity);", "public function updated($model)\n {\n }", "public function update($model) :bool;", "protected function updateEntity($entity)\n {\n }", "public function update(User $model);", "function update($unique_id, $model)\n {\n }", "public static function updateByModel($model,$args){\n $model->attributes = $args;\n $model->updated_at = date('Y-m-d H:i:s');\n $model->save();\n return $model;\n }", "public function update(OrmModelInterface $model): bool\n {\n }", "public function update($model, array $data)\n {\n return $this->persist($data, $model);\n }", "public abstract function update($object);", "public function update(IModel $organization)\n {\n }", "public function updateModel(Model &$model)\n {\n }", "public function update(Model $model, Request $request): ?Model;", "public function saveModel($entity){\n $this->entityManager->persist($entity);\n $this->entityManager->flush();\n }", "public function update(Model $model, array $attributes);", "public function update(PhpORM_Entity $entity)\n {\n $table = $this->getTable();\n $data = $entity->toArray();\n\n $id = $entity->id;\n unset($data['id']);\n\n $table->update($data, \"id = '$id'\");\n }", "public static function update($entity)\n {\n return static::mapper()->update($entity);\n }", "public function save($entity);", "public function save($entity);", "public function save($entity);", "function _update($entity)\n {\n $key = $this->object->get_primary_key_column();\n return $this->object->_wpdb()->update($this->object->get_table_name(), $this->object->_convert_to_table_data($entity), array($key => $entity->{$key}));\n }", "public function update($model, array $data) {\n $repositoryClass = get_class($this->_model);\n\n if (!($model instanceof $repositoryClass)) {\n throw new InvalidArgumentException(\"The model is not an instance of {$repositoryClass}.\");\n }\n\n if ($model->update($data)) {\n return $model;\n }\n\n return false;\n }", "public function updatedModel(Model &$model)\n {\n }", "function update($field, $value, $model)\n {\n }", "public function update(Request $request, string $model, string $id): Response\n {\n //\n }", "public function updateWithoutData(Model $entity){\n $entity->save();\n return $entity;\n }", "public function update($data,$model=false){\n\n if(is_array($data)){\n $data=(array_key_exists(0,$data)) ? $data[0] : $data;\n return $this->allMethodProcess(function() use($data,$model){\n return $this->querySqlFormatter->getUpdateQueryFormatter($data,['where'=>$this->where,'execute'=>$this->execute,\n 'model'=>$this->subClassOf,'bool'=>$this->bool,'detail'=>$model]);\n },\"no--autoscope\");\n\n }\n\n }", "public function testUpdateModelSet()\n {\n }", "public function update( One_Model $model )\n\t{\n\t\treturn null;\n\t}", "public function update(Identifiable $model, array $newAttributes);", "public function update($entity)\n {\n $this->getObjectManager()->persist($entity);\n $this->getObjectManager()->flush();\n }", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "public function updateRelationship(Request $request, object $model, string $fieldName): bool;", "public function update($id, array $properties): RepositoryEntity;", "public function update($entity){\n\t\ttry {\n\t\t\t$data = $entity->toArray();\n\t\t\t$this->updateEmbedded($data,$entity);\n\t\t\t$theId = new MongoId($data['_id']);\n\t\t\tunset($data['_id']);\n\t\t\t$this->callBehavior('beforeUpdate',$data,$entity);\n\t\t\t$bulk = new BulkWrite();\n\t\t\t$bulk->update(['_id'=>$theId],$data);\n\t\t\t$this->manager->executeBulkWrite($this->dbName.'.'.$this->collectionName,$bulk);\n\t\t\t$this->callBehavior('afterUpdate',$data,$entity);\n\t\t} catch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function update(array $data, Model $model)\n {\n return $model->update($data);\n }", "public function update($entity) {\n $this->updateRecord([\n 'created-on' => $entity->getCreatedOn(),\n 'last-updated' => $entity->getLastUpdated(),\n 'title' => $entity->getTitle(),\n 'description' => $entity->getDescription(),\n 'body' => $entity->getBody(),\n ], [\n 'id' => $entity->getId(),\n ]);\n }", "public function update($entity, $flush = false);", "function update($model, $data){\n /* set data into iterator */\n $iterator = $model->_get(\"iterator\");\n if (!$model->loaded()){\n throw $this->exception(\"Please, load model prior to updating it\");\n }\n if (!$iterator){\n throw $this->exception(\"Iterator not set for model - how to update? Is it loaded?\");\n }\n foreach ($data as $k => $v){\n if ($xpath=$model->elements[$k]->setterGetter(\"xpath\")){\n $a = $iterator->xpath($xpath);\n if ($a){\n $i = array_shift($a);\n $i[0] = $v;\n } else {\n /* create xpath */\n $xpath = explode(\"/\", $xpath);\n $i2 = $iterator;\n while ($r = array_shift($xpath)){\n if (count($xpath)){\n if (!isset($i2->{$r})){\n $i2->addChild($r);\n }\n $i2 = $i2->{$r};\n } else {\n $i2->{$r}[0] = $v;\n }\n }\n }\n } else {\n $iterator->{$k} = $v;\n }\n }\n /* remove snippets from iterator */\n $remove = array();\n foreach ($model->elements as $k => $v){\n if ($v instanceof \\Field){\n if ($r=$v->setterGetter(\"retrieve\")){\n if ($r != \"yes\"){\n throw $this->exception(\"Cannot update model, as it contains non-fully loaded fields\");\n }\n }\n }\n }\n if ($model->sub){\n $model->_get(\"parent\")->save();\n } else {\n /* store to cluster point */\n /*$a=$this->xml2array($iterator);\n echo \"<pre>\";\n print_r($a);\n exit;*/\n //$this->simple->partialReplaceSingle($model[$model->id_field], $a);\n $this->simple->updateSingle($model[$model->id_field], $iterator);\n }\n }", "public function update(Request $request, BranchModel $branchModel)\n {\n //\n }", "public function update (ValueObjectAbstract $valueObject);", "function update(){\n\t\t$this->model->update();\n\t}", "protected function update() {\n if ($this->_isLoaded()) {\n $this->db->where('id', $this->id);\n $this->db->update($this->tableName, $this->mapToDatabase());\n } else {\n throw new Exception(\"Model is not loaded\");\n }\n }", "public function update(User $user, User $model)\n {\n //\n }", "public function update($modelData) {\n// codigoCliente = ? ,\n// codigoPedido = ?, \n// monto = ? WHERE codigo = ?\"; \n// \n// $stmt = $this->mysql->getStmt($sql);\n// $stmt->bind_param(\"iidi\", $modelData['codigoCliente'], \n// $modelData['codigoPedido'], \n// $modelData['monto'],\n// $modelData['codigo']);\n// $stmt->execute();\n }", "public function save(Identifiable $model);", "public function update(EntityRequest $request, Entity $entity)\n {\n\n $entity->name = $request->name;\n $entity->social_denomination = $request->input('social_denomination');\n $entity->nif = $request->input('nif');\n $entity->type_company = $request->input('type_company');\n $entity->access_application = filter_var($request->input('access_application'), FILTER_VALIDATE_BOOLEAN);\n $entity->active = filter_var($request->input('ative'), FILTER_VALIDATE_BOOLEAN);\n $entity->updated_by = auth()->user()->id;\n\n $entity->update();\n\n return redirect()->route('entity.show', $entity->id);\n }", "protected function entityUpdate(Array $data){\n // TODO: deal with errors\n // update model\n $updated = $this->resourceService()->update($this->getId(), $data);\n if(isset($updated['data'])){\n // return updated model\n return new LaravelCollection($updated['data']);\n }\n \\Log::error($updated);\n }", "function update($where) {\n}", "public function update(Entity $user)\n {\n $model = $this->model->newInstance($user->toArray(), true);\n $model->id = $user->id;\n\n return $user->getDirtyAttributes() ? $model->save() : $model->touch();\n }", "public function update(array $data){\n $entity = $this->em->getReference($this->entity, $data['id']);\n //Peguei o que eu precisava, agora � necessario pupular o registro com os dados que vieram\n //do array data. E para isso vamos usar o hidrator.\n //Populando o entity\n (new Hydrator\\ClassMethods())->hydrate($data,$entity);\n \n $this->em->persist($entity);\n $this->em->flush();\n return $entity;\n }", "public function update(Request $request, FormModel $formModel)\n {\n //\n }", "public function transform(Model $model): EntityInterface;", "private function _updateModel($model, $data) {\n\t\t\n\t\t$changeAttributes = array();\n\t\t\n\t\tforeach($data as $attr=>$value){\n\t\t\tif($value['value'] || $value['replace']) {\n\t\t\t\t\t$changeAttributes[$value['name']] = $value['value'];\n\t\t\t}\n\t\t}\n\n\t\t$model->setAttributes($changeAttributes);\n\t\t\n\t\treturn $model->save();\n\t}", "private function updateEntity(Site $siteService) {\n //We don't currently allow any access to unauthenticated users, so for now\n //we can simply refuse unauthenticated users. In the future we could look\n //to authenticate everything except 'GET' requests and then process 'GETs'\n //on a case by case basis.\n $this->checkUserAuthenticated();\n\n\n switch($this->entityType) {\n case 'site': {\n $this->updateSite($siteService);\n break;\n }\n case 'service': {\n $this->updateService($siteService);\n break;\n }\n case 'endpoint': {\n $this->updateEndpoint($siteService);\n break;\n }\n default: {\n $this->exceptionWithResponseCode(501,\n \"Updating \" . $this->entityType. \"s is not currently supported \" .\n \"through the API, for details of the currently supported methods \" .\n \"see: $this->docsURL\"\n );\n }\n }\n\n #TODO: return the entity that's been changed or created as $this->returnObject,\n # for now just return the no content http code (delete operations should\n # return nothing and a 204, others should return the changed object and a 200)\n $this->httpResponseCode = 204;\n }", "public function update(Model $model, $fields = null, $values = null, $conditions = null) {\n\t\t$this->create($model, $fields, $values);\n\t}", "public function updateEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function updateEntityData(EntityData $entityData);", "public function update($data) {}", "public function update($data) {}", "public function update(int $id, array $attributes): Model;", "function updateEntity($args = array(), $entity = '', $fields = array(),\n $where = array(), $notequal = array())\n {\n // $setParams = $args['setParams'];\n $setParams = array();\n $entity = (isset($args ['entity']) && !empty($args ['entity'])) ? $args ['entity']\n : $entity;\n $fields = (isset($args ['fields']) && !empty($args ['fields'])) ? $args ['fields']\n : $fields;\n $where = $this->generateWhere((isset($args ['where']) && !empty($args ['where']))\n ? $args ['where'] : $where, null,\n (isset($args ['notequal']) && !empty($args ['notequal'])) ? $args ['notequal']\n : $notequal );\n $items = '';\n foreach ($fields as $fkey => $fval) {\n // $items .= \"a.\" . $fkey . \"=\" . \"'$fval'\" . ',';\n $items .= \"a.\".$fkey.\"=\".\":$fkey\".',';\n $setParams [$fkey] = $fval;\n }\n // echo $items; exit;\n // echo \"<pre>\"; print_r($setParams); echo \"</pre>\"; exit;\n $items = substr($items, 0, - 1);\n\n $setParams += $where ['setParams'];\n // echo \"<pre>\"; print_r($setParams); echo \"</pre>\"; exit;\n // $where = $this->generateWhere($args['where']);\n $query = \"UPDATE $entity a SET $items WHERE \".$where ['where'];\n // echo $query; exit;\n $q = $this->_em->createQuery($query);\n $q->setParameters($setParams);\n $numUpdated = $q->execute();\n // return $numUpdated;\n return true;\n }", "abstract public function save(Model $model);", "public function save($model);", "public function update(AbstractEntity $entity)\n {\n throw new \\Exception('Please override this method in your own repository');\n }", "public function flush($model)\n {\n $class = \\is_object($model) ? \\get_class($model) : false;\n if ($class) {\n $query = $this->client->createUpdate();\n $query->addDeleteQuery(\"_class:{$class}\");\n $query->addCommit();\n $this->client->update($query);\n }\n }", "function mongo_node_mass_update($entity_type, $entities, $args) {\n foreach ($entities as $entity_id) {\n $entity = entity_get_controller($entity_type)->load(array($entity_id));\n $entity = reset($entity);\n // Skip if not updates.\n if (!isset($args['updates'])) {\n continue;\n }\n foreach ($args['updates'] as $p_name => $p_val) {\n $entity->$p_name = $p_val;\n }\n entity_save($entity_type, $entity);\n }\n}", "public function updateModelSync($model)\n {\n\t$this->query('update [tables] set [hash] = %s where [name] = %s',\n\t$model->getHash(),\n\t$model->getTableName()\n\t);\n }", "public function update($record);", "public function updateUseModel($model, $requestData, $merge_data_with = [])\n {\n $model->fill(array_merge($requestData, $merge_data_with));\n $model->save();\n return $model;\n }", "public function update( \\Contracts\\EntityInterface $entity )\n {\n if ( isset( $entity->id ) ) {\n\n // Get the original entity from storage\n $originalEntity = $this->select( \"*\" )\n ->whereColumnValue( \"id\", \"=\", $entity->id )\n ->execute( \"entity\" );\n\n // If the original entity return from storage is null, throw exception.\n if ( !is_null( $originalEntity ) ) {\n\n // Determine which properties have been changed from the original\n // entity and save them to an array\n $props = get_object_vars( $originalEntity );\n $propsToUpdate = [];\n\n foreach ( $props as $prop => $originalValue ) {\n if ( $entity->$prop != $originalValue ) {\n $propsToUpdate[ $prop ] = $entity->$prop;\n }\n }\n\n if ( !empty( $propsToUpdate ) ) {\n $this->updateColumns( $propsToUpdate, [ \"id\" => $entity->id ] );\n }\n\n return $entity;\n }\n\n // Throw exception if the object return from storage was null\n throw new \\Exception( \"Entity does not exist to be updated.\" );\n }\n\n throw new \\Exception( \"Entity must have an 'id' in order be updated.\" );\n }", "abstract protected function updateResponse(Model $data);", "public function setUpdate($model) {\n $id = $model->get('id');\n $newmovementtype = $model->get('movementtype');\n $newreleasestype = $model->get('releasestype');\n\n $data = array(\"query\"=>$id);\n\n $masterCoach = new \\iSterilization\\Coach\\armorymovement();\n $detailCoach = new \\iSterilization\\Coach\\armorymovementitem();\n $master = self::jsonToObject($masterCoach->getStore()->select());\n $detail = self::jsonToObject($detailCoach->getStore()->getCache()->selectItem($data));\n\n if(count($detail->rows) == 0 && $newreleasestype != \"C\") {\n throw new \\PDOException(\"O Movimento não pode ser encerrado pois <b>não existem lançamentos!</b>\");\n }\n\n $oldreleasestype = $master->rows[0]->releasestype;\n\n if($oldreleasestype !== $newreleasestype && $newreleasestype == \"E\") {\n\n $closeddate = date(\"Ymd H:i:s\");\n $model->set('closeddate',$closeddate);\n\n $proxy = $masterCoach->getStore()->getProxy();\n $stock = new \\iSterilization\\Coach\\armorystock();\n $output = new \\iSterilization\\Coach\\armorymovementoutput();\n\n try {\n $proxy->beginTransaction();\n\n if($newmovementtype == '002') {\n\n $boxsealone = $model->getSubmit()->getRowValue('boxsealone');\n $boxsealtwo = $model->getSubmit()->getRowValue('boxsealtwo');\n $transportedby = $model->getSubmit()->getRowValue('transportedby');\n\n $output->getStore()->setProxy($proxy);\n $output->getStore()->getModel()->set('id',$id);\n $output->getStore()->getModel()->set('boxsealone',$boxsealone);\n $output->getStore()->getModel()->set('boxsealtwo',$boxsealtwo);\n $output->getStore()->getModel()->set('transportedby',$transportedby);\n $result = self::jsonToObject($output->getStore()->update());\n\n if(!$result->success) {\n throw new \\PDOException($result->text);\n }\n }\n\n foreach ($detail->rows as $item) {\n $armorylocal = $item->armorylocal;\n $flowprocessingstepid = $item->flowprocessingstepid;\n\n if($newmovementtype == '001') {\n $stock->getStore()->setProxy($proxy);\n $stock->getStore()->getModel()->set('id','');\n $stock->getStore()->getModel()->set('flowprocessingstepid',$flowprocessingstepid);\n $stock->getStore()->getModel()->set('armorylocal',$armorylocal);\n $stock->getStore()->getModel()->set('armorystatus','A');\n $result = self::jsonToObject($stock->getStore()->insert());\n\n if(!$result->success) {\n throw new \\PDOException($result->text);\n }\n\n $sql = \"\n declare\n @flowprocessingid int,\n @flowprocessingstepid int = :flowprocessingstepid;\n\n select\n @flowprocessingid = flowprocessingid\n from\n flowprocessingstep\n where id = @flowprocessingstepid;\n\n update flowprocessing set flowstatus = 'E' where id = @flowprocessingid;\n\n update flowprocessingstepaction set isactive = 0 where flowprocessingstepid = @flowprocessingstepid;\";\n\n $pdo = $proxy->prepare($sql);\n $pdo->bindValue(\":flowprocessingstepid\", $flowprocessingstepid, \\PDO::PARAM_INT);\n $callback = $pdo->execute();\n\n if(!$callback) {\n throw new \\PDOException(self::$FAILURE_STATEMENT);\n }\n }\n\n if($newmovementtype == '002') {\n $sql = \"\n declare\n @flowprocessingstepid int = :flowprocessingstepid;\n\n update\n armorystock\n set \n armorystatus = 'E'\n where flowprocessingstepid = @flowprocessingstepid\";\n\n $pdo = $proxy->prepare($sql);\n $pdo->bindValue(\":flowprocessingstepid\", $flowprocessingstepid, \\PDO::PARAM_INT);\n $callback = $pdo->execute();\n\n if(!$callback) {\n throw new \\PDOException(self::$FAILURE_STATEMENT);\n }\n }\n\n if($newmovementtype == '003') {\n $sql = \"\n declare\n @armorylocal char(3) = :armorylocal,\n @flowprocessingstepid int = :flowprocessingstepid;\n\n update\n armorystock\n set\n armorystatus = 'A'\n where flowprocessingstepid = @flowprocessingstepid\n and armorystatus = 'E'\n and armorylocal = @armorylocal\";\n\n $pdo = $proxy->prepare($sql);\n $pdo->bindValue(\":armorylocal\", $armorylocal, \\PDO::PARAM_STR);\n $pdo->bindValue(\":flowprocessingstepid\", $flowprocessingstepid, \\PDO::PARAM_INT);\n $callback = $pdo->execute();\n\n if(!$callback) {\n throw new \\PDOException(self::$FAILURE_STATEMENT);\n }\n }\n }\n\n $proxy->commit();\n\n } catch ( \\PDOException $e ) {\n if ($proxy->inTransaction()) {\n $proxy->rollBack();\n }\n throw new \\PDOException($e->getMessage());\n }\n }\n }", "public function update(IModel $target, array $values, $primary);", "public function update(Request $request, Modelo $modelo)\n {\n //\n }", "public function update($object): void;", "public function test_model_relation_handler_update()\n {\n $model = Individual::create([\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n ]);\n QueryableRelations::new($model)->create(['member'], [\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n 'member' => [\n 'phonenumber' => '407-925-1076',\n 'email' => '[email protected]',\n ],\n ]);\n QueryableRelations::new($model)->update(['member'], [\n 'member' => [\n 'email' => '[email protected]',\n ],\n ], true);\n $member = Member::where('email', '[email protected]')->get()->first();\n $this->assertNotNull($member);\n $this->assertSame($model->getKey(), $member->distinctable_id);\n }", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function update($obj)\n {\n }", "public function actionUpdate() {\n $json = file_get_contents('php://input'); //$GLOBALS['HTTP_RAW_POST_DATA'] is not preferred: http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data\n $put_vars = CJSON::decode($json, true); //true means use associative array\n switch ($_GET['model']) {\n // Find respective model\n case 'Order':\n $model = Order::model()->findByPk($_GET['id']);\n break;\n case 'Users':\n $model = Users::model()->findByPk($_GET['id']);\n break;\n case 'Product':\n $model = Product::model()->findByPk($_GET['id']);\n break;\n case 'Vendor':\n $model = Vendor::model()->findByPk($_GET['id']);\n break;\n case 'FavoriteProduct':\n $model = FavoriteProduct::model()->findByPk($_GET['id']);\n break;\n case 'Rating':\n $model = Rating::model()->findByPk($_GET['id']);\n break;\n case 'Review':\n $model = Review::model()->findByPk($_GET['id']);\n break;\n case 'UserAddress':\n $model = UserAddress::model()->findByPk($_GET['id']);\n break;\n case 'OrderDetail':\n $model = OrderDetail::model()->findByPk($_GET['id']);\n break;\n default:\n $this->_sendResponse(0, sprintf('Error: Mode update is not implemented for model ', $_GET['model']));\n Yii::app()->end();\n }\n // Did we find the requested model? If not, raise an error\n if ($model === null)\n $this->_sendResponse(0, sprintf(\"Error: Didn't find any model with ID .\", $_GET['model'], $_GET['id']));\n\n // Try to assign PUT parameters to attributes\n unset($_POST['id']);\n foreach ($_POST as $var => $value) {\n // Does model have this attribute? If not, raise an error\n if ($model->hasAttribute($var))\n $model->$var = $value;\n else {\n $this->_sendResponse(0, sprintf('Parameter %s is not allowed for model ', $var, $_GET['model']));\n }\n }\n // Try to save the model\n if ($model->update())\n $this->_sendResponse(1, '', $model);\n else\n $this->_sendResponse(0, $msg);\n // prepare the error $msg\n // see actionCreate\n // ...\n }", "public function testUpdate(): void\n {\n $this->markTestSkipped('Skipping as PostsService::update() is not yet ready for prod/testing');\n// $belongsToMany = $this->mock(BelongsToMany::class, static function ($mock) {\n// $mock->shouldReceive('sync');\n// });\n//\n// $mockedModel = $this->mock(Post::class, static function ($mock) use ($belongsToMany) {\n// $mock->shouldReceive('fill')->once();\n// $mock->shouldReceive('save')->once();\n// $mock->shouldReceive('categories')->andReturn($belongsToMany);\n// });\n//\n// $this->mock(PostsRepository::class, static function ($mock) use ($mockedModel) {\n// $mock->shouldReceive('find')->once()->andReturn($mockedModel);\n// });\n//\n// $this->mock(UploadsService::class, static function ($mock) {\n// $mock->shouldReceive('processFeaturedUpload')->once();\n// });\n//\n// $service = resolve(PostsService::class);\n//\n// $request = $this->createRequest($this->createParams());\n//\n// $this->expectsEvents(BlogPostEdited::class);\n//\n// $service->update(1, $request);\n }", "public function update() {\r\n\t\t$this->getMapper()->update($this);\r\n\t}", "public function Update($data) {\n\n }", "public function readFromModel($entity);", "public function update($article);" ]
[ "0.74115294", "0.74115294", "0.71164316", "0.706642", "0.7039792", "0.6995776", "0.69682", "0.68942565", "0.6874243", "0.6826137", "0.6796669", "0.67930496", "0.6779532", "0.6744282", "0.6704778", "0.6573136", "0.6553765", "0.65467274", "0.64862984", "0.6480552", "0.6440242", "0.6398796", "0.63735855", "0.63453364", "0.62819153", "0.62747073", "0.6236434", "0.6227009", "0.62265337", "0.6221121", "0.61828613", "0.61656773", "0.6145768", "0.6139792", "0.6139792", "0.6139792", "0.6122147", "0.6120726", "0.6104393", "0.60848653", "0.60581654", "0.6031282", "0.6016422", "0.6012244", "0.60116494", "0.5947978", "0.593725", "0.59254473", "0.5915801", "0.59055936", "0.590353", "0.58802646", "0.58690214", "0.58497304", "0.58486867", "0.5846944", "0.5842618", "0.5840716", "0.5802147", "0.5800346", "0.5798324", "0.57767683", "0.57745034", "0.5771915", "0.5763882", "0.57446796", "0.57444876", "0.5743415", "0.57432276", "0.57087684", "0.5704487", "0.57044184", "0.56991154", "0.5697287", "0.5690845", "0.5690845", "0.5682815", "0.56788516", "0.5667958", "0.5662057", "0.5661781", "0.5654424", "0.5643369", "0.5640582", "0.56319684", "0.562473", "0.5611153", "0.56071347", "0.5596121", "0.5594869", "0.5592163", "0.5574362", "0.5570374", "0.5567084", "0.55584186", "0.5553773", "0.55429536", "0.55411965", "0.5540935", "0.5531792", "0.5523153" ]
0.0
-1
Create or update a record matching the attributes, and fill it with values.
public function updateOrCreate(array $attributes, array $values = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateOrCreateRecord(array $record) {\n /** @var CmfDbModel|KeyValueModelHelpers $this */\n if (empty($record['key'])) {\n throw new DbModelException($this, '$record does not contain [key] key or its value is empty');\n } else if (!array_key_exists('value', $record)) {\n throw new DbModelException($this, '$record does not contain [value] key');\n }\n $conditions = [\n 'key' => $record['key']\n ];\n $fkName = $this->getMainForeignKeyColumnName();\n if (!empty($fkName)) {\n if (empty($record[$fkName])) {\n throw new DbModelException($this, \"\\$record does not contain [{$fkName}] key or its value is empty\");\n }\n $conditions[$fkName] = $record[$fkName];\n }\n $object = $this->getOwnDbObject()->find($conditions);\n if ($object->exists()) {\n return $object\n ->begin()\n ->_setFieldValue('value', $record['value'])\n ->commit();\n } else {\n return $object\n ->reset()\n ->fromData($record)\n ->save();\n }\n }", "public function updateRecord() {\n $model = self::model()->findByAttributes(array('id_customer' => $this->id_customer, 'id_supplier' => $this->id_supplier));\n\n //model is new, so create a copy with the keys set\n if (null === $model) {\n //we don't use clone $this as it can leave off behaviors and events\n $model = new self;\n $model->id_customer = $this->id_customer;\n $model->id_supplier = $this->id_supplier;\n }\n $model->save(false);\n return $model;\n }", "public function updateOrCreate(array $attributes, array $values);", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "public function prepAttributesForSave()\n\t{\n\t\t$attributes = $this->defineAttributes();\n\t\t$attributes['dateUpdated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\t\t$attributes['dateCreated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\t\t\t$value = $this->getAttribute($name);\n\n\t\t\t$this->setAttribute($name, ModelHelper::packageAttributeValue($config, $value, true));\n\t\t}\n\n\t\t// Populate dateCreated and uid if this is a new record\n\t\tif ($this->isNewRecord())\n\t\t{\n\t\t\t$this->dateCreated = DateTimeHelper::currentTimeForDb();\n\t\t\t$this->uid = StringHelper::UUID();\n\t\t}\n\n\t\t// Update the dateUpdated\n\t\t$this->dateUpdated = DateTimeHelper::currentTimeForDb();\n\t}", "private function add_record_or_update_record() {\n\t\t\t$this->before_custom_save();\n\t\t\t$this->before_save();\n\t\t\tif($this->new_record) {\n\t\t\t\t$this->before_create();\n\t\t\t\t$result = $this->add_record();\n\t\t\t\t$this->after_create();\n\t\t\t} else {\n\t\t\t\t$this->before_update();\n\t\t\t\t$result = $this->update_record();\n\t\t\t\t$this->after_update();\n\t\t\t}\n\t\t\t$this->after_save();\n\n\t\t\t// init user custom cache\n\t\t\tif (is_array($this->cache)) {\n\t\t\t\t$this->rebuild_cache();\n\t\t\t}\n\n\t\t\tif($this->blob_fields) {\n\t\t\t\t$this->update_blob_fields();\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "public static function populateRecord($record, $row)\n {\n $columns = array_flip($record->attributes());\n foreach ($row as $name => $type_value) {\n $value=current($type_value);\n if (isset($columns[$name])) {\n $record->setAttribute($name, $value);\n $record->setOldAttribute($name,$value);\n } elseif ($record->canSetProperty($name)) {\n $record->$name = $value;\n }\n }\n\n\n }", "public function update($record);", "public function updateOrCreate(array $primaryKeys = [], $values = [])\n {\n $instance = $this->where($primaryKeys)->first();\n $instance->fill($values)->save();\n\n return $instance;\n }", "public function update($values=''){\n\t\t$this->_connect();\n\t\t$numberArguments = func_num_args();\n\t\t$values = Utils::getParams(func_get_args(), $numberArguments);\n\t\tif(is_array($values)){\n\t\t\tforeach($values as $key => $value){\n\t\t\t\tif(isset($this->$key)){\n\t\t\t\t\t$this->$key = $value;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new ActiveRecordException('No existe el atributo \"'.$key.'\" en la entidad \"'.$this->_source.'\" al ejecutar la inserción');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->_exists()==true){\n\t\t\t\treturn $this->save();\n\t\t\t} else {\n\t\t\t\t$this->appendMessage('', 'No se puede actualizar porque el registro no existe');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif($this->_exists()==true){\n\t\t\t\treturn $this->save();\n\t\t\t} else {\n\t\t\t\t$this->appendMessage('', 'No se puede actualizar porque el registro no existe');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public static function prepare($record) {\n $fieldRepo = Field::getRepository();\n /**\n * @var FieldEntity[] $fields\n */\n $fields = $fieldRepo->findBy(['is_hidden' => false, 'organisation' => Apollo::getInstance()->getUser()->getOrganisationId()]);\n /**\n * @var FieldEntity $field\n */\n foreach($fields as $field) {\n $record->findOrCreateData($field->getId());\n }\n }", "public function create_record() {\n $class = get_called_class();\n\n if ($this->does_exist()) {\n return false;\n }\n\n $db = DB::connect();\n\n $attributes = '';\n $values = '';\n\n // Loop through all the attributes to get the attributes and values\n foreach (get_object_vars($this) as $key => $value) {\n // We dont add the id of the object, as it is autoincremented\n if ($value == null) {\n continue;\n }\n\n $attributes = $attributes . \" $key,\";\n\n // We cannot add an object to sql statemnt. if the value is an object, get the id of it\n if (gettype($value) == 'object') {\n $value = $value->id;\n } elseif (gettype($value) === 'string') {\n $value = \"'\" . $value . \"'\";\n }\n\n $values = $values . \" $value,\";\n\n }\n\n // Delete the last comma\n $attributes = substr_replace($attributes, \" \", -1);\n $values = substr_replace($values, \" \", -1);\n\n $sql = $db->prepare(\"INSERT INTO \" . $class . \" (\" . $attributes . \") VALUES (\" . $values . \")\");\n $sql->execute();\n\n return true;\n }", "protected function _create()\n {\n $entry = $this->_db->createRow();\n foreach ($this->getFields() as $key => $value) {\n $entry->{$key} = $value;\n }\n return $entry->save();\n }", "public static function updateOrCreate(array $attributes, array $values = array())\n {\n $instance = static::firstOrNew($attributes);\n\n $instance->fill($values)->save();\n\n return $instance;\n }", "private function crud_put($record = null)\n {\n $key = $record['id'];\n // Make sure the new record has an ID\n if (!isset($key))\n {\n $this->response(array('error' => 'Update: No item specified'), 406);\n return;\n }\n // make sure the item is real\n if (!$this->supplies->exists($key))\n {\n $this->response(array('error' => 'Update: Item ' . $key . ' not found'), 406);\n return;\n }\n // proceed with update\n $this->supplies->update($record);\n // check for DB errors\n $oops = $this->db->error();\n if (empty($oops['code']))\n $this->response(array('ok'), 200);\n else\n $this->response($oops, 400);\n }", "public function updateOrCreate(array $attributes, array $values){\n $results = $this->entity->updateOrCreate($attributes, $values);\n $this->reset();\n return $results;\n }", "public function create($values=''){\n\t\t$this->_connect();\n\t\t$primaryKeys = $this->_getPrimaryKeyAttributes();\n\t\tif(is_array($values)){\n\t\t\t$fields = $this->getAttributes();\n\t\t\tif(isset($values[0])&&is_array($values[0])){\n\t\t\t\tforeach($values as $value){\n\t\t\t\t\tforeach($fields as $field){\n\t\t\t\t\t\t$this->$field = '';\n\t\t\t\t\t}\n\t\t\t\t\tforeach($value as $key => $r){\n\t\t\t\t\t\tif(isset($this->$key)){\n\t\t\t\t\t\t\t$this->$key = $r;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new ActiveRecordException('No existe el Atributo \"'.$key.'\" en la entidad \"'.get_class($this).'\" al ejecutar la inserción');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($primaryKeys[0]=='id'){\n\t\t\t\t\t\t$this->id = null;\n\t\t\t\t\t}\n\t\t\t\t\treturn $this->save();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach($fields as $f){\n\t\t\t\t\t$this->$f = '';\n\t\t\t\t}\n\t\t\t\tforeach($values as $key => $r){\n\t\t\t\t\tif(isset($this->$key)){\n\t\t\t\t\t\t$this->$key = $r;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new ActiveRecordException('No existe el atributo \"'.$key.'\" en la entidad \"'.$this->_source.'\" al ejecutar la inserción');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($primaryKeys[0]=='id'){\n\t\t\t\t\t$this->id = null;\n\t\t\t\t}\n\t\t\t\treturn $this->save();\n\t\t\t}\n\t\t} else {\n\t\t\tif($values!==''){\n\t\t\t\tthrow new ActiveRecordException(\"Parámetro incompatible en acción 'create'. No se pudo crear ningún registro\");\n\t\t\t} else {\n\t\t\t\t//Detectar campo autonumérico\n\t\t\t\t$this->_forceExists = true;\n\t\t\t\tif($primaryKeys[0]=='id'){\n\t\t\t\t\t$this->id = null;\n\t\t\t\t}\n\t\t\t\treturn $this->save();\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function updateOrCreate(array $attributes, array $values = [])\n {\n return $this->model->updateOrCreate($attributes, $values);\n }", "public function update() {\n // Get the values that are currently in the database\n $curr_vals = $this->read_single();\n\n // Set the values that will be added to the table\n foreach ($curr_vals as $key => $value) {\n // Convert key from the Database's capitalization to\n // this model's attribute capitalization style (all lowercase)\n $local_key = strtolower($key);\n // If user didn't specify property\n if (($this->attr[$local_key] === \"\") || ($this->attr[$local_key] === null)){\n // Then use the value that's already in the database\n $this->attr[$local_key] = $curr_vals[$key];\n }\n }\n\n // Create query\n $query = \"UPDATE \" . $this->table .\n \" SET = \" .\n \" WHERE MID = :mid AND Spot = :spot \";\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the data (reduce malicious SQL injection, etc.)\n foreach ($this->attr as $key => $value) {\n $this->attr[$key] = htmlspecialchars(strip_tags($value));\n }\n \n // Bind the data to a variable for an SQL attribute\n foreach ($this->attr as $key => $value) {\n $stmt->bindValue((\":\" . $key), $value);\n }\n\n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "public static function updateOrCreateRecord(array $data): RecordInterface\n {\n $success = KeyValueTableHelpers::updateOrCreateRecord($data);\n /** @var LaravelKeyValueTableInterface $table */\n $table = static::getInstance();\n $fkName = $table->getMainForeignKeyColumnName();\n static::cleanCachedValues(empty($fkName) ? null : $data[$fkName]);\n return $success;\n }", "public function updateOrCreate(array $attributes, array $values = [])\n {\n // $this->applyScope();\n\n // if (!is_null($this->validator)) {\n // $this->validator->with(array_merge($attributes, $values))->passesOrFail(ValidatorInterface::RULE_CREATE);\n // }\n\n // $temporarySkipPresenter = $this->skipPresenter;\n\n // $this->skipPresenter(true);\n\n // event(new RepositoryEntityCreating($this, $attributes));\n\n $model = $this->model->updateOrCreate($attributes, $values);\n\n // $this->skipPresenter($temporarySkipPresenter);\n $this->resetModel();\n\n // event(new RepositoryEntityUpdated($this, $model));\n\n return $model;\n }", "public function update(){\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = implode(', ', array_map(fn($name) => $name . ' = :' . $name, $fields));\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\t$where = $primaryKey . ' = :' . $primaryKey;\n\t\t$statement = $this->db->prepare('UPDATE ' . $tableName . ' SET ' . $params . ' WHERE ' . $where);\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\t$statement->bindValue(':' . $primaryKey, $this->{$primaryKey});\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function save() {\n\t\tif( $this->isAddingNew() ) {\n\t\t\t//Insert record\n\t\t\t$key = $this->getConnection()->insert( $this->_updateBuffer, $this );\n\n\t\t\t//remove all state from this object (including isAddingNew)\n\t\t\t$this->clear();\n\n\t\t\t//Pull just this new record\n\t\t\t$method = \"where\" . $this->getTable()->getPrimaryKey();\n\t\t\t$this->$method( $key );\n\t\t} else {\n\t\t\t$updatedRecord = $this->getConnection()->update( $this->_updateBuffer, $this );\n\t\t\t$this->_recordset[ $this->_currentRow ] = $updatedRecord[0];\n\t\t}\n\n\t\t$this->_updateBuffer = array();\n\t\treturn $this;\n\t}", "function InsertOrUpdateRecord2($oDB, $tableName, $idFieldName, $itemID, $values)\n{\n if ($itemID == -1)\n {\n // --- Record doesn't exist yet. Build INSERT query to create new record \n $sql=\"INSERT INTO $tableName (\";\n foreach($values as $colname => $value)\n {\n $sql .= $colname . \",\";\n }\n $sql = substr($sql, 0, -1); // trim last \",\" from string\n $sql .= \") VALUES(\";\n foreach($values as $colname => $value)\n {\n $sql .= $value . \",\";\n }\n $sql = substr($sql, 0, -1); // trim last \",\" from string\n $sql .= \")\";\n // --- execute query\n $oDB->query($sql);\n // --- store ID of new item in result\n $result[$idFieldName] = $oDB->insert_id;\n // --- record activity\n $oDB->RecordActivityIfOK(\"Add [$tableName]\", $result[$idFieldName]);\n }\n else\n {\n // --- Record already exists. Build update query to update existing record\n $sql = \"UPDATE $tableName SET \";\n foreach($values as $colname => $value)\n {\n $sql .= \"$colname = $value, \";\n }\n $sql = substr($sql, 0, -2); // trim last \", \" from string\n $sql .= \" WHERE $idFieldName=$itemID\";\n // --- execute query\n $oDB->query($sql);\n // --- store ID of existing item in result\n $result[$idFieldName] = $itemID;\n // --- record activity\n $oDB->RecordActivityIfOK(\"Update [$tableName]\", $result[$idFieldName]);\n }\n// --- check result of SQL operation\n if($oDB->errno!=0)\n {\n $result['success'] = false;\n $result['message'] = \"[\" . $oDB->errno . \"] SQL Error\";// . $oDB->error;\n // --- needed so Ext returns failureType of 'server' (FYI: could also be used to do server-side field validation)\n $result['errors'][] = array('id' => 'CtrlID', 'msg' => 'Error Msg' );\n }\n else\n {\n $result['success'] = true;\n }\n return($result);\n}", "public function createUpdateStruct();", "function create_or_update($name,$data) {\n return $this->save($name,$data);\n }", "public function testUpdateSingleRecord() {\r\n // Create record\r\n $po = new test_persistence_AbstractPersistenceAdapterTestPersistentObject();\r\n $po->booleanValue = true;\r\n $po->intValue = 2147483647;\r\n $po->stringValue = 'Hallo Welt!';\r\n // Store new record\r\n $this->getPersistenceAdapter()->save($po);\r\n // Remember UUID\r\n $uuid = $po->uuid;\r\n // Update values;\r\n $po->booleanValue = false;\r\n $po->intValue = -2147483646;\r\n $po->stringValue = 'Guten Morgen!';\r\n // Update record\r\n $this->getPersistenceAdapter()->save($po);\r\n // Get record back from database\r\n $result = $this->executeQuery('select * from POTEST where UUID=\\''.$uuid.'\\'');\r\n // Records must be unique\r\n $this->assertEquals($po->booleanValue, (bool)$result[0]['BOOLEAN_VALUE'], 'Boolean value from database differs from the boolean value of the persistent object.');\r\n $this->assertEquals($po->intValue, intval($result[0]['INT_VALUE']), 'Integer value from database differs from the int value of the persistent object.');\r\n $this->assertEquals($po->stringValue, $result[0]['STRING_VALUE'], 'String value from database differs from the string value of the persistent object.');\r\n }", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "abstract public function setRecordEntity();", "public function updateOrCreate(array $attributes, array $values = [])\n {\n $result = $this->_model->updateOrCreate($attributes, $values);\n\n return $result;\n }", "protected function update()\n\t{\n\t\t$set = array();\n\t\tforeach( $this->attributes as $column => $value )\n\t\t{\n\t\t\t$set[] = \"`$column`=?\";\n\t\t}\n\t\t$set = implode(\",\", $set);\n\t\t\n\t\t$methodAttributes = array_values( $this->attributes );\n\t\t// add first method attribute - query\n\t\tarray_unshift($methodAttributes, \"UPDATE `\" . static::$table . \"` SET $set WHERE `\" . static::$primaryKey . \"` = ?\");\n\t\t// add last method attribute - primaryKey to WHERE\n\t\t$methodAttributes[] = $this->attributes[static::$primaryKey];\n\t\t\n\t\t// inserting\n\t\treturn call_user_func_array(\"Database::update\", $methodAttributes);\n\t}", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "public static function populate($record) {\n\t\t\n\t\tif(empty($record)) {\n\t\t\treturn $record;\n\t\t}\n\n\t\t$catId = $record->getCatId();\n\t\t$tmdbId = $record->getTmdbId();\n\t\t$imdbId = $record->getImdbId();\n\t\t$title = $record->getTitle();\n\n\t\tif(empty($catId)) {\n\t\t\treturn $record;\n\t\t}\n\n\t\tif(empty($tmdbId)) {\n\t\t\tif(!empty($imdbId)) {\n\t\t\t\t$tmdbId = Lookup::getTmdbIdUsingImdbId($imdbId);\n\t\t\t\t$record->setTmdbId($tmdbId);\n\t\t\t} else {\n\t\t\t\t$tmdbId = Lookup::getTmdbId($catId, $title);\n\t\t\t\t$record->setTmdbId($tmdbId);\n\t\t\t}\n\t\t}\n\n\t\tif(empty($imdbId)) {\n\t\t\t$imdbId = Lookup::getImdbId($tmdbId);\n\t\t\t$record->setImdbId($imdbId);\n\t\t}\n\t\t\n\t\treturn $record;\n\n\t}", "abstract public function updateRecord($tableName, $record, $where = '');", "protected function _update() {\n $this->_getDef();\n \n //prepare\n foreach ($this->_tableData as $field) {\n if($field['primary']) {\n $primaryKey = $field['field_name'];\n $primaryValue = $this->$primaryKey;\n continue;\n }\n \n $sql_fields[] = '`' . $field['field_name'] . '` =?';\n \n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n if($this->$field_name instanceof \\DateTime){\n $$field_name = $this->$field_name->format('Y-m-d H:i:s');\n } elseif(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n } else {\n $$field_name = $this->$field_name;\n }\n \n $values[] = $$field_name;\n }\n \n $values[] = $primaryValue;\n \n $sql = \"UPDATE `{$this->_table}` SET \" . implode(',', $sql_fields) . \" WHERE `{$primaryKey}` =?\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $this->setLastError(NULL);\n if($stmt->error !== ''){\n $this->setLastError($stmt->error);\n }\n \n $stmt->close();\n \n return $this->getLastError() === NULL ? true : false;\n }", "static function createOrReplaceWith($fields) {\r\n return static::make($fields)->createOrReplace();\r\n }", "public function save() {\n return $this->{static::$primaryKey} === null? $this->create() : $this->update();\n }", "function update($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\t\t// update the collection appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\tif (isset($this->_data[$key]))\n\t\t{\n\t\t\t$this->_data[$key] = $record;\n\t\t\t$this->store();\n\t\t}\n\t}", "public function Create($params = array()) \n { \n $this->Update($params); \n }", "public function Create($params = array()) \n { \n $this->Update($params); \n }", "public function setRecordAttributes(Model &$record, array $definition, array $defaultAttributes);", "public function save()\n {\n // that is already in this database using the current IDs in this \"where\"\n // clause to only update this model. Otherwise, we'll just insert them.\n if ($this->exists) {\n $saved = $this->newBuilder()->where('_id', $this->convertToMongoId($this->attributes['_id']))->update($this->attributes);\n }\n // If the model is brand new, we'll insert it into our database and set the\n // ID attribute on the model to the value of the newly inserted row's ID\n // which is typically an auto-increment value managed by the database.\n else {\n $saved = $this->newBuilder()->insert($this->attributes);\n }\n\n // TODO: fill() attributes will new or updated values.\n\n return $saved;\n }", "private function saveRecord(array &$record, array $primaryKey): array\n {\n $status = [\n 'success' => true,\n 'pk_assigned' => null,\n 'invalid_fields' => [],\n ];\n\n // Determine if the primary key of the record is set.\n $pkSet = $this->isPrimaryKeySet($primaryKey, $record);\n\n // Reset the data in the model to contain only the data to be saved\n $this->wrapper->setData($record);\n\n // Execute all callbacks on the model\n $this->wrapper->preSaveCallback();\n if ($pkSet) {\n $this->wrapper->preUpdateCallback();\n } else {\n $this->wrapper->preCreateCallback();\n }\n\n // Validate the data\n $validity = $this->validate($pkSet ? self::MODE_UPDATE : self::MODE_SAVE);\n\n // Exit if data is invalid\n if ($validity !== true) {\n $status['invalid_fields'] = $validity;\n $status['success'] = false;\n\n return $status;\n }\n\n $record = $this->wrapper->getData();\n $record = reset($record) === false ? [] : reset($record);\n\n // Save any relationships that are attached to the data\n $relationships = $this->wrapper->getDescription()->getRelationships();\n $relationshipsWithData = [];\n\n foreach ($relationships ?? [] as $model => $relationship) {\n if (isset($record[$model])) {\n $relationship->preSave($record, $record[$model]);\n $relationshipsWithData[$model] = $relationship;\n }\n }\n\n // Assign the data to the wrapper again\n $this->wrapper->setData($record);\n\n // Update or save the data and run post callbacks\n if ($pkSet) {\n $this->adapter->update($record);\n $this->wrapper->postUpdateCallback();\n } else {\n $this->adapter->insert($record);\n $keyValue = $this->driver->getLastInsertId();\n $this->wrapper->{$primaryKey[0]} = $keyValue;\n $this->wrapper->postCreateCallback($keyValue);\n }\n $this->wrapper->postSaveCallback();\n\n // Reset the data so it contains any modifications made by callbacks\n $record = $this->wrapper->getData()[0];\n foreach ($relationshipsWithData as $model => $relationship) {\n $relationship->postSave($record);\n }\n\n return $status;\n }", "public function update(array $attributes = []): self\n {\n if (! $this->exists) {\n return false;\n }\n\n return $this->fill($attributes)->save();\n }", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function update() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t//check if record exists\r\n\t\t\tif(! $this->exists ()) {\r\n\t\t\t\techo \"Fatal Error: No record found with id of ($this->id)\";\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"UPDATE $this->sqlTable SET \";\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$sql .= \"lp_userid = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$sql .= \"lp_random = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$sql .= \"lp_deadline = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\r\n\t\t\t$sql = preg_replace ( '/, $/', '', $sql);\r\n\t\t\t$sql .= \" WHERE lp_id = ?\";\r\n\t\t\t$arrBindings[] = $this->id;\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "public final function update() {\n\t\t$properties = self::getProperties($this);\n\t\t$columns = array_keys($properties);\n\t\t$values = array_values($properties);\n\n\t\t$setArray = array();\n\t\tfor ($i = 0; $i < count($properties); $i++) {\n\t\t\t$column = $columns[$i];\n\t\t\tif (strcmp($column, $this->primaryField) == 0 ||\n\t\t\t\tin_array($column, $this->uniqueFields)\n\t\t\t) {\n\t\t\t\t// Remove the value for binding\n\t\t\t\tunset($values[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$setArray[] = $column . \" = ?\";\n\t\t}\n\n\t\t$sql = \"\n\tUPDATE\n\t\t\" . $this->table . \"\n\tSET\n\t\t\" . implode(\", \", $setArray) . \"\n\tWHERE\n\t\t\" . $this->primaryField . \" = ?\n\t;\";\n\t\t// Adds the primary key binding\n\t\t$values[] = $this->{$this->primaryField};\n\n\t\t$db = new MySQL();\n\t\t$statement = $db->prepare($sql);\n\t\t$status = $statement->execute($values);\n\t\t$statement = NULL;\n\n\t\treturn $status;\n\t}", "public function update(){\r\n\t\tif (!$this->hasChanged) return self::RES_UNCHANGED;\r\n\t\t$table = $this->getTable();\r\n\t\tif ($this->new){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the record doesn't exist.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\tif (!$table->hasPrimaryKey()){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the table does not have a primary key.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$where = array();\r\n\t\t$changeCount = 0;\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\tif ($value->hasChanged()){\r\n\t\t\t\t$vals[] = \"`$name` = \".$value->getSQLValue();\r\n\t\t\t\t$changeCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\t$where[] = \"`$name` = \".$this->values[$name]->getSQLValue();\r\n\t\t}\r\n\t\t$sql = 'UPDATE '.$this->getFullTableName().' SET '.implode(', ',$vals).' WHERE '.implode(' AND ',$where).' LIMIT 1';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to update record in '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public function createOrUpdate(array $data, $model=null);", "public function insert(){\r\n\t\tif (!$this->new){\r\n\t\t\tMessages::msg(\"Cannot insert {$this->getFullTableName()} record: already exists.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\t$vals[\"`$name`\"] = $value->getSQLValue();\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = 'INSERT INTO '.$this->getFullTableName().' ('.implode(', ',array_keys($vals)).') VALUES ('.implode(', ',$vals).')';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to insert record into '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t// Get this here, because getPrimaryKey can call other SQL queries and thus override this value\r\n\t\t$auto_id = SQL::getInsertId();\r\n\t\t\r\n\t\t$table = $this->getTable();\r\n\t\t// Load the AUTO_INCREMENT value, if any, before marking record as not new (at which point primary fields cannot be changed)\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\tif ($table->getColumn($name)->isAutoIncrement()){\r\n\t\t\t\t$this->$name = $auto_id;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->new = false;\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public function fill(array $attributes)\n {\n $this->saving = true;\n\n $totallyGuarded = $this->totallyGuarded();\n\n foreach ($attributes as $key => $values) {\n if ($this->isKeyALocale($key)) {\n foreach ($values as $translationAttribute => $translationValue) {\n if ($this->alwaysFillable() or $this->isFillable($translationAttribute)) {\n $this->getTranslationOrNew($key)->$translationAttribute = $translationValue;\n } elseif ($totallyGuarded) {\n throw new MassAssignmentException($key);\n }\n }\n unset($attributes[$key]);\n }\n }\n\n $result = parent::fill($attributes);\n\n $this->saving = false;\n\n return $result;\n }", "public function setPutData(Omeka_Record_AbstractRecord $record, $data)\r\n {\r\n // Set properties directly to an existing record.\r\n }", "public function createRecord();", "public function updateOrCreate(array $attributes, array $values = [])\n {\n $this->applyQueryScope();\n\n $model = $this->model->updateOrCreate($attributes, $values);\n\n $this->resetModel();\n\n event(new RepositoryEntityUpdated($this, $model));\n\n return $model;\n }", "function UpdateRecord($values)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n //dprint_r($_FILES);\n if ( !isset($values[$this->primarykey]) )\n return false;\n $unirecid = $values[$this->primarykey];\n return $this->UpdateRecordBypk($values,$this->primarykey,$values[$this->primarykey]);\n }", "public function updateAssociatedRecords()\n\t{\n\t\t$fkObject = $this->getContext()->getPropertyValue();\n\t\t$source = $this->getSourceRecord();\n\t\t$fkeys = $this->findForeignKeys($fkObject, $source);\n\t\tforeach($fkeys as $fKey => $srcKey)\n\t\t\t$fkObject->setColumnValue($fKey, $source->getColumnValue($srcKey));\n\t\treturn $fkObject->save();\n\t}", "public function save(){\n $tableName = $this->tableName();\n $attributes = $this->attributes();\n $params = array_map(fn($attr) => \":$attr\", $attributes);\n $statement = self::prepare(\"INSERT INTO $tableName (\".implode(',', $attributes).\") \n VALUES (\".implode(',', $params).\")\");\n \n foreach($attributes as $attribute){\n $statement->bindValue(\":$attribute\", $this->{$attribute});\n }\n \n $statement->execute();\n return true;\n }", "public function upsert($table, $insertFieldValues, $updateFieldValues = [], $primaryKey = null);", "public function fill($model, $setPrimaryKey = true) {\r\n if($setPrimaryKey)\r\n $this->primaryKey = $model->id;\r\n $this->attributes = [\r\n 'title' => $model->header1,\r\n 'content' => $model->text,\r\n ];\r\n }", "public function setPostData(Omeka_Record_AbstractRecord $record, $data)\r\n {\r\n // Set properties directly to a new record.\r\n }", "public function update(array $attributes)\n {\n return $this->getResults()->fill($attributes)->save();\n }", "public function createUpdateData($condition, $parameters)\n {\n # code...\n return $resultSet = $this->model->updateOrCreate($condition, $parameters);\n }", "public function create(){\n\n $id=0;\n $attributes = $this->prepared_attributes_insert();\n\t\t\n\t $sql = \"INSERT INTO \".static::$table_name.\" (\";\n\t $sql .= join(\",\",array_keys($attributes));\n\t $sql .= \") VALUES (\"; \n $sql .= join(\",\",array_values($attributes));\t\t \n $sql .= \") \";\n \n $idf = static::$id_field;\n \n $this->{static::$id_field} = static::db()->insert($sql);\n static::db()->free_statement();\n if (static::$idf !== -1)\n {\n\t return true;\n\t } else {\n\t return false;\n\t }\n }", "public function save() {\n\n $this->get(\"id\") ? $this->_update() : $this->_create();\n return $this;\n\n }", "public function update_record($value = null) {\n $class = get_called_class();\n\n if (!$this->does_exist()) {\n return false;\n }\n\n if ($value == null) {\n $value = 'id';\n }\n\n // If the object doesnt have the attribute passed on\n if (!$this->has_attribute($value)) {\n return false;\n }\n\n $db = DB::connect();\n\n // We style the attributes to set them\n $conditions = $this->style_sql_attributes();\n\n $sql = $db->prepare(\"UPDATE \" . $class . \" SET \". $conditions . \" WHERE \" . $value . \" = :id\");\n $sql->bindParam(':id', $this->$value);\n $sql->execute();\n\n return true;\n }", "public function save(){\n\t\t// If primary key is set in model, run an update instead.\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\tif(isset($this->{$primaryKey})){\n\t\t\treturn $this->update();\n\t\t}\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = array_map(fn($name) => ':'.$name, $fields);\n\t\t// Populate statement by imploding the arrays.\n\t\t$statement = $this->db->prepare('INSERT INTO ' . $tableName . ' ( ' . implode(', ', $fields) . ') VALUES (' . implode(', ', $params) . ')');\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function save(){\n return isset($this->id) ? $this->update() : $this->create();\n \n }", "public function MakePersistent() {\n\t\t\t$dataWritten = true;\n\t\t\t$dataToWrite = array_reduce( $this->dbFields, array( $this, 'mapPropertyToField' ) );\n\n\t\t\t// sl_id int field blank, unset it we will insert a new auto-int record\n\t\t\t//\n\t\t\tif ( empty( $dataToWrite['sl_id'] ) ) {\n\t\t\t\tunset( $dataToWrite['sl_id'] );\n\t\t\t}\n\n\t\t\t// sl_last_upated is blank, unset to get auto-date value\n\t\t\t//\n\t\t\tif ( empty( $dataToWrite['sl_lastupdated'] ) ) {\n\t\t\t\tunset( $dataToWrite['sl_lastupdated'] );\n\t\t\t}\n\n\t\t\t// sl_linked_postid is blank, set it to 0\n\t\t\t//\n\t\t\tif ( empty( $dataToWrite['sl_linked_postid'] ) ) {\n\t\t\t\t$dataToWrite['sl_linked_postid'] = 0;\n\t\t\t}\n\n\t\t\t// Location is set, update it.\n\t\t\t//\n\t\t\tif ( $this->id > 0 ) {\n\t\t\t\tif ( ! $this->slplus->db->update( $this->slplus->database->info['table'], $dataToWrite, array( 'sl_id' => $this->id ) ) ) {\n\t\t\t\t\t$dataWritten = false;\n\t\t\t\t}\n\n\t\t\t\t// No location, add it.\n\t\t\t\t//\n\t\t\t} else {\n\t\t\t\tif ( ! $this->slplus->db->insert( $this->slplus->database->info['table'], $dataToWrite ) ) {\n\t\t\t\t\t$this->slplus->notifications->add_notice(\n\t\t\t\t\t\t'warning',\n\t\t\t\t\t\tsprintf( __( 'Could not add %s as a new location', 'store-locator-le' ), $this->store )\n\t\t\t\t\t);\n\t\t\t\t\t$dataWritten = false;\n\t\t\t\t\t$this->id = '';\n\n\t\t\t\t\t// Set our location ID to be the newly inserted record!\n\t\t\t\t\t//\n\t\t\t\t} else {\n\t\t\t\t\t$this->id = $this->slplus->db->insert_id;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$dataWritten = $this->make_extended_data_persistent() || $dataWritten;\n\n\t\t\t// Reset the data changed flag, used to manage MakePersistent calls.\n\t\t\t// Stops MakePersistent from writing data to disk if it has not changed.\n\t\t\t//\n\t\t\t$this->dataChanged = false;\n\n\t\t\treturn $dataWritten;\n\t\t}", "public function put($attributes = []);", "public function update(Model $model, $fields = null, $values = null, $conditions = null) {\n\t\t$this->create($model, $fields, $values);\n\t}", "public function setPostData(Omeka_Record_AbstractRecord $record, $data)\n {\n // Set properties directly to a new record.\n $record->item_id = $data->item_id;\n $record->three_file_id = $data->three_file_id;\n $record->three_thumbnail_id = $data->three_thumbnail_id;\n $record->skybox_id = $data->skybox_id;\n $record->enable_lights = $data->enable_lights;\n $record->enable_materials = $data->enable_materials;\n $record->enable_shaders = $data->enable_shaders;\n $record->enable_measurement = $data->enable_measurement;\n $record->model_units = $data->model_units;\n $record->needs_delete = $data->needs_delete;\n }", "public function prepareRecord()\n {\n // Get specific record\n $requestParameters = $this->Request->all();\n $Model = clone $this->Model;\n if (request('action') == \"view\") {\n // Hook Filter viewModifyRecord\n $Model = $this->doFilter(\"viewPrepareRecord\", $Model);\n } else {\n $Model = $this->doFilter(\"prepareRecord\", $Model);\n }\n foreach ($requestParameters['indexes'] as $column => $value) {\n $Model = $Model->where($column, '=', $value);\n }\n $record = $Model->first();\n // Is valid record\n if (!$record) {\n // Redirect to List Page\n // Set session flash for notify Entry is not exist\n return redirect($this->getFormAction())\n ->with('dk_' . $this->getIdentifier() . '_info_error', trans('dkscaffolding.no.entry'));\n }\n $this->Model->setRawAttributes($record->getAttributes(), true);\n }", "function save() {\n $all_fields = ['id' => $this->id] + ['data' => JSON::encode($this->getData(true))];\n if($this->_just_created) {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n insert into \".static::$table.\"(\".implode(\",\", array_keys($all_fields)).\")\n values (\".implode(\", \", array_map(function($field) {return \":$field\";}, array_keys($all_fields))).\")\n \");\n } else {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n update \".static::$table.\"\n set \".implode(\", \", array_map(function($field) {return \"$field = :$field\";}, array_keys($all_fields))).\"\n where id = :id\n \");\n }\n foreach ($all_fields as $field => $value) {\n if (is_bool($value)) {\n $ps->bindValue($field, $value, \\PDO::PARAM_BOOL);\n } else {\n $ps->bindValue($field, $value);\n }\n }\n // Little cheat to get calculated data to be displayed in api call request\n $this->data = $this->getData();\n $ps->execute();\n $this->_just_created = false;\n return $this;\n }", "public function save() {\n return isset($this->id) ? $this->update() : $this->create();\n }", "private static function instantiate($record) {\n $object = new self;\n\t\tforeach($record as $attribute=>$value){\n\t\t if($object->has_attribute($attribute)) {\n\t\t $object->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $object;\n\t}", "public function update () {\n reset($this->__fields);\n $pk = key($this->__fields);\n $form = $this->getForm();\n $updates = array();\n\n foreach ($form as $k => $v) {\n $updates[] = sprintf('%s = :%s', $k, $k);\n }\n\n $sql = sprintf(\n 'UPDATE %s SET %s WHERE %s = :%s'\n , $this->getTableName()\n , implode(',', $updates)\n , $pk\n , $pk\n );\n\n $stmt = $this->__db->prepare($sql);\n $stmt->bindValue($pk, $this->__get($pk));\n\n foreach ($form as $k => $v) {\n if (is_object($v->getData()) && get_class($v->getData()) == 'DateTime') {\n $stmt->bindValue($k, $v->getData(), $this->__fields[$k]['type']);\n } else {\n $stmt->bindValue($k, $v->getData());\n }\n }\n\n $stmt->execute();\n\n return $this;\n }", "public static function saveAssignedRecordAttributes($attributes, $id, $uid, $eid, $aid, $lid = null)\n {\n $ret = false;\n \n if(!is_array($attributes) || count($attributes) < 1) {\n return $ret;\n }\n \n $sql = \"UPDATE event_request \"\n . \"SET updated_on = NOW(), \"\n . \" updated_by_id = :uid, \";\n \n $paramNames = array();\n $paramCount = 0;\n \n // Set the update values of the query\n foreach($attributes as $name => $value) {\n $paramName = \":\" . $name . (string)$paramCount;\n \n if($paramCount == 0) {\n $sql .= $name . \" = \" . $paramName;\n } else {\n $sql .= \", \" . $name . \" = \" . $paramName;\n }\n \n $paramNames[$paramName] = $value;\n \n $paramCount += 1;\n }\n \n $sql .= \" WHERE id = :id \"\n . \" AND event_id = :eid \"\n . \" AND event_id IN (SELECT e.id \"\n . \" FROM event e \"\n . \" INNER JOIN arena a \"\n . \" ON e.arena_id = a.id \"\n . \" INNER JOIN arena_user_assignment aua \"\n . \" ON a.id = aua.arena_id \"\n . \" INNER JOIN user u \"\n . \" ON u.id = aua.user_id \";\n \n if($lid !== null) {\n $sql .= \" INNER JOIN location l \"\n . \" ON l.arena_id = a.id \";\n }\n \n $sql .= \" WHERE e.id = :eid \"\n . \" AND a.id = :aid \"\n . \" AND u.id = :uid \";\n\n if($lid !== null) {\n $sql .= \" AND l.id = :lid \"\n . \" AND e.location_id = :lid \";\n }\n \n $sql .= \")\";\n \n $command = Yii::app()->db->createCommand($sql);\n \n $command->bindParam(':id', $id, PDO::PARAM_INT);\n $command->bindParam(':uid', $uid, PDO::PARAM_INT);\n $command->bindParam(':eid', $eid, PDO::PARAM_INT);\n $command->bindParam(':aid', $aid, PDO::PARAM_INT);\n \n if($lid !== null) {\n $command->bindParam(':lid', $lid, PDO::PARAM_INT);\n }\n \n foreach($paramNames as $name => $value) {\n $command->bindValue($name, $value);\n }\n \n // Since we are updating, we are going to do this in a transaction\n // in case something catastrophic, such as more than one row being\n // updated, happens.\n \n $transaction = Yii::app()->db->beginTransaction();\n\n try\n {\n // Just update the record and if more than one row affected\n // we will roll back the transaction and return false!\n $count = $command->execute();\n \n if($count != 1) {\n $ret = false;\n } else {\n $ret = true;\n }\n \n if($transaction->active == true && $ret == true) {\n $transaction->commit();\n } elseif($transaction->active == true && $ret == false) {\n $transaction->rollback();\n }\n }\n catch(Exception $e)\n {\n if($transaction->active == true) {\n $transaction->rollback();\n }\n\n if($e instanceof CDbException) {\n throw $e;\n }\n\n $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;\n $message = $e->getMessage();\n throw new CDbException(\n 'Failed to execute the SQL statement: ' . $message,\n (int)$e->getCode(),\n $errorInfo\n );\n }\n \n return $ret;\n }", "function editRecord($rec)\r\n\t\t{\r\n\t\t\t// Create associative array of key fields and data values\r\n\t\t\t$data = array(\"idMedicalRecord\"=>$rec[0],\"medicalRec_weight\"=>$rec[1],\"medicalRec_height\"=>$rec[2],\"medicalRec_bloodPressure\"=>$rec[3],\"medicalRec_temperature\"=>$rec[4],\"medicalRec_bloodIronLevel\"=>$rec[5],\"medicalRec_time\"=>$rec[6],\"medicalRec_date\"=>$rec[7],\"medicalRec_medicalHistory\"=>$rec[8],\"medicalRec_rejectionReason\"=>$rec[9]);\r\n\t\t\t// Bind values to object's attributes\r\n\t\t\t$this->bind($data);\r\n\t\t\t// Add new updated values to table in database to location of given Primary key\r\n\t\t\t$this->update($rec[0]);\r\n\t\t}", "public function save(){\r\n\t \t\treturn isset($this->id) ? $this->update() : $this->create();\r\n\t\t}", "public function testInsertAndUpdateSimpleRecord()\n {\n $this->expectQueries(\n [\n [\n 'INSERT INTO test (fieldWithSetter, field2) VALUES (?, ?)',\n ['foo via setter and getter', ' and getter']\n ],\n ['UPDATE test SET field2=? WHERE key=?', ['bar via setter and getter', null]]\n ]\n );\n\n $entity = $this->entityManager->get('TestEntity');\n /** @var TestEntity $object */\n $object = $entity->create(\n [\n 'fieldWithSetter' => 'foo'\n ]\n );\n $entity->save($object);\n\n $object->setField2('bar');\n\n $entity->save($object);\n\n $this->entityManager->commit();\n }", "public function updateOrCreate(array $params): ParseDataProvider\n {\n return $this->setParams($params)->checkup()->checkIfExist()->persist()->getModel();\n }", "public function createUpdateData($condition, $parameters)\n {\n return $resultSet = $this->model->updateOrCreate($condition, $parameters);\n }", "public function createUpdateData($condition, $parameters)\n {\n return $resultSet = $this->model->updateOrCreate($condition, $parameters);\n }", "private static function instantiate($record) {\r\r\n $object = new self;\r\r\n\t\tforeach($record as $attribute=>$value){\r\r\n\t\t if($object->has_attribute($attribute)) {\r\r\n\t\t $object->$attribute = $value;\r\r\n\t\t }\r\r\n\t\t}\r\r\n\t\treturn $object;\r\r\n\t}", "public function fill(Identifiable $model, array $attributes);", "function add($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\n\t\t// update the DB table appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\t$this->_data[$key] = $record;\n\n\t\t$this->store();\n\t}", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function save() {\n\t\tif (empty($this->values))\n\t\t\treturn false;\n\n\t\tif ($this->fieldUpdatedAt && isset($this->schema[$this->fieldUpdatedAt]))\n\t\t\t$this->values[$this->fieldUpdatedAt] = date('Y-m-d H:i:s');\n\t\telse if (!$this->modified)\n\t\t\treturn true;\n\n\t\t// Prepare sql\n\t\tif (is_null($this->id)) {\n\t\t\t// Insert\n\t\t\tif ($this->fieldCreatedAt && isset($this->schema[$this->fieldCreatedAt]))\n\t\t\t\t$this->values[$this->fieldCreatedAt] = date('Y-m-d H:i:s');\n\n\t\t\t$sql = \"INSERT INTO `{$this->table}` (\"\n\t\t\t\t. implode(',', array_map(function($item) {\n\t\t\t\t\t\treturn \"`$item`\";\n\t\t\t\t\t}, array_keys($this->values)))\n\t\t\t\t. ') VALUES ('\n\t\t\t\t. implode(',', array_map(function($item) {\n\t\t\t\t\t\treturn \":$item\";\n\t\t\t\t\t}, array_keys($this->values)))\n\t\t\t\t. ')';\n\t\t} else {\n\t\t\t// Update\n\t\t\t$id = $this->values['id'];\n\t\t\tunset($this->values['id']);\n\t\t\t$sql = \"UPDATE `{$this->table}` SET \"\n\t\t\t\t. implode(',', array_map(function($item) {\n\t\t\t\t\t\treturn \"`$item`=:$item\";\n\t\t\t\t\t}, array_keys($this->values)))\n\t\t\t\t. ' WHERE `id`=:id';\n\t\t\t$this->values['id'] = $id;\n\t\t}\n\n\t\t// Bind params\n\t\t$query = self::$pdo->prepare($sql);\n\t\tforeach ($this->values as $key => $value) {\n\t\t\t$query->bindValue(\":$key\", $value);\n\t\t}\n\n\t\tif ($query->execute()) {\n\t\t\tif (is_null($this->id))\n\t\t\t\t$this->id = self::$pdo->lastInsertId();\n\t\t\t$this->modified = false;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function add_or_update()\n {\n $this->on_duplicate_key('foo = foo + 1');\n $this->insert('table', array('foo' => 'bar'));\n }", "public function save(){\r\n return isset($this->id) ? $this->update() : $this->create();\r\n }", "public function save() {\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}", "public function save() {\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "public function update(int $id, array $attributes): Model;", "public function insert($attributes);", "public function save(){\n $tableName = $this->tableName();\n $attributes = $this->attributes();\n $params = array_map(fn($attr)=> \":$attr\", $attributes);\n\n $st = self::prepare(\n \"INSERT INTO $tableName (\".implode(',', $attributes).\")\n VALUES(\".implode(',', $params).\")\"\n );\n\n foreach($attributes as $attribute){\n $st->bindValue(\":$attribute\", $this->{$attribute});\n }\n\n $st->execute();\n return true;\n }", "static function updateWith($fields) {\r\n return static::make($fields)->update();\r\n }", "private function crud_post($record = null) {\n $key = $record['id'];\n\n if (!isset($key)) {\n $this->response(array('error' => 'Create: No supply specified'), 406);\n return;\n }\n\n if ($this->supplies->exists($key)) {\n $this->response(array('error' => 'Create: Supply ' . $key . ' already exists'), 406);\n return;\n }\n\n $this->supplies->add($record);\n\n $oops = $this->db->error();\n if (empty($oops['code']))\n $this->response(array('ok'), 200);\n else\n $this->response($oops, 400);\n }", "function lr_set($pid, $record) {\n list($ns, $x) = explode(':', $pid);\n list($rec, $sort) = explode('.', $x);\n $db = lr_connect( );\n $table = lr_make_table($db, $ns);\n $sql = \"INSERT INTO ?n SET rec=?i, sort=?i, text=?s ON DUPLICATE KEY UPDATE text=?s\";\n $db->query($sql, $table, $rec, $sort, $record, $record);\n}" ]
[ "0.6513278", "0.64137524", "0.6407186", "0.6340457", "0.6192482", "0.609686", "0.6059493", "0.60562354", "0.59924245", "0.593393", "0.5900355", "0.5859465", "0.58454156", "0.5824891", "0.580954", "0.57782364", "0.5773031", "0.5712245", "0.56930876", "0.56304836", "0.5617712", "0.56088525", "0.5594427", "0.5589242", "0.55758244", "0.55707216", "0.55694187", "0.5562399", "0.5539871", "0.5529358", "0.55278504", "0.5524591", "0.5512228", "0.55017847", "0.5491033", "0.5474998", "0.54617685", "0.54574203", "0.54462767", "0.54462767", "0.54419154", "0.5432939", "0.5432067", "0.543084", "0.54268277", "0.5422993", "0.5419356", "0.5415907", "0.54064006", "0.5404549", "0.5402289", "0.5397709", "0.53948987", "0.5390607", "0.5381367", "0.5375014", "0.5373562", "0.53708214", "0.5366067", "0.5364463", "0.5363207", "0.53478974", "0.5345014", "0.5344863", "0.53354794", "0.53345877", "0.53324616", "0.5321556", "0.53212726", "0.5317711", "0.5316931", "0.531437", "0.5301895", "0.52960944", "0.52945966", "0.5290817", "0.5280706", "0.52758807", "0.5265314", "0.52647185", "0.52636015", "0.52575445", "0.52575445", "0.5256571", "0.5252354", "0.52484566", "0.5247867", "0.5247863", "0.5245101", "0.52447325", "0.5234841", "0.5234841", "0.52343607", "0.52343607", "0.523183", "0.5224368", "0.52179563", "0.5217199", "0.5216085", "0.52140576" ]
0.63327456
4
Get an array with the values of a given column.
public function pluck($column, $key = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCol() : array\n\t{\n\t\treturn $this->fetchAllFromColumn();\n\t}", "public function result_column($column)\n {\n $output = array();\n\n if (is_bool($this->result))\n {\n return $output;\n }\n\n while ($row = $this->result->fetch_assoc())\n {\n $output[] = $row[$column];\n }\n\n $this->free_result();\n\n return $output;\n }", "public function getValues($column)\n\t{\n\t\t$arr = array();\n\t\tforeach($this as $item) {\n\t\t\tif($item->$column !== NULL) {\n\t\t\t\t$arr[(string)$item->$column] = $item->$column;\n\t\t\t}\n\t\t}\n\t\treturn array_values($arr);\n\t}", "public function getResultOnlyAColumn($column)\n {\n $arr = [];\n $data = $this->queryData();\n while ($row = $data->fetch_assoc()) {\n array_push($arr, $row[$column]);\n }\n Apps_Class_Log::writeFlowLog(\"getResultOnlyAColumn lấy tất cả giá trị của cột \".$column.\" database.php\");\n return $arr;\n }", "public function column(): array\n {\n if ($this->shouldEmulateExecution()) {\n return [];\n }\n\n /** TODO add support for orderBy */\n return $this->executeScript('Column', $this->attribute);\n }", "public function valuesFlat($column)\n {\n $data = $this->query->select(\n $this->filter,\n $this->order,\n [$column],\n $this->limitOffset,\n PDO::FETCH_NUM\n );\n\n foreach ($data as &$item) {\n $item = $item[0];\n }\n unset($item);\n\n return $data;\n }", "public function getColumnDataAsArray( $iColumn )\r\n {\r\n $columnData = array();\r\n foreach ($this->data as $row) {\r\n $columnData[] = $row[$iColumn];\r\n }\r\n return $columnData;\r\n }", "protected function _getValues()\n {\n $values = $this->getColumn()->getValues();\n return $this->_converter->toFlatArray($values);\n }", "public function fetchColumn(int $column = 0): array\n {\n $result = $this->_getResult()->fetchCol($column); // Returns an array on success and an \\PEAR_Error object on failure\n return is_array($result) ? $result : array();\n }", "public function getToArray()\n {\n $row = [];\n foreach (array_keys($this->columns) as $column) {\n $row[$column] = trim($this->getColumnValue($column));\n }\n return $row;\n }", "public function getColumnData($column = null)\n\t{\n\t\tif (!in_array($column, $this->productColumns)) return \"Request not a tablecolumn\";\n\t\n\t\t$results = [];\n\n\t\t$stmt = $this->pdo->prepare(\"SELECT DISTINCT $column FROM product LIMIT 10\");\n\n\t\ttry {\n\t\t\t$stmt->execute();\n\t\t\t$db_column_select = $stmt->fetchAll();\n\t\t\tforeach ($db_column_select as $k => $row) {\n\t\t\t\t$results['columnData'][] = $row[$column];\n\t\t\t}\n\t\t\treturn $results; \n\t\t} catch (PDOException $Exception) {\n\t\t\tthrow new MyDatabaseException( $Exception->getMessage(), (int)$Exception->getCode() );\n\t\t}\n\n\t}", "public function toColumn(): array\n {\n return $this->pdoStatement->fetchAll(\\PDO::FETCH_COLUMN, 0);\n }", "public function toArray($keyColumn, $valueColumn)\n\t{\n\t\t// Execute query and call the 'toArray' function on the ResultSet\n\t\t$result = $this->execute();\n\t\treturn ($result !== false) ? $result->toArray($keyColumn, $valueColumn) : array();\n\t}", "public function getArrayColumnValues($field, $twoDimArray){\n return array_column($twoDimArray, $field);\n }", "public function fetchColumn() {\r\n\t\t$result = array();\r\n\r\n\t\twhile ($data = $this->fetch()) {\r\n\t\t\t$result[] = current($data);\r\n\t\t}\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $result;\r\n\t}", "private function getColumnValues()\n {\n return array_slice($this->_args, 2);\n }", "public function pluck($column)\n {\n $columns = func_get_args();\n $argv_count = func_num_args();\n \n $collection = $this->take();\n $values = [];\n \n if ($collection->any()) {\n if ($argv_count == 1) {\n foreach ($collection as $model)\n $values[] = $model->$column;\n } else {\n foreach ($collection as $model) {\n $row_values = [];\n foreach ($columns as $column) {\n $row_values[] = $model->$column;\n }\n $values[] = $row_values;\n }\n }\n }\n \n return $values;\n }", "public function value($column)\r\n {\r\n $rs = (array) $this->first();\r\n return $rs[$column];\r\n }", "public function fetchAllFromColumn(int $column = 0) : array\n\t{\n\t\treturn $this->handle->fetchAllFromColumn($this->result, $column);\n\t}", "public static function col($query = null , $x = 0) {\n $query && self::query($query);\n $new_array = array();\n // Extract the column values\n for ( $i=0; $i < count(self::$last_result); $i++ ) {\n $new_array[$i] = self::value(null, $x, $i);\n }\n return $new_array;\n }", "function get_col($query=null,$x=0)\n\t\t{\n\n\t\t\t$new_array = array();\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query )\n\t\t\t{\n\t\t\t\t$this->query($query);\n\t\t\t}\n\n\t\t\t// Extract the column values\n\t\t\tfor ( $i=0; is_array($this->last_result) && $i < count($this->last_result); $i++ )\n\t\t\t{\n\t\t\t\t$new_array[$i] = $this->get_var(null,$x,$i);\n\t\t\t}\n\n\t\t\treturn $new_array;\n\t\t}", "function get_col( $query = null , $x = 0 ) {\n\t\tif ( $query )\n\t\t\t$this->dbcr_query( $query );\n\n\t\t$new_array = array();\n\t\t// Extract the column values\n\t\tfor ( $i = 0, $j = count( $this->dbcr_wpdb->last_result ); $i < $j; $i++ ) {\n\t\t\t$new_array[$i] = $this->get_var( null, $x, $i );\n\t\t}\n\t\treturn $new_array;\n\t}", "function array_column(&$arr, $col) {\n $column = array();\n foreach ($arr as $row) {\n $column[] = $row[$col];\n }\n return $column;\n}", "function get($table,$col){\n $array=array();\n $conn=connectDB();\n $query=\"SELECT * FROM $table\";\n foreach ($conn->query($query)as $row){\n array_push($array,$row[$col]);\n }\n return $array;\n }", "public function getColumnValues($columnKey)\n {\n $values = array();\n foreach ($this->items as $item) {\n $values[$item->key] = $item->get($columnKey);\n }\n\n return $values;\n }", "public function getColumns(): array;", "function get_col($query=null,$x=0) {\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query ) {\n\t\t\t\t$this->query($query);\n\t\t\t}\n\n\t\t\t// Extract the column values\n\t\t\tfor ( $i=0; $i < count($this->last_result); $i++ ) {\n\t\t\t\t$new_array[$i] = $this->get_var(null,$x,$i);\n\t\t\t}\n\n\t\t\treturn $new_array;\n\t\t}", "public function getValues($row){\n $data = array();\n while( ($obj = oci_fetch_assoc($this->result)) != false ){\n $data[] = $obj[$row];\n }\n return $data;\n }", "public function pluck($column)\n {\n return $this->value($column);\n }", "function get_col($query=null,$x=0, $use_prepare=false)\n\t\t{\n\n\t\t\t$new_array = array();\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query )\n\t\t\t{\n\t\t\t\t$this->query($query, $use_prepare);\n\t\t\t}\n\n\t\t\t// Extract the column values\n\t\t\t$j = count($this->last_result);\n\t\t\tfor ( $i=0; $i < $j; $i++ )\n\t\t\t{\n\t\t\t\t$new_array[$i] = $this->get_var(null,$x,$i);\n\t\t\t}\n\n\t\t\treturn $new_array;\n\t\t}", "private function getPivotRowArray($column, $array) {\n $list = [];\n foreach ($array AS $key => $value) {\n if($key != $column) {\n $list[] = $value;\n }\n }\n\n unset($array, $key, $value, $column);\n return $list;\n }", "public static function select_column($query)\n {\n $column = array();\n $rs = self::query($query);\n while (true)\n {\n $values = Db::fetch_row($rs);\n if ($values === false)\n break;\n array_push($column, $values[0]);\n }\n Db::free_result($rs);\n return $column;\n }", "public function getArrayValues($sql,$params = null){\n $result = $this->getResult($sql,$params);\n $arr = [];\n while ($row = $result->fetch_row()) {\n $arr[] = $row[0];\n }\n\n $result->close();\n\n return $arr;\n }", "public static function getColumnsArray(): array {\n return range(1, 10);\n }", "public function value($column)\n {\n $result = (array) $this->first([$column => 1]);\n\n return count($result) > 0 ? $result[$column] : null;\n }", "public function getValues()\n {\n if ($this->_values === null) {\n $this->_values = $this->getColumn()->getData('values') ? $this->getColumn()->getData('values') : [];\n }\n return $this->_values;\n }", "public function get_col($query=null, $x=0) {\n\n\t\t// If there is a query then perform it if not then use cached results..\n\t\tif ($query)\n\t\t\t$this->query($query);\n\n\t\t// Extract the column values\n\t\tfor ($i=0; $i < count($this->last_result); $i++)\n\t\t\t$new_array[$i] = $this->get_var(null, $x, $i);\n\n\t\treturn $new_array;\n\t}", "public function getColumn($query, $col = 0) {\n\t\t$return = array();\n\t\t$result = $this->query($query);\n\t\twhile ($row = $result->fetch_array()) {\n\t\t\t$return[] = $row[$col];\n\t\t}\n\t\t$result->free();\n\t\treturn $return;\n\t}", "public static function extract(array $array, string $column): array\n {\n if (empty($array)) {\n return [];\n }\n\n $values = array_map(\n fn ($item) => self::getProperty($item, $column),\n $array\n );\n\n $values = array_filter(\n array_unique($values),\n fn ($item) => $item !== null\n );\n\n return array_values($values);\n }", "public function getArray()\n\t{\n\t\treturn $this->row;\n\t}", "public function toArray()\n {\n return collect($this->columns)->toArray();\n }", "function get_data ($row, $column)\n {\n global $data_array;\n $column_array = array ();\n $column_array = explode (\"\\t\", $data_array[$row]);\n return ($column_array[$column]);\n }", "public function getDiscreteColumnValues( $iColumn )\r\n {\r\n $values = array();\r\n foreach ($this->data as $row) {\r\n if (!in_array( $row[$iColumn], $values )) {\r\n $values[] = $row[$iColumn];\r\n }\r\n }\r\n return $values;\r\n }", "function array_pluck($array, $column) {\n\treturn array_map(function($obj) use ($column) {\n\t\treturn $obj[$column];\n\t}, $array);\n}", "public function asColumnVectors() : array\n {\n $vectors = [];\n\n for ($i = 0; $i < $this->n; ++$i) {\n $vectors[] = $this->columnAsVector($i);\n }\n\n return $vectors;\n }", "public function values($field)\n {\n if ($this->multiMode) {\n return $this->load()->values($field);\n }\n if ($this->data === null) {\n $this->load();\n }\n\n return ($v = $this[$field]) !== null ? [$v] : [];\n }", "public function getColumn($name)\n {\n $columnValues = array();\n foreach ($this->getRows() as $row) {\n $columnValues[] = $row->getColumn($name);\n }\n return $columnValues;\n }", "function pluck($col, $array)\n{\n $res = array();\n foreach ($array as $k => $row) {\n $res[$k] = $row[$col];\n }\n return $res;\n}", "public function getColumns(){\n $rows = array();\n return $rows; \n }", "public static function getColumn($query)\n {\n $result = array();\n\n if ($_result = call_user_func_array(array('self', 'query'), func_get_args())) {\n while ($arr = self::$_db->fetchRow($_result, 'indexed')) {\n $result[] = $arr[0];\n }\n\n self::$_db->freeResult($_result);\n }\n\n return $result;\n }", "public function fetchColumn($query)\n {\n if (func_num_args() > 1) $query = call_user_func_array(array(get_class(), 'bind'), func_get_args());\n\n $result = $query instanceof \\mysqli_result ? $query : $this->query($query);\n\n $values = array();\n while (list($value) = $result->fetch_row()) {\n $values[] = $value;\n }\n\n return $values;\n }", "function array_pluck(iterable $arrays, $column): array\n{\n $plucked = [];\n foreach ($arrays as $array) {\n if (is_array($array)) {\n foreach ($array as $key => $value) {\n if ($key === $column) {\n $plucked[] = $value;\n continue 2;\n }\n }\n }\n $plucked[] = null;\n }\n\n return $plucked;\n}", "public function toColumn() {\r\n\t\treturn $this->PDOStatement->fetchAll(PDO::FETCH_COLUMN,0);\r\n\t}", "public function getBy(string $column, $value)\r\n {\r\n $stmt = $this->conn->prepare(\"SELECT * FROM $this->table WHERE $column = '$value'\");\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "function array_pluck($array, $column) {\n return array_map(function($obj) use ($column) {\n return isset($obj[$column]) ? $obj[$column] : null;\n }, $array);\n}", "abstract public function getRowAsArray();", "public function scalarArray()\n {\n if($this->result_array) {\n $arr = array();\n $keys = array_keys($this->result_array[0]);\n foreach($this->result_array as $v) {\n $arr[] = $v[$keys[0]];\n }\n return $arr;\n }\n return [];\n }", "abstract protected function getColumns(): array;", "public function toArray()\n\t{\n\t\t$columns = array();\n\t\t\n\t\t$rf = new ReflectionClass($this);\n\t\t$props = $rf->getProperties();\n\t\tforeach ($props as $prop)\n\t\t{\n\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\tif ($column != \"\")\n\t\t\t\t$columns[$column] = $prop->getValue($this);\n\t\t}\n\n\t\treturn $columns;\n\t}", "public static function getArray($param) {\n $conn = self::connect();\n $getQuery = self::getQuery($param);\n $string = $conn['query'].\"fetch_assoc\";\n while($result = $string($getQuery)) {\n $all[] = $result;\n }\n return @$all;\n }", "public function getJobsValuesByColumnName($columnName) {\n\t\treturn $this->getParamountProjectJob()->getValueByColumnName($columnName);\n\t}", "public static function queryCol($sql)\n\t{\n\t\t$tempResults = self::$link->query($sql);\n\t\t\n\t\tif(!$tempResults)\n\t\t{\n\t\t\tself::handleError($sql);\n //TODO should probably return here\n\t\t}\n\t\t\n\t\t$column = array();\n\t\t\n\t\twhile(!is_null($row = $tempResults->fetch_row()))\n\t\t{\n\t\t\t$column[] = $row[0];\n\t\t}\n\t\t\n\t\t$tempResults->close();\n\t\t\n\t\t//return $tempResults->fetchCol();\n\t\treturn $column;\n\t}", "function sql_new_fetch_into_array($query) {\n\treturn sql_fetch_column($query);\n}", "public function getAllColumn(string $sColumn, array $aData, bool $bIncludeDeleted = false): array\n {\n $this->deprecatedIncludeDeleted($bIncludeDeleted);\n $oResults = $this->getAllRawQuery($aData);\n\n return arrayExtractProperty(\n $oResults->result(),\n $this->getColumn($sColumn)\n );\n }", "public function getCol($col)\n {\n if (!$this->checkRange(0, $col)) {\n throw new \\OutOfRangeException();\n }\n\n return array_column($this->_data, $col);\n }", "protected function populate(string $sourceClass, string $column): array\n {\n $source = $this->getSource($sourceClass);\n $input = $source->find()->fetchAll();\n\n return array_column($input, $column);\n }", "function obtenerArray(){\r\n\t\treturn mysql_fetch_array( $this->rs() );\r\n\t}", "function array_column($array, $key) {\n\t\t\t$result = [];\n\t\t\tforeach ($array as $val) {\n\t\t\t\t$result[] = $val[$key];\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "function slice_array($arr, $column) {\n $output = array();\n foreach ($arr as $row) {\n $output[$row[$column]][] = $row;\n }\n return $output;\n}", "public static function getColumns()\n {\n return array();\n }", "public function getInHashArray($columnName = 'id')\n {\n if(!$this->result)\n {\n // No result to work on\n return false;\n }\n \n // Start building the IN list\n $list = array();\n \n // Build the list\n while($row = $this->next())\n {\n $list[] = $row->{$columnName};\n }\n \n // Reset resource\n $this->rewind();\n \n return $list;\n }", "public static function getEnumValues($column) \n {\n // Create an instance of the model to be able to get the table name\n $instance = new static;\n\n // Pulls column string from DB\n $enumStr = DB::select(DB::raw('SHOW COLUMNS FROM '.$instance->getTable().' WHERE Field = \"'.$column.'\"'))[0]->Type;\n\n // Parse string\n preg_match_all(\"/'([^']+)'/\", $enumStr, $matches);\n\n // Return matches\n return isset($matches[1]) ? $matches[1] : [];\n }", "public function getDataAllColumns() : array{\n\n $columns = [];\n foreach ($this->configs->fields as $k => $value) {\n $columns[$k] = array_column($this->model->getValuesColumn($value),$value);\n }\n return $columns;\n }", "abstract protected function columns(): array;", "function getColumn($arr, $x){\n\treturn array_map(function($y)use($x){ return $y[$x]; }, $arr);\n}", "public function getValues(): array;", "public function getValues(): array;", "public function get_column($index = 0) {\n\t\t$values = array();\n\t\tforeach ($this->get_rows() as $row) {\n\t\t\t$values[] = $row[$index];\n\t }\n\t return $values;\n\t}", "public function getArray()\n {\n return mysqli_fetch_array($this->resulset);\n }", "public function value($column)\n {\n return $this->callHook(__FUNCTION__, $this->packArgs(compact('column')));\n }", "public function toArray(): array\n {\n $data = [];\n foreach ($this->table as $y => $Vector) {\n $data[$y] = $Vector->toArray();\n }\n return $data;\n }", "private function getPivotArray($column = null, $row = null) {\n $list = [];\n foreach ($this->array AS $key => $value) {\n if($key != $row) {\n $list[] = $this->getPivotRowArray($column, $value);\n }\n }\n\n unset($key, $value);\n return ['pivot' => $this->array[$row][$column], 'adj' => ['array' => $list, 'result' => (new self($list))->getResult()]];\n }", "public function getAsArray();", "function pluck($array, $key) {\n $values = array();\n\n foreach ($array as $row) {\n if (isset($row[$key])) {\n // Found a value in this row\n $values[] = $row[$key];\n }\n }\n\n return $values;\n}", "public static function getRowsArray(): array {\n return range('A', 'J');\n }", "public function getArray($key)\n {\n\n if (isset($this->data[$key]))\n return Db::getActive()->dbArrayToArray($this->data[$key]);\n else\n return null;\n\n }", "public function column(mixed $column): Collection;", "public function getProjectsValuesByColumnName($columnName) {\n\t\treturn $this->getParamountProject()->getValueByColumnName($columnName);\n\t}", "public function getRowsAsArray(){\n $fieldNames=$this->getFieldNames();\n $result=[];\n if (!empty($this->valuesRows)){\n foreach($this->valuesRows as $valuesRow){\n $rowArr=[];\n foreach($fieldNames as $i=>$fieldName){\n if (isset($valuesRow[$i])){\n $rowArr[$fieldName]=$valuesRow[$i];\n }\n }\n $result[]=$rowArr;\n }\n }\n return $result;\n }", "function filter_array($arr, $column, $value) {\n $output = array();\n foreach ($arr as $row) {\n if ($row[$column] == $value) {\n $output[] = $row;\n }\n }\n return $output;\n}", "public function getByColumn($column, $value)\n {\n if (is_array($value)) {\n $sql = \"SELECT * FROM `%s` WHERE `%s` IN (%s)\";\n $placesArray = array_fill(0, count($value), \"?\");\n $places = implode(\", \", $placesArray);\n $this->_sql[] = sprintf($sql, $this->_table, $column, $places);\n $parameters = array();\n foreach ($value as $v) {\n $parameters[] = array($column => $v);\n }\n $this->_parameters[] = $this->parameterize($parameters);\n } else {\n $sql = \"SELECT * FROM `%s` WHERE `%s` = ?\";\n $this->_sql[] = sprintf($sql, $this->_table, $column);\n $parameters = array(array($column => $value));\n $this->_parameters[] = $this->parameterize($parameters);\n }\n }", "function FetchArray() {\n\t\t\t$this->ConnectServer();\n\t\t\t$array = pg_fetch_array($this->result, NULL, PGSQL_ASSOC);\n\t\t\t$this->DisconnectServer();\n\t\t\treturn $array;\n\t\t}", "public static function splitArray($values, $col = 1){\n\t\t$result\t= array();\n\t\t$count\t= ceil(count($values) / $col);\n\n\t\tif($col == 1 || $count == 1){\n\t\t\t$result[] = $values;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($values)){\n\t\t\t\t$index\t= 0;\n\t\t\t\t$loop\t= 1;\n\n\t\t\t\tforeach($values as $key => $value){\n\t\t\t\t\t$result[$index][$key] = $value;\n\n\t\t\t\t\tif($loop >= $count){\n\t\t\t\t\t\t$loop = 1;\n\t\t\t\t\t\t$index++;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$loop++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function GetSingleRow() : ARRAY\r\n {\r\n return($this->preparedStatement->fetch(\\PDO::FETCH_ASSOC));\r\n }", "public function columns() : array\n {\n if ($this->numRows() > 1) {\n return array_map(null, ...$this->samples);\n }\n\n $n = $this->numColumns();\n\n $columns = [];\n\n for ($i = 0; $i < $n; $i++) {\n $columns[] = array_column($this->samples, $i);\n }\n\n return $columns;\n }", "public function get_array() {\n\t\tif (!isset($this->data)) {\n\t\t\t$this->data = !empty($this->csv) ? $this->csv2array($this->csv) : array();\n\t\t\t$this->header = $this->data ? current($this->data) : array();\n\t\t}\n\t\treturn $this->data;\n\t}", "public function getDataFromColumn($col)\n {\n return $this->attributes[app()->getLocale() == 'ar' ? 'ar_'.$col : $col] ?? $this->attributes[$col];\n }", "public static function getColumn(array $arr,$attribute){\n $column=array();\n foreach($arr as $one){\n if(is_array($one)){\n $column[]=$one[$attribute];\n }else{\n $column[]=$one->{$attribute};\n }\n }\n return $column;\n }", "public function toArray()\n\t{\n\t\treturn $this->values;\n\t}", "public function toArray()\n\t{\n\t\treturn $this->values;\n\t}", "private function table_columns(){\n $column = array();\n $query = $this->db->select('column_name')\n ->from('information_schema.columns')\n ->where('table_name', $this::$table_name)\n ->get($this::$table_name)->result_array();\n //return individual table column\n foreach($query as $column_array){\n foreach($column_array as $column_name){\n $column[] = $column_name;\n }\n }\n return $column;\n }" ]
[ "0.7637657", "0.7627025", "0.7569935", "0.7388444", "0.73434395", "0.72554815", "0.725229", "0.7224806", "0.71995115", "0.7098746", "0.7085926", "0.70714974", "0.70001453", "0.6970375", "0.6969906", "0.69535625", "0.69414085", "0.69306844", "0.69168395", "0.68833756", "0.6856019", "0.6779251", "0.6775853", "0.67445344", "0.6740953", "0.6643031", "0.6637611", "0.65936965", "0.65746427", "0.6556631", "0.65501225", "0.6533734", "0.6530015", "0.6525211", "0.6511926", "0.6502481", "0.6449224", "0.6408228", "0.6402368", "0.6394312", "0.6390506", "0.633914", "0.6336144", "0.6329973", "0.6313611", "0.6298411", "0.6280523", "0.62702096", "0.62587285", "0.623431", "0.62214285", "0.621996", "0.618986", "0.61864364", "0.61747766", "0.6162733", "0.61607647", "0.6156095", "0.61413467", "0.61388206", "0.61331457", "0.61201394", "0.6110977", "0.61101365", "0.61092705", "0.6104062", "0.6097958", "0.60797477", "0.60771537", "0.60543275", "0.6022485", "0.6015388", "0.6015188", "0.60134053", "0.60072047", "0.599451", "0.599451", "0.5992893", "0.5987741", "0.59839284", "0.5973593", "0.59510666", "0.5939454", "0.5933904", "0.5927125", "0.59266907", "0.5924239", "0.59084594", "0.59061915", "0.59041685", "0.5888087", "0.5883542", "0.58739257", "0.5855576", "0.58522666", "0.5849567", "0.5845305", "0.58395994", "0.5839248", "0.5839248", "0.5835666" ]
0.0
-1
Retrieve all data of repository, paginated
public function paginate($limit = null, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchAll()\n {\n return Accessory::paginate(25);\n }", "protected function getAll(){\n return $this->orderBy('id','desc')->paginate(10);\n }", "public function findAllWithPagination(): LengthAwarePaginator;", "public function findAllWithPagination(): LengthAwarePaginator;", "public function findAllWithPagination() {\n\n $this->checkOptionsAndEnableCors();\n\n $page = $this->input->get('page');\n $limit = $this->input->get('limit');\n $sortParam = $this->input->get('sort');\n if(isset($sortParam)){\n $sort = json_decode($sortParam);\n } else {\n $sort = null;\n }\n\n if(isset($page) && isset($limit)){\n $users = $this->repository->findAllWithPagination($page - 1, $limit, $sort);\n $count = $this->repository->count();\n echo json_encode([ \"data\" => $users, \"count\" => $count ]);\n } else {\n $this->handleError('Missing page and limit parameter');\n }\n }", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function index()\n {\n if (\\Request::exists('all')) {\n return $this->service\n ->with(['persons'])\n ->filters($this->filter)\n ->select('id', 'name')\n ->get();\n }\n\n $order = Str::contains(\\Request::get('orderBy'), ['asc', 'desc'])\n ? \\Request::get('orderBy')\n : 'desc';\n\n return $this->service\n ->showAll()\n ->orderBy('updated_at', $order)\n ->filters($this->filter)\n ->paginate(\n request(\n 'per_page',\n \\Request::get('per_page') ?? 15\n )\n );\n }", "public function get_all ();", "public function getAll()\n {\n $model = new static::$model;\n\n $per_page = request('per_page');\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n if( $per_page ) $model->setPerPage($per_page);\n\n $perPage = $model->getPerPage();\n if ($perPage) {\n $paginator = $query->paginate($perPage);\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "public function showEntities()\n {\n return Entity::paginate(10);\n }", "public function index()\n {\n $domainMetaData = DomainMetaData::paginate(10);\n return $this->response->paginator($domainMetaData,new DomainMetaDataTransformer());\n }", "public function index()\n {\n return Repository::all();\n }", "public function getAll()\n {\n $this->authorizeUserAction('viewAll');\n\n $model = new static::$model;\n\n // If we are caching the endpont, do a simple get all resources\n if (static::$cacheAll) {\n return $this->response->collection(Cache::remember(static::getCacheKey(), static::$cacheExpiresIn, function () use ($model) {\n return $model::with($model::getCollectionWith())->get();\n }), $this->getTransformer());\n }\n\n $query = $model::with($model::getCollectionWith());\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n $perPage = $model->getPerPage();\n if ($perPage) {\n // If specified, use per_page of the request\n if (request()->has('per_page')) {\n $perPage = intval(request()->input('per_page'));\n }\n\n $paginator = $query->paginate($perPage);\n\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "public function getPaginated();", "public abstract function getAll();", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function getAll()\n\t{\n\t\treturn $this->getMyRepository()->findAll();\n\t}", "public function findAll() {}", "public function findAll() {}", "public function findAll() {}", "public function fetchAll()\n {\n $products = product::with('brand')->paginate(8);\n return productResource::collection($products);\n }", "protected function getAll() {}", "public function index()\n {\n return $this->repository->all();\n }", "public function index()\n {\n return $this->repository->all();\n }", "public function index() {\n\t\treturn $this->repository->all();\n\t}", "public function findAll()\n {\n $this->setPageSize(9999);\n \n return $this->find();\n }", "public function fetchAllPaginated() {\r\n \r\n // Create a Paginator for the blog posts query\r\n \r\n $paginator = Zend_Paginator::factory($this->select());\r\n \r\n // $select = $db->select()->from('posts')->sort('date_created DESC');\r\n \r\n // Create a Paginator for the blog posts query\r\n \r\n \r\n return $paginator; \r\n \r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $paginator = $this->get('knp_paginator');\n\t\t$query = $em->getRepository('AppBundle:Peserta')->dataAllQuery();\n $pagination = $paginator->paginate(\n\t\t\t$query,\n\t\t\t$this->get('request')->query->get('page', 1),\n\t\t\t25\n\t\t);\n\n return array(\n 'entities' => $pagination,\n );\n }", "public function findAllAction();", "abstract public function getAll();", "abstract public function getAll();", "abstract public function getAll();", "public function getAll()\n {\n return $this->banque->paginate(10);\n }", "protected function fetchData()\n\t{\n\t\t$this->addScopes();\n\t\t$criteria=$this->getCriteria();\n\t\tif(($pagination=$this->getPagination())!==false)\n\t\t{\n\t\t\t$pagination->setItemCount($this->getTotalItemCount());\n\t\t\t$pagination->applyLimit($criteria);\n\t\t}\n\t\tif(($sort=$this->getSort())!==false)\n\t\t\t$sort->applyOrder($criteria);\n\t\treturn CActiveRecord::model($this->modelClass)->findAll($criteria);\n\t}", "public function paginate()\n {\n return $this->configurationRepository->scopeQuery(function ($query) {\n return $query->orderBy('id', 'desc');\n })->paginate();\n }", "public function index()\n {\n return Container::paginate();\n }", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public function findAll();", "public final function get_all()\n {\n }", "public function index()\n {\n return $this->paginate();\n }", "public function index()\n {\n return Bien::paginate(3);\n }", "public function getAllPaginateRepo($data = [])\n {\n $perPage = $data['perPage'];\n $sort = $data['sort'];\n $page = $data['page'];\n $id = $data['id'];\n $active = $data['active'];\n $status = $data['status'];\n $type = $data['type'];\n $name = $data['name'];\n $email = $data['email'];\n $branch = $data['branch'];\n $phone = $data['phone'];\n\n $driver = $this->driver->with(['user', 'user.address', 'user.branch']);\n\n if (empty($perPage)) {\n $perPage = 15;\n }\n\n if (!empty($sort['field'])) {\n $order = $sort['order'];\n if ($order == 'ascend') {\n $order = 'asc';\n } else if ($order == 'descend') {\n $order = 'desc';\n } else {\n $order = 'desc';\n }\n switch ($sort['field']) {\n case 'id':\n $driver = $driver->sortable([\n 'id' => $order\n ]);\n break;\n case 'active':\n $driver = $driver->sortable([\n 'active' => $order\n ]);\n break;\n case 'type':\n $driver = $driver->sortable([\n 'type' => $order\n ]);\n break;\n case 'status':\n $driver = $driver->sortable([\n 'status' => $order\n ]);\n break;\n case 'user.name':\n $driver = $driver->sortable([\n 'user.name' => $order\n ]);\n break;\n case 'user.phone':\n $driver = $driver->sortable([\n 'user.phone' => $order\n ]);\n break;\n default:\n $driver = $driver->sortable([\n 'id' => 'desc'\n ]);\n break;\n }\n }\n\n if (!empty($id)) {\n $driver = $driver->where('id', 'ilike', '%'.$id.'%');\n }\n\n if (!empty($type)) {\n $driver = $driver->where('type', 'ilike', '%'.$type.'%');\n }\n\n if (!empty($active)) {\n $driver = $driver->where('active', 'ilike', '%'.$active.'%');\n }\n\n if (!empty($status)) {\n $driver = $driver->where('status', 'ilike', '%'.$status.'%');\n }\n\n if (!empty($name)) {\n $driver = $driver->whereHas('user', function($q) use ($name) {\n $q->where('name', 'ilike', '%'.$name.'%');\n });\n }\n\n if (!empty($email)) {\n $driver = $driver->whereHas('user', function($q) use ($email) {\n $q->where('email', 'ilike', '%'.$email.'%');\n });\n }\n\n if (!empty($phone)) {\n $driver = $driver->whereHas('user', function($q) use ($phone) {\n $q->where('phone', 'ilike', '%'.$phone.'%');\n });\n }\n\n if (!empty($branch)) {\n $driver = $driver->whereHas('user', function($q) use ($branch) {\n $q->whereHas('branch', function($x) use ($branch) {\n $x->where('name', 'ilike', '%'.$branch.'%');\n });\n });\n }\n\n $driver = $driver->paginate($perPage);\n\n // $driver = $this->driver->sortable(['created_at' => 'desc'])->simplePaginate($perPage);\n return $driver;\n }", "public function index()\n {\n return response()->json(Item::paginate(10000), 200);\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function index()\n {\n return Article::latest()->paginate(20);\n }", "public static function getAll() {}", "public function index()\n {\n return ProdutoResource::collection(Produto::paginate(25));\n }", "public function index(): AnonymousResourceCollection\n {\n return CommerceResource::collection(Commerce::latest()->paginate());\n }", "public function getAll()\n {\n return Admin::paginate($this->pagination);\n }", "public function findAll(): QueryResultInterface;", "public function all(): Paginator\n {\n return $this->model->paginate();\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 abstract function fetchAll();", "public function getAll(): array;", "public function getAll(): array;", "public function getAll(): array;", "public abstract function fetchAllObjects();", "public function all()\n {\n // Response variables\n $result = true;\n $error = null;\n $object = null;\n\n // Operations\n try{\n $object = SocialMedia::all();\n }\n catch(\\Exception $e){\n $error = $e;\n $result = false;\n }\n\n // Response\n $resp = new RepositoryResponse($result, $object, $error);\n return $resp;\n }", "public function retrieve()\n {\n return $this->getRepository()->findAll();\n }" ]
[ "0.74444866", "0.74282986", "0.73016363", "0.73016363", "0.7294588", "0.6995143", "0.6995143", "0.6995143", "0.6994534", "0.6994534", "0.68970305", "0.68278205", "0.6815231", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67728114", "0.67632663", "0.6736887", "0.6721918", "0.67096967", "0.670588", "0.66999733", "0.66937065", "0.669081", "0.668702", "0.6684966", "0.6684966", "0.66826385", "0.66663605", "0.6635529", "0.6635529", "0.6631442", "0.6631359", "0.6609591", "0.6595619", "0.6585484", "0.65813524", "0.65813524", "0.65813524", "0.65811694", "0.6578727", "0.6578667", "0.65669703", "0.65639514", "0.65639514", "0.65639514", "0.65639514", "0.65639514", "0.65639514", "0.65639514", "0.65639514", "0.6553847", "0.65383995", "0.6534668", "0.6531265", "0.6525793", "0.6506436", "0.6506436", "0.6506436", "0.6506436", "0.6506436", "0.6506436", "0.6506436", "0.6506436", "0.649052", "0.6474372", "0.6474177", "0.6460768", "0.6459151", "0.64586973", "0.6453855", "0.64514107", "0.64514107", "0.64514107", "0.64501685", "0.6440786", "0.6440786", "0.6440786", "0.64383745", "0.6412135", "0.6409198" ]
0.0
-1
Run the database seeds.
public function run() { $this->command->info('Seeding Memberships'); $membership = [ [ 'name' => 'Sky Member', 'direct_bonus' => '10%', ], [ 'name' => 'Iron', 'direct_bonus' => '12%', ], [ 'name' => 'Steel', 'direct_bonus' => '15%', ], [ 'name' => 'Crystal', 'direct_bonus' => '18%', ], [ 'name' => 'Master', 'direct_bonus' => '20%', ], [ 'name' => 'Champion', 'direct_bonus' => '25%', ], [ 'name' => 'Titan', 'direct_bonus' => '25%', ], ]; foreach($membership as $member) { DB::table('membership')->insert([ 'name' => $member['name'], 'direct_bonus' => $member['direct_bonus'], ]); } }
{ "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
put your code here
public function post() { $this->data = $this->param(); foreach ($this->data as $ms) { $muestra = new Muestra(); $muestra->tomamuestra_fecha = $ms['fechatoma']; $muestra->tomamuestra_hora = $ms['horatoma']; $muestra->recepcionmuestra_fecha = $ms['fecharecepcion']; $muestra->recepcionmuestra_hora = $ms['horarecepcion']; $muestra->tipomatrizanalizada_id = $ms['tipomatriz']; $muestra->tipomuestra_id = $ms['tipomuestra']; $muestra->codigomuestra = $ms['codigomuestra']; $muestra->lugartomamuestra_id = $ms['lugarmuestra']; $muestra->lugartomamuestratexto = $ms['lugartomamuestratexto']; $muestra->formato_id = $ms['formato_id']; $muestra->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function custom()\n\t{\n\t}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\r\n {\r\n\r\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }", "public function run()\n {\n\n parent::run();\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "function execute()\r\n\t{\r\n\t\t\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "function use_codepress()\n {\n }", "public function run()\n {\n // Put your code here;\n }", "function run()\r\n {\r\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run() {\n }", "public static function run() {\n\t}", "public function onRun()\n {\n }", "public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}", "public function run() {\n }", "public function render_content() {\n\t}", "public function main()\r\n {\r\n \r\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "function render() ;", "function execute()\n {\n }", "public function run(): void\n {\n //\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }", "public function render()\n {\n //\n }", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}", "public function run(){}", "public function demo()\n {\n // xu ly logic\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function render(){\n\t\t\n\t}", "public static function main(){\n\t\t\t\n\t\t}", "public function render() {\r\n\t\t\r\n\t}", "public function main()\n\t{\n\t}", "function handle() ;", "public function execute() {\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function run() {}", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "function main()\r\n {\r\n $this->setOutput();\r\n }", "public function run()\n\n {\n DB::table('actives')->insert([\n 'script_tag' => 0,\n 'status' =>0\n \n ]);\n //\n }", "protected function _exec()\n {\n }", "public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}", "protected function after_load(){\n\n\n }", "public function work()\n {\n }", "function run();", "function run();", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "function tap_run_page_handler() \n {\n include(\"/var/www/html/run/tap_run.php\");\n \n $params = cargaArray('Torneo Argentino de Programación', $form, '');\n \n include('body.php'); \n }", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "public function helper()\n\t{\n\t\n\t}", "public function drawContent()\n\t\t{\n\t\t}" ]
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407", "0.56068903", "0.56068903", "0.56068903", "0.56016845", "0.5597219", "0.5595339", "0.5591545", "0.558057", "0.55636305", "0.55034596", "0.5487096", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.54594034", "0.5446425", "0.5446197", "0.54451364", "0.54319674", "0.5426377", "0.54072845", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.53981763", "0.5394762", "0.5392594", "0.5392164", "0.5391672", "0.5391672", "0.5391672", "0.5386191", "0.53823715", "0.5374112", "0.5373851", "0.5371084", "0.5369742", "0.53666246", "0.5365522", "0.5358571", "0.53542304", "0.5353158", "0.5345768", "0.5339915", "0.53389114", "0.53339213", "0.5332912", "0.5323722", "0.5323722", "0.5321411", "0.5318719", "0.53184503", "0.5300535", "0.5290181", "0.52723837", "0.52723306" ]
0.0
-1
escapeXML function helps you escape special characters in XML
function escapeXML($strItem, $forDataURL) { //Common replacements $findStr = array("&", "<", ">", "'"); $repStr = array("&amp;", "&lt;", "&gt;", "&apos;"); $strItem = str_replace($findStr, $repStr, $strItem); //We've not considered any special characters here. //You can add them as per your language and requirements. //Return return $strItem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xml_escape($value)\n{\n return htmlspecialchars(preg_replace('#[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]+#', '',\n $value), ENT_QUOTES);\n}", "public static function escapeXML( string $xml, array $escape ) {\n\n // Escape HTML.\n $xml = self::escapeHTML($xml, $escape);\n\n // Escape query strings.\n $xml = self::escapeQueryStrings($xml);\n\n // Escape ampersands.\n $xml = self::escapeAmpersands($xml);\n\n // Return the escaped XML.\n return $xml;\n\n }", "private function _escapeXml($value) {\n $from = array( \"&\", \"<\", \">\", \"'\", \"\\\"\"); \n $to = array( \"&amp;\", \"&lt;\", \"&gt;\", \"&#039;\", \"&quot;\");\n return str_replace($from, $to, $value);\n }", "function escapeXML($elementValue){\n\n $escapedValue = str_replace(\"&\", \"&amp;\", $elementValue);\n $escapedValue = str_replace(\"<\", \"&lt;\", $escapedValue);\n\n return $escapedValue;\n\n }", "public static function xml_escape($input)\n {\n return htmlentities($input);\n }", "private function escapeXML($xmlValue) {\n\t\t\t$xmlValue = str_replace(\"&\", \"&amp;\", $xmlValue);\n\t\t\t$xmlValue = str_replace(\"<\", \"&lt;\", $xmlValue);\n\t\t\t$xmlValue = str_replace(\">\", \"&gt;\", $xmlValue);\n\t\t\t$xmlValue = str_replace(\"\\\"\", \"&quot;\", $xmlValue);\n\t\t\t$xmlValue = str_replace(\"'\", \"&apos;\", $xmlValue);\n\n\t\t\treturn $xmlValue;\n\t\t}", "protected static function escapeHTML( string $xml, array $escape ) {\n\n // Initialize the result.\n $result = $xml;\n\n // Look for HTML within the XML.\n foreach( $escape as $tag ) {\n\n // Build the regex used to locate the HTML.\n $regex = \"/\\<{$tag}\\>([\\S\\s]*?)\\<\\/{$tag}\\>/\";\n\n // Find any HTML that should be escaped.\n if( preg_match_all($regex, $result, $matches, PREG_SET_ORDER) ) {\n\n // Escape the HTML one by one.\n foreach( $matches as $match ) {\n\n // Escape the HTML.\n $result = str_replace($match[0], \"<{$tag}>\".htmlspecialchars($match[1]).\"</{$tag}>\", $result);\n\n // If result contains a .xml file extension, strip it.\n if (strpos($result, '.xml') !== false) {\n \n // Strip '.xml' extensions from hyperlinks.\n $result = str_replace('.xml','',$result);\n\n }\n\n }\n\n }\n\n }\n\n // Return the result.\n return $result;\n\n }", "function esc_xml($text)\n {\n }", "function xml_entities($text, $charset = 'UTF-8'){\n\t\t$xml_special_chars = array(\"&quot;\",\"&amp;\",\"&apos;\",\"&lt;\",\"&gt;\");\n $text = htmlentities($text, ENT_COMPAT, $charset, false);\n\n $xml_special_char_regex = \"(?\";\n foreach($xml_special_chars as $key => $value){\n $xml_special_char_regex .= \"(?!$value)\";\n }\n $xml_special_char_regex .= \")\";\n \n $pattern = \"/$xml_special_char_regex&([a-zA-Z0-9]+;)/\";\n return preg_replace($pattern, '&amp;${1}', $text);\n}", "function xmlenc($str, $trans = \"\")\n{\n //return htmlentities ( $str, ENT_QUOTES, \"ISO-8859-1\" );\n $str = str_replace(\"&\",\"&amp;\",$str);\n $str = str_replace(\"<\",\"&lt;\",$str);\n $str = str_replace(\">\",\"&gt;\",$str);\n return $str;\n\n}", "function _make_safe_for_xml( $t )\n \t{\n \t\treturn str_replace( '&amp;#39;', '&#39;', htmlspecialchars( $t ) );\n \t}", "function xml_special_char($t_data){\n\n if(preg_match(\"/\\\"/\", $t_data)) str_replace(\"\\\"\", \"&quot\", $t_data);\n elseif(preg_match(\"/'/\", $t_data)) str_replace(\"\\'\", \"&quot\", $t_data);\n elseif(preg_match(\"/&/\", $t_data)) str_replace(\"&\", \"&amp\", $t_data);\n elseif(preg_match(\"/</\", $t_data)) str_replace(\"<\", \"&lt\", $t_data);\n elseif(preg_match(\"/>/\", $t_data)) str_replace(\">\", \"&gt\", $t_data);\n\n return $t_data;\n }", "function _xmlEntities($string) {\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\n }", "protected static function escapeAmpersands( string $xml ) {\n\n // Initialize the result.\n $result = $xml;\n\n // Build the regex used to locate lone ampersands.\n $regex = '/ \\& /';\n\n // Look for query strings within the XML.\n if( preg_match_all($regex, $result, $matches, PREG_SET_ORDER) ) {\n\n // Escape the ampersands one by one.\n foreach( $matches as $match ) {\n\n // Escape the ampersand.\n $result = str_replace($match[0], ' &amp; ', $result);\n\n }\n\n }\n\n // Return the result.\n return $result;\n\n }", "function __xml($s) {\n\n return str_replace(array('&', '<', '>', '\"'),\n array('&amp;', '&lt;', '&gt;', '&quot;'),\n $s);\n\n}", "function xml_entities($value) {\n\n return strtr(\n\n $value, \n\n array(\n\n \"<\" => \"&lt;\",\n\n \">\" => \"&gt;\",\n\n '\"' => \"&quot;\",\n\n \"'\" => \"&apos;\",\n\n \"&\" => \"&amp;\",\n\n )\n\n );\n\n}", "public function testEncodeForXML()\n {\n $this->assertEquals(\n '&quot;&gt;&lt;script&gt;alert&#x28;&apos;XSS&apos;&#x29;&lt;&#x2f;script&gt;&lt;foo attr&#x3d;&quot;',\n $this->_xmlEntityCodec->encode(\n $this->_immune_xml,\n '\"><script>alert(\\'XSS\\')</script><foo attr=\"'\n )\n );\n }", "function xmlentities($string)\n{\n return str_replace ( array ( '&', '\"', \"'\", '<', '>' ), array ( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;' ), $string );\n}", "public static function xml($string) {\n return htmlspecialchars($string, ENT_QUOTES | ENT_XML1, 'UTF-8');\n }", "function xmlentities ( $string ) { \n\treturn str_replace ( array ('&', '<', '>', '\"'), array ('&amp;', '&lt;', '&gt;', '&#34;' ), $string ); \n}", "function xmlEntities($str)\n{\n $xml = array('&#34;','&#38;','&#38;','&#60;','&#62;','&#160;','&#161;','&#162;','&#163;','&#164;','&#165;','&#166;','&#167;','&#168;','&#169;','&#170;','&#171;','&#172;','&#173;','&#174;','&#175;','&#176;','&#177;','&#178;','&#179;','&#180;','&#181;','&#182;','&#183;','&#184;','&#185;','&#186;','&#187;','&#188;','&#189;','&#190;','&#191;','&#192;','&#193;','&#194;','&#195;','&#196;','&#197;','&#198;','&#199;','&#200;','&#201;','&#202;','&#203;','&#204;','&#205;','&#206;','&#207;','&#208;','&#209;','&#210;','&#211;','&#212;','&#213;','&#214;','&#215;','&#216;','&#217;','&#218;','&#219;','&#220;','&#221;','&#222;','&#223;','&#224;','&#225;','&#226;','&#227;','&#228;','&#229;','&#230;','&#231;','&#232;','&#233;','&#234;','&#235;','&#236;','&#237;','&#238;','&#239;','&#240;','&#241;','&#242;','&#243;','&#244;','&#245;','&#246;','&#247;','&#248;','&#249;','&#250;','&#251;','&#252;','&#253;','&#254;','&#255;');\n $html = array('&quot;','&amp;','&amp;','&lt;','&gt;','&nbsp;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;');\n $str = str_replace($html,$xml,$str);\n $str = str_ireplace($html,$xml,$str);\n return $str;\n}", "static function xmlEncode($v)\n {\n \t// Encode array\n if (is_array($v))\n return self::xmlEncodeArray($v);\n\n // Ignore empty string and object\n if ($v == null || is_object($v))\n return null;\n\n // Decode all entities\n $v = html_entity_decode($v, ENT_COMPAT, 'UTF-8');\n\n return htmlspecialchars($v, ENT_COMPAT, 'UTF-8');\n }", "static function cleanXml($xml, $encoding = 'UTF-8')\n {\n static $mapping = null;\n if (!$mapping) {\n $list1 = get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES, $encoding);\n $list2 = get_html_translation_table(HTML_SPECIALCHARS, ENT_NOQUOTES, $encoding);\n $list = array_merge($list1, $list2);\n $mapping = array();\n foreach ($list as $char => $entity) {\n $mapping[strtolower($entity)] = '&#' . self::ord($char) . ';';\n }\n //$extras = array('&times;' => '&#215;', '&copy;' => '&#169;', '&nbsp;' => '&#160;', '&raquo;' => '&#187;', '&laquo;' => '&#171;');\n $extras = array('&times;' => '&#215;');\n $mapping = array_merge($mapping, $extras);\n }\n $xml = str_replace(array_keys($mapping), $mapping, $xml);\n $xml = preg_replace ('/[^\\x{0009}\\x{000a}\\x{000d}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}]+/u', ' ', $xml);\n return $xml;\n }", "function XMLify($input){\n return '<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>' . \"\\n\" . $input;\n\n}", "protected static function escapeQueryStrings( string $xml ) {\n\n // Initialize the result.\n $result = $xml;\n\n // Build the regex used to locate query strings.\n $regex = '/\\?[[:word:][:punct:]]+?\\=[[:word:][:punct:]]+?((?:\\&(?![x#]{0,2}?[a-z]+;)[[:word:][:punct:]]+?\\=[[:word:][:punct:]]+?(?=\\<|\\&|$))+)/';\n\n // Look for query strings within the XML.\n if( preg_match_all($regex, $result, $matches, PREG_SET_ORDER) ) {\n\n // Escape the query strings one by one.\n foreach( $matches as $match ) {\n\n // Capture the query string and its replacements.\n $query = $match[1];\n $replacement = strtr($match[1], ['&' => '&amp;']);\n\n // Escape the query string.\n $result = preg_replace('/'.preg_quote($query).'/', $replacement, $result, 1);\n\n }\n\n }\n\n // Return the result.\n return $result;\n\n }", "function attribute_escape($text)\n {\n }", "function _transxml($text) {\n \n //first replace allready translated text to original symbols\n\t $preout = str_replace(\"&amp;\",\"&\",$text);\n\t $preout1 = str_replace(\"&lt;\",\"<\",$preout);\n\t $preout2 = str_replace(\"&gt;\",\">\",$preout1);\n\t $preout3 = str_replace(\"&apos;\",\"'\",$preout2); \t \t \n\t $preout4 = str_replace(\"&quot\",\"\\\"\",$preout3);\n\t \n\t //next set original symbols to its equal symbols\t \n\t $out4 = str_replace(\"\\\"\",\"&quot;\",$preout4);\n\t $out3 = str_replace(\"'\",\"&apos;\",$preout4);\n\t $out2 = str_replace(\">\",\"&gt;\",$preout4);\n\t $out1 = str_replace(\"<\",\"&lt;\",$preout4);\n\t $out = str_replace(\"&\",\"&amp;\",$preout4);\t \t \t \t \n\t \n\t return ($out);\n }", "function escape($value) {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}", "function xssafe($data, $encoding = 'UTF-8')\n{\n //return htmlspecialchars($data,ENT_QUOTES | ENT_HTML401,$encoding);\n return htmlspecialchars($data);\n}", "public static function xmlEncode($_str,$_latin=FALSE) {\n\t\treturn strtr($_str,self::xmlTable($_latin));\n\t}", "function escape($html) { return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\"); }", "function escape($text) {\n\t$text = htmlspecialchars($text, ENT_QUOTES);\n\t$text = addslashes($text);\n\treturn $text;\n}", "function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }", "public function testEncodeImmuneCharsForXML()\n {\n $immune = array();\n $this->assertEquals(\n 'testTEST0123&#x2c;&#x2e;&#x2d;&#x5f;&#x20;',\n $this->_xmlEntityCodec->encode(\n $immune,\n 'testTEST0123,.-_ '\n )\n );\n }", "function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n}", "function tag_escape($tag_name)\n {\n }", "abstract protected function xmlEncode($value = null);", "function escape($str) {\n return htmlspecialchars($str, ENT_QUOTES);\n}", "function _twig_escape_html_attr_callback($matches)\n{\n /*\n * While HTML supports far more named entities, the lowest common denominator\n * has become HTML5's XML Serialisation which is restricted to the those named\n * entities that XML supports. Using HTML entities would result in this error:\n * XML Parsing Error: undefined entity\n */\n static $entityMap = array(\n 34 => 'quot', /* quotation mark */\n 38 => 'amp', /* ampersand */\n 60 => 'lt', /* less-than sign */\n 62 => 'gt', /* greater-than sign */\n );\n $chr = $matches[0];\n $ord = ord($chr);\n /**\n * The following replaces characters undefined in HTML with the\n * hex entity for the Unicode replacement character.\n */\n if (($ord <= 0x1f && $chr != \"\\t\" && $chr != \"\\n\" && $chr != \"\\r\") || ($ord >= 0x7f && $ord <= 0x9f)) {\n return '&#xFFFD;';\n }\n /**\n * Check if the current character to escape has a name entity we should\n * replace it with while grabbing the hex value of the character.\n */\n if (strlen($chr) == 1) {\n $hex = strtoupper(substr('00'.bin2hex($chr), -2));\n } else {\n $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');\n $hex = strtoupper(substr('0000'.bin2hex($chr), -4));\n }\n $int = hexdec($hex);\n if (array_key_exists($int, $entityMap)) {\n return sprintf('&%s;', $entityMap[$int]);\n }\n /**\n * Per OWASP recommendations, we'll use hex entities for any other\n * characters where a named entity does not exist.\n */\n return sprintf('&#x%s;', $hex);\n}", "function qa_xml($string)\n{\n\treturn htmlspecialchars(preg_replace('/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/', '', (string)$string));\n}", "public function escape($text);", "function escape($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "static function clean4xml($xml) {\n\t\t$xml = self::makeUTF8($xml);\n\t\t$xml = self::str_replace_array(array(\n\t\t\t'&' => '&amp;',\n\t\t\t'<' => '&lt;',\n\t\t\t'>' => '&gt;',\n\t\t\t'\"' => '&quot;',\n\t\t\t\"'\" => '&apos;',\n\t\t\t),$xml);\n\t\t$xml = self::str_replace_array(array(\n\t\t\t'&amp;amp;' => '&amp;',\n\t\t\t),$xml);\n\t\t$xml = preg_replace('`\\n\\t+`',\"\\n\",$xml);\n\t\t$xml = preg_replace('`>\\t+`',\">\\n\",$xml);\n\t\t$xml = preg_replace('`>\\s?\\t?<`',\">\\n<\",$xml);\n\t\t$xml = preg_replace('`\\n\\n++`',\"\\n\",$xml);\n\t\treturn $xml;\n\t}", "function input_xml($text)\n{\n if( function_exists('mb_eregi_replace'))\n {\n $text = mb_eregi_replace(\"#\",'#001;',$text);\n $text = mb_eregi_replace(\"<\",'#002;',$text);\n $text = mb_eregi_replace(\">\",'#003;',$text);\n $text = mb_eregi_replace(\"&\",'#004;',$text);\n }\n else\n {\n $text = str_replace(\"#\",'#001;',$text);\n $text = str_replace(\"<\",'#002;',$text);\n $text = str_replace(\">\",'#003;',$text);\n $text = str_replace(\"&\",'#004;',$text);\n }\n \n return $text;\n}", "function ha($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_QUOTES | ENT_IGNORE, 'UTF-8');\n}", "function ailyak_facebook_group_feed_html_escape(&$text) {\n $text = htmlspecialchars($text);\n}", "abstract protected function _escape($s);", "protected static function xmlentities($string) {\n return str_replace ( array ( '&', '\"', \"'\", '<', '>', '`' ), array ( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;', '&apos;' ), $string );\n }", "function escape($string) {\n\n return htmlentities($string, ENT_QUOTES, 'ISO-8859-15');\n}", "public function testEscape() {\n\t\t$string = 'Tom \"&/Or\" \\'Jerry\\' <[email protected]>';\n\t\t$expected = 'Tom &quot;&amp;&#x2F;Or&quot; &#x27;Jerry&#x27; &lt;[email protected]&gt;';\n\t\t$result = _::escape($string);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test unescaping a string\n\t\t$result = _::escape($result, false);\n\t\t$this->assertEquals($string, $result);\n\t}", "public abstract function escape($string);", "function escape($string) {\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "public function htmlspecial($text) {\n // This converts single quote to &#039;\n $tooltip = htmlspecialchars($text,ENT_QUOTES);\n // since the result is parsed again with xml_parser, and xml_parser\n // autoconverts (apparently) &#039; back to single quote,\n // and then generates a parse error if this single quote occurs\n // within an atribute value expresses as <x attr='y'> (i.e. y has a\n // single quote).\n // Because of this we change &#039; to &#8217; -- which xml_parser\n // apparently leaves unchanged, and generates no error.\n $tooltip = preg_replace('/&#039;/','&#8217;',$tooltip);\n return $tooltip;\n}", "function html_escape($v) {\n\treturn escape($v, TRUE);\n}", "function html_escape($value)\n{\n return apply_filters('html_escape', $value);\n}", "public function escape($string);", "public function escape($string);", "public static function escape($value) {}", "public function escape($value);", "public function escape($value);", "function escape($string) {\r\n\treturn htmlentities($string, ENT_QUOTES, 'UTF-8');\r\n}", "function escape ($val, $charset = 'UTF-8') {\n\treturn htmlspecialchars ($val, ENT_QUOTES, $charset);\n}", "function sanitxt($sanitxt) {\r\n\t$sanitxt = str_replace('><','> <',$sanitxt);\r\n\r\n\t// remove HTML tags\r\n\t$sanitxt = strip_tags($sanitxt);\r\n\r\n\t// remove multiple spaces\r\n\t$sanitxt = preg_replace('/\\s+/', ' ', $sanitxt);\r\n\r\n\t// convert smart quotes into normal\r\n\tconvert_smart_quotes($sanitxt);\r\n\r\n\t// replace quotes and ampersands with HTML chars (recommended)\r\n\t// and encode string to UTF-8. UTF-8 is default from PHP 5.4.0 only\r\n\r\n\t$sanitxt = htmlspecialchars($sanitxt,ENT_QUOTES,\"UTF-8\",FALSE);\r\n\r\nreturn($sanitxt);\r\n}", "function xmlClean($tmp) {\n\n$new = str_replace('&','&amp;',$tmp);\n$new = str_replace('<','&lt;',$new);\n$new = str_replace('>','&gt;',$new);\n$new = str_replace('\"','&quot;',$new);\n$new = str_replace(\"'\",'&apos;',$new);\n$new = str_replace(\"£\",'&pound;',$new);\n$new = trim($new);\n\nif (!$new) $new = 0;\nreturn $new;\n}", "public function htmlspecial($text) {\n // First, use the php function to convert quotes to html entities:\n // This converts single quote to &#039;\n $tooltip = htmlspecialchars($text,ENT_QUOTES);\n // since the result is parsed again with xml_parser, and xml_parser\n // autoconverts (apparently) &#039; back to single quote,\n // and then generates a parse error if this single quote occurs\n // within an atribute value expresses as <x attr='y'> (i.e. y has a\n // single quote).\n // Because of this we change &#039; to &#8217; -- which xml_parser\n // apparently leaves unchanged, and generates no error.\n $tooltip = preg_replace('/&#039;/','&#8217;',$tooltip);\n return $tooltip;\n}", "function sysEncode( $str ){\n\treturn( addslashes( htmlspecialchars( $str ) ) );\n}", "function escape_string($string)\n{\n\tglobal $connection;\n\t$string=htmlentities($string);\n\treturn $string;\n}", "abstract public function escapeString($value);", "protected abstract function escape($string);", "function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {\n if ( $double_encode ) {\n $string = @htmlspecialchars( $string, $quote_style, $charset );\n } else {\n // Decode &amp; into &\n $string = wp_specialchars_decode( $string, $quote_style );\n\n // Guarantee every &entity; is valid or re-encode the &\n $string = kses_normalize_entities( $string );\n\n // Now re-encode everything except &entity;\n $string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n for ( $i = 0; $i < count( $string ); $i += 2 )\n $string[$i ] = @htmlspecialchars( $string[$i], $quote_style, 'UTF-8' );\n\n $string = implode( '', $string );\n }\n\n return $string;\n\n}", "function replace_entities($xml, $entities)\n\t{\n\t\tforeach ($entities[0] as $key => $val)\n\t\t{\n\t\t\t$xml = str_replace('&'.$entities[0][$key].';', $entities[1][$key], $xml);\n\t\t}\n\n\t\treturn $xml;\n\t}", "public function testNoEncodeImmuneCharsForXML()\n {\n $this->assertEquals(\n 'testTEST0123,.-_ ',\n $this->_xmlEntityCodec->encode(\n $this->_immune_xml,\n 'testTEST0123,.-_ '\n )\n );\n }", "public abstract function escapeString($value);", "public function xmlize($content) {\n\t\tif (empty($content)) { // check to make sure $content isn't empty\n\t\t\tthrow new Exception('Empty value passed from '.\n\t\t\t\t$this->className.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$invalid_text = array('&', '<', '>', '\\r\\n', '\\n');\n\t\t\t\t$valid_text = array('&amp;', '&lt;', '&gt;', ' ', ' ');\n\t\t\t\t$content = str_replace($invalid_text, $valid_text, $content);\n\t\t\t\treturn $content;\n\t\t\t} catch (Exception $e) { \n\t\t\t\tthrow new Exception($e->getMessage().' from '.$this->className.\n\t\t\t\t\t'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t\t);\n\t\t\t} //<-- end try -->\n\t\t} //<-- end if -->\n\t}", "function s2_htmlencode($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "public function testSpecialChar()\n\t{\n\t\t$special = array(\n\t\t\t'symbol' => '! @ # $ % ^ & * ( ) _ + - = [ ] \\ { } | ; \\' : \" , . / < > ? &amp; &lt; &#039;',\n\t\t\t'html' => '<body><a href=\"http://example.com\">click</a></body>',\n\t\t\t'space' => \"white \\t\\n space\", // no cdata tag for this\n\t\t\t'raw' => '<span>comm]]>ent</span>', // premature end cdata tag will be escaped\n\t\t);\n\n\t\t$xml = $this->getDataElement();\n\t\tInterspire_Xml::addArrayToXML($xml, $special);\n\t\t$out = Interspire_Xml::prettyIndent($xml);\n\n\t\t$expected = Interspire_Xml::getDeclaration();\n\t\t$expected .= '\n<data>\n <symbol><![CDATA['.$special['symbol'].']]></symbol>\n <html><![CDATA['.$special['html'].']]></html>\n <space>'.$special['space'].'</space>\n <raw><![CDATA[<span>comm]]]]><![CDATA[>ent</span>]]></raw>\n</data>\n';\n\t\t$this->assertTrue(Interspire_Xml::validateXMLString($out));\n\t\t$this->assertEquals($expected, $out);\n\n\t\t// reverse\n\t\t$xml = simplexml_load_string($out);\n\t\t$result = Interspire_Xml::xml2array($xml);\n\t\t$this->assertEquals($special, $result);\n\n\t\t// test all html entities\n\t\t$entities = array();\n\t\tforeach (get_html_translation_table(HTML_ENTITIES) as $entity => $encode) {\n\t\t\t$key = str_replace(array('&', ';'), '', $encode);\n\t\t\t$entities[$key] = $encode;\n\t\t}\n\n\t\t$xml = $this->getDataElement();\n\t\tInterspire_Xml::addArrayToXML($xml, $entities);\n\t\t$out = Interspire_Xml::prettyIndent($xml);\n\n\t\t$this->assertTrue(Interspire_Xml::validateXMLString($out));\n\t\t$xml = simplexml_load_string($out);\n\t\t$result = Interspire_Xml::xml2array($xml);\n\t\t$this->assertEquals($entities, $result);\n\t}", "private function _escape($data)\n {\n return htmlspecialchars($data, ENT_QUOTES);\n }", "public function testEncodeInvalidCharsReplacedBySpace()\n {\n $this->assertEquals(\n 'a b c d e f&#x9;g',\n $this->_xmlEntityCodec->encode(\n $this->_immune_xml,\n 'a' . chr(0) . 'b' . chr(4) . 'c' . chr(128) . 'd' .\n chr(150) . 'e' . chr(159) . 'f' . chr(9) . 'g'\n )\n );\n }", "public static function escape($s) {}", "abstract public function escapeString($string);", "public function escape($text, $flags = ENT_COMPAT, $charset = null, $doubleEncode = true);", "function do_xml_encode($data, $as) {\n $encoder = new XmlEncoder();\n return $encoder->encode($data, $as);\n }", "protected function quote_escaped()\n {\n }", "function h($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_NOQUOTES | ENT_IGNORE, 'UTF-8');\n}", "function parseToXML($htmlStr) // function to parse the data fecthed from data base and strip it clean of excess (useless) character like commas etc.\n{ \n$xmlStr=str_replace('<','&lt;',$htmlStr); // replace character to allow clean xml output from data parsed\n$xmlStr=str_replace('>','&gt;',$xmlStr); // replace character to allow clean xml output from data parsed\n$xmlStr=str_replace('\"','&quot;',$xmlStr); // replace character to allow clean xml output from data parsed\n$xmlStr=str_replace(\"'\",'&#39;',$xmlStr); // replace character to allow clean xml output from data parsed\n$xmlStr=str_replace(\"&\",'&amp;',$xmlStr); // replace character to allow clean xml output from data parsed\nreturn $xmlStr; // return what is left after stripping the above characters from result set.\n}", "private function encode_xquery ($string) {\n // convert multiple consecutive white spaces (of any kind) to a single space\n // convert escaped quotes & apostrophes into their tamino entities\n $pattern = Array(\"/\\s+/\", \"/\\\\\\'/\", '/\\\\\\\"/');\n $replace = Array(\" \", \"&apos;\", '&quot;');\n $string = preg_replace($pattern, $replace, $string);\n // convert all characters into url %## equivalent\n return urlencode($string);\n }", "function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}", "public function escapeString($string);", "public function escapeString($stringToEscape);", "protected function renderAsXML() {}", "function xmldec($str)\n{\n if ( !is_string($str) )\n return \"\";\n\n return html_entity_decode($str,ENT_QUOTES,\"ISO-8859-1\");\n\n /*\n $str = str_replace ( \"&gt;\", \">\", $str );\n $str = str_replace ( \"&lt;\", \"<\", $str );\n $str = str_replace ( \"&amp;\", \"&\", $str );\n return $str;\n */\n\n}", "function customXmlClean($tmp) {\n\t//Use this function for returning data to the Android app\n\t\t\n\t$new = str_replace('&','and',$tmp);\n\t$new = str_replace('<','&lt;',$new);\n\t$new = str_replace('>','&gt;',$new);\n\t$new = str_replace('\"','',$new); //Remove speech marks\n\t$new = str_replace(\"'\",'',$new); //Remove apostrophes\n\t//$new = str_replace(\"£\",'&pound;',$new);\n\t$new = str_replace(\"£\",'',$new);\n\t$new = str_replace(\"*\",'',$new);\n\t$new = str_replace(array(\"\\r\", \"\\r\\n\", \"\\n\"), ',', $new); //Remove new lines and replace with a comma\n\t$new = htmlspecialchars($new);\n\t$new = trim($new);\n\t$new = rtrim($new);\n\t\n\tif (!$new) $new = 0;\n\treturn $new;\n}", "public static function escapeCharacters($stringa){\r\n $stringa = preg_replace('/&/', '&amp;', $stringa);//Questa istruzione deve essere prima delle succesive per non impedire il parsing degli altri escape\r\n $stringa = preg_replace('/\"/', '&quot;', $stringa);\r\n $stringa = preg_replace('/\\'/', '&apos;', $stringa);\r\n $stringa = preg_replace('/</', '&lt;', $stringa);\r\n $stringa = preg_replace('/>/', '&gt;', $stringa);\r\n return $stringa;\r\n }", "function html_escape($var, bool $double_encode = true)\n {\n if ($double_encode === false) {\n throw new NotSupportedException(\n '$double_encode = false is not supported.'\n );\n }\n\n return esc($var, 'html');\n }", "abstract public function escape_string( $str );", "protected static function escapeAttrChar($matches) {\n $char = $matches[0];\n \n if(static::charIsUndefined($char)) {\n return '&#xFFFD;';\n }\n \n $dec = hexdec(bin2hex($char));\n \n $namedEntities = array(\n 34 => '&quot;', // \"\n 38 => '&amp;', // &\n 60 => '&lt;', // <\n 62 => '&gt;' // >\n );\n \n if(isset($namedEntities[$dec])) {\n return $namedEntities[$dec];\n }\n \n if($dec > 255) {\n return sprintf('&#x%04X;', $dec);\n }\n \n return sprintf('&#x%02X;', $dec);\n }", "public static function escape($som) {}", "public function asXML();", "function toXML($htmlString) {\n\n\t$xmlString = str_replace('<', '&lt;', $htmlString);\n\t$xmlString = str_replace('>', '&gt;', $xmlString);\n\t$xmlString = str_replace('\"', '&quot;', $xmlString);\n\t$xmlString = str_replace(\"'\", '&#39;', $xmlString);\n\t$xmlString = str_replace(\"&\", '&amp;', $xmlString);\n\treturn $xmlString;\n\n}", "private static function _escapeTagChar($matches) {}" ]
[ "0.8183405", "0.81185", "0.76584536", "0.762911", "0.7500431", "0.73642755", "0.7314889", "0.7307573", "0.72541493", "0.71971595", "0.7114054", "0.7102265", "0.7026569", "0.6823563", "0.6746851", "0.67413294", "0.6724982", "0.66889006", "0.6618022", "0.6611725", "0.6592711", "0.6560928", "0.65583515", "0.64961535", "0.64884526", "0.6431118", "0.64245117", "0.6384486", "0.6381899", "0.6312626", "0.6287253", "0.6286366", "0.6249579", "0.62426823", "0.62364995", "0.62351394", "0.6227563", "0.6213534", "0.61959356", "0.6188686", "0.6186379", "0.61702675", "0.6168717", "0.615645", "0.6149442", "0.61470765", "0.61462337", "0.6140293", "0.61373436", "0.60837036", "0.6064399", "0.6054279", "0.60166955", "0.59792143", "0.5971399", "0.59663826", "0.59663826", "0.5966048", "0.59547174", "0.59547174", "0.59478104", "0.5938965", "0.5932297", "0.591789", "0.59041226", "0.58929473", "0.5877693", "0.58699375", "0.5859047", "0.5848595", "0.58430964", "0.5829686", "0.5821523", "0.5817116", "0.5802854", "0.579035", "0.5769384", "0.5767218", "0.5763416", "0.5757778", "0.57354814", "0.5735212", "0.570781", "0.56742555", "0.56713676", "0.56647795", "0.5654983", "0.5654041", "0.563817", "0.5628263", "0.562078", "0.56173974", "0.56096935", "0.5601323", "0.5583068", "0.55770016", "0.55749947", "0.55588245", "0.55561876", "0.5555364" ]
0.7584177
4
getPalette method returns a value between 15 depending on which paletter the user wants to plot the chart with. Here, we just read from Session variable and show it In your application, you could read this configuration from your User Configuration Manager, database, or global application settings
function getPalette() { //Return return (((!isset($_SESSION['palette'])) || ($_SESSION['palette']=="")) ? "2" : $_SESSION['palette']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getColorPalette() {\n\t\treturn 'XLSConfig::$systemPalette';\n\t}", "public function tcb_get_palettes_from_config() {\n\t\treturn ! empty( $this->skin_palettes_config['palette'] ) ? $this->skin_palettes_config['palette'] : [];\n\t}", "public function getPaletteColours() {\n\t\treturn array(\n\t\t\t'PaletteColour1' => $this->PaletteColour1,\n\t\t\t'PaletteColour2' => $this->PaletteColour2,\n\t\t\t'PaletteColour3' => $this->PaletteColour3,\n\t\t\t'PaletteColour4' => $this->PaletteColour4,\n\t\t\t'PaletteColour5' => $this->PaletteColour5,\n\t\t\t'PaletteColour6' => $this->PaletteColour6,\n\t\t);\n\t}", "public function getPaletteColors($id){\n $palette = Palette::find($id);\n return $palette -> colors;\n }", "private function getPlotColor() {\n\t\treturn $this->plotColor;\n\t}", "public function getFullPalette() {\n\t\treturn array(\n\t\t\t\"ContrastColour1\" => $this->ContrastColour1,\n\t\t\t\"ContrastColour2\" => $this->ContrastColour2,\n\t\t\t\"ContrastColour3\" => $this->ContrastColour3,\n\t\t\t\"ContrastColour4\" => $this->ContrastColour4,\n\t\t\t'PaletteColour1' => $this->PaletteColour1,\n\t\t\t'PaletteColour2' => $this->PaletteColour2,\n\t\t\t'PaletteColour3' => $this->PaletteColour3,\n\t\t\t'PaletteColour4' => $this->PaletteColour4,\n\t\t\t'PaletteColour5' => $this->PaletteColour5,\n\t\t\t'PaletteColour6' => $this->PaletteColour6\n\t\t);\n\t}", "public function index()\n {\n return PalettesResource::collection(Palette::all());\n\n }", "protected function _getColour() {\n return $this->_getFromConfig(\"button_colour\");\n }", "function generateLevelBarChart($pays,$ind,$agr,$con,$it)\n {\n $MyData = new pData(); \n $MyData->addPoints($it,\"IT solution\");\n $MyData->addPoints($ind ,\"Industrie\");\n $MyData->addPoints($con,\"Construction\");\n $MyData->addPoints($agr,\"Agriculture\");\n $MyData->setAxisName(0,\"Nombre de partenaires\");\n $MyData->addPoints($pays,\"Labels\");\n $MyData->setSerieDescription(\"Labels\",\"Months\");\n $MyData->setAbscissa(\"Labels\");\n $Palette = array(\"0\"=>array(\"R\"=>46,\"G\"=>151,\"B\"=>224,\"Alpha\"=>100),\n \"1\"=>array(\"R\"=>128,\"G\"=>128,\"B\"=>128,\"Alpha\"=>100),\n \"2\"=>array(\"R\"=>204,\"G\"=>102,\"B\"=>0,\"Alpha\"=>100),\n \"3\"=>array(\"R\"=>0,\"G\"=>153,\"B\"=>0,\"Alpha\"=>100),\n );\n $MyData->setPalette(\"IT solution\",array(\"R\"=>46,\"G\"=>151,\"B\"=>224,\"Alpha\"=>100)) ; \n $MyData->setPalette(\"Industrie\",array(\"R\"=>128,\"G\"=>128,\"B\"=>128,\"Alpha\"=>100)) ; \n $MyData->setPalette(\"Construction\",array(\"R\"=>204,\"G\"=>102,\"B\"=>0,\"Alpha\"=>100)) ;\n $MyData->setPalette(\"Agriculture\",array(\"R\"=>0,\"G\"=>153,\"B\"=>0,\"Alpha\"=>100)) ;\n\n\n $myPicture = new pImage(700,230,$MyData);\n $Settings = array(\"R\"=>194, \"G\"=>92, \"B\"=>4, \"Dash\"=>1, \"DashR\"=>204, \"DashG\"=>102, \"DashB\"=>14);\n $myPicture->drawFilledRectangle(0,0,700,390,$Settings);\n /* Create the pChart object */\n $myPicture->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,array(\"StartR\"=>240,\"StartG\"=>240,\"StartB\"=>240,\"EndR\"=>180,\"EndG\"=>180,\"EndB\"=>180,\"Alpha\"=>100));\n $myPicture->drawGradientArea(0,0,700,230,DIRECTION_HORIZONTAL,array(\"StartR\"=>240,\"StartG\"=>240,\"StartB\"=>240,\"EndR\"=>180,\"EndG\"=>180,\"EndB\"=>180,\"Alpha\"=>20));\n /* Set the default font properties */\n $myPicture->setFontProperties(array(\"FontName\"=>\"../app/includes/pChart/fonts/pf_arma_five.ttf\",\"FontSize\"=>6));\n /* Draw the scale and the chart */\n $myPicture->setGraphArea(60,20,680,190);\n $myPicture->drawScale(array(\"DrawSubTicks\"=>TRUE,\"Mode\"=>SCALE_MODE_ADDALL_START0));\n $myPicture->setShadow(FALSE);\n \n\n $myPicture->drawStackedBarChart(array(\"DisplayPos\"=>LABEL_POS_INSIDE,\"DisplayValues\"=>false ,\"Rounded\"=>TRUE,\"Surrounding\"=>30));\n /* Write the chart legend */\n $myPicture->drawLegend(380,210,array(\"Style\"=>LEGEND_NOBORDER,\"Mode\"=>LEGEND_HORIZONTAL));\n /* Render the picture (choose the best way) */\n $myPicture->Render(\"assets/images/barLevelChart1.png\");\n }", "function generateSocialColorPalette()\n {\n $socialnetworks = array(\"twitter\", \"instagram\", \"facebook\", \"storify\");\n \n $properties = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"ctmtb\", \"ctmlr\");\n /*$properties[$socialnetowks[1]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n $properties[$socialnetowks[2]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n $properties[$socialnetowks[3]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n */\n // Twitter default values\n $default_properties[$socialnetworks[0]] = array(\"#ffffff\", \"#ffffff\", \"#002957\", \"#4099ff\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Instagram default values\n $default_properties[$socialnetworks[1]] = array(\"#ffffff\", \"#000000\", \"#ffffff\", \"#517fa4\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Facebook default values\n $default_properties[$socialnetworks[2]] = array(\"#ffffff\", \"#000000\", \"#ffffff\", \"#3B5998\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Storify default values\n $default_properties[$socialnetworks[3]] = array(\"#3a96db\", \"#3a96db\", \"#dfe5ea\", \"#a9bbcc\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n \n \n $db = JFactory::getDBO();\n\n foreach($socialnetworks as $socialnetwork)\n {\n $category_id = self::checkCategoryExists($socialnetwork);\n if($category_id)\n {\n $propertyIndex = 0;\n foreach($properties as $property)\n {\n $value = $default_properties[$socialnetwork][$propertyIndex++]; \n if(!self::checkExistingCategoryColorPalette($property, $category_id)) \n {\n $sql = \"INSERT INTO #__activategrid (context, name, value) VALUES ('category_color', '\".$property.\"_\".$category_id.\"', '{$value}');\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n }\n }\n \n \n // Default properties for other categories\n $default_properties[\"other\"] = array(\"#000000\", \"#000000\", \"#002bff\", \"#ebebeb\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n \n // Other categories \n $sql = \"SELECT id FROM #__categories WHERE extension='com_content' AND title <> 'twitter' AND title <> 'facebook' AND title <> 'instagram' AND title <> 'storify'\";\n $db->setQuery($sql);\n $db->execute();\n $result = $db->loadObjectList();\n foreach($result as $category)\n { \n $category_id = $category->id; \n $propertyIndex = 0;\n foreach($properties as $property)\n {\n $value = $default_properties[\"other\"][$propertyIndex++]; \n if(!self::checkExistingCategoryColorPalette($property, $category_id)) \n {\n $sql = \"INSERT INTO #__activategrid (context, name, value) VALUES ('category_color', '\".$property.\"_\".$category_id.\"', '{$value}');\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n }\n }", "private function getColors(): array\n {\n $colors = $this->website->getConfiguration()->getColors();\n $choices = [];\n foreach ($colors as $color) {\n if ($color->getCategory() === \"background\" && $color->getIsActive()) {\n $choices[$color->getAdminName()] = $color->getSlug();\n $this->colors[$color->getSlug()] = $color->getColor();\n }\n }\n return $choices;\n }", "function get_at_colors() {\n $scheme = theme_get_setting('color_schemes');\n if (!$scheme) {\n $scheme = 'colors-default.css';\n }\n if (isset($_COOKIE[\"atcolors\"])) {\n $scheme = $_COOKIE[\"atcolors\"];\n }\n return $scheme;\n}", "function expense_tracker_pie_chart()\n{\n\t\tif($this->RequestHandler->isAjax()){\n\t\t$this->layout='blank';\n\t\t}else{\n\t\t$this->layout='session';\n\t\t}\n\t$this->ath();\n\t$this->check_user_privilages();\t\n\t\n\t\t$s_role_id=$this->Session->read('role_id');\n\t\t$s_society_id = (int)$this->Session->read('society_id');\n\t\t$s_user_id=$this->Session->read('user_id');\t\n\n}", "public static function getPaletteCount($app): int\n {\n $mapper = $app['spot']->mapper('Entity\\Palette');\n $num = $mapper->all()->count();\n\n return $num;\n\n }", "public function getColors()\n\t{\n\t\treturn [\n\t\t\t'AliceBlue',\n\t\t\t'AntiqueWhite',\n\t\t\t'Aqua',\n\t\t\t'Aquamarine',\n\t\t\t'Azure',\n\t\t\t'Beige',\n\t\t\t'Bisque',\n\t\t\t'Black',\n\t\t\t'BlanchedAlmond',\n\t\t\t'Blue',\n\t\t\t'BlueViolet',\n\t\t\t'Brown',\n\t\t\t'BurlyWood',\n\t\t\t'CadetBlue',\n\t\t\t'Chartreuse',\n\t\t\t'Chocolate',\n\t\t\t'Coral',\n\t\t\t'CornflowerBlue',\n\t\t\t'Cornsilk',\n\t\t\t'Crimson',\n\t\t\t'Cyan',\n\t\t\t'DarkBlue',\n\t\t\t'DarkCyan',\n\t\t\t'DarkGoldenRod',\n\t\t\t'DarkGray',\n\t\t\t'DarkGreen',\n\t\t\t'DarkKhaki',\n\t\t\t'DarkMagenta',\n\t\t\t'DarkOliveGreen',\n\t\t\t'Darkorange',\n\t\t\t'DarkOrchid',\n\t\t\t'DarkRed',\n\t\t\t'DarkSalmon',\n\t\t\t'DarkSeaGreen',\n\t\t\t'DarkSlateBlue',\n\t\t\t'DarkSlateGray',\n\t\t\t'DarkTurquoise',\n\t\t\t'DarkViolet',\n\t\t\t'DeepPink',\n\t\t\t'DeepSkyBlue',\n\t\t\t'DimGray',\n\t\t\t'DodgerBlue',\n\t\t\t'FireBrick',\n\t\t\t'FloralWhite',\n\t\t\t'ForestGreen',\n\t\t\t'Fuchsia',\n\t\t\t'Gainsboro',\n\t\t\t'GhostWhite',\n\t\t\t'Gold',\n\t\t\t'GoldenRod',\n\t\t\t'Gray',\n\t\t\t'Green',\n\t\t\t'GreenYellow',\n\t\t\t'HoneyDew',\n\t\t\t'HotPink',\n\t\t\t'IndianRed',\n\t\t\t'Indigo',\n\t\t\t'Ivory',\n\t\t\t'Khaki',\n\t\t\t'Lavender',\n\t\t\t'LavenderBlush',\n\t\t\t'LawnGreen',\n\t\t\t'LemonChiffon',\n\t\t\t'LightBlue',\n\t\t\t'LightCoral',\n\t\t\t'LightCyan',\n\t\t\t'LightGoldenRodYellow',\n\t\t\t'LightGreen',\n\t\t\t'LightGrey',\n\t\t\t'LightPink',\n\t\t\t'LightSalmon',\n\t\t\t'LightSeaGreen',\n\t\t\t'LightSkyBlue',\n\t\t\t'LightSlateGray',\n\t\t\t'LightSteelBlue',\n\t\t\t'LightYellow',\n\t\t\t'Lime',\n\t\t\t'LimeGreen',\n\t\t\t'Linen',\n\t\t\t'Magenta',\n\t\t\t'Maroon',\n\t\t\t'MediumAquaMarine',\n\t\t\t'MediumBlue',\n\t\t\t'MediumOrchid',\n\t\t\t'MediumPurple',\n\t\t\t'MediumSeaGreen',\n\t\t\t'MediumSlateBlue',\n\t\t\t'MediumSpringGreen',\n\t\t\t'MediumTurquoise',\n\t\t\t'MediumVioletRed',\n\t\t\t'MidnightBlue',\n\t\t\t'MintCream',\n\t\t\t'MistyRose',\n\t\t\t'Moccasin',\n\t\t\t'NavajoWhite',\n\t\t\t'Navy',\n\t\t\t'OldLace',\n\t\t\t'Olive',\n\t\t\t'OliveDrab',\n\t\t\t'Orange',\n\t\t\t'OrangeRed',\n\t\t\t'Orchid',\n\t\t\t'PaleGoldenRod',\n\t\t\t'PaleGreen',\n\t\t\t'PaleTurquoise',\n\t\t\t'PaleVioletRed',\n\t\t\t'PapayaWhip',\n\t\t\t'PeachPuff',\n\t\t\t'Peru',\n\t\t\t'Pink',\n\t\t\t'Plum',\n\t\t\t'PowderBlue',\n\t\t\t'Purple',\n\t\t\t'Red',\n\t\t\t'RosyBrown',\n\t\t\t'RoyalBlue',\n\t\t\t'SaddleBrown',\n\t\t\t'Salmon',\n\t\t\t'SandyBrown',\n\t\t\t'SeaGreen',\n\t\t\t'SeaShell',\n\t\t\t'Sienna',\n\t\t\t'Silver',\n\t\t\t'SkyBlue',\n\t\t\t'SlateBlue',\n\t\t\t'SlateGray',\n\t\t\t'Snow',\n\t\t\t'SpringGreen',\n\t\t\t'SteelBlue',\n\t\t\t'Tan',\n\t\t\t'Teal',\n\t\t\t'Thistle',\n\t\t\t'Tomato',\n\t\t\t'Turquoise',\n\t\t\t'Violet',\n\t\t\t'Wheat',\n\t\t\t'White',\n\t\t\t'WhiteSmoke',\n\t\t\t'Yellow',\n\t\t\t'YellowGreen',\n\t\t];\n\t}", "function timezonecalculator_get_admin_colors() {\r\n\r\n\t/*\r\n\tdefault colors = fresh\r\n\t*/\r\n\r\n\t$available_admin_colors=array(\"fresh\" => array(\"#464646\", \"#6D6D6D\", \"#F1F1F1\", \"#DFDFDF\"), \"classic\" => array(\"#073447\", \"#21759B\", \"#EAF3FA\", \"#BBD8E7\") );\r\n\r\n\t$current_color = get_user_option('admin_color');\r\n\tif (strlen($current_color)<1)\r\n\t\t$current_color=\"fresh\";\r\n\r\n\t/*\r\n\tinclude user-defined color schemes\r\n\t*/\r\n\r\n\t$timezonecalculator_available_admin_colors = apply_filters('timezonecalculator_available_admin_colors', array());\r\n\r\n\tif (!empty($timezonecalculator_available_admin_colors) && is_array($timezonecalculator_available_admin_colors))\r\n\t\tforeach($timezonecalculator_available_admin_colors as $key => $available_admin_color)\r\n\t\t\tif (is_array($available_admin_color) && sizeof($available_admin_color)==4)\r\n\t\t\t\tif (!array_key_exists($key, $available_admin_colors))\r\n\t\t\t\t\t$available_admin_colors[$key]=$timezonecalculator_available_admin_colors[$key];\r\n\r\n\tif (!array_key_exists($current_color, $available_admin_colors))\r\n\t\treturn $available_admin_colors[\"fresh\"];\r\n\telse\r\n\t\treturn $available_admin_colors[$current_color];\r\n}", "function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}", "private function getAxisColor() {\n\t\treturn $this->axisColor;\n\t}", "function get_RGB($i,$iMax,$palette){\n $r = 0 ;\n $g = 0 ;\n $b = 0 ;\n $i = $i/$iMax ;\n switch($palette){\n case 2: // Red \n $r = $i*255*1 ; $g = $i*255*0 ; $b = $i*255*0 ;\n break ;\n case 3: // Green \n $r = $i*255*0 ; $g = $i*255*1 ; $b = $i*255*0 ;\n break ;\n case 4: // Blue \n $r = $i*255*0 ; $g = $i*255*0 ; $b = $i*255*1 ;\n break ;\n case 5: // Cyan\n $r = $i*255*0 ; $g = $i*255*1 ; $b = $i*255*1 ;\n break ;\n case 6: // Magenta \n $r = $i*255*1 ; $g = $i*255*0 ; $b = $i*255*1 ;\n break ;\n case 7: // Yellow\n $r = $i*255*1 ; $g = $i*255*1 ; $b = $i*255*0 ;\n break ;\n case 12: // Hot red\n if ($i<1/2) { $r = $i*255*2 ; $g = $i*255*0 ; $b = $i*255*0 ; }\n else if($i<2/2) { $r = 255*1 ; $g = ($i-1/2)*255*2 ; $b = ($i-1/2)*255*2 ; }\n break ;\n case 13: // Hot green\n if ($i<1/2) { $r = $i*255*0 ; $g = $i*255*2 ; $b = $i*255*0 ; }\n else if($i<2/2) { $r = ($i-1/2)*255*2 ; $g = 255*1 ; $b = ($i-1/2)*255*2 ; }\n break ;\n case 14: // Hot blue\n if ($i<1/2) { $r = $i*255*0 ; $g = $i*255*0 ; $b = $i*255*2 ; }\n else if($i<2/2) { $r = ($i-1/2)*255*2 ; $g = ($i-1/2)*255*2 ; $b = 255*1 ; }\n break ;\n case 15: // Hot cyan\n if ($i<1/2) { $r = $i*255*0 ; $g = $i*255*2 ; $b = $i*255*2 ; }\n else if($i<2/2) { $r = ($i-1/2)*255*2 ; $g = 255*1 ; $b = 255*1 ; }\n break ;\n case 16: // Hot magenta\n if ($i<1/2) { $r = $i*255*2 ; $g = $i*255*0 ; $b = $i*255*2 ; }\n else if($i<2/2) { $r = 255*1 ; $g = ($i-1/2)*255*2 ; $b = 255*1 ; }\n break ;\n case 17: // Hot yellow\n if ($i<1/2) { $r = $i*255*2 ; $g = $i*255*2 ; $b = $i*255*0 ; }\n else if($i<2/2) { $r = 255*1 ; $g = 255*1 ; $b = ($i-1/2)*255*2 ; }\n break ;\n case 22: // Very hot red\n $r = 255*1 ; $g = $i*255*1 ; $b = $i*255*1 ;\n break ;\n case 23: // Very hot green\n $r = $i*255*1 ; $g = 255*1 ; $b = $i*255*1 ;\n break ;\n case 24: // Very hot blue\n $r = $i*255*1 ; $g = $i*255*1 ; $b = 255*1 ;\n break ;\n case 25: // Very hot cyan\n $r = $i*255*1 ; $g = 255*1 ; $b = 255*1 ;\n break ;\n case 26: // Very hot magenta\n $r = 255*1 ; $g = $i*255*1 ; $b = 255*1 ;\n break ;\n case 27: // Very hot yellow\n $r = 255*1 ; $g = 255*1 ; $b = $i*255*1 ;\n break ;\n case 8: // Grey\n $r = $i*255*1 ; $g = $i*255*1 ; $b = $i*255*1 ;\n break ;\n case 9: $r = $i*255*0 ; $g = 255*abs(sin($i*pi()*8)) ; $b = 255*abs(sin($i*pi()*8)) ; break ; // Wave\n case 10: $r = 255*abs(sin($i*pi()*3)) ; $g = $i*255*0 ; $b = $i*255*0 ; break ; // Pulse\n case 11: // Flame\n if ($i>=0/3 AND $i<1/3) { $r=(3*$i-0)*255 ; $g=(3*$i-0)*255 ; $b=(3*$i-0)*255 ; } // Black to white 0/0-1/3\n else if($i>=1/3 AND $i<2/3) { $r=255 ; $g=255 ; $b=(1-(3*$i-1))*255 ; } // White to Yellow 1/3-2/3\n else if($i>=2/3 AND $i<3/3) { $r=255 ; $g=(1-(3*$i-2))*255 ; $b=0 ; } // Yellow to red 2/3-3/3\n else { $r=0 ; $g=0 ; $b=0 ; } // Black\n break ;\n case 12: // Log\n $i = log(1+$i) ;\n $r = $i*255*0 ; $g = $i*255*1 ; $b = $i*255*0 ;\n break ;\n case 20: // Aqua\n $r = $i*255*0 ; $g = 255*1 ; $b = (1-$i)*255*1 ;\n break ;\n case 21: // Cheese and onion\n $r = $i*255*1 ; $g = 255*1 ; $b = 255*0 ;\n break ;\n case 102: // Red to blue\n if ($i>=0/2 AND $i<1/2) { $r=255 ; $g=(2*$i-0)*255 ; $b=(2*$i-0)*255 ; } // Red to white 0/0-1/2\n else { $r=(1-(2*$i-1))*255 ; $g=(1-(2*$i-1))*255 ; $b=255 ; } // White to Blue 1/2-2/2\n break ;\n case 103: // Fireworks\n $r=0 ; $g=0 ; $b=0 ;\n if($i>0.12 AND $i<0.13 ) { $r=205+10*abs($i-0.125) ; $g=0 ; $b=0 ; }\n if($i>0.245 AND $i<0.255) { $r=0 ; $g=205+10*abs($i-0.25) ; $b=0 ; }\n if($i>0.37 AND $i<0.38 ) { $r=0 ; $g=0 ; $b=205+10*abs($i-0.375) ; }\n if($i>0.495 AND $i<0.505) { $r=205+10*abs($i-0.5) ; $g=205+10*abs($i-0.5) ; $b=0 ; }\n if($i>0.62 AND $i<0.63 ) { $r=205+10*abs($i-0.625) ; $g=0 ; $b=205+10*abs($i-0.625) ; }\n if($i>0.745 AND $i<0.755) { $r=0 ; $g=205+10*abs($i-0.75) ; $b=205+10*abs($i-0.75) ; }\n if($i>0.87 AND $i<0.88 ) { $r=205+10*abs($i-0.875) ; $g=205+10*abs($i-0.875) ; $b=205+10*abs($i-0.875) ; }\n break ;\n case 104: // Roulette\n if ($i>=0/10 AND $i<1/10) { $r=0 ; $g=0 ; $b=0 ; }\n\telse if($i>=1/10 AND $i<2/10) { $r=255 ; $g=0 ; $b=0 ; }\n\telse if($i>=2/10 AND $i<3/10) { $r=0 ; $g=0 ; $b=0 ; }\n\telse if($i>=3/10 AND $i<4/10) { $r=255 ; $g=0 ; $b=0 ; }\n\telse if($i>=4/10 AND $i<5/10) { $r=0 ; $g=0 ; $b=0 ; }\n\telse if($i>=5/10 AND $i<6/10) { $r=255 ; $g=0 ; $b=0 ; }\n\telse if($i>=6/10 AND $i<7/10) { $r=0 ; $g=0 ; $b=0 ; }\n\telse if($i>=7/10 AND $i<8/10) { $r=255 ; $g=0 ; $b=0 ; }\n\telse if($i>=8/10 AND $i<9/10) { $r=0 ; $g=0 ; $b=0 ; }\n\telse if($i>=9/10 AND $i<10/10) { $r=255 ; $g=0 ; $b=0 ; }\n\telse { $r=0 ; $g=0 ; $b=0 ; }\n\tbreak ;\n case 105: // Contours\n $r=255 ; $g=255 ; $b=255 ;\n if($i>0.095 AND $i<0.105) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.195 AND $i<0.205) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.295 AND $i<0.305) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.395 AND $i<0.405) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.495 AND $i<0.505) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.595 AND $i<0.605) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.695 AND $i<0.705) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.795 AND $i<0.805) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.895 AND $i<0.905) { $r=0 ; $g=0 ; $b=0 ;}\n if($i>0.995 AND $i<1.005) { $r=0 ; $g=0 ; $b=0 ;}\n break ;\n default:\n if($palette>=1000){\n $r=0 ; $g=0 ; $b=0 ;\n if($iIn==$palette-1000) $r=255 ;\n break ;\n }\n if($palette==100){ // Low\n $i = pow($i,1/5) ;\n }\n if($palette==101){ // High\n $i = pow($i,5) ;\n }\n if ($i>=0/7 AND $i<1/7) { $r= (7*$i-0)*255 ; $g=0 ; $b=(7*$i-0)*255 ; } // Black to magenta 0/0-1/7\n else if($i>=1/7 AND $i<2/7) { $r=(1-(7*$i-1))*255 ; $g=0 ; $b=255 ; } // Magenta to blue 1/7-2/7\n else if($i>=2/7 AND $i<3/7) { $r=0 ; $g=(7*$i-2)*255 ; $b=255 ; } // Blue to cyan 2/7-3/7\n else if($i>=3/7 AND $i<4/7) { $r=0 ; $g=255 ; $b=(1-(7*$i-3))*255 ; } // Cyan to green 3/7-4/7\n else if($i>=4/7 AND $i<5/7) { $r=(7*$i-4)*255 ; $g=255 ; $b=0 ; } // Green to yellow 4/7-5/7\n else if($i>=5/7 AND $i<6/7) { $r=255 ; $g=(1-(7*$i-5))*255 ; $b=0 ; } // Yellow to red 5/7-6/7\n else if($i>=6/7 AND $i<7/7) { $r=255 ; $g=(7*$i-6)*255 ; $b=(7*$i-6)*255 ; } // Red to white 6/7-7/7\n else{\n if($palette==1){ $r=255 ; $g=255 ; $b=255 ; } // Pure as driven snow\n else { $r=0 ; $g=0 ; $b=0 ; } // Black, like my soul\n }\n }\n $rgb[0] = floor($r) ;\n $rgb[1] = floor($g) ;\n $rgb[2] = floor($b) ;\n return $rgb ;\n}", "private function getGraphColor() {\n\t\treturn $this->graphColor;\n\t}", "public function get_variables_for_css() {\n\t\t$data = '';\n\n\t\tif ( ! empty( $this->skin_palettes_config ) && is_array( $this->skin_palettes_config ) ) {\n\t\t\t$palette = $this->skin_palettes_config ['palette'];\n\n\t\t\tforeach ( $palette as $variable ) {\n\n\t\t\t\t$color_name = static::SKIN_COLOR_VARIABLE_PREFIX . $variable['id'];\n\n\t\t\t\tif ( ! empty( $variable['hsla_code'] ) && ! empty( $variable['hsla_vars'] ) && is_array( $variable['hsla_vars'] ) ) {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['hsla_code'] . ';';\n\n\t\t\t\t\tforeach ( $variable['hsla_vars'] as $var => $css_variable ) {\n\t\t\t\t\t\t$data .= $color_name . '-' . $var . ':' . $css_variable . ';';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['color'] . ';';\n\n\t\t\t\t\tif ( function_exists( 'tve_rgb2hsl' ) && function_exists( 'tve_print_color_hsl' ) ) {\n\t\t\t\t\t\t$data .= tve_print_color_hsl( $color_name, tve_rgb2hsl( $variable['color'] ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( function_exists( 'tve_prepare_master_variable' ) ) {\n\t\t\t$palettes = $this->get_smart_lp_palettes_v2();\n\t\t\t$active_id = (int) $palettes['active_id'];\n\t\t\t$master_variable = $palettes['palettes'][ $active_id ]['modified_hsl'];\n\t\t\t$general_master_variable = tve_prepare_master_variable( array( 'hsl' => $master_variable ) );\n\t\t\t$theme_master_variable = str_replace( '--tcb-main-master', '--tcb-theme-main-master', $general_master_variable );\n\n\t\t\t$data .= $general_master_variable;\n\t\t\t$data .= $theme_master_variable;\n\t\t}\n\n\t\treturn $data;\n\t}", "public function changeEditorColorPalette(): void\n\t{\n\t\t// Unable to use state due to this method is used in JS and store is not registered there.\n\t\t$colors = $this->getSettingsManifest()['globalVariables']['colors'] ?? [];\n\n\t\tif ($colors) {\n\t\t\t\\add_theme_support('editor-color-palette', $colors);\n\t\t}\n\t}", "protected function getCouponColor()\n {\n return Mage::getStoreConfig(\n Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_DYNAMIC_COUPON_COLOR\n );\n }", "public function getLookAndFeelSettingsDefaultData()\n {\n $settings = array(\n 'image_url' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'vss_spinandwin' . DS . 'front_image.png',\n 'try_luck_color' => '00c74c',\n 'try_luck_text_color' => 'ffffff',\n 'feel_lucky_text_color' => 'fffbf8',\n 'continue_color' => 'd6042e',\n 'next_time_color' => 'ff8400',\n 'background_color' => '007aa7',\n 'text_color' => 'ffffff',\n 'wheel_color' => '4497bb',\n 'wheel_text_color' => 'ffffff',\n 'theme' => 0,\n 'wheel_design' => 1\n );\n return $settings;\n }", "public function getFigured()\n\t{\n\t\tif(!Storage::has('json/wristband/colors/figured.json')) {\n\t\t\t// generate and save .json file.\n\t\t\tStorage::put('json/wristband/colors/figured.json', json_encode($this->figured()));\n\t\t}\n\t\t// return data from .json file.\n\t\treturn json_decode(Storage::get('json/wristband/colors/figured.json'), true);\n\t}", "public function colors()\n {\n $section = self::$panel . '_colors';\n\n /**\n * Add Section and fields for Colors\n */\n Customizer::addSection($section, array(\n 'title' => esc_html__('Colors', 'stage'),\n 'description' => esc_html__('Set color settings for your website', 'stage'),\n 'priority' => 60,\n 'panel' => self::$panel,\n ));\n\n // Fields are calculated from ColorsPanel.php\n }", "public function get_color_scheme() {\r\n\r\n return \tarray(\r\n 'epsilon_general_separator' => array(\r\n 'label' => esc_html__( 'Accent Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_accent_color' => array(\r\n 'label' => esc_html__( 'Accent Color #1', 'unapp' ),\r\n 'description' => esc_html__( 'Theme main color.', 'unapp' ),\r\n 'default' => '#798eea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_accent_color_second' => array(\r\n 'label' => esc_html__( 'Accent Color #2', 'unapp' ),\r\n 'description' => esc_html__( 'The second main color.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n 'epsilon_accent_color_third' => array(\r\n 'label' => esc_html__( 'Accent Color #3', 'unapp' ),\r\n 'description' => esc_html__( 'The third main color.', 'unapp' ),\r\n 'default' => '#499bea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_separator' => array(\r\n 'label' => esc_html__( 'Typography Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_title_color' => array(\r\n 'label' => esc_html__( 'Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for titles.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for paragraphs.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for links.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for hovered links.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_separator' => array(\r\n 'label' => esc_html__( 'Navigation Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n \r\n\r\n 'epsilon_menu_item_color' => array(\r\n 'label' => esc_html__( 'Menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_background' => array(\r\n 'label' => esc_html__( 'Dropdown background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu background.', 'unapp' ),\r\n 'default' => '#000000',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#999999',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_separator' => array(\r\n 'label' => esc_html__( 'Footer Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_footer_contact_background' => array(\r\n 'label' => esc_html__( 'Footer Widget Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget background.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_background' => array(\r\n 'label' => esc_html__( 'Footer Copyright Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer copyright background.', 'unapp' ),\r\n 'default' => '#262626',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_title_color' => array(\r\n 'label' => esc_html__( 'Footer Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget title.', 'unapp' ),\r\n 'default' => '#e6e6e6',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer text.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link hover.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n );\r\n\t}", "public static function summaryChartColouring()\n {\n return [ '#f1592c', '#f3724c', '#f58b6c', '#f7a48c' ];\n }", "private function getColor() {\n $randomNumber = rand(0, 7);\n $colors = array(0 => 'green',\n 1 => 'orange',\n 2 => 'blue', \n 3 => 'orange',\n 4 => 'yellow',\n 5 => 'purple',\n 6 => 'red',\n 7 => 'cyan');\n //$this->changeColor($colors[$randomNumber]);\n return $colors[$randomNumber]; \n \n }", "function getColor(){\n\t\treturn $this->color_ficha;\n\t}", "function tc_get_skin_color() {\r\n $_skin_map = TC_init::$instance -> skin_color_map;\r\n $_active_skin = str_replace('.min.', '.', basename( TC_init::$instance -> tc_active_skin() ) );\r\n //falls back to blue ( default #08c ) if not defined\r\n return ( false != $_active_skin && isset($_skin_map[$_active_skin]) ) ? $_skin_map[$_active_skin] : '#08c';\r\n }", "public static function getColors()\n {\n $db = DataBase::connect();\n\n $result = $db->query('SELECT * FROM `color`');\n\n $colors = [];\n\n $i = 1;\n\n while($row = $result->fetch()) {\n $colors[$i]['color'] = $row['color'];\n $colors[$i]['ukr_title'] = $row['ukr_title'];\n $colors[$i]['upper_ukr_title'] = $row['upper_ukr_title'];\n $colors[$i]['default'] = $row['default'];\n\n $i++;\n }\n return $colors;\n }", "public function color()\n {\n $color = $this->customer->color;\n\n $r = substr($color, 1, 2);\n $g = substr($color, 3, 2);\n $b = substr($color, 5, 2);\n $luma = (float)0.2126 * hexdec($r)\n + 0.7152 * hexdec($g)\n + 0.0722 * hexdec($b);\n\n return ['color' => $this->customer->color, 'luma' => $luma];\n }", "public static function plantuml_colour_scheme(): array\n\t{\n\t\treturn [\n\t\t\t'background' => 'FireBrick',\n\t\t\t'border' => 'DarkRed',\n\t\t\t'text' => 'White',\n\t\t];\n\t}", "protected function getChartIndexColor( $index ){\n\n\t\t$chartColors = array(\n\t\t\tarray( 248 , 139 , 0 ),\n\t\t\tarray( 0 , 0 , 248 ),\n\t\t\tarray( 248 , 0 , 248 ),\n\t\t\tarray( 248 , 0 , 0 ),\n\t\t\tarray( 248 , 248 , 0 ),\n\t\t\tarray( 0 , 248 , 0 ),\n\t\t\tarray( 0 , 248 , 248 ),\n\t\t\tarray( 123 , 248 , 0 ),\n\t\t\tarray( 135 , 0 , 72 ),\n\t\t\tarray( 102 , 135 , 0 )\n\t\t);\n\n\t\t$colorCount = count( $chartColors ) ;\n\t\t$colorIndex = ( $index + $colorCount ) % $colorCount ;\n\n\t\treturn ( $chartColors[ $colorIndex ] );\n\n\t}", "public function getFavColour();", "protected function get_config()\n {\n \n if( !isset($this->_config) ){\n $this->_config = array(\n 'color-base' => array(\n 'less_var' => true,\n 'setting' => array(\n 'default' => '#147BB8'\n ),\n 'control' => array(\n 'type' => 'WP_Customize_Color_Control',\n 'args' => array(\n 'label' => 'Theme Base',\n 'section' => 'colors'\n )\n )\n )\n );\n }\n return $this->_config;\n }", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function generatePictureBar() \n {\n $values = $this->data;\n\n // Get the total number of columns we are going to plot\n $columns = count($values);\n\n // Get the height and width of the diagram itself\n $width = round($this->w*0.7);\n $height = round($this->h*0.7);\n\n $padding = 0;\n $padding_h = round(($this->w - $width) / 2);\n $padding_v = round(($this->h - $height) / 2); \n\n // Get the width of 1 column\n $column_width = round ($width / $columns) ;\n\n\n // Fill in the background of the image\n imagefilledrectangle($this->im,0,0,$this->w,$this->h,$this->white);\n\n $maxv = 0;\n\n // Calculate the maximum value we are going to plot\n\n foreach($values as $key => $value) \n {\n $maxv = max($value,$maxv); \n }\n \n $this->drawAxesLabels($width, $height, $column_width, $padding_h,$padding_v, $maxv);\n\n //diagram itself\n $i = 0;\n foreach ($values as $key => $value)\n {\n $column_height = ($height / 100) * (( $value / $maxv) *100);\n\n $x1 = $i*$column_width + $padding_h;\n $y1 = $height-$column_height + $padding_v;\n $x2 = (($i+1)*$column_width)-$padding + $padding_h;\n $y2 = $height + $padding_v;\n\n imagefilledrectangle($this->im,$x1,$y1,$x2,$y2,$this->color_helper->img_colorallocate($this->im, $this->color_helper->nextColor()));\n\n $i++;\n }\n\n return $this->im;\n }", "function generateHistoryChart($result,$graph_type,$graph_file_name,$gateway,$chart_path)\r\n\t{\r\n \r\n\t\tif ($graph_type==\"pie_chart\") {\r\n\t\t\r\n\t\t$f_name = split(\"\\,\", $graph_file_name);\r\n\t\t$file_name_len = count($f_name);\r\n\t\t\r\n\t\t$file_name=\"\";\r\n\t\tfor ($i=0;$i<$file_name_len;$i++) {\r\n\t\t if ($file_name==\"\")\r\n\t\t\t\t$file_name= $f_name[$i];\r\n\t\t\telse\r\n\t\t\t\t$file_name= $file_name.\"_\".$f_name[$i];\r\n\t\t}\r\n\t\t\r\n\t\t$_SESSION[\"file_name\"] = $_SERVER[\"PHP_AUTH_USER\"].\"_\".$file_name.\"_history\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$image_name= $_SESSION[\"file_name\"].\".png\";\r\n\r\n\t\t$DataSet = new pData; \r\n\t\t\r\n\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t \t\t \r\n\r\n\t\t\t\t \t$DataSet->AddPoint($row[\"total_login\"],\"Serie1\"); \r\n\t\t\t\t \tif ($gateway!=\"\") {\r\n\t\t\t\t \t\t$_SESSION[\"historyBased\"] = \"per_month\";\r\n\t\t\t\t\t\t$mon = date(\"M\", strtotime($row[\"login\"])); \r\n \t\t\t\t\t$yr \t\t\t= \t date('Y', strtotime($row[\"login\"]));\r\n\t\t\t\t\t\t$DataSet->AddPoint(\"$mon-$yr\",\"Serie2\"); \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t$_SESSION[\"historyBased\"] = \"per_gw\";\r\n\t\t\t\t\t$DataSet->AddPoint($row[\"gw_name\"],\"Serie2\"); \r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\r\n\t\t\r\n\r\n \t\t$DataSet->AddAllSeries(); \r\n\t\t$DataSet->SetAbsciseLabelSerie(\"Serie2\"); \r\n \r\n\t\t // Initialise the graph\r\n\t\t $Test = new pChart(740,520); \r\n\t\t $Test->drawFilledRoundedRectangle(7,7,673,513,5,240,240,240); \r\n\t\t $Test->drawRoundedRectangle(5,5,575,515,5,230,230,230); \r\n \r\n\t\t // Draw the pie chart \r\n\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t$Test->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),150,90,110,PIE_PERCENTAGE,TRUE,50,20,5); \r\n\t\t$Test->drawPieLegend(410,15,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250); \r\n \r\n\t\t$Test->Render($chart_path.\"$image_name\"); \r\n\t\t}\r\n\t\telse {\r\n\t\t$f_name = split(\"\\,\", $graph_file_name);\r\n\t\t//echo $graph_file_name;\r\n\t\t$file_name_len = count($f_name);\r\n\t\t//echo $file_name_len;\r\n\t\t$file_name=\"\";\r\n\t\tfor ($i=0;$i<$file_name_len;$i++) {\r\n\t\t if ($file_name==\"\")\r\n\t\t\t\t$file_name= $f_name[$i];\r\n\t\t\telse\r\n\t\t\t\t$file_name= $file_name.\"_\".$f_name[$i];\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t//echo $file_name;\r\n\t\t\t\t$_SESSION[\"file_name\"] = $_SERVER[\"PHP_AUTH_USER\"].\"_\".$file_name.\"_history_bar\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$image_name= $_SESSION[\"file_name\"].\".png\";\r\n\t\t//echo $image_name;\r\n\t\t//echo $gateway;\r\n\t\t\t\t\t $DataSet = new pData; \r\n\t\t\t\t$j=1;\r\n\t\t\t\t\r\n\t\t\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t\t\t \t\t $DataSet->AddPoint($row[\"total_login\"],\"Serie.$j\"); \r\n\t\t\t \t\t \tif ($gateway!=\"\") {\r\n\t\t\t \t\t \t$_SESSION[\"historyBased\"] = \"per_month\";\r\n\t\t\t\t\t\t$mon = date(\"M\", strtotime($row[\"login\"])); \r\n \t\t\t\t\t$yr \t\t\t= \t date('Y', strtotime($row[\"login\"]));\r\n\t\t\t\t\t\t$DataSet->SetSerieName(\"$mon-$yr\",\"Serie.$j\"); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t$_SESSION[\"historyBased\"] = \"per_gw\";\r\n\r\n\t\t\t\t\t $DataSet->SetSerieName($row[\"gw_name\"],\"Serie.$j\"); \r\n\t\t\t\t\t }\r\n\t\t\t\t\t $j++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t$DataSet->AddAllSeries(); \r\n \r\n\t\t\t// Initialise the graph \t\r\n\t\t\t$Test = new pChart(740,520); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->setGraphArea(50,30,470,200); \r\n\t\t\t$Test->drawFilledRoundedRectangle(7,7,600,513,5,240,240,240); \r\n\t\t\t$Test->drawRoundedRectangle(5,5,600,515,5,230,230,230); \r\n\t\t\t$Test->drawGraphArea(255,255,255,TRUE); \r\n\t\t\t$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); \r\n\t\t\t$Test->drawGrid(4,TRUE,230,230,230,50); \r\n\t \r\n\t\t\t// Draw the 0 line \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",6); \r\n\t\t\t$Test->drawTreshold(0,143,55,72,TRUE,TRUE); \r\n\t \r\n\t\t\t// Draw the bar graph \r\n\t\t\t$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE); \r\n\t \r\n\t\t\t// Finish the graph \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->drawLegend(500,30,$DataSet->GetDataDescription(),250,250,250); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",10); \r\n\t\t\t$Test->drawTitle(50,22,\"Load Graph \",50,50,50,430); \r\n\t\t\t$Test->Render($chart_path.\"$image_name\"); \r\n\t\t\t\r\n\t\t}\r\n\t \r\n}", "function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}", "function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}", "public function getAppearanceCanvas() {}", "function lalita_enqueue_color_palettes() {\n\t\t// Old versions of WP don't get nice things\n\t\tif ( ! function_exists( 'wp_add_inline_script' ) )\n\t\t\treturn;\n\n\t\t// Grab our palette array and turn it into JS\n\t\t$palettes = json_encode( lalita_get_default_color_palettes() );\n\n\t\t// Add our custom palettes\n\t\t// json_encode takes care of escaping\n\t\twp_add_inline_script( 'wp-color-picker', 'jQuery.wp.wpColorPicker.prototype.options.palettes = ' . $palettes . ';' );\n\t}", "public function getStyle() {\n // have to handle it here if set, so we can show apps in dark mode.\n $darkmode = '';\n if ($this->getRequest()->getSession()->get('darkmode') === 'true') {\n statsd_bump('dagd_dark_mode_active');\n }\n\n return array(\n $darkmode,\n );\n }", "public function modifyPalette()\n\t{\n\t\tif (version_compare(VERSION . '.' . BUILD, '2.11.0', '<'))\n\t\t\t{\n\t\t\t\t$GLOBALS['TL_DCA']['tl_module']['fields']['newslist_comments_avatarSize'] = array\n\t\t\t\t(\n\t\t\t\t\t'label' => &$GLOBALS['TL_LANG']['tl_content']['size'],\n\t\t\t\t\t'exclude' => false,\n\t\t\t\t\t'inputType' => 'imageSize',\n\t\t\t\t\t'options' => array('crop', 'proportional', 'box'),\n\t\t\t\t\t'reference' => &$GLOBALS['TL_LANG']['MSC'],\n\t\t\t\t\t'eval' => array('rgxp'=>'digit', 'nospace'=>true, 'tl_class'=>'w50')\n\t\t\t\t);\n\t\t}\n\t}", "function get_account_color($acc_number)\n\t{\n\t return $this->db->select('color')\n\t\t ->from('pamm_accounts') \n\t\t ->where(\"login\",$acc_number)\n\t\t ->get()->result();\n\t}", "function get_peepso_color_template() {\n $color = \"\";\n\n if (class_exists( 'PeepSo' )) {\n $color = PeepSo::get_option('site_css_template','');\n }\n\n return $color;\n}", "function generateDetailChart($chartType,$result,$criteria,$chart_path)\r\n\t{\r\n \r\n\tif ($chartType==\"gw_load\") {\r\n\t\t\t\t\r\n\t\t\t\t$_SESSION[\"gw_criteria\"] = $criteria;\r\n\t\t\t\t$_SESSION[\"gwLoadDetail\"] = $_SERVER[\"PHP_AUTH_USER\"].\"gw_\".$criteria.\"_bar_load\";\r\n\t\t \t\t$image_name =$_SERVER[\"PHP_AUTH_USER\"]. \"gw_\".$criteria.\"_bar_load.png\";\r\n\t\t\t\t$gw_id = $_SESSION[\"gw_id\"];\r\n\t\t\t\t$title = \"Gateway Load (\".$gw_id.\")\";\r\n\t\t\t\t\r\n\t\t\t $DataSet = new pData; \r\n\t\t\t\t$j=1;\r\n\t\t\t\t$total=0;\r\n\t\t\t//\tmysql_data_seek($result ,0);\r\n\r\n\t\t\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t\t\t \t\t \t\t$mon = date(\"M\", strtotime($row[\"login\"])); \r\n \t\t\t\t\t\t$yr \t\t\t= date('Y', strtotime($row[\"login\"]));\r\n\r\n\t\t\t\t\t\t $DataSet->AddPoint($row[\"count\"],\"Serie.$j\"); \r\n\t\t\t\t\t\t \t$DataSet->SetSerieName($mon.\"-\".$yr,\"Serie.$j\"); \r\n\t\t\t\t\t\t \t$j++;\r\n\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t$DataSet->AddAllSeries(); \r\n \r\n\t\t\t// Initialise the graph \r\n\t\t\t$Test = new pChart(740,520); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->setGraphArea(50,30,470,200); \r\n\t\t\t$Test->drawFilledRoundedRectangle(7,7,600,513,5,240,240,240); \r\n\t\t\t$Test->drawRoundedRectangle(5,5,600,515,5,230,230,230); \r\n\t\t\t$Test->drawGraphArea(255,255,255,TRUE); \r\n\t\t\t$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); \r\n\t\t\t$Test->drawGrid(4,TRUE,230,230,230,50); \r\n\t \r\n\t\t\t// Draw the 0 line \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",6); \r\n\t\t\t$Test->drawTreshold(0,143,55,72,TRUE,TRUE); \r\n\t \r\n\t\t\t// Draw the bar graph \r\n\t\t\t$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE); \r\n\t \r\n\t\t\t// Finish the graph \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->drawLegend(500,30,$DataSet->GetDataDescription(),250,250,250); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",10); \r\n\t\t\t$Test->drawTitle(50,22,\"$title\",50,50,50,485); \r\n\t\t\t$Test->Render($chart_path.\"$image_name\"); \t\t\t\r\n\r\n }\r\n\t \t \r\n/***************************************************************Generate Service Load Graph *********************************************************************************/\r\n\r\n\t\tif ($chartType==\"service_load\") {\r\n\t\t\r\n\t\t\t $_SESSION[\"sv_criteria\"] = $criteria;\r\n\t\t\t\t\r\n\t\t \t\t$_SESSION[\"svLoadDetail\"] = $_SERVER[\"PHP_AUTH_USER\"].\"sv_\".$criteria.\"_bar_load\";\r\n\t\t \t\t$image_name = $_SERVER[\"PHP_AUTH_USER\"].\"sv_\".$criteria.\"_bar_load.png\";\r\n\t\t\t\t$sv_id = $_SESSION[\"sv_id\"];\r\n\t\t\t\t$title = \"Service Load (\".$sv_id.\")\";\r\n\t\t\t\t\r\n\t\t\t $DataSet = new pData; \r\n\t\t\t\t$j=1;\r\n\t\t\t\t$total=0;\r\n\t\t\t\t$groupby = $_SESSION[\"gw_group\"];\r\n\t\t\t\t\r\n\t\t\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t\t\t \t\t \t\t\r\n\t\t\t\t\t\t $DataSet->AddPoint($row[\"count\"],\"Serie.$j\"); \r\n\t\t\t\t\t\t if ($groupby ==\"ByMonth\") {\r\n\t\t\t\t\t\t $mon = date(\"M\", strtotime($row[login])); \r\n \t\t\t\t\t\t$yr \t\t\t= date('Y', strtotime($row[login]));\r\n\t\t\t\t\t\t\t$DataSet->SetSerieName($mon.\"-\".$yr,\"Serie.$j\"); \r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t \t$DataSet->SetSerieName($row[\"gw_name\"],\"Serie.$j\"); \r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t$j++;\r\n\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t$DataSet->AddAllSeries(); \r\n \r\n\t\t\t// Initialise the graph \r\n\t\t\t$Test = new pChart(740,520); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->setGraphArea(50,30,470,200); \r\n\t\t\t$Test->drawFilledRoundedRectangle(7,7,600,513,5,240,240,240); \r\n\t\t\t$Test->drawRoundedRectangle(5,5,600,515,5,230,230,230); \r\n\t\t\t$Test->drawGraphArea(255,255,255,TRUE); \r\n\t\t\t$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); \r\n\t\t\t$Test->drawGrid(4,TRUE,230,230,230,50); \r\n\t \r\n\t\t\t// Draw the 0 line \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",6); \r\n\t\t\t$Test->drawTreshold(0,143,55,72,TRUE,TRUE); \r\n\t \r\n\t\t\t// Draw the bar graph \r\n\t\t\t$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE); \r\n\t \r\n\t\t\t// Finish the graph \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->drawLegend(500,30,$DataSet->GetDataDescription(),250,250,250); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",10); \r\n\t\t\t$Test->drawTitle(50,22,\"$title\",50,50,50,485); \r\n\t\t\t$Test->Render($chart_path.\"$image_name\"); \r\n\t\t\t\t\t\t\r\n\t\t\t}\r\n\t \t \r\n/********************************************************************Generate Top Ten users Graph *************************************************************************/\r\n \r\n\t\tif ($chartType==\"top_ten_users\") {\r\n\t\t\r\n\t\t\t $_SESSION[\"tt_users_criteria\"] = $criteria;\r\n\r\n\t\t\t$_SESSION[\"userLoadDetail\"] = $_SERVER[\"PHP_AUTH_USER\"].\"user_\".$criteria.\"_bar_load\";\r\n\t\t \t\t$image_name = $_SERVER[\"PHP_AUTH_USER\"].\"user_\".$criteria.\"_bar_load.png\";\r\n\t\t\t\t$user_id = $_SESSION[\"user_id\"];\r\n\t\t\t\t$title = \"User Load (\".$user_id.\")\";\r\n\t\t\t\t\r\n\t\t\t\t$groupby = $_SESSION[\"gw_group\"];\r\n\t\t\t\t\r\n\t\t\t $DataSet = new pData; \r\n\t\t\t\t$j=1;\r\n\t\t\t\t$total=0;\r\n\t\t\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t\t\t \t\t \t\r\n\t\t\t\t\t\t $DataSet->AddPoint($row[\"count\"],\"Serie.$j\"); \r\n\t\t\t\t if ($groupby ==\"ByMonth\") {\r\n\t\t\t\t\t\t $mon = date(\"M\", strtotime($row[login])); \r\n \t\t\t\t\t\t$yr \t\t\t= date('Y', strtotime($row[login]));\r\n\t\t\t\t\t\t\t$DataSet->SetSerieName($mon.\"-\".$yr,\"Serie.$j\"); \r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t \t$DataSet->SetSerieName($row[\"gw_name\"],\"Serie.$j\"); \r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t \t$j++;\r\n\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t$DataSet->AddAllSeries(); \r\n \r\n\t\t\t// Initialise the graph \r\n\t\t\t$Test = new pChart(740,520); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->setGraphArea(50,30,470,200); \r\n\t\t\t$Test->drawFilledRoundedRectangle(7,7,600,513,5,240,240,240); \r\n\t\t\t$Test->drawRoundedRectangle(5,5,600,515,5,230,230,230); \r\n\t\t\t$Test->drawGraphArea(255,255,255,TRUE); \r\n\t\t\t$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); \r\n\t\t\t$Test->drawGrid(4,TRUE,230,230,230,50); \r\n\t \r\n\t\t\t// Draw the 0 line \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",6); \r\n\t\t\t$Test->drawTreshold(0,143,55,72,TRUE,TRUE); \r\n\t \r\n\t\t\t// Draw the bar graph \r\n\t\t\t$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE); \r\n\t \r\n\t\t\t// Finish the graph \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->drawLegend(500,30,$DataSet->GetDataDescription(),250,250,250); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",10); \r\n\t\t\t$Test->drawTitle(50,22,\"$title\",50,50,50,485); \r\n\t\t\t$Test->Render($chart_path.\"$image_name\"); \t\t\t\r\n\t\t\t}\r\n\r\n/**************************************************************Generate Direction Load Graph *******************************************************************************/\r\n\r\n\t\tif ($chartType==\"direction_load\") {\r\n\t\t \r\n\t\t \t$_SESSION[\"direction_criteria\"] = $criteria;\r\n\r\n\t\t\t $_SESSION[\"dirLoadDetail\"] = $_SERVER[\"PHP_AUTH_USER\"].\"direction_\".$criteria.\"_bar_load\";\r\n\t\t \t\t$image_name = $_SERVER[\"PHP_AUTH_USER\"].\"direction_\".$criteria.\"_bar_load.png\";\r\n\t\t\t\t$dir_id = $_SESSION[\"dir_id\"];\r\n\t\t\t\t$title = \"Direction Load (\".$dir_id.\")\";\r\n\t\t\t\t$groupby = $_SESSION[\"gw_group\"];\r\n\r\n\t\t\t $DataSet = new pData; \r\n\t\t\t\t$j=1;\r\n\t\t\t\t$total=0;\r\n\t\t\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t\t\t\t $DataSet->AddPoint($row[\"count\"],\"Serie.$j\"); \r\n\t\t\t \t\t \t\tif ($groupby==\"ByMonth\") {\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t \t$mon = date(\"M\", strtotime($row[login])); \r\n \t\t\t\t\t\t$yr \t\t\t= date('Y', strtotime($row[login]));\r\n\t\t\t\t\t\t\t$DataSet->SetSerieName($mon.\"-\".$yr,\"Serie.$j\"); \r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t \t$DataSet->SetSerieName($row[\"gw_name\"],\"Serie.$j\"); \r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t$j++;\r\n\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t$DataSet->AddAllSeries(); \r\n \r\n\t\t\t// Initialise the graph \r\n\t\t\t$Test = new pChart(740,520); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->setGraphArea(50,30,470,200); \r\n\t\t\t$Test->drawFilledRoundedRectangle(7,7,600,513,5,240,240,240); \r\n\t\t\t$Test->drawRoundedRectangle(5,5,600,515,5,230,230,230); \r\n\t\t\t$Test->drawGraphArea(255,255,255,TRUE); \r\n\t\t\t$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); \r\n\t\t\t$Test->drawGrid(4,TRUE,230,230,230,50); \r\n\t \r\n\t\t\t// Draw the 0 line \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",6); \r\n\t\t\t$Test->drawTreshold(0,143,55,72,TRUE,TRUE); \r\n\t \r\n\t\t\t// Draw the bar graph \r\n\t\t\t$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE); \r\n\t \r\n\t\t\t// Finish the graph \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->drawLegend(500,30,$DataSet->GetDataDescription(),250,250,250); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",10); \r\n\t\t\t$Test->drawTitle(50,22,\"$title\",50,50,50,485); \r\n\t\t\t$Test->Render($chart_path.\"$image_name\"); \r\n\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\r\n/*********************************************************************Generate Destination host Load Graph *****************************************************************/\r\n\r\n\t\t\tif ($chartType==\"destination_host_load\") {\r\n\t\t\t\r\n\t\t\t\t$_SESSION[\"destination_host_criteria\"] = $criteria;\r\n\r\n\t\t\t \t$_SESSION[\"destLoadDetail\"] = $_SERVER[\"PHP_AUTH_USER\"].\"destination_host_\".$criteria.\"_bar_load\";\r\n\t\t \t\t$image_name = $_SERVER[\"PHP_AUTH_USER\"].\"destination_host_\".$criteria.\"_bar_load.png\";\r\n\t\t\t\t$dest_id = $_SESSION[\"dest_id\"];\r\n\t\t\t\t$title = \"Destination Host Load (\".$dest_id.\")\";\r\n\t\t\t\t$groupby = $_SESSION[\"gw_group\"];\r\n\t\t\t $DataSet = new pData; \r\n\t\t\t\t$j=1;\r\n\t\t\t\t$total=0;\r\n\t\t\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t\t\t \t\t \t\t\r\n\r\n\t\t\t\t\t\t $DataSet->AddPoint($row[\"count\"],\"Serie.$j\"); \r\n\t\t\t\tif ($groupby==\"ByMonth\") {\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t \t$mon = date(\"M\", strtotime($row[login])); \r\n \t\t\t\t\t\t$yr \t\t\t= date('Y', strtotime($row[login]));\r\n\t\t\t\t\t\t\t$DataSet->SetSerieName($mon.\"-\".$yr,\"Serie.$j\"); \r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t \t$DataSet->SetSerieName($row[\"gw_name\"],\"Serie.$j\"); \r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t$j++;\r\n\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t$DataSet->AddAllSeries(); \r\n \r\n\t\t\t// Initialise the graph \r\n\t\t\t$Test = new pChart(740,520); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->setGraphArea(50,30,470,200); \r\n\t\t\t$Test->drawFilledRoundedRectangle(7,7,600,513,5,240,240,240); \r\n\t\t\t$Test->drawRoundedRectangle(5,5,600,515,5,230,230,230); \r\n\t\t\t$Test->drawGraphArea(255,255,255,TRUE); \r\n\t\t\t$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); \r\n\t\t\t$Test->drawGrid(4,TRUE,230,230,230,50); \r\n\t \r\n\t\t\t// Draw the 0 line \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",6); \r\n\t\t\t$Test->drawTreshold(0,143,55,72,TRUE,TRUE); \r\n\t \r\n\t\t\t// Draw the bar graph \r\n\t\t\t$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE); \r\n\t \r\n\t\t\t// Finish the graph \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->drawLegend(500,30,$DataSet->GetDataDescription(),250,250,250); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",10); \r\n\t\t\t$Test->drawTitle(50,22,\"$title\",50,50,50,485); \r\n\t\t\t$Test->Render($chart_path.\"$image_name\"); \r\n\t\t\t\r\n\r\n\t\t\t}\r\n\r\n\r\n\r\n\t}", "final private function setColors()\n {\n\n $systemColorFile = new PhingFile(Phing::getResourcePath(\"phing/listener/defaults.properties\"));\n\n try {\n $prop = new Properties();\n\n $prop->load($systemColorFile);\n\n $err = $prop->getProperty(\"HtmlColorLogger.ERROR_CLASS\");\n $warn = $prop->getProperty(\"HtmlColorLogger.WARNING_CLASS\");\n $info = $prop->getProperty(\"HtmlColorLogger.INFO_CLASS\");\n $verbose = $prop->getProperty(\"HtmlColorLogger.VERBOSE_CLASS\");\n $debug = $prop->getProperty(\"HtmlColorLogger.DEBUG_CLASS\");\n if ($err !== null) {\n $this->errColor = self::PREFIX . $err . self::SUFFIX;\n }\n if ($warn !== null) {\n $this->warnColor = self::PREFIX . $warn . self::SUFFIX;\n }\n if ($info !== null) {\n $this->infoColor = self::PREFIX . $info . self::SUFFIX;\n }\n if ($verbose !== null) {\n $this->verboseColor = self::PREFIX . $verbose . self::SUFFIX;\n }\n if ($debug !== null) {\n $this->debugColor = self::PREFIX . $debug . self::SUFFIX;\n }\n } catch (IOException $ioe) {\n //Ignore exception - we will use the defaults.\n }\n }", "function colorList() {\n $colorArr = (new \\yii\\db\\Query())\n ->select(['color'])\n ->from('product_variation')\n ->where(['!=', 'color', ''])\n ->groupBy(['color'])\n ->all();\n return $colorArr;\n }", "public function actionChart()\n {\n $data = Account::find()->where('id_user='.Yii::$app->user->id)->all();\n $accounts = ArrayHelper::map($data, 'id', 'title');\n\n $operationsByAccount = [];\n foreach($accounts as $id_account=>$title){\n $operations = OperationController::findOperationsOfAccount($id_account);\n $operationsByAccount[$title] = $this->splitValueByMonths($operations);\n }\n\n $chart = new Chart($operationsByAccount);\n $data = $chart->data;\n\n return $this->render('chart', [\n 'data' => $data,\n ]);\n }", "public function getColorSpace() {}", "public function getColorSpace() {}", "public function getColor();", "public function getColor();", "public function getColor();", "public function getColor();", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColor() {}", "public function getColor() {}", "function get_ColorLovers_Palette($hex, $route, $num) {\n //update to request and process more plalettes to make sure we always returns palattes of 5-colors.\n $client = new GuzzleHttp\\Client();\n\n $url = \"http://www.colourlovers.com/api/palettes/top?hex=\".urlencode($hex).\"&format=json&sortBy=asc&numResults=\".urlencode($num);\n $headers = array('ACCEPT' => 'application/json');\n\n $response = $client->get($url);\n $data = $response->json();\n\n\n $all_palettes = array();\n array_push($all_palettes, array(\"resource_location\"=>$route));\n foreach ($data as $color) {\n if (count($color['colors']) == 5) {\n $palette = array(\n \"palette\"=>$color['colors'],\n \"source_url\"=>$color['url'],\n \"source_api_url\"=>$color['apiUrl'],\n );\n array_push($all_palettes, $palette);\n }\n }\n return $all_palettes;\n $hex = null;\n \n}", "public function getAvailableLayoutColors()\n {\n $module = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Module')->getCurrentSkinModule();\n\n return $module\n ? $module->callModuleMethod('getLayoutColors', array())\n : array();\n }", "public function charts()\n\t{\n\t\t//\n\t\t$loggeduser=\\App::make('authenticator')->getLoggedUser();\n\t\t\n\t\t//var_dump($userinfo);\n\t\t//var_dump($userprofile->first_name);\n\t\t if($loggeduser)\n\t\t\t{\n\t\t\t\t$userinfo=\\App::make('authenticator')->getUserById($loggeduser->id);\n\t\t$userprofile=UserProfile::find($loggeduser->id);\n\t\treturn \\View::make('backend.charts')->with('user',$userprofile);\n\t\t\t}\n\t\t\telse{\n\t\t \t$logged='not login';\n\t\t \treturn \\View::make('users.login');\n\t\t}\n\t}", "public function getColors()\n {\n return $this->colors;\n }", "public function get_customizer_color_vars() {\n\n\t\t$colors = [\n\t\t\t'content' => [\n\t\t\t\t'setting' => 'background_color',\n\t\t\t],\n\t\t\t'header-footer' => [\n\t\t\t\t'setting' => 'header_footer_background_color',\n\t\t\t],\n\t\t];\n\t\treturn $colors;\n\t}", "function colorMap(): array\n{\n return [\n 'black' => 'white',\n 'red' => 'white',\n 'green' => 'black',\n 'yellow' => 'black',\n 'blue' => 'white',\n 'magenta' => 'white',\n 'cyan' => 'black',\n 'white' => 'black',\n 'default' => 'white',\n ];\n}", "function pieGen($stats, $mode) {\n\t\n\tglobal $centreon_path;\n\t// Create and populate the pData object \n\t $MyData = new pData(); \n\t \n\t// print_r($stats[\"average\"]);\n\t\n\t$arrPoints = array();\n\t$i=0;\n\t// Host groups\n\tif ($mode == \"hgs\" ) { \n\t \n\t $MyData->addPoints(array($stats[\"average\"][\"UP_TP\"],\n\t\t\t\t $stats[\"average\"][\"DOWN_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNDETERMINED_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNREACHABLE_TP\"],\n\t\t\t\t $stats[\"average\"][\"MAINTENANCE_TP\"]),\n\t\t\t\t\"Hostgroups\"); \n\t $MyData->setSerieDescription(\"Hostgroups\",\"Hostgroups\");\n\t\n\n\t$arrPoints = array(\"Up\",\n\t\t\t\t \"Down\",\n\t\t\t\t \"Undeterminded\",\n\t\t\t\t \"Unreachable\",\n\t\t\t\t \"Schedule Downtime\");\t\t\n\n\t// Define the absissa serie \n\t $MyData->addPoints($arrPoints,\t\"Labels\");\n\t $MyData->setAbscissa(\"Labels\");\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\t // Create the pChart object \n\t $myPicture = new pImage(120,120,$MyData,TRUE);\t\t\t\t \n\t // Create the pPie object \n\t $PieChart = new pPie($myPicture,$MyData);\t\t\t \n\t\t\t\t \n\t$i = 0;\n\t/* Define the slice color */ \n\tif ($stats[\"average\"][\"UP_TP\"] > 0 ) { \n\t\t$PieChart->setSliceColor($i,array(\"R\"=>25,\"G\"=>238,\"B\"=>17)); // UP\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"DOWN_TP\"] > 0 ) {\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>249,\"G\"=>30,\"B\"=>5)); // DOWN\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNDETERMINED_TP\"] > 0 ) \t{\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>248,\"B\"=>255));// UNDETERMINED\n\t\t//$PieChart->setSliceColor($i,array(\"R\"=>240,\"G\"=>240,\"B\"=>240)); \n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNREACHABLE_TP\"] > 0 ) \t{\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>130,\"G\"=>207,\"B\"=>216)); // UNREACHABLE\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"MAINTENANCE_TP\"] > 0 ) \t{\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>153,\"B\"=>255));\t// MAINTENANCE\n\t\t$i++;\n\t\t}\n\t \n\t}\n\n\t// Service Groups\n\tif ($mode == \"sgs\" ) { \n\t \n\t $MyData->addPoints(array($stats[\"average\"][\"OK_TP\"],\n\t\t\t\t $stats[\"average\"][\"WARNING_TP\"],\n\t\t\t\t $stats[\"average\"][\"CRITICAL_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNKNOWN_TP\"],\n\t\t\t\t $stats[\"average\"][\"MAINTENANCE_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNDETERMINED_TP\"]),\n\t\t\t\t\"Servicegroups\"); \n\t $MyData->setSerieDescription(\"Servicegroups\",\"Servicegroups\");\n\t\n\n\t$arrPoints = array(\"Ok\",\n\t\t\t\t \"Warning\",\n\t\t\t\t \"Critical\",\n\t\t\t\t \"Unknown\",\n\t\t\t\t \"Schedule Downtime\",\n\t\t\t\t \"Undeterminded\");\n\n\t\t// Define the absissa serie \n\t $MyData->addPoints($arrPoints,\t\"Labels\");\n\t $MyData->setAbscissa(\"Labels\");\t\t\t \n\t\t\t\t \n\t // Create the pChart object \n\t $myPicture = new pImage(120,120,$MyData,TRUE);\t\n\t // Create the pPie object \n\t $PieChart = new pPie($myPicture,$MyData);\n\t\n\t\n\t\n\t/* Define the slice color */ \n\tif ($stats[\"average\"][\"OK_TP\"] > 0 ) {\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>13,\"G\"=>235,\"B\"=>58)); // OK\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"WARNING_TP\"] > 0 ) { \t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>248,\"G\"=>199,\"B\"=>6)); // DOWN \n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"CRITICAL_TP\"] > 0 ) \t{ \t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>249,\"G\"=>30,\"B\"=>5)); // DOWN\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNKNOWN_TP\"] > 0 ) {\t\t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>220,\"G\"=>218,\"B\"=>218)); // UNKNOWN\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"MAINTENANCE_TP\"] > 0 ) { \t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>153,\"B\"=>255));\t// MAINTENANCE\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNDETERMINED_TP\"] > 0 ) \t{ \n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>248,\"B\"=>255)); // UNDETERMINED\n\t\t//$PieChart->setSliceColor($i,array(\"R\"=>240,\"G\"=>240,\"B\"=>240)); // UNDETERMINED\t\t\n\t\t$i++;\n\t\t}\t \n\t}\t\t \n\t\n\t\n\t$Settings = array(\"R\"=>255, \"G\"=>255, \"B\"=>255);\n\t$myPicture->drawFilledRectangle(0,0,120,120,$Settings);\n\t\n\t// Enable shadow computing \n\t// $myPicture->setShadow(TRUE,array(\"X\"=>3,\"Y\"=>3,\"R\"=>0,\"G\"=>0,\"B\"=>0,\"Alpha\"=>10));\n\t\n\t // Draw a splitted pie chart \n\t $PieChart->draw3DPie(60,70,array(\"Radius\"=>50,\"DataGapAngle\"=>8,\"DataGapRadius\"=>6,\"Border\"=>TRUE,\"BorderR\"=>0,\"BorderG\"=>0,\"BorderB\"=>0));\n\n\t /* Render the picture */\n\t \n//\t$pie_file = tempnam( \"/tmp\" , \"reportreon_pie_\" ); \n\t$pie_file = tempnam( $centreon_path . \"/www/modules/pdfreports/generatedFiles/tmp\" , \"reportreon_pie_\" ); \n\t\n\t$myPicture->render($pie_file . \".png\");\n\t@unlink($pie_file );\n\n\treturn $pie_file . \".png\" ;\n}", "public function wpzoom_helper_guide_get_admin_colors() {\n\n\t\tif(is_customize_preview()){\n\t\t\tregister_admin_color_schemes();\n\t\t}\n\n\t\tglobal $_wp_admin_css_colors;\n\n\n\t\t$current_color_scheme = get_user_meta( get_current_user_id(), 'admin_color', true );\n\t\t$colors = $_wp_admin_css_colors[ $current_color_scheme ]->colors;\n\n\t\treturn $colors;\n\t}", "public function graphic()\n {\n return \"dice-\" . $this->getLastRoll();\n }", "function getColor() { return $this->readColor(); }", "function getColor() {return $this->readColor();}", "public function getHex($index) {\n\t\t$palette = $this->getFullPalette();\n\t\tif(isset($palette[$index])) {\n\t\t\treturn $palette[$index];\n\t\t} else {\n\t\t\treturn $palette['PaletteColour1'];\n\t\t}\n\t}", "public function getColor()\r\n {\r\n $out = array();\r\n\r\n// if ($this->getChatHelper()->getWidgetApi() == 'new') {\r\n if (strlen($this->getChatHelper()->getThemePrimaryColor()) > 0) {\r\n $out[] = \"\\$zopim.livechat.theme.setColor('#\" . ltrim($this->getChatHelper()->getThemePrimaryColor(), '#') . \"', 'primary')\";\r\n }\r\n\r\n // Specify Badge Color\r\n if ($this->getChatHelper()->getWindowTheme() == 'simple' && $this->getChatHelper()->getBadgeColorPrimary()) {\r\n switch ($this->getChatHelper()->getBadgeColorPrimary()){\r\n case 'badge_color_primary':\r\n $color = $this->getChatHelper()->getThemePrimaryColor();\r\n break;\r\n case 'badge_color_customized':\r\n default:\r\n $color = $this->getChatHelper()->getBadgeColor();\r\n if (empty($color)) {\r\n $color = $this->getChatHelper()->getThemePrimaryColor();\r\n }\r\n break;\r\n\r\n }\r\n if (!empty($color)) {\r\n $out[] = \"\\$zopim.livechat.theme.setColor('#\" . ltrim($color, '#') . \"', 'badge')\";\r\n }\r\n }\r\n\r\n // Specify Bubble Color\r\n if ($this->getChatHelper()->getWindowTheme() == 'classic' && $this->getChatHelper()->getBubbleColorPrimary()) {\r\n switch ($this->getChatHelper()->getBubbleColorPrimary()) {\r\n case 'bubble_color_primary':\r\n $color = $this->getChatHelper()->getThemePrimaryColor();\r\n break;\r\n case 'bubble_color_customized':\r\n default:\r\n $color = $this->getChatHelper()->getBubbleColor();\r\n if (empty($color)) {\r\n $color = $this->getChatHelper()->getThemePrimaryColor();\r\n }\r\n break;\r\n }\r\n if (!empty($color)) {\r\n $out[] = \"\\$zopim.livechat.theme.setColor('#\" . ltrim($color, '#') . \"', 'bubble')\";\r\n }\r\n }\r\n\r\n if (count($out) > 0) {\r\n $out[] = \"\\$zopim.livechat.theme.reload()\";\r\n }\r\n\r\n// } else {\r\n// if (strlen($this->getChatHelper()->getThemePrimaryColor()) > 0) {\r\n// $out[] = \"\\$zopim.livechat.window.setColor('#\" . ltrim($this->getChatHelper()->getThemePrimaryColor(), '#') . \"')\";\r\n// }\r\n//\r\n// if (strlen($this->getChatHelper()->getBubbleColor()) > 0) {\r\n// $out[] = \"\\$zopim.livechat.bubble.setColor('#\" . ltrim($this->getChatHelper()->getBubbleColor(), '#') . \"')\";\r\n// }\r\n// }\r\n\r\n if (!empty($out)) {\r\n return implode(';' . \"\\n\", $out). ';' . \"\\n\";\r\n }\r\n return null;\r\n }", "function background() \n{\n\tinclude(\"dbconnect.php\");\n\t$str9=\"select value1 from options where name='template'\";\n\t$result9=mysql_query($str9) or die(mysql_error());\n\t$row9=mysql_fetch_array($result9);\t\n\t$t=$row9['value1']; \n\tmysql_free_result($result9);\n\t$color=\"\";\n\tif(isset($_SESSION['color']))\n\t\t$t=$_SESSION['color'];\n\tswitch ($t)\n\t{\n\t\tcase 0: $color=\"#d03107\";break;//0099CC 0078cc\n\t\tcase 1: $color=\"#e05d04\";break;\n\t\tcase 2: $color=\"#1f7511\";break;\n\t\tcase 3: $color=\"#bf093c\";break;\n\t\tcase 4: $color=\"#0b1493\";break;\n\t} \n\treturn $color;\n}", "public function htmlValue()\n { \n \t$obj_javascripter=new javascripter();\n\n $stri_config=\"\";\n $stri_config.=($this->bool_adjustable)?\"graphe.Set('chart.adjustable',true);\\n\":\"\";\n $stri_config.=($this->bool_annotatable)?\"graphe.Set('chart.annotatable',true);\\n\":\"\";\n $stri_config.=($this->stri_annotate_color!='')?\"graphe.Set('chart.annotate.color','\".$this->stri_annotate_color.\"');\\n\":\"\";\n $stri_config.=($this->stri_centerx!='')?\"graphe.Set('chart.centerx','\".$this->stri_centerx.\"');\\n\":\"\";\n $stri_config.=($this->stri_centery!='')?\"graphe.Set('chart.centery','\".$this->stri_centery.\"');\\n\":\"\";\n $stri_config.=(count($this->arra_colors)>0)?\"graphe.Set('chart.colors', ['\".join(\"','\",$this->arra_colors).\"']);\\n\":\"\";\n $stri_config.=($this->stri_contextmenu!='')?\"graphe.Set('chart.contextmenu','\".$this->stri_contextmenu.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_bottom!='')?\"graphe.Set('chart.gutter.bottom','\".$this->int_gutter_bottom.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_left!='')?\"graphe.Set('chart.gutter.left','\".$this->int_gutter_left.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_right!='')?\"graphe.Set('chart.gutter.right','\".$this->int_gutter_right.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_top!='')?\"graphe.Set('chart.gutter.top','\".$this->int_gutter_top.\"');\\n\":\"\";\n $stri_config.=(count($this->arra_icon)>0)?\"graphe.Set('chart.icon', ['\".join(\"','\",$this->arra_icon).\"']);\\n\":\"\";\n $stri_config.=($this->bool_icon_redraw)?\"graphe.Set('chart.icon.redraw',true);\\n\":\"\";\n $stri_config.=($this->int_labels_count!='')?\"graphe.Set('chart.labels.count','\".$this->int_labels_count.\"');\\n\":\"\";\n $stri_config.=($this->stri_labels_empty!='')?\"graphe.Set('chart.labels.empty','\".$this->stri_labels_empty.\"');\\n\":\"\";\n $stri_config.=($this->stri_labels_full!='')?\"graphe.Set('chart.labels.full','\".$this->stri_labels_full.\"');\\n\":\"\";\n $stri_config.=($this->stri_needle_color!='')?\"graphe.Set('chart.needle.color','\".$this->stri_needle_color.\"');\\n\":\"\";\n $stri_config.=($this->stri_radius!='')?\"graphe.Set('chart.radius','\".$this->stri_radius.\"');\\n\":\"\";\n $stri_config.=($this->bool_resizable)?\"graphe.Set('chart.resizable',true);\\n\":\"\";\n $stri_config.=($this->stri_resize_handle_background!='')?\"graphe.Set('chart.resize.handle.background','\".$this->stri_resize_handle_background.\"');\\n\":\"\";\n $stri_config.=($this->int_scale_decimals!='')?\"graphe.Set('chart.scale.decimals','\".$this->int_scale_decimals.\"');\\n\":\"\";\n $stri_config.=($this->bool_scale_visible)?\"graphe.Set('chart.scale.visible',true);\\n\":\"\";\n $stri_config.=($this->stri_text_color!='')?\"graphe.Set('chart.text.color','\".$this->stri_text_color.\"');\\n\":\"\";\n $stri_config.=($this->stri_text_font!='')?\"graphe.Set('chart.text.font','\".$this->stri_text_font.\"');\\n\":\"\";\n $stri_config.=($this->stri_units_post!='')?\"graphe.Set('chart.units.post','\".$this->stri_units_post.\"');\\n\":\"\";\n $stri_config.=($this->stri_units_pre!='')?\"graphe.Set('chart.units.pre','\".$this->stri_units_pre.\"');\\n\":\"\";\n $stri_config.=($this->bool_zoom_background)?\"graphe.Set('chart.zoom.background',true);\\n\":\"\";\n $stri_config.=($this->int_zoom_delay!='')?\"graphe.Set('chart.zoom.delay','\".$this->int_zoom_delay.\"');\\n\":\"\";\n $stri_config.=($this->float_zoom_factor!='')?\"graphe.Set('chart.zoom.factor','\".$this->float_zoom_factor.\"');\\n\":\"\";\n $stri_config.=($this->bool_zoom_fade_in)?\"graphe.Set('chart.zoom.fade.in',true);\\n\":\"\";\n $stri_config.=($this->bool_zoom_fade_out)?\"graphe.Set('chart.zoom.fade.out',true);\\n\":\"\";\n $stri_config.=($this->int_zoom_frames!='')?\"graphe.Set('chart.zoom.frames','\".$this->int_zoom_frames.\"');\\n\":\"\";\n $stri_config.=($this->stri_zoom_hdir!='')?\"graphe.Set('chart.zoom.hdir','\".$this->stri_zoom_hdir.\"');\\n\":\"\";\n $stri_config.=($this->bool_zoom_shadow)?\"graphe.Set('chart.zoom.shadow',true);\\n\":\"\";\n $stri_config.=($this->stri_zoom_vdir!='')?\"graphe.Set('chart.zoom.vdir','\".$this->stri_zoom_vdir.\"');\\n\":\"\";\n\n\n \n \t$obj_javascripter->addFunction(\" \n \t$(function()\n \t{ \n var graphe = new RGraph.Fuel('\".$this->stri_id.\"',\".$this->int_min_value.\",\".$this->int_max_value.\",\".$this->int_value.\");\n // Configure the progress bar to appear as requested.\n $stri_config\n \n // Now call the .Draw() method to draw the chart.\n graphe.Draw();\n //RGraph.Effects.Fuel.Grow(graphe);\n\t\n \t});\n \");\n \t \n \t\t$stri_res=' <canvas id=\"'.$this->stri_id.'\" width=\"'.$this->int_width.'\" height=\"'.$this->int_height.'\">[No canvas support]</canvas>';\n \t\treturn $stri_res.$obj_javascripter->javascriptValue();\n }", "function tewwie_gutenberg_color_palette() {\n\tadd_theme_support(\n\t\t'editor-color-palette', array(\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Primary', '@@textdomain' ),\n\t\t\t\t'slug' => 'primary',\n\t\t\t\t'color' => 'rgb(94, 114, 228)',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Secondary', '@@textdomain' ),\n\t\t\t\t'slug' => 'secondary',\n\t\t\t\t'color' => 'rgb(245, 54, 92)',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Green', '@@textdomain' ),\n\t\t\t\t'slug' => 'green',\n\t\t\t\t'color' => 'rgb(67, 170, 139)',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Dark Grey', '@@textdomain' ),\n\t\t\t\t'slug' => 'dark-grey',\n\t\t\t\t'color' => 'rgb(68,68,68)',\n\t\t\t)\n\t\t)\n\t);\n}", "public function getColor()\n {\n return self::QUALITY_MAP[$this->qualityID]['color'];\n }", "public function getColor() {\n //Busca en esta clase la propiedad x\n return $this->color;\n }", "public function get_color( $ufc = null){\n\t\t$ufc = empty( $ufc ) ? self::$_ufc : $ufc;\n\n\t\t$index = (int) str_replace(self::VAR_PREFIX, \"\", $ufc);\n\n\t\t$theme_colors = self::$_theme_colors->colors;\n\n\t\tforeach($theme_colors as $key => $theme_color){\n\t\t\tif( $key === $index ) return $theme_color->color;\n\t\t}\n\n\t\treturn false;\n\t}", "function pieGen($stats, $mode,$Dir) {\n\t\n\tglobal $centreon_path;\n\t// Create and populate the pData object \n\t $MyData = new pData();\n\n\t// print_r($stats[\"average\"]);\n\t\n\t$arrPoints = array();\n\t$i=0;\n\t// Host groups\n\tif ($mode == \"hgs\" ) { \n\t \n\t $MyData->addPoints(array($stats[\"average\"][\"UP_TP\"],\n\t\t\t\t $stats[\"average\"][\"DOWN_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNDETERMINED_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNREACHABLE_TP\"],\n\t\t\t\t $stats[\"average\"][\"MAINTENANCE_TP\"]),\n\t\t\t\t\"Hostgroups\"); \n\t $MyData->setSerieDescription(\"Hostgroups\",\"Hostgroups\");\n\t\n\n\t$arrPoints = array(\"Up\",\n\t\t\t\t \"Down\",\n\t\t\t\t \"Undeterminded\",\n\t\t\t\t \"Unreachable\",\n\t\t\t\t \"Schedule Downtime\");\t\t\n\n\t// Define the absissa serie \n\t $MyData->addPoints($arrPoints,\t\"Labels\");\n\t $MyData->setAbscissa(\"Labels\");\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\t // Create the pChart object \n\t $myPicture = new pImage(120,120,$MyData,TRUE);\t\t\t\t \n\t // Create the pPie object \n\t $PieChart = new pPie($myPicture,$MyData);\t\t\t \n\t\t\t\t \n\t$i = 0;\n\t/* Define the slice color */ \n\tif ($stats[\"average\"][\"UP_TP\"] > 0 ) { \n\t\t$PieChart->setSliceColor($i,array(\"R\"=>25,\"G\"=>238,\"B\"=>17)); // UP\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"DOWN_TP\"] > 0 ) {\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>249,\"G\"=>30,\"B\"=>5)); // DOWN\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNDETERMINED_TP\"] > 0 ) \t{\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>248,\"B\"=>255));// UNDETERMINED\n\t\t//$PieChart->setSliceColor($i,array(\"R\"=>240,\"G\"=>240,\"B\"=>240)); \n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNREACHABLE_TP\"] > 0 ) \t{\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>130,\"G\"=>207,\"B\"=>216)); // UNREACHABLE\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"MAINTENANCE_TP\"] > 0 ) \t{\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>153,\"B\"=>255));\t// MAINTENANCE\n\t\t$i++;\n\t\t}\n\t \n\t}\n\n\t// Service Groups\n\tif ($mode == \"sgs\" ) { \n\t \n\t $MyData->addPoints(array($stats[\"average\"][\"OK_TP\"],\n\t\t\t\t $stats[\"average\"][\"WARNING_TP\"],\n\t\t\t\t $stats[\"average\"][\"CRITICAL_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNKNOWN_TP\"],\n\t\t\t\t $stats[\"average\"][\"MAINTENANCE_TP\"],\n\t\t\t\t $stats[\"average\"][\"UNDETERMINED_TP\"]),\n\t\t\t\t\"Servicegroups\"); \n\t $MyData->setSerieDescription(\"Servicegroups\",\"Servicegroups\");\n\t\n\n\t$arrPoints = array(\"Ok\",\n\t\t\t\t \"Warning\",\n\t\t\t\t \"Critical\",\n\t\t\t\t \"Unknown\",\n\t\t\t\t \"Schedule Downtime\",\n\t\t\t\t \"Undeterminded\");\n\n\t\t// Define the absissa serie \n\t $MyData->addPoints($arrPoints,\t\"Labels\");\n\t $MyData->setAbscissa(\"Labels\");\t\t\t \n\t\t\t\t \n\t // Create the pChart object \n\t $myPicture = new pImage(120,120,$MyData,TRUE);\t\n\t // Create the pPie object \n\t $PieChart = new pPie($myPicture,$MyData);\n\t\n\t\n\t\n\t/* Define the slice color */ \n\tif ($stats[\"average\"][\"OK_TP\"] > 0 ) {\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>13,\"G\"=>235,\"B\"=>58)); // OK\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"WARNING_TP\"] > 0 ) { \t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>248,\"G\"=>199,\"B\"=>6)); // DOWN \n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"CRITICAL_TP\"] > 0 ) \t{ \t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>249,\"G\"=>30,\"B\"=>5)); // DOWN\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNKNOWN_TP\"] > 0 ) {\t\t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>220,\"G\"=>218,\"B\"=>218)); // UNKNOWN\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"MAINTENANCE_TP\"] > 0 ) { \t\n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>153,\"B\"=>255));\t// MAINTENANCE\n\t\t$i++;\n\t\t}\n\tif ($stats[\"average\"][\"UNDETERMINED_TP\"] > 0 ) \t{ \n\t\t$PieChart->setSliceColor($i,array(\"R\"=>204,\"G\"=>248,\"B\"=>255)); // UNDETERMINED\n\t\t//$PieChart->setSliceColor($i,array(\"R\"=>240,\"G\"=>240,\"B\"=>240)); // UNDETERMINED\t\t\n\t\t$i++;\n\t\t}\t \n\t}\t\t \n\t\n\t\n\t$Settings = array(\"R\"=>255, \"G\"=>255, \"B\"=>255);\n\t$myPicture->drawFilledRectangle(0,0,120,120,$Settings);\n\t\n\t// Enable shadow computing \n\t// $myPicture->setShadow(TRUE,array(\"X\"=>3,\"Y\"=>3,\"R\"=>0,\"G\"=>0,\"B\"=>0,\"Alpha\"=>10));\n\t\n\t // Draw a splitted pie chart \n\t//\t $PieChart->draw3DPie(60,70,array(\"Radius\"=>50,\"DataGapAngle\"=>8,\"DataGapRadius\"=>6,\"Border\"=>TRUE,\"BorderR\"=>0,\"BorderG\"=>0,\"BorderB\"=>0));\n\t$PieChart->draw2DPie(60,60,array(\"Radius\"=>50,\"DrawLabels\"=>FALSE,\"LabelStacked\"=>TRUE,\"Border\"=>FALSE,\"BorderR\"=>0,\"BorderG\"=>0,\"BorderB\"=>0));\n\n\t /* Render the picture */\n\t \n\n\t//\t$pie_file = tempnam( \"/tmp\" , \"reportreon_pie_\" );\n\t$pie_file = tempnam($Dir, \"reportreon_pie_\" );\n//\t$pie_file = tempnam( $centreon_path . \"/www/modules/pdfreports/generatedFiles/tmp\" , \"reportreon_pie_\" );\n\n\t$myPicture->render($pie_file . \".png\");\n\t \t@unlink($pie_file );\n\n\treturn $pie_file . \".png\" ;\n}", "function hotel_lux_gutenberg_support() {\r\n\t$colors = cmsmasters_color_picker_palettes();\r\n\t\r\n\t$color_palette = array();\r\n\t\r\n\t\r\n\tforeach ($colors as $color) {\r\n\t\t$color_palette[] = array(\r\n\t\t\t'color' => $color,\r\n\t\t);\r\n\t}\r\n\t\r\n\t\r\n\tadd_theme_support('editor-color-palette', $color_palette);\r\n}", "public function post_rating_colors()\n\t{\n\t\t\n\t\t$query = $this->db->query(\"SELECT `average`, `color` FROM `post_rating_colors`\");\n\t\t\n\t\t// echo $this->db->last_query();\n\t\t// print_r($query->result_array()\t);\n\t\t// die();\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t$all_colors = array();\n\t\t\tforeach ($query->result_array() as $value) {\n\t\t\t\t$all_colors[$value['average']] = $value['color'];\n\t\t\t}\n\t\t\treturn $all_colors;\n\t\t}\n\t}", "public function show(Palette $favourite)\n {\n //return new PalettesResource($palette);\n $palettes = Palette::where('favourite',1)->get();\nreturn response($palettes,200);\n}", "public function colors()\n {\n $color = $this->backgroundColor();\n return array($color, Kronolith::foregroundColor($color));\n }", "function _field_colorpicker($fval) \n {\n\n $this->attribs['size'] = 7;\n $res = $this->_field_text($fval);\n\n $name = $this->fname;\n\n $res .= sprintf(\"<span id=\\\"swatch_%s\\\" style=\\\"border: 2px solid black; background-color: %s\\\">\n <a href=\\\"#\\\" onclick=\\\"cp_displayToggle('palette_%s'); return false;\\\" style=\\\"text-decoration:none\\\">\n &nbsp;&nbsp;&nbsp;&nbsp;</a></span>\",\n $name, $fval, $name);\n $res .= <<<EOJS\n <div id=\"palette_$name\" style=\"display:none; position: absolute; z-index: 11; background: #ddd;\">\n <script type=\"text/javascript\">\n document.forms[0].$name.onchange = function () { document.getElementById('swatch_$name').style.background = this.value }\n\n var total = colors.length;\n var width = 18;\n var cp_contents = \"\";\n cp_contents += '<table border=\\\"0\\\" cellspacing=\\\"2\\\" cellpadding=\\\"0\\\">';\n var use_highlight = (document.getElementById || document.all)?true:false;\n for (var i=0; i<total; i++) {\n if ((i % width) == 0) { cp_contents += \"<tr>\"; }\n if (use_highlight) { var mo = 'onMouseOver=\"cp_highlightColor(\\''+colors[i]+'\\',\\'$name\\')\"'; }\n else { mo = \"\"; }\n cp_contents += '<td bgcolor=\"'+colors[i]+'\"><span style=\"font-size:0.75em\"><a href=\"#\" onclick=\"cp_selectColor(\\''+colors[i]+'\\',\\'$name\\');return false;\" '+mo+' style=\"text-decoration:none;\">&nbsp;&nbsp;&nbsp;</a></span></td>';\n if ( ((i+1)>=total) || (((i+1) % width) == 0)) { \n cp_contents += \"</tr>\";\n }\n }\n\n if (document.getElementById) {\n cp_contents += '<tr><td colspan=\"'+width+'\">';\n cp_contents += '<div style=\"width:48%; border: 1px solid #ddd; float: left; background-color: #fff\" id=\"cp_SelectedColor_$name\">&nbsp;</div>';\n cp_contents += '<div style=\"width:48%; border: 1px solid #ddd; float: right; background-color: #fff\" id=\"cp_SelectedColorValue_$name\">#ffffff</div>';\n cp_contents += '</td></tr>';\n }\n cp_contents += \"</table>\";\n document.write(cp_contents);\n\n </script>\n </div>\nEOJS;\n return $res;\n }", "public function getColor()\n {\n if (array_key_exists(\"color\", $this->_propDict)) {\n return $this->_propDict[\"color\"];\n } else {\n return null;\n }\n }", "function getColor(){\n\t\t# Like this: Array ( [red] => 255 [green] => 255 [blue] => 255 )\n\t\t# You could then use it with the setRGB function (See class.rgbcontrol.php for that.)\n\t\t# Simple usage is $led->setRBG($dbh->getColor());\n\n\t\t$pdo = $this->db->prepare(\"SELECT red,green,blue FROM colors ORDER BY cID DESC LIMIT 1\");\n\t\t$pdo->execute();\n\n\t\treturn $pdo->fetch();\n\t}", "private function getDataColorArray() {\n\t\treturn $this->dataColorArray;\n\t}", "public function UXBarChart($cfg,$data,$legend=false){\n\t\t\t$xScale = count($data) / ( $cfg['width'] - 40 );\n\t\t\t$maxTotal = $this->chartmax($data);\n\t\t\t$yScale = $maxTotal / $cfg['height'];\n\t\t\n\t\t\t// Compute the bar width\n\t\t\t$barWidth = ( 1 / $xScale ) / 1.5;\n\t\t\n\t\t\t// Add the axes:\n\t\t\t$this->SetFont( '', '', 10);\n\t\t\n\t\t\t// X axis\n\t\t\t$this->Line( $cfg['xpos'] + 30, $cfg['ypos'], $cfg['xpos'] + $cfg['width'], $cfg['ypos'] );\n\t\t\t//$this->Arrow( $cfg['xpos'] + 30, $cfg['ypos'], $cfg['xpos'] + $cfg['width'], $cfg['ypos'], 1 );\n\t\t\n\t\t\t$this->SetTextColor(200,200,200);\n\t\t\tfor ( $i=0; $i < count( $data ); $i++ ) {\n\t\t\t\t$this->SetXY( $cfg['xpos'] + 40 + $i / $xScale, $cfg['ypos'] );\n\t\t\t\t$this->Cell( $barWidth, 10, $data[$i]['label'], 0, 0, 'C' );\n\t\t\t}\n\t\t\n\t\t\t// Y axis\n\t\t\t$this->Line( $cfg['xpos'] + 30, $cfg['ypos'], $cfg['xpos'] + 30, $cfg['ypos'] - $cfg['height'] - 8 );\n\t\t\n\t\t\tfor ( $i=0; $i <= $maxTotal; $i += $cfg['ystep'] ) {\n\t\t\t\t$this->SetXY( $cfg['xpos'] + 7, $cfg['ypos'] - 5 - $i / $yScale );\n\t\t\t\t$this->Cell( 20, 10, number_format( $i ), 0, 0, 'R' );\n\t\t\t\t$this->Line( $cfg['xpos'] + 28, $cfg['ypos'] - $i / $yScale, $cfg['xpos'] + $cfg['width'], $cfg['ypos'] - $i / $yScale, array('dash'=>4) );\n\t\t\t}\n\t\t\t// Add the axis labels\n\t\t\t$this->SetTextColor(0,0,255);\n\t\t\t$this->SetFont( '', 'B', 10 );\n\t\t\t$this->SetXY( $cfg['width'] / 2 + 20, $cfg['ypos'] + 8 );\n\t\t\t$this->Cell( 30, 10, $cfg['xtitle'], 0, 0, 'C' );\n\t\t\t$this->SetXY( $cfg['xpos'] + 7, $cfg['ypos'] - $cfg['height'] - 12 );\n\t\t\t$this->Cell( 20, 10, $cfg['ytitle'], 0, 0, 'R' );\n\t\t\n\t\t\t// Create the bars\n\t\t\t$this->SetFont( '', 'B', 5 );\n\t\t\t$xPos = $cfg['xpos'] + 40;\n\t\t\t$bar = 0;\n\t\t\n\t\t\t$count = count($data);\n\t\t\t\n// \t\t\t$this->SetFont( '', 'B', 10 );\n\t\t\tforeach ( $data as $ix => $row ) {\n\t\t\t\t$color = $this->hex2rgb($row['color']);\n\t\t\t\t$this->SetFillColor( $color['r'], $color['g'], $color['b'] );\n\t\t\t\t$this->Rect( $xPos, $cfg['ypos'] - ( $row['value'] / $yScale ), $barWidth, $row['value'] / $yScale, 'DF', array('all'=>array('dash'=>0)));\n\t\t\t\t//valuetext: test\n\t\t\t\t$this->SetXY($xPos, $cfg['ypos'] - ( $row['value'] / $yScale ) - 10);\n\t\t\t\t$this->Cell($barWidth, 10, $row['value'], 0, 0, 'C' );\n\t\t\t\t\n\t\t\t\t//Legend: test\t\t\t\t\n\t\t\t\tif($legend){\n\t\t\t\t\t$this->SetFont('', 'B', 10 );\n\t\t\t\t\t$this->Rect($cfg['xleg'], $cfg['yleg']+$bar*10, 5, 5, 'DF', array('all'=>array('dash'=>0)));\n\t\t\t\t\t$this->SetXY($cfg['xleg']+10, $cfg['yleg']+$bar*10-3);\n\t\t\t\t\t$this->Cell( $this->getStringWidth($row['legend']), 10, $row['legend'], 0, 0, 'L' );\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$this->SetFont('', 'B', 5 );\n\t\t\t\t$xPos += ( 1 / $xScale );\n\t\t\t\t$bar++;\n// \t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}", "function get_all_colors()\n{\n\t$colors = array(\n\t\t\"000000\" => \"Black\",\n\t\t\"0000FF\" => \"Blue\",\n\t\t\"804000\" => \"Brown\",\n\t\t\"736F6E\" => \"Gray\",\n\t\t\"00FF00\" => \"Green\",\n\t\t\"FF8040\" => \"Orange\",\n\t\t\"FF00FF\" => \"Pink\",\n\t\t\"8E35EF\" => \"Purple\",\n\t\t\"FF0000\" => \"Red\",\n\t\t\"FFFF00\" => \"Yellow\",\n\t\t\"FFFFFF\" => \"White\",\n\t);\n\treturn $colors;\n}", "private function draw_axes(){\n\t\t$this->display_graph_axis = \"\\t<path stroke=\\\"$this->axes_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->graphmarginleft $this->axisheight h $this->axiswidth\\\"/>\\n\";\n\t\t$this->display_graph_axis .= \"\\t<path stroke=\\\"$this->axes_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->graphmargintop 0 v $this->axisheight\\\"/>\\n\";\n\t\treturn;\n\t}", "public function getColor()\n {\n // Busca en esta clase la propiedad X\n return $this->color;\n }" ]
[ "0.6487676", "0.5982131", "0.5815626", "0.5804494", "0.5717699", "0.5594531", "0.54597574", "0.53283125", "0.5303035", "0.5261232", "0.5253047", "0.5227681", "0.5208537", "0.5196157", "0.51812506", "0.5174102", "0.5156563", "0.51425695", "0.50963384", "0.5065445", "0.506498", "0.50298727", "0.5023568", "0.5002535", "0.4967516", "0.4949212", "0.49317282", "0.49271914", "0.4920132", "0.4906714", "0.49011743", "0.49010083", "0.49003625", "0.48844868", "0.4875274", "0.48573974", "0.48485717", "0.48211658", "0.48211658", "0.48167017", "0.48143667", "0.4797388", "0.47965702", "0.4792441", "0.47821093", "0.47781533", "0.47762626", "0.47650468", "0.47622916", "0.4736156", "0.47354898", "0.47346377", "0.4730766", "0.4719111", "0.47185856", "0.47173762", "0.47173762", "0.47173762", "0.47173762", "0.47169608", "0.4716939", "0.4716939", "0.4716939", "0.4716939", "0.4716939", "0.4716939", "0.47166374", "0.47166374", "0.4715271", "0.47143912", "0.47136953", "0.47130156", "0.4708355", "0.47067592", "0.4703626", "0.46931532", "0.4685935", "0.46693724", "0.466735", "0.46611908", "0.46456125", "0.4645504", "0.4644623", "0.46366695", "0.4625817", "0.46232787", "0.46198305", "0.461575", "0.46128282", "0.46124586", "0.46080652", "0.46069548", "0.46033448", "0.45907837", "0.45820796", "0.45773703", "0.45748225", "0.4571846", "0.45713234", "0.45711082" ]
0.7155442
0
getAnimationState returns 0 or 1, depending on whether we've to animate chart. Here, we just read from Session variable and show it In your application, you could read this configuration from your User Configuration Manager, database, or global application settings
function getAnimationState() { //Return return (($_SESSION['animation']<>"0") ? "1" : "0"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAnimation($param){\n $this->_config_mapper(array('showAnim' => $param)); \n }", "public function isSequencedAnimation()\n {\n return $this->sequencedAnimation;\n }", "public function getAnimated()\r\n {\r\n return $this->animated;\r\n }", "function GetAnimation() {\n return ($this->GIF);\n }", "public function graphicState() {}", "function _jquery_loadinganimation_get_settings() {\n $module_path = drupal_get_path('module', 'exam');\n return array(\n 'module_path' => $module_path,\n 'img_src' => variable_get('jquery_loadinganimation_img_src', $module_path . '/images/jquery_loadinganimation/ajax-loader.gif'),\n 'show_on_ajax' => variable_get('jquery_loadinganimation_show_on_ajax', FALSE),\n 'show_on_href' => variable_get('jquery_loadinganimation_show_on_href', TRUE),\n\t'show_on_form_submit' => variable_get('jquery_loadinganimation_show_on_form_submit', TRUE),\n 'close_on_click' => variable_get('jquery_loadinganimation_close_on_click', TRUE),\n 'close_on_esc' => variable_get('jquery_loadinganimation_close_on_esc', TRUE),\n 'subselector' => variable_get('jquery_loadinganimation_subselector', ''));\n}", "public function setAnimated($value) {\r\n $this->animated = $value;\r\n }", "public function animales()\n {\n $id = $this->_userdata->idUser();\n $Animales = new AnimalesModel();\n $listadoAnunciosCount = $Animales->getAll(false, null, $id, true);\n $paginador = new Paginator($listadoAnunciosCount, NUMERO_PAGINACION, $this->get('pag') ?? 1, '?pag=(:num)');\n if ($this->get('pag')) {\n $listadoAnuncios = $Animales->getAll($paginador->getLimit(), $id)['anuncios'];\n } else {\n $listadoAnuncios = $Animales->getAll(true, \"0,\" . NUMERO_PAGINACION, $id)['anuncios'];\n }\n $this->_view->_paginator = $paginador->toHtml();\n\n $this->_view->_listadoAnimales = $listadoAnuncios;\n $this->_view->panelTitle = \"Bienvenido a tu panel de gestión Particular\";\n $this->_view->titulo = $this->_view->getConfigure()->title;\n $this->_view->meta_descripcion = \"Sistema Perreras\";\n $this->_view->titulo_page = \"Panel principal\";\n $this->_view->renderizar(\"animales\", 'index');\n }", "function jquery_loadinganimation_init() {\n $module_path = drupal_get_path('module', 'exam');\n $js_settings = _jquery_loadinganimation_get_settings();\n drupal_add_js(array('jquery_loadinganimation' => $js_settings), 'setting');\n drupal_add_js($module_path . '/js/jquery_loadinganimation.js');\n drupal_add_css($module_path . '/css/jquery_loadinganimation.css');\n}", "function easl_page_header_has_particle_animation() {\n return get_field('enable_header_animation', wpex_get_current_post_id());\n}", "public function animation($value) {\n return $this->setProperty('animation', $value);\n }", "public function animation($value) {\n return $this->setProperty('animation', $value);\n }", "public function animation($value) {\n return $this->setProperty('animation', $value);\n }", "public function animation($value)\n {\n return $this->setProperty('animation', $value);\n }", "function expense_tracker_pie_chart()\n{\n\t\tif($this->RequestHandler->isAjax()){\n\t\t$this->layout='blank';\n\t\t}else{\n\t\t$this->layout='session';\n\t\t}\n\t$this->ath();\n\t$this->check_user_privilages();\t\n\t\n\t\t$s_role_id=$this->Session->read('role_id');\n\t\t$s_society_id = (int)$this->Session->read('society_id');\n\t\t$s_user_id=$this->Session->read('user_id');\t\n\n}", "private function getBuildingAnimation(){\n $img = NULL;\n\n $building = $this->getBuilding();\n \n if ($building){\n if (!strcmp(\"factory\", $building)) {\n $image = \"img/smoke2.png\";\n }\n }\n\n return $image;\n }", "function vcex_get_css_animation( $css_animation = '' ) {\n\tif ( ! $css_animation || 'none' === $css_animation ) {\n\t\treturn;\n\t}\n\n\twp_enqueue_script( 'vc_waypoints' );\n\twp_enqueue_style( 'vc_animate-css' );\n\n\treturn ' wpb_animate_when_almost_visible wpb_' . sanitize_html_class( $css_animation ) . ' ' . esc_attr( $css_animation );\n}", "function getTableStateChart()\n{\n\tglobal $dbObjMirrors;\n\n\t$RCCAQuery = \"SELECT * FROM [mirrors].[dbo].[View_LSIP2_RCCA] ORDER BY id DESC\";\n\n\t$RCCAResult = $dbObjMirrors->executeQuery($RCCAQuery);\n\n\treturn $RCCAResult;\n}", "function jquery_loadinganimation_install() {\n // Set general settings.\n variable_set('jquery_loadinganimation_show_on_ajax', FALSE);\n variable_set('jquery_loadinganimation_show_on_href', TRUE);\n variable_set('jquery_loadinganimation_show_on_form_submit', TRUE);\n variable_set('jquery_loadinganimation_close_on_click', TRUE);\n variable_set('jquery_loadinganimation_close_on_esc', TRUE);\n variable_set('jquery_loadinganimation_subselector', '');\n}", "public function saveGraphicState() {}", "public function saveGraphicState() {}", "private function graph_display(){\n\t\t$this->display_svg_graph = \"<svg id=\\\"graph\\\" width=\\\"\" . $this->graphwidth . \"px\\\" height=\\\"\" . $this->graphheight . \"px\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\";\n\t\t$this->display_svg_graph .= $this->display_graph_axis;\n\t\t$this->display_svg_graph .= $this->display_main_graph;\n\t\t$this->display_svg_graph .= $this->main_graph_ave_lines;\n\t\t$this->display_svg_graph .= $this->main_graph_dots;\n\t\t$this->display_svg_graph .= \"</svg>\\n\";\n\t\treturn;\n\t}", "public function htmlValue()\n { \n \t$obj_javascripter=new javascripter();\n\n $stri_config=\"\";\n $stri_config.=($this->bool_adjustable)?\"graphe.Set('chart.adjustable',true);\\n\":\"\";\n $stri_config.=($this->bool_annotatable)?\"graphe.Set('chart.annotatable',true);\\n\":\"\";\n $stri_config.=($this->stri_annotate_color!='')?\"graphe.Set('chart.annotate.color','\".$this->stri_annotate_color.\"');\\n\":\"\";\n $stri_config.=($this->stri_centerx!='')?\"graphe.Set('chart.centerx','\".$this->stri_centerx.\"');\\n\":\"\";\n $stri_config.=($this->stri_centery!='')?\"graphe.Set('chart.centery','\".$this->stri_centery.\"');\\n\":\"\";\n $stri_config.=(count($this->arra_colors)>0)?\"graphe.Set('chart.colors', ['\".join(\"','\",$this->arra_colors).\"']);\\n\":\"\";\n $stri_config.=($this->stri_contextmenu!='')?\"graphe.Set('chart.contextmenu','\".$this->stri_contextmenu.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_bottom!='')?\"graphe.Set('chart.gutter.bottom','\".$this->int_gutter_bottom.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_left!='')?\"graphe.Set('chart.gutter.left','\".$this->int_gutter_left.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_right!='')?\"graphe.Set('chart.gutter.right','\".$this->int_gutter_right.\"');\\n\":\"\";\n $stri_config.=($this->int_gutter_top!='')?\"graphe.Set('chart.gutter.top','\".$this->int_gutter_top.\"');\\n\":\"\";\n $stri_config.=(count($this->arra_icon)>0)?\"graphe.Set('chart.icon', ['\".join(\"','\",$this->arra_icon).\"']);\\n\":\"\";\n $stri_config.=($this->bool_icon_redraw)?\"graphe.Set('chart.icon.redraw',true);\\n\":\"\";\n $stri_config.=($this->int_labels_count!='')?\"graphe.Set('chart.labels.count','\".$this->int_labels_count.\"');\\n\":\"\";\n $stri_config.=($this->stri_labels_empty!='')?\"graphe.Set('chart.labels.empty','\".$this->stri_labels_empty.\"');\\n\":\"\";\n $stri_config.=($this->stri_labels_full!='')?\"graphe.Set('chart.labels.full','\".$this->stri_labels_full.\"');\\n\":\"\";\n $stri_config.=($this->stri_needle_color!='')?\"graphe.Set('chart.needle.color','\".$this->stri_needle_color.\"');\\n\":\"\";\n $stri_config.=($this->stri_radius!='')?\"graphe.Set('chart.radius','\".$this->stri_radius.\"');\\n\":\"\";\n $stri_config.=($this->bool_resizable)?\"graphe.Set('chart.resizable',true);\\n\":\"\";\n $stri_config.=($this->stri_resize_handle_background!='')?\"graphe.Set('chart.resize.handle.background','\".$this->stri_resize_handle_background.\"');\\n\":\"\";\n $stri_config.=($this->int_scale_decimals!='')?\"graphe.Set('chart.scale.decimals','\".$this->int_scale_decimals.\"');\\n\":\"\";\n $stri_config.=($this->bool_scale_visible)?\"graphe.Set('chart.scale.visible',true);\\n\":\"\";\n $stri_config.=($this->stri_text_color!='')?\"graphe.Set('chart.text.color','\".$this->stri_text_color.\"');\\n\":\"\";\n $stri_config.=($this->stri_text_font!='')?\"graphe.Set('chart.text.font','\".$this->stri_text_font.\"');\\n\":\"\";\n $stri_config.=($this->stri_units_post!='')?\"graphe.Set('chart.units.post','\".$this->stri_units_post.\"');\\n\":\"\";\n $stri_config.=($this->stri_units_pre!='')?\"graphe.Set('chart.units.pre','\".$this->stri_units_pre.\"');\\n\":\"\";\n $stri_config.=($this->bool_zoom_background)?\"graphe.Set('chart.zoom.background',true);\\n\":\"\";\n $stri_config.=($this->int_zoom_delay!='')?\"graphe.Set('chart.zoom.delay','\".$this->int_zoom_delay.\"');\\n\":\"\";\n $stri_config.=($this->float_zoom_factor!='')?\"graphe.Set('chart.zoom.factor','\".$this->float_zoom_factor.\"');\\n\":\"\";\n $stri_config.=($this->bool_zoom_fade_in)?\"graphe.Set('chart.zoom.fade.in',true);\\n\":\"\";\n $stri_config.=($this->bool_zoom_fade_out)?\"graphe.Set('chart.zoom.fade.out',true);\\n\":\"\";\n $stri_config.=($this->int_zoom_frames!='')?\"graphe.Set('chart.zoom.frames','\".$this->int_zoom_frames.\"');\\n\":\"\";\n $stri_config.=($this->stri_zoom_hdir!='')?\"graphe.Set('chart.zoom.hdir','\".$this->stri_zoom_hdir.\"');\\n\":\"\";\n $stri_config.=($this->bool_zoom_shadow)?\"graphe.Set('chart.zoom.shadow',true);\\n\":\"\";\n $stri_config.=($this->stri_zoom_vdir!='')?\"graphe.Set('chart.zoom.vdir','\".$this->stri_zoom_vdir.\"');\\n\":\"\";\n\n\n \n \t$obj_javascripter->addFunction(\" \n \t$(function()\n \t{ \n var graphe = new RGraph.Fuel('\".$this->stri_id.\"',\".$this->int_min_value.\",\".$this->int_max_value.\",\".$this->int_value.\");\n // Configure the progress bar to appear as requested.\n $stri_config\n \n // Now call the .Draw() method to draw the chart.\n graphe.Draw();\n //RGraph.Effects.Fuel.Grow(graphe);\n\t\n \t});\n \");\n \t \n \t\t$stri_res=' <canvas id=\"'.$this->stri_id.'\" width=\"'.$this->int_width.'\" height=\"'.$this->int_height.'\">[No canvas support]</canvas>';\n \t\treturn $stri_res.$obj_javascripter->javascriptValue();\n }", "public function getGraphicStateSync() {}", "public static function wpabstats_chart_page_active_check()\n {\n $getChartPageIsActive = get_option('_wpabstats_chart_page_widget');\n $isActive = \"\";\n\n if( $getChartPageIsActive === \"on\" ) $isActive = 'checked=\"checked\"';\n\n return $isActive;\n }", "public function drawProgressChart() {\n $pid = $this->session->userdata('project_id');\n\n if (empty($this->chart_model->getNotFinishedCount($pid)) && empty($this->chart_model->getFinishedCount($pid)))\n $this->data['display'] = 1;\n\n $category = array();\n $category['name'] = 'Category';\n\n $series1 = array();\n $series1['name'] = 'Open Test Cases';\n\n $series2 = array();\n $series2['name'] = 'Closed Test Cases ';\n\n $category['data'][] = $this->chart_model->getProjectName($pid);\n $series1['data'][] = $this->chart_model->getNotFinishedCount($pid);\n $series2['data'][] = $this->chart_model->getFinishedCount($pid);\n\n $result = array();\n array_push($result, $category);\n array_push($result, $series1);\n array_push($result, $series2);\n\n print json_encode($result, JSON_NUMERIC_CHECK);\n\n return $result;\n }", "public static function getCustomAnimationByHandle($handle){\r\n\t\t$db = new RevSliderDB();\r\n\r\n\t\t$result = $db->fetch(RevSliderGlobals::$table_layer_anims, \"handle = '\".$handle.\"'\");\r\n\t\tif(!empty($result)) return json_decode(str_replace(\"'\", '\"', $result[0]['params']), true);\r\n\r\n\t\treturn false;\r\n\t}", "public function saveAnimation()\n {\n $response = array('status' => 500, 'desc' => 'failure');\n\n if ($this->request->ajax()) {\n $id = $_POST['id'];\n $data = Convert::to_pairs($_POST['data']);\n\n $agroup = AnimationGroupTemplate::findOrFail($id);\n $animation = $agroup->animation->first();\n\n $animation->animation_group_id = $id;\n $animation->shuffler_level = json_encode([0, 1], JSON_NUMERIC_CHECK);\n $animation->animation_type_id = $data['animation_type'];\n\n if ($animation->save()) {\n $script = 'console.log(\"hore\");';\n\n $response = array('status' => 200, 'desc' => 'ok', 'content' => $script);\n }\n }\n\n return $response;\n }", "public function getExportState() {}", "function yearly_chart() {\n $this->load->view(\"expenses/yearly_chart\");\n }", "public function setSequencedAnimation($sequenced = true)\n {\n $this->sequencedAnimation = (bool) $sequenced;\n \n return $this;\n }", "function getViewState(){\n\treturn $_POST[ SESSION_NAME_SPACE ][ 'viewSate' ];\t\n}", "function display() {\r\n\t\tJRequest::setVar('view', 'charts');\r\n\t\tJRequest::setVar('layout', 'charts');\r\n\t\tparent::display();\t\r\n }", "function presscore_tpl_get_hover_anim_class( $animation ) {\n\t\tswitch ( $animation ) {\n\t\t\tcase 'direction_aware': $class = 'hover-grid'; break;\n\t\t\tcase 'redirection_aware': $class = 'hover-grid-reverse'; break;\n\t\t\tcase 'scale_in': $class = 'hover-scale'; break;\n\t\t\tcase 'fade':\n\t\t\tdefault: $class = 'hover-fade';\n\t\t}\n\n\t\treturn $class;\n\t}", "public function decision() {\n Log::info($this->runId.': New Position Decision Indicators: '.PHP_EOL.' '.$this->logIndicators());\n\n\n if ($this->decisionIndicators['slowHmaSlopePass'] == \"long\" && $this->decisionIndicators['slowStochOverboughtCheck'] == 'overBoughtShort' && $this->decisionIndicators['fastHmaCrossover'] == 'crossedAbove') {\n Log::warning($this->runId.': NEW LONG POSITION');\n return \"long\";\n }\n elseif ($this->decisionIndicators['slowHmaSlopePass'] == \"short\" && $this->decisionIndicators['slowStochOverboughtCheck'] == 'overBoughtLong' && $this->decisionIndicators['fastHmaCrossover'] == 'crossedBelow') {\n Log::warning($this->runId.': NEW SHORT POSITION');\n return \"short\";\n }\n else {\n Log::info($this->runId.': Failed Ema Breakthrough');\n return \"none\";\n }\n }", "public function displayAjaxConfig()\n {\n $config = new Config();\n $this->ajaxRenderJson($config->get());\n }", "public function setting_show_on_dashboard() {\n\t\t$show_on_dashboard = get_option( 'simple_history_show_on_dashboard', 1 );\n\t\t$show_on_dashboard = apply_filters( 'simple_history_show_on_dashboard', $show_on_dashboard );\n\t\treturn (bool) $show_on_dashboard;\n\t}", "public function showImage()\n {\n $gif = new AnimatedGif($this->frames, $this->delays, $this->loops);\n $gif->display();\n }", "public function decision() {\n Log::info($this->runId.': Decision Indicators '.json_encode($this->decisionIndicators));\n\n //if (!$this->fullPositionInfo['open']) {\n Log::info($this->runId.': Decision Completely Open.');\n\n if ($this->decisionIndicators['hma'] == 'long' && $this->decisionIndicators['stochOverboughtCheck'] != 'overBoughtLong') {\n Log::warning($this->runId.': NEW LONG POSITION');\n return 'long';\n }\n elseif ($this->decisionIndicators['hma'] == 'short' && $this->decisionIndicators['stochOverboughtCheck'] != 'overBoughtShort') {\n Log::warning($this->runId.': NEW SHORT POSITION');\n return 'short';\n }\n// }\n }", "public function animation(Animation $a)\n {\n return $this->addOption($a->toArray());\n }", "public function setAnimatedSteps($value) {\r\n $this->animatedSteps = $value;\r\n }", "function generateHistoryChart($result,$graph_type,$graph_file_name,$gateway,$chart_path)\r\n\t{\r\n \r\n\t\tif ($graph_type==\"pie_chart\") {\r\n\t\t\r\n\t\t$f_name = split(\"\\,\", $graph_file_name);\r\n\t\t$file_name_len = count($f_name);\r\n\t\t\r\n\t\t$file_name=\"\";\r\n\t\tfor ($i=0;$i<$file_name_len;$i++) {\r\n\t\t if ($file_name==\"\")\r\n\t\t\t\t$file_name= $f_name[$i];\r\n\t\t\telse\r\n\t\t\t\t$file_name= $file_name.\"_\".$f_name[$i];\r\n\t\t}\r\n\t\t\r\n\t\t$_SESSION[\"file_name\"] = $_SERVER[\"PHP_AUTH_USER\"].\"_\".$file_name.\"_history\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$image_name= $_SESSION[\"file_name\"].\".png\";\r\n\r\n\t\t$DataSet = new pData; \r\n\t\t\r\n\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t \t\t \r\n\r\n\t\t\t\t \t$DataSet->AddPoint($row[\"total_login\"],\"Serie1\"); \r\n\t\t\t\t \tif ($gateway!=\"\") {\r\n\t\t\t\t \t\t$_SESSION[\"historyBased\"] = \"per_month\";\r\n\t\t\t\t\t\t$mon = date(\"M\", strtotime($row[\"login\"])); \r\n \t\t\t\t\t$yr \t\t\t= \t date('Y', strtotime($row[\"login\"]));\r\n\t\t\t\t\t\t$DataSet->AddPoint(\"$mon-$yr\",\"Serie2\"); \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t$_SESSION[\"historyBased\"] = \"per_gw\";\r\n\t\t\t\t\t$DataSet->AddPoint($row[\"gw_name\"],\"Serie2\"); \r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\r\n\t\t\r\n\r\n \t\t$DataSet->AddAllSeries(); \r\n\t\t$DataSet->SetAbsciseLabelSerie(\"Serie2\"); \r\n \r\n\t\t // Initialise the graph\r\n\t\t $Test = new pChart(740,520); \r\n\t\t $Test->drawFilledRoundedRectangle(7,7,673,513,5,240,240,240); \r\n\t\t $Test->drawRoundedRectangle(5,5,575,515,5,230,230,230); \r\n \r\n\t\t // Draw the pie chart \r\n\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t$Test->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),150,90,110,PIE_PERCENTAGE,TRUE,50,20,5); \r\n\t\t$Test->drawPieLegend(410,15,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250); \r\n \r\n\t\t$Test->Render($chart_path.\"$image_name\"); \r\n\t\t}\r\n\t\telse {\r\n\t\t$f_name = split(\"\\,\", $graph_file_name);\r\n\t\t//echo $graph_file_name;\r\n\t\t$file_name_len = count($f_name);\r\n\t\t//echo $file_name_len;\r\n\t\t$file_name=\"\";\r\n\t\tfor ($i=0;$i<$file_name_len;$i++) {\r\n\t\t if ($file_name==\"\")\r\n\t\t\t\t$file_name= $f_name[$i];\r\n\t\t\telse\r\n\t\t\t\t$file_name= $file_name.\"_\".$f_name[$i];\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t//echo $file_name;\r\n\t\t\t\t$_SESSION[\"file_name\"] = $_SERVER[\"PHP_AUTH_USER\"].\"_\".$file_name.\"_history_bar\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$image_name= $_SESSION[\"file_name\"].\".png\";\r\n\t\t//echo $image_name;\r\n\t\t//echo $gateway;\r\n\t\t\t\t\t $DataSet = new pData; \r\n\t\t\t\t$j=1;\r\n\t\t\t\t\r\n\t\t\t\twhile ( $row = mysql_fetch_array($result) ) {\r\n\t\t\t \t\t $DataSet->AddPoint($row[\"total_login\"],\"Serie.$j\"); \r\n\t\t\t \t\t \tif ($gateway!=\"\") {\r\n\t\t\t \t\t \t$_SESSION[\"historyBased\"] = \"per_month\";\r\n\t\t\t\t\t\t$mon = date(\"M\", strtotime($row[\"login\"])); \r\n \t\t\t\t\t$yr \t\t\t= \t date('Y', strtotime($row[\"login\"]));\r\n\t\t\t\t\t\t$DataSet->SetSerieName(\"$mon-$yr\",\"Serie.$j\"); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t$_SESSION[\"historyBased\"] = \"per_gw\";\r\n\r\n\t\t\t\t\t $DataSet->SetSerieName($row[\"gw_name\"],\"Serie.$j\"); \r\n\t\t\t\t\t }\r\n\t\t\t\t\t $j++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t$DataSet->AddAllSeries(); \r\n \r\n\t\t\t// Initialise the graph \t\r\n\t\t\t$Test = new pChart(740,520); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->setGraphArea(50,30,470,200); \r\n\t\t\t$Test->drawFilledRoundedRectangle(7,7,600,513,5,240,240,240); \r\n\t\t\t$Test->drawRoundedRectangle(5,5,600,515,5,230,230,230); \r\n\t\t\t$Test->drawGraphArea(255,255,255,TRUE); \r\n\t\t\t$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); \r\n\t\t\t$Test->drawGrid(4,TRUE,230,230,230,50); \r\n\t \r\n\t\t\t// Draw the 0 line \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",6); \r\n\t\t\t$Test->drawTreshold(0,143,55,72,TRUE,TRUE); \r\n\t \r\n\t\t\t// Draw the bar graph \r\n\t\t\t$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE); \r\n\t \r\n\t\t\t// Finish the graph \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",8); \r\n\t\t\t$Test->drawLegend(500,30,$DataSet->GetDataDescription(),250,250,250); \r\n\t\t\t$Test->setFontProperties(\"Fonts/tahoma.ttf\",10); \r\n\t\t\t$Test->drawTitle(50,22,\"Load Graph \",50,50,50,430); \r\n\t\t\t$Test->Render($chart_path.\"$image_name\"); \r\n\t\t\t\r\n\t\t}\r\n\t \r\n}", "public function getAnimatedSteps() {\r\n return $this->animatedSteps;\r\n }", "public function getState($user)\n {\n $v = mtAlertUserHelper::getHideAlertInSessionAttribute($user);\n $v = $v instanceOf sfOutputEscaper? $v->getRawValue() : $v;\n\n if ($this->getConfiguration($user)->getHidePermanently())\n {\n $state = 'Hidden permanently';\n }\n elseif (in_array($this->getId(), $v))\n {\n $state = 'Hidden for this session';\n }\n else\n {\n $state = 'Active';\n }\n\n return $state;\n }", "public static function getArrEndAnimations($all = true){\r\n\t\t$arrAnimations = array();\r\n\t\t$arrAnimations['custom'] = array('handle' => __('## Custom Animation ##', REVSLIDER_TEXTDOMAIN));\r\n\t\t$arrAnimations['auto'] = array('handle' => __('Automatic Reverse', REVSLIDER_TEXTDOMAIN));\r\n\t\t$arrAnimations['v5s'] = array('handle' => '-----------------------------------');\r\n\t\t$arrAnimations['v5'] = array('handle' => __('- VERSION 5.0 ANIMATIONS -', REVSLIDER_TEXTDOMAIN));\r\n\t\t$arrAnimations['v5e'] = array('handle' => '-----------------------------------');\r\n\r\n\t\t$arrAnimations['BounceOut'] = array('handle' => 'BounceOut','params' => '{\"movex\":\"inherit\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"0deg\",\"scalex\":\"0.7\",\"scaley\":\"0.7\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"true\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"easing\":\"Back.easeIn\",\"speed\":\"500\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['Fade-Out-Long'] = array('handle' => 'Fade-Out-Long','params' => '{\"movex\":\"inherit\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"easing\":\"Power2.easeIn\",\"speed\":\"1000\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['SlideMaskToBottom'] = array('handle' => 'SlideMaskToBottom','params' => '{\"movex\":\"inherit\",\"movey\":\"[100%]\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"true\",\"mask_x\":\"inherit\",\"mask_y\":\"inherit\",\"easing\":\"nothing\",\"speed\":\"300\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['SlideMaskToLeft'] = array('handle' => 'SlideMaskToLeft','params' => '{\"movex\":\"[-100%]\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"true\",\"mask_x\":\"inherit\",\"mask_y\":\"inherit\",\"easing\":\"Power3.easeInOut\",\"speed\":\"1000\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['SlideMaskToRight'] = array('handle' => 'SlideMaskToRight','params' => '{\"movex\":\"[100%]\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"true\",\"mask_x\":\"inherit\",\"mask_y\":\"inherit\",\"easing\":\"Power3.easeInOut\",\"speed\":\"1000\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['SlideMaskToTop'] = array('handle' => 'SlideMaskToTop','params' => '{\"movex\":\"inherit\",\"movey\":\"[-100%]\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"true\",\"mask_x\":\"inherit\",\"mask_y\":\"inherit\",\"easing\":\"nothing\",\"speed\":\"300\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['SlurpOut'] = array('handle' => 'SlurpOut','params' => '{\"movex\":\"inherit\",\"movey\":\"[100%]\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"0deg\",\"scalex\":\"0.7\",\"scaley\":\"0.7\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"true\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"easing\":\"Power3.easeInOut\",\"speed\":\"1000\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['SmoothCropToBottom'] = array('handle' => 'SmoothCropToBottom','params' => '{\"movex\":\"inherit\",\"movey\":\"[175%]\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"true\",\"mask_x\":\"inherit\",\"mask_y\":\"inherit\",\"easing\":\"Power2.easeInOut\",\"speed\":\"1000\",\"split\":\"none\",\"splitdelay\":\"10\"}', 'settings' => array('version' => '5.0'));\r\n \r\n\t\t$arrAnimations['v4s'] = array('handle' => '-----------------------------------');\r\n\t\t$arrAnimations['v4'] = array('handle' => __('- VERSION 4.0 ANIMATIONS -', REVSLIDER_TEXTDOMAIN));\r\n\t\t$arrAnimations['v4e'] = array('handle' => '-----------------------------------');\r\n\t\t$arrAnimations['noanimout'] = array('handle' => 'No-Out-Animation','params' => '{\"movex\":\"inherit\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['fadeout'] = array('handle' => 'Fade-Out','params' => '{\"movex\":\"inherit\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"0\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['stt'] = array('handle' => 'Short-To-Top','params' => '{\"movex\":\"inherit\",\"movey\":\"-50px\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['stb'] = array('handle' => 'Short-To-Bottom','params' => '{\"movex\":\"inherit\",\"movey\":\"50px\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['stl'] = array('handle' => 'Short-To-Left','params' => '{\"movex\":\"-50px\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['str'] = array('handle' => 'Short-To-Right','params' => '{\"movex\":\"50px\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['ltr'] = array('handle' => 'Long-To-Right','params' => '{\"movex\":\"right\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['ltl'] = array('handle' => 'Long-To-Left','params' => '{\"movex\":\"left\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['ltt'] = array('handle' => 'Long-To-Top','params' => '{\"movex\":\"inherit\",\"movey\":\"top\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['ltb'] = array('handle' => 'Long-To-Bottom','params' => '{\"movex\":\"inherit\",\"movey\":\"bottom\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['skewtoleft'] = array('handle' => 'Skew-To-Long-Left','params' => '{\"movex\":\"left\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"45px\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['skewtoright'] = array('handle' => 'Skew-To-Long-Right','params' => '{\"movex\":\"right\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"-85px\",\"skewy\":\"inherit\",\"captionopacity\":\"inherit\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['skewtorightshort'] = array('handle' => 'Skew-To-Short-Right','params' => '{\"movex\":\"200px\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"-85px\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['skewtoleftshort'] = array('handle' => 'Skew-To-Short-Left','params' => '{\"movex\":\"-200px\",\"movey\":\"inherit\",\"movez\":\"inherit\",\"rotationx\":\"inherit\",\"rotationy\":\"inherit\",\"rotationz\":\"inherit\",\"scalex\":\"inherit\",\"scaley\":\"inherit\",\"skewx\":\"85px\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\t\t$arrAnimations['randomrotateout'] = array('handle' => 'Random-Rotate-Out','params' => '{\"movex\":\"{-250,250}\",\"movey\":\"{-150,150}\",\"movez\":\"inherit\",\"rotationx\":\"{-90,90}\",\"rotationy\":\"{-90,90}\",\"rotationz\":\"{-360,360}\",\"scalex\":\"{0,1}\",\"scaley\":\"{0,1}\",\"skewx\":\"inherit\",\"skewy\":\"inherit\",\"captionopacity\":\"0\",\"mask\":\"false\",\"mask_x\":\"0\",\"mask_y\":\"0\",\"mask_speed\":\"500\"}', 'settings' => array('version' => '5.0'));\r\n\r\n\t\tif($all){\r\n\t\t\t$arrAnimations['vss'] = array('handle' => '--------------------------------------');\r\n\t\t\t$arrAnimations['vs'] = array('handle' => __('- SAVED CUSTOM ANIMATIONS -', REVSLIDER_TEXTDOMAIN));\r\n\t\t\t$arrAnimations['vse'] = array('handle' => '--------------------------------------');\r\n\t\t\t//$custom = RevSliderOperations::getCustomAnimations('customout');\r\n\t\t\t$custom = RevSliderOperations::getCustomAnimationsFullPre('customout');\r\n\r\n\t\t\t$arrAnimations = array_merge($arrAnimations, $custom);\r\n\t\t}\r\n\t\t\r\n\t\tforeach($arrAnimations as $key => $value){\r\n\t\t\tif(!isset($value['params'])) continue;\r\n\t\t\t\r\n\t\t\t$t = json_decode(str_replace(\"'\", '\"', $value['params']), true);\r\n\t\t\tif(!empty($t))\r\n\t\t\t\t$arrAnimations[$key]['params'] = $t;\r\n\t\t}\r\n\t\treturn($arrAnimations);\r\n\t}", "private function getAnimation(array $params = array(), array $animation = array()) {\n $frame_start = $animation[\"start\"];\n $frame_end = $animation[\"stop\"];\n\n // Default delta values for animation\n $delta = [\n \"top\" => 0,\n \"left\" => 0,\n \"opacity\" => 0,\n \"rotate\" => 0,\n \"scale\" => 0,\n \"width\" => 0,\n \"height\" => 0\n ];\n\n // If this element has animation params, recalculate delta params for it\n if (isset($animation[\"top\"])) {\n $delta[\"top\"] = round(($animation[\"top\"] - $params[\"top\"]) / ($this->fps * $animation[\"duration\"]), 2);\n $animation[\"top\"] = $params[\"top\"] + $delta[\"top\"] * $this->fps * $animation[\"duration\"];\n }\n\n if (isset($animation[\"left\"])) {\n $delta[\"left\"] = round(($animation[\"left\"] - $params[\"left\"]) / ($this->fps * $animation[\"duration\"]), 2);\n $animation[\"left\"] = $params[\"left\"] + $delta[\"left\"] * $this->fps * $animation[\"duration\"];\n }\n\n if (isset($animation[\"opacity\"])) {\n $delta[\"opacity\"] = round(($animation[\"opacity\"] - $params[\"opacity\"]) / ($this->fps * $animation[\"duration\"]), 4);\n }\n\n if (isset($animation[\"rotate\"])) {\n $delta[\"rotate\"] = round(($animation[\"rotate\"] - $params[\"rotate\"]) / ($this->fps * $animation[\"duration\"]), 2);\n }\n\n if (isset($animation[\"scale\"])) {\n $delta[\"scale\"] = round(($animation[\"scale\"] - $params[\"scale\"]) / ($this->fps * $animation[\"duration\"]), 4);\n }\n\n if (isset($animation[\"width\"])) {\n $delta[\"width\"] = round(($animation[\"width\"] - $params[\"width\"]) / ($this->fps * $animation[\"duration\"]), 4);\n }\n\n if (isset($animation[\"height\"])) {\n $delta[\"height\"] = round(($animation[\"height\"] - $params[\"height\"]) / ($this->fps * $animation[\"duration\"]), 4);\n }\n\n $animation[\"delta\"] = $delta;\n\n return $animation;\n }", "public function decision() {\n Log::info($this->runId.': New Position Decision Indicators: '.PHP_EOL.' '.$this->logIndicators());\n\n //Simple MACD Crossover\n if ($this->decisionIndicators['emaCrossover'] == \"crossedAbove\" && $this->decisionIndicators['hmaSlowLinReg']['m'] >= $this->hmaSlopeMin) {\n Log::warning($this->runId.': NEW LONG POSITION');\n return \"long\";\n }\n elseif ($this->decisionIndicators['emaCrossover'] == \"crossedBelow\" && $this->decisionIndicators['hmaSlowLinReg']['m'] <= $this->hmaSlopeMin*-1) {\n Log::warning($this->runId.': NEW SHORT POSITION');\n return \"short\";\n }\n else {\n Log::info($this->runId.': Failed Ema Breakthrough');\n return \"none\";\n }\n }", "public function alwaysShown()\n {\n \treturn $this->alwaysShown;\n }", "protected static function getAnimatedPresintax($jquerySelector, $value){\n $template = 'var barVal = %s; var i = (%s <= barVal) ? 0 : barVal; var newValue = %s;var interval = %s';\n $template = sprintf($template,\n self::widgetValue($jquerySelector),\n $value,\n $value,\n YsJsFunction::setInterval(self::getAnimatedIntervalSintax($jquerySelector), self::$intervalTime)\n );\n return $template;\n }", "public static function showArchive(){\n if(Cache::isStored('show_archive')) return Cache::get('show_archive');\n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'show_archive'\");\n $show = $row['value'] == \"false\" ? false : true;\n Cache::store('show_archive', $show);\n return $show;\n }", "function setDefaultWhenVisible() {\n $equations = array();\n list($branching_fields, ) = (function_exists('getBranchingFields')) ?\n getBranchingFields($_GET['page']) :\n \\DataEntry::getBranchingFields($_GET['page']);\n\n foreach ($branching_fields as $field => $equation) {\n list($equations[$field], ) = LogicTester::formatLogicToJS($equation, false, $_GET['event_id'], true);\n }\n\n // More current versions of REDCap do not have all js libraries loaded in time\n $this->setJsSetting('versionMod', version_compare(REDCAP_VERSION, '9.4.1', '>='));\n\n $this->setJsSetting('defaultWhenVisible', array('branchingEquations' => $equations));\n $this->includeJs('js/default_when_visible.js');\n }", "public function orientationCalculationOn()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_ORIENTATION_CALCULATION_ON, $payload);\n }", "public function actionChartTest1(){\n\t\t\n\t $chartGrantData='{\n\t\t\"chart\": {\n \"subcaption\": \"Pilot Project Planned vs Actual\", \n \"dateformat\": \"dd/mm/yyyy\",\n \"outputdateformat\": \"ddds mns yy\",\n \"ganttwidthpercent\": \"70\",\n \"ganttPaneDuration\": \"50\",\n \"ganttPaneDurationUnit\": \"d\",\t\n\t\t\t\t\"height\":\"500%\",\n\t\t\t\t\"fontsize\": \"14\",\t\t\t\t\n \"plottooltext\": \"$processName{br} $label starting date $start{br}$label ending date $end\",\n \"theme\": \"fint\"\n },\n\t\t\"categories\": [\n\t\t\t{\n\t\t\t\t\"bgcolor\": \"#33bdda\",\n\t\t\t\t\"category\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"1/4/2014\",\n\t\t\t\t\t\t\"end\": \"30/6/2014\",\n\t\t\t\t\t\t\"label\": \"Months\",\n\t\t\t\t\t\t\"align\": \"middle\",\n\t\t\t\t\t\t\"fontcolor\": \"#ffffff\",\n\t\t\t\t\t\t\"fontsize\": \"14\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"bgcolor\": \"#33bdda\",\n\t\t\t\t\"align\": \"middle\",\n\t\t\t\t\"fontcolor\": \"#ffffff\",\n\t\t\t\t\"fontsize\": \"12\",\n\t\t\t\t\"category\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"1/4/2014\",\n\t\t\t\t\t\t\"end\": \"30/4/2014\",\n\t\t\t\t\t\t\"label\": \"April\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"1/5/2014\",\n\t\t\t\t\t\t\"end\": \"31/5/2014\",\n\t\t\t\t\t\t\"label\": \"May\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"1/6/2014\",\n\t\t\t\t\t\t\"end\": \"30/6/2014\",\n\t\t\t\t\t\t\"label\": \"June\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"bgcolor\": \"#ffffff\",\n\t\t\t\t\"fontcolor\": \"#1288dd\",\n\t\t\t\t\"fontsize\": \"10\",\n\t\t\t\t\"isbold\": \"1\",\n\t\t\t\t\"align\": \"center\",\n\t\t\t\t\"category\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"1/4/2014\",\n\t\t\t\t\t\t\"end\": \"5/4/2014\",\n\t\t\t\t\t\t\"label\": \"Week 1\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"6/4/2014\",\n\t\t\t\t\t\t\"end\": \"12/4/2014\",\n\t\t\t\t\t\t\"label\": \"Week 2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"13/4/2014\",\n\t\t\t\t\t\t\"end\": \"19/4/2014\",\n\t\t\t\t\t\t\"label\": \"Week 3\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"20/4/2014\",\n\t\t\t\t\t\t\"end\": \"26/4/2014\",\n\t\t\t\t\t\t\"label\": \"Week 4\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"27/4/2014\",\n\t\t\t\t\t\t\"end\": \"3/5/2014\",\n\t\t\t\t\t\t\"label\": \"Week 5\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"4/5/2014\",\n\t\t\t\t\t\t\"end\": \"10/5/2014\",\n\t\t\t\t\t\t\"label\": \"Week 6\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"11/5/2014\",\n\t\t\t\t\t\t\"end\": \"17/5/2014\",\n\t\t\t\t\t\t\"label\": \"Week 7\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"18/5/2014\",\n\t\t\t\t\t\t\"end\": \"24/5/2014\",\n\t\t\t\t\t\t\"label\": \"Week 8\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"25/5/2014\",\n\t\t\t\t\t\t\"end\": \"31/5/2014\",\n\t\t\t\t\t\t\"label\": \"Week 9\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"1/6/2014\",\n\t\t\t\t\t\t\"end\": \"7/6/2014\",\n\t\t\t\t\t\t\"label\": \"Week 10\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"8/6/2014\",\n\t\t\t\t\t\t\"end\": \"14/6/2014\",\n\t\t\t\t\t\t\"label\": \"Week 11\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"15/6/2014\",\n\t\t\t\t\t\t\"end\": \"21/6/2014\",\n\t\t\t\t\t\t\"label\": \"Week 12\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"start\": \"22/6/2014\",\n\t\t\t\t\t\t\"end\": \"28/6/2014\",\n\t\t\t\t\t\t\"label\": \"Week 13\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"datatable\": {\n \"headervalign\": \"bottom\",\n \"datacolumn\": [\n {\n \"headertext\": \"PIC\",\n \"fontcolor\": \"#000000\",\n\t\t\t\t\t\t\"fontsize\": \"10\",\n\t\t\t\t\t\t\"isanimated\": \"1\",\n\t\t\t\t\t\t\"bgcolor\": \"#6baa01\",\n\t\t\t\t\t\t\"headervalign\": \"middle\",\n\t\t\t\t\t\t\"headeralign\": \"center\",\n\t\t\t\t\t\t\"headerbgcolor\": \"#6baa01\",\n\t\t\t\t\t\t\"headerfontcolor\": \"#ffffff\",\n\t\t\t\t\t\t\"headerfontsize\": \"16\",\n\t\t\t\t\t\t\"width\":\"150\",\n\t\t\t\t\t\t\"align\": \"left\",\n\t\t\t\t\t\t\"isbold\": \"1\",\n\t\t\t\t\t\t\"bgalpha\": \"25\",\t\t\t\t\n \"text\": [\n {\n \"label\": \" \"\n },\n {\n \"label\": \"John\"\n },\n {\n \"label\": \"David\"\n },\n {\n \"label\": \"Mary\"\n },\n {\n \"label\": \"John\"\n },\n {\n \"label\": \"Andrew & Harry\"\n }, \n {\n \"label\": \"John & Harry\"\n },\n {\n \"label\": \" \"\n },\n {\n \"label\": \"Neil & Harry\"\n },\n {\n \"label\": \"Neil & Harry\"\n },\n {\n \"label\": \"Chris\"\n },\n {\n \"label\": \"John & Richard\"\n }\n ]\n }\n ]\n },\n\t\t\"processes\": {\n\t\t\t\"headertext\": \"Pilot Task\",\n\t\t\t\"fontsize\": \"12\",\n\t\t\t\"fontcolor\": \"#000000\",\n\t\t\t\"fontsize\": \"10\",\n\t\t\t\"isanimated\": \"1\",\n\t\t\t\"bgcolor\": \"#6baa01\",\n\t\t\t\"headervalign\": \"middle\",\n\t\t\t\"headeralign\": \"center\",\n\t\t\t\"headerbgcolor\": \"#6baa01\",\n\t\t\t\"headerfontcolor\": \"#ffffff\",\n\t\t\t\"headerfontsize\": \"16\",\n\t\t\t\"width\":\"200\",\n\t\t\t\"align\": \"left\",\n\t\t\t\"isbold\": \"1\",\n\t\t\t\"bgalpha\": \"25\",\n\t\t\t\"process\": [\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Clear site\",\n\t\t\t\t\t\"id\": \"1\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Excavate Foundation\",\n\t\t\t\t\t\"id\": \"2\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Concrete Foundation\",\n\t\t\t\t\t\"id\": \"3\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Footing to DPC\",\n\t\t\t\t\t\"id\": \"4\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Drainage Services\",\n\t\t\t\t\t\"id\": \"5\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Backfill\",\n\t\t\t\t\t\"id\": \"6\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Ground Floor\",\n\t\t\t\t\t\"id\": \"7\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Walls on First Floor\",\n\t\t\t\t\t\"id\": \"8\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"First Floor Carcass\",\n\t\t\t\t\t\"id\": \"9\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"First Floor Deck\",\n\t\t\t\t\t\"id\": \"10\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Roof Structure\",\n\t\t\t\t\t\"id\": \"11\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Roof Covering\",\n\t\t\t\t\t\"id\": \"12\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Rainwater Gear\",\n\t\t\t\t\t\"id\": \"13\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Windows\",\n\t\t\t\t\t\"id\": \"14\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"External Doors\",\n\t\t\t\t\t\"id\": \"15\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Connect Electricity\",\n\t\t\t\t\t\"id\": \"16\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Connect Water Supply\",\n\t\t\t\t\t\"id\": \"17\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Install Air Conditioning\",\n\t\t\t\t\t\"id\": \"18\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Interior Decoration\",\n\t\t\t\t\t\"id\": \"19\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Fencing And signs\",\n\t\t\t\t\t\"id\": \"20\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Exterior Decoration\",\n\t\t\t\t\t\"id\": \"21\",\n\t\t\t\t\t\"hoverbandcolor\": \"#e44a00\",\n\t\t\t\t\t\"hoverbandalpha\": \"40\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Setup racks\",\n\t\t\t\t\t\"id\": \"22\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\t\t\n\t\t\"tasks\": {\n\t\t\t\"task\": [\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"1\",\n\t\t\t\t\t\"start\": \"9/4/2014\",\n\t\t\t\t\t\"end\": \"12/4/2014\",\n\t\t\t\t\t\"id\": \"1-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"1\",\n\t\t\t\t\t\"start\": \"9/4/2014\",\n\t\t\t\t\t\"end\": \"12/4/2014\",\n\t\t\t\t\t\"id\": \"1\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"2\",\n\t\t\t\t\t\"start\": \"13/4/2014\",\n\t\t\t\t\t\"end\": \"23/4/2014\",\n\t\t\t\t\t\"id\": \"2-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"2\",\n\t\t\t\t\t\"start\": \"13/4/2014\",\n\t\t\t\t\t\"end\": \"25/4/2014\",\n\t\t\t\t\t\"id\": \"2\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"2\",\n\t\t\t\t\t\"start\": \"23/4/2014\",\n\t\t\t\t\t\"end\": \"25/4/2014\",\n\t\t\t\t\t\"id\": \"2-2\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 2 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"3\",\n\t\t\t\t\t\"start\": \"23/4/2014\",\n\t\t\t\t\t\"end\": \"30/4/2014\",\n\t\t\t\t\t\"id\": \"3-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"3\",\n\t\t\t\t\t\"start\": \"26/4/2014\",\n\t\t\t\t\t\"end\": \"4/5/2014\",\n\t\t\t\t\t\"id\": \"3\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"3\",\n\t\t\t\t\t\"start\": \"3/5/2014\",\n\t\t\t\t\t\"end\": \"4/5/2014\",\n\t\t\t\t\t\"id\": \"3-2\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 1 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"4\",\n\t\t\t\t\t\"start\": \"3/5/2014\",\n\t\t\t\t\t\"end\": \"10/5/2014\",\n\t\t\t\t\t\"id\": \"4-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"4\",\n\t\t\t\t\t\"start\": \"4/5/2014\",\n\t\t\t\t\t\"end\": \"10/5/2014\",\n\t\t\t\t\t\"id\": \"4\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"5\",\n\t\t\t\t\t\"start\": \"6/5/2014\",\n\t\t\t\t\t\"end\": \"11/5/2014\",\n\t\t\t\t\t\"id\": \"5-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"5\",\n\t\t\t\t\t\"start\": \"6/5/2014\",\n\t\t\t\t\t\"end\": \"10/5/2014\",\n\t\t\t\t\t\"id\": \"5\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"6\",\n\t\t\t\t\t\"start\": \"4/5/2014\",\n\t\t\t\t\t\"end\": \"7/5/2014\",\n\t\t\t\t\t\"id\": \"6-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"6\",\n\t\t\t\t\t\"start\": \"5/5/2014\",\n\t\t\t\t\t\"end\": \"11/5/2014\",\n\t\t\t\t\t\"id\": \"6\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"6\",\n\t\t\t\t\t\"start\": \"7/5/2014\",\n\t\t\t\t\t\"end\": \"11/5/2014\",\n\t\t\t\t\t\"id\": \"6-2\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 4 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"7\",\n\t\t\t\t\t\"start\": \"11/5/2014\",\n\t\t\t\t\t\"end\": \"14/5/2014\",\n\t\t\t\t\t\"id\": \"7-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"7\",\n\t\t\t\t\t\"start\": \"11/5/2014\",\n\t\t\t\t\t\"end\": \"14/5/2014\",\n\t\t\t\t\t\"id\": \"7\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"8\",\n\t\t\t\t\t\"start\": \"16/5/2014\",\n\t\t\t\t\t\"end\": \"19/5/2014\",\n\t\t\t\t\t\"id\": \"8-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"8\",\n\t\t\t\t\t\"start\": \"16/5/2014\",\n\t\t\t\t\t\"end\": \"19/5/2014\",\n\t\t\t\t\t\"id\": \"8\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"9\",\n\t\t\t\t\t\"start\": \"16/5/2014\",\n\t\t\t\t\t\"end\": \"18/5/2014\",\n\t\t\t\t\t\"id\": \"9-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"9\",\n\t\t\t\t\t\"start\": \"16/5/2014\",\n\t\t\t\t\t\"end\": \"21/5/2014\",\n\t\t\t\t\t\"id\": \"9\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"9\",\n\t\t\t\t\t\"start\": \"18/5/2014\",\n\t\t\t\t\t\"end\": \"21/5/2014\",\n\t\t\t\t\t\"id\": \"9-2\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 3 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"10\",\n\t\t\t\t\t\"start\": \"20/5/2014\",\n\t\t\t\t\t\"end\": \"23/5/2014\",\n\t\t\t\t\t\"id\": \"10-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"10\",\n\t\t\t\t\t\"start\": \"21/5/2014\",\n\t\t\t\t\t\"end\": \"24/5/2014\",\n\t\t\t\t\t\"id\": \"10\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"10\",\n\t\t\t\t\t\"start\": \"23/5/2014\",\n\t\t\t\t\t\"end\": \"24/5/2014\",\n\t\t\t\t\t\"id\": \"10-2\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 1 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"11\",\n\t\t\t\t\t\"start\": \"25/5/2014\",\n\t\t\t\t\t\"end\": \"27/5/2014\",\n\t\t\t\t\t\"id\": \"11-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"11\",\n\t\t\t\t\t\"start\": \"25/5/2014\",\n\t\t\t\t\t\"end\": \"27/5/2014\",\n\t\t\t\t\t\"id\": \"11\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"12\",\n\t\t\t\t\t\"start\": \"28/5/2014\",\n\t\t\t\t\t\"end\": \"1/6/2014\",\n\t\t\t\t\t\"id\": \"12-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"12\",\n\t\t\t\t\t\"start\": \"28/5/2014\",\n\t\t\t\t\t\"end\": \"1/6/2014\",\n\t\t\t\t\t\"id\": \"12\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"13\",\n\t\t\t\t\t\"start\": \"4/6/2014\",\n\t\t\t\t\t\"end\": \"6/6/2014\",\n\t\t\t\t\t\"id\": \"13-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"13\",\n\t\t\t\t\t\"start\": \"4/6/2014\",\n\t\t\t\t\t\"end\": \"6/6/2014\",\n\t\t\t\t\t\"id\": \"13\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"14\",\n\t\t\t\t\t\"start\": \"4/6/2014\",\n\t\t\t\t\t\"end\": \"4/6/2014\",\n\t\t\t\t\t\"id\": \"14-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"14\",\n\t\t\t\t\t\"start\": \"4/6/2014\",\n\t\t\t\t\t\"end\": \"4/6/2014\",\n\t\t\t\t\t\"id\": \"14\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"15\",\n\t\t\t\t\t\"start\": \"4/6/2014\",\n\t\t\t\t\t\"end\": \"4/6/2014\",\n\t\t\t\t\t\"id\": \"15-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"15\",\n\t\t\t\t\t\"start\": \"4/6/2014\",\n\t\t\t\t\t\"end\": \"4/6/2014\",\n\t\t\t\t\t\"id\": \"15\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"16\",\n\t\t\t\t\t\"start\": \"2/6/2014\",\n\t\t\t\t\t\"end\": \"7/6/2014\",\n\t\t\t\t\t\"id\": \"16-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"16\",\n\t\t\t\t\t\"start\": \"2/6/2014\",\n\t\t\t\t\t\"end\": \"7/6/2014\",\n\t\t\t\t\t\"id\": \"16\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"17\",\n\t\t\t\t\t\"start\": \"5/6/2014\",\n\t\t\t\t\t\"end\": \"10/6/2014\",\n\t\t\t\t\t\"id\": \"17-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"17\",\n\t\t\t\t\t\"start\": \"5/6/2014\",\n\t\t\t\t\t\"end\": \"17/6/2014\",\n\t\t\t\t\t\"id\": \"17\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"17\",\n\t\t\t\t\t\"start\": \"10/6/2014\",\n\t\t\t\t\t\"end\": \"17/6/2014\",\n\t\t\t\t\t\"id\": \"17-2\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 7 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"18\",\n\t\t\t\t\t\"start\": \"10/6/2014\",\n\t\t\t\t\t\"end\": \"12/6/2014\",\n\t\t\t\t\t\"id\": \"18-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"18\",\n\t\t\t\t\t\"start\": \"18/6/2014\",\n\t\t\t\t\t\"end\": \"20/6/2014\",\n\t\t\t\t\t\"id\": \"18\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 8 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"19\",\n\t\t\t\t\t\"start\": \"15/6/2014\",\n\t\t\t\t\t\"end\": \"23/6/2014\",\n\t\t\t\t\t\"id\": \"19-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"19\",\n\t\t\t\t\t\"start\": \"16/6/2014\",\n\t\t\t\t\t\"end\": \"23/6/2014\",\n\t\t\t\t\t\"id\": \"19\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"20\",\n\t\t\t\t\t\"start\": \"23/6/2014\",\n\t\t\t\t\t\"end\": \"23/6/2014\",\n\t\t\t\t\t\"id\": \"20-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"20\",\n\t\t\t\t\t\"start\": \"23/6/2014\",\n\t\t\t\t\t\"end\": \"23/6/2014\",\n\t\t\t\t\t\"id\": \"20\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"21\",\n\t\t\t\t\t\"start\": \"18/6/2014\",\n\t\t\t\t\t\"end\": \"21/6/2014\",\n\t\t\t\t\t\"id\": \"21-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"21\",\n\t\t\t\t\t\"start\": \"18/6/2014\",\n\t\t\t\t\t\"end\": \"23/6/2014\",\n\t\t\t\t\t\"id\": \"21\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Delay\",\n\t\t\t\t\t\"processid\": \"21\",\n\t\t\t\t\t\"start\": \"21/6/2014\",\n\t\t\t\t\t\"end\": \"23/6/2014\",\n\t\t\t\t\t\"id\": \"21-2\",\n\t\t\t\t\t\"color\": \"#e44a00\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"tooltext\": \"Delayed by 2 days.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"processid\": \"22\",\n\t\t\t\t\t\"start\": \"24/6/2014\",\n\t\t\t\t\t\"end\": \"28/6/2014\",\n\t\t\t\t\t\"id\": \"22-1\",\n\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\"height\": \"32%\",\n\t\t\t\t\t\"toppadding\": \"12%\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"processid\": \"22\",\n\t\t\t\t\t\"start\": \"25/6/2014\",\n\t\t\t\t\t\"end\": \"28/6/2014\",\n\t\t\t\t\t\"id\": \"22\",\n\t\t\t\t\t\"color\": \"#6baa01\",\n\t\t\t\t\t\"toppadding\": \"56%\",\n\t\t\t\t\t\"height\": \"32%\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"connectors\": [\n\t\t\t{\n\t\t\t\t\"connector\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"1\",\n\t\t\t\t\t\t\"totaskid\": \"2\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\",\n\t\t\t\t\t\t\"fromtaskconnectstart_\": \"1\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"2-2\",\n\t\t\t\t\t\t\"totaskid\": \"3\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"3-2\",\n\t\t\t\t\t\t\"totaskid\": \"4\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"3-2\",\n\t\t\t\t\t\t\"totaskid\": \"6\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"7\",\n\t\t\t\t\t\t\"totaskid\": \"8\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"7\",\n\t\t\t\t\t\t\"totaskid\": \"9\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"12\",\n\t\t\t\t\t\t\"totaskid\": \"16\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"12\",\n\t\t\t\t\t\t\"totaskid\": \"17\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"17-2\",\n\t\t\t\t\t\t\"totaskid\": \"18\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"fromtaskid\": \"19\",\n\t\t\t\t\t\t\"totaskid\": \"22\",\n\t\t\t\t\t\t\"color\": \"#008ee4\",\n\t\t\t\t\t\t\"thickness\": \"2\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"milestones\": {\n\t\t\t\"milestone\": [\n\t\t\t\t{\n\t\t\t\t\t\"date\": \"2/6/2014\",\n\t\t\t\t\t\"taskid\": \"12\",\n\t\t\t\t\t\"color\": \"#f8bd19\",\n\t\t\t\t\t\"shape\": \"star\",\n\t\t\t\t\t\"tooltext\": \"Completion of Phase 1\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"legend\": {\n\t\t\t\"item\": [\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Planned\",\n\t\t\t\t\t\"color\": \"#008ee4\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Actual\",\n\t\t\t\t\t\"color\": \"#6baa01\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"Slack (Delay)\",\n\t\t\t\t\t\"color\": \"#e44a00\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t }';\n\t\treturn $chartGrantData;\n\t\t\n\t}", "private function displayJavascript() {\n $this->javascript_is_displayed = TRUE ;\n }", "function simple_history_setting_show_on_dashboard() {\n\t$show_on_dashboard = get_option(\"simple_history_show_on_dashboard\", 0);\n\t$show_on_dashboard = apply_filters(\"simple_history_show_on_dashboard\", $show_on_dashboard);\n\treturn (bool) $show_on_dashboard;\n}", "function bf_get_menus_animations_option( $args = array() ) {\n\n\t\t$animations = array(\n\n\t\t\t'default' => __( '-- Default --', 'publisher' ),\n\t\t\t'none' => __( 'No Animation', 'publisher' ),\n\t\t\t'random' => __( 'Random Animation', 'publisher' ),\n\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Fading', 'publisher' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'fade' => __( 'Simple Fade', 'publisher' ),\n\t\t\t\t\t'slide-fade' => __( 'Fading Slide', 'publisher' ),\n\t\t\t\t),\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Attention Seekers', 'publisher' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'bounce' => __( 'Bounce', 'publisher' ),\n\t\t\t\t\t'tada' => __( 'Tada', 'publisher' ),\n\t\t\t\t\t'shake' => __( 'Shake', 'publisher' ),\n\t\t\t\t\t'swing' => __( 'Swing', 'publisher' ),\n\t\t\t\t\t'wobble' => __( 'Wobble', 'publisher' ),\n\t\t\t\t\t'buzz' => __( 'Buzz', 'publisher' ),\n\t\t\t\t),\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Sliding', 'publisher' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'slide-top-in' => __( 'Slide &#x2193; In', 'publisher' ),\n\t\t\t\t\t'slide-bottom-in' => __( 'Slide &#x2191; In', 'publisher' ),\n\t\t\t\t\t'slide-left-in' => __( 'Slide &#x2192; In', 'publisher' ),\n\t\t\t\t\t'slide-right-in' => __( 'Slide &#x2190; In', 'publisher' ),\n\t\t\t\t),\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Flippers', 'publisher' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'filip-in-x' => __( 'Filip In X - &#x2195;', 'publisher' ),\n\t\t\t\t\t'filip-in-y' => __( 'Filip In Y - &#x2194;', 'publisher' ),\n\t\t\t\t),\n\t\t\t),\n\n\t\t);\n\n\t\treturn $animations;\n\n\t}", "function ipal_display_instructor_interface($cmid){\r\nglobal $DB;\r\n\tglobal $ipal;\r\n\r\n if(isset($_POST['clearQuestion'])){\r\n ipal_clear_question();\r\n }\r\n if(isset($_POST['question'])){\r\n ipal_send_question();\r\n }\r\n\r\n\t$state=$DB->get_record('ipal',array('id'=>$ipal->id));\r\n\tif($_POST['ipal_view']==\"changeState\"){\r\n if($state->preferredbehaviour == \"Graph\"){\r\n $result=$DB->set_field('ipal', 'preferredbehaviour', 'Grid',array('id'=>$ipal->id));\r\n\t\t\t $newstate = 'Histogram';\r\n }else{\r\n $result=$DB->set_field('ipal', 'preferredbehaviour','Graph',array('id'=>$ipal->id));\r\n\t\t\t $newstate = 'Spreadsheet';\r\n }\r\n\t}\r\n\telse\r\n\t{\r\n if($state->preferredbehaviour == \"Graph\"){$newstate = 'Spreadsheet';}\r\n\t\t else{$newstate = 'Histogram';}\r\n\t}\r\n if(($newstate == 'Histogram') and (ipal_get_qtype(ipal_show_current_question_id()) == 'essay')){\r\n\t $newstate = 'Responses';\r\n\t}\r\n\r\n ipal_java_graphupdate();\r\n\r\necho \"<table><tr><td>\".instructor_buttons().\"</td><td>\".ipal_show_compadre($cmid).\"</td><td>\".ipal_toggle_view($newstate).\"<td></tr></table>\";\r\necho ipal_make_instructor_form();\r\necho \"<br><br>\";\r\n$state=$DB->get_record('ipal',array('id'=>$ipal->id));\r\nif($state->preferredbehaviour ==\"Graph\"){\r\n\tif(ipal_show_current_question()==1){\r\necho \"<br>\";\r\necho \"<br>\";\r\necho \"<iframe id= \\\"graphIframe\\\" src=\\\"graphics.php?ipalid=\".$ipal->id.\"\\\" height=\\\"535\\\" width=\\\"723\\\"></iframe>\";\r\necho \"<br><br><a onclick=\\\"window.open('popupgraph.php?ipalid=\".$ipal->id.\"', '',\r\n 'width=620,height=450,toolbar=no,location=no,menubar=no,copyhistory=no,status=no,directories=no,scrollbars=yes,resizable=yes');\r\n return false;\\\"\r\n href=\\\"popupgraph.php?ipalid=\".$ipal->id.\"\\\" target=\\\"_blank\\\">Open a new window for the graph.</a>\";}\r\n}else{\r\necho \"<br>\";\r\necho \"<br>\";\r\necho \"<iframe id= \\\"graphIframe\\\" src=\\\"gridview.php?id=\".$ipal->id.\"\\\" height=\\\"535\\\" width=\\\"723\\\"></iframe>\";\r\n//echo \"<br><br><a href=\\\"gridview.php?refresh=true&id=\".$ipal->id.\"\\\" target=\\\"_blank\\\">Open a new window for the graph.</a>\";\r\necho \"<br><br><a onclick=\\\"window.open('popupgraph.php?id=\".$ipal->id.\"', '',\r\n 'width=620,height=450,toolbar=no,location=no,menubar=no,copyhistory=no,status=no,directories=no,scrollbars=yes,resizable=yes');\r\n return false;\\\"\r\n href=\\\"popupgraph.php?ipalid=\".$ipal->id.\"\\\" target=\\\"_blank\\\">Open a new window for the graph.</a>\";\r\n\r\n//ipal_grid_view();\t\r\n}}", "public function getPanel()\n {\n \t$this->_timer['postDispatch'] = isset($this->_timer['postDispatch']) ? \n \t\t$this->_timer['postDispatch'] : '';\n \t$this->_timer['preDispatch'] = isset($this->_timer['preDispatch']) ? \n \t\t$this->_timer['preDispatch'] : '';\n \t\t\n \treturn parent::getPanel();\n }", "public function chart()\n {\n $data ['footer'] = $this->page_model->getfooter();\n\n $this->load->view('templates/header');\n $this->load->view('home/about/head_about');\n $this->load->view('home/about/chart', $data);\n $this->load->view('templates/footer', $data);\n }", "private function draw_axes(){\n\t\t$this->display_graph_axis = \"\\t<path stroke=\\\"$this->axes_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->graphmarginleft $this->axisheight h $this->axiswidth\\\"/>\\n\";\n\t\t$this->display_graph_axis .= \"\\t<path stroke=\\\"$this->axes_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->graphmargintop 0 v $this->axisheight\\\"/>\\n\";\n\t\treturn;\n\t}", "function stateMachine() {\n\t\tif ($_SESSION['order_condition'] == 'RW') {\n\t\t\tswitch($_SESSION['state']) {\n\t\t\t\tcase \"START\":\t\n\t\t\t\t\t$_SESSION['section_order'] = 1;\n\t\t\t\t\t$_SESSION['section_total'] = 27;\n\t\t\t\t\tstateTransition('pages/ethics.html', 'DEMOGRAPHICS');\n\t\t\t\t\t//stateTransition('pages/ethics.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DEMOGRAPHICS\":\n\t\t\t\t\tstateTransition('pages/demographics.html', 'INSTR_EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_SCRIPT\":\n\t\t\t\t\tstateTransition('pages/before_learn_letters.html', 'SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SCRIPT\":\n\t\t\t\t\tstateTransition('pages/learn_letters.html', 'INSTR_R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_R_TR1\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR1\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR1\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR1\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_R_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR2\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR2\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR2\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR2\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_EXPOSURE3');\n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR3\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR3\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR3\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR3\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_R_TEST\":\n\t\t\t\t\tstateTransition('pages/before_reading_test.html', 'R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TEST\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TEST\":\n\t\t\t\t\tstateTransition('pages/before_writing_test.html', 'W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TEST\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'QUESTIONNAIRE');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"QUESTIONNAIRE\":\n\t\t\t\t\tstateTransition('pages/questionnaire.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"END\":\n\t\t\t\t\tstateTransition('pages/end.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tswitch($_SESSION['state']) {\n\t\t\t\tcase \"START\":\t\n\t\t\t\t\t$_SESSION['section_order'] = 1;\n\t\t\t\t\t$_SESSION['section_total'] = 27;\n\t\t\t\t\tstateTransition('pages/ethics.html', 'DEMOGRAPHICS');\n\t\t\t\t\t//stateTransition('pages/ethics.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DEMOGRAPHICS\":\n\t\t\t\t\tstateTransition('pages/demographics.html', 'INSTR_EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_SCRIPT\":\n\t\t\t\t\tstateTransition('pages/before_learn_letters.html', 'SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SCRIPT\":\n\t\t\t\t\tstateTransition('pages/learn_letters.html', 'INSTR_W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_W_TR1\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR1\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR1\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR1\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR2\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR2\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TR2');\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"INSTR_R_TR2\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR2\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_EXPOSURE3');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR3\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR3\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR3\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR3\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_W_TEST\":\n\t\t\t\t\tstateTransition('pages/before_writing_test.html', 'W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TEST\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TEST\":\n\t\t\t\t\tstateTransition('pages/before_reading_test.html', 'R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TEST\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'QUESTIONNAIRE');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase \"QUESTIONNAIRE\":\n\t\t\t\t\tstateTransition('pages/questionnaire.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"END\":\n\t\t\t\t\tstateTransition('pages/end.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\t// switch end\n\t\t}\t// condition end\n\t}", "function drawOptionsDisplay() {\r\n global $saveShowWbs, $saveShowClosed, $saveShowResource,$planningType, $showListFilter,$showClosedPlanningVersion;?>\r\n <table width=\"100%\">\r\n <?php if ($planningType!='contract' and $planningType!='version') {?>\r\n <tr class=\"checkboxLabel\">\r\n <td><?php echo ucfirst(i18n(\"labelShowWbs\".((isNewGui())?'':'Short')));?></td>\r\n <td width=\"35px\">\r\n <div title=\"<?php echo ucfirst(i18n('showWbs'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showWBS\" name=\"showWBS\"\r\n <?php if ($saveShowWbs=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowWbs',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n </td>\r\n </tr>\r\n <?php }?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td><?php echo ucfirst(i18n(\"labelShowIdle\".((isNewGui() or $planningType=='version')?'':'Short')));?></td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?>\r\n <div title=\"<?php echo i18n('labelShowIdle')?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showClosedPlanningVersion\" name=\"showClosedPlanningVersion\"\r\n <?php if ($showClosedPlanningVersion=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningVersionShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php } else {?>\r\n <div title=\"<?php echo ucfirst(i18n('showIdleElements'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"listShowIdle\" name=\"listShowIdle\"\r\n <?php if ($saveShowClosed=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n if (strtoupper(Parameter::getUserParameter('displayResourcePlan'))!='NO' and ($planningType=='planning' or $planningType=='global' or $planningType=='contract' or $planningType=='version') ) {?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td>\r\n <?php if ($planningType=='version') {?><div id=\"displayRessource\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php }?>\r\n <?php echo ucfirst(i18n(\"labelShowResource\".((isNewGui() or $planningType=='version')?'':'Short')));?>\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?><div id=\"displayRessourceCheck\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>!important;\"><?php }?>\r\n <div title=\"<?php echo ucfirst(i18n('showResources'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" \r\n <?php if ($planningType=='version') {?>id=\"showRessourceComponentVersion\" name=\"showRessourceComponentVersion\"<?php } else { ?>id=\"listShowResource\" name=\"listShowResource\"<?php }?> \r\n <?php if ($saveShowResource=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowResource',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n }?>\r\n </table>\r\n<?php \r\n}", "public function setView() {\n \n switch ( $this->getEffect() ) {\n case 1 :\n $this->view = 'first';\n break;\n case 2 :\n $this->view = 'second';\n break;\n case 3 :\n $this->view = 'third';\n break;\n case 4 :\n $this->view = 'fourth';\n break;\n case 5 :\n $this->view = 'fifth';\n break;\n case 6 :\n $this->view = 'sixth';\n break;\n case 7 :\n $this->view = 'seventh';\n break;\n case 8 :\n $this->view = 'eight';\n break;\n case 9 :\n $this->view = 'ninth';\n break;\n default:\n $this->view = 'tenth';\n break;\n }\n return $this->view;\n \n }", "public function setIsRunning($running);", "protected function getSlideAnimationRequest(Requests\\GetSlideAnimationRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling getSlideAnimation');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling getSlideAnimation');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/animation';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->shapeIndex !== null) {\n $queryParams['shapeIndex'] = ObjectSerializer::toQueryValue($request->shapeIndex);\n }\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'GET');\n }", "public function draw_toggle ()\n {\n echo $this->toggle_as_html ();\n }", "public function restoreGraphicState() {}", "public function restoreGraphicState() {}", "public function getViewState() {}", "function vcex_hover_animation_class( $animation = '' ) {\n\tif ( function_exists( 'wpex_hover_animation_class' ) ) {\n\t\treturn wpex_hover_animation_class( $animation );\n\t}\n}", "public function getCurrentStateAction()\n {\n $controller = new ModuleStateController();\n\n $this->View()->assign(['response' => $controller->getCurrentState()->toArray()]);\n }", "public function setGraphicStateSync($graphicStateSync) {}", "public function is_panel_active()\n {\n }", "public function getDateShown()\n {\n return !$this->getAlbum()->HideImageDate;\n }", "public function getIsEffect()\n {\n return $this->is_effect;\n }", "protected function parseState(): void\n {\n $state = $this->plotter()->parser()->getProgress();\n\n $this->setAttribute('status', $state->state());\n\n // Update plot file name only if it was not set and exists in state.\n if ($state->plotFileName() !== null && $this->getAttribute('plot_file_name') === null) {\n $filename = rtrim($this->plotter()->getDestination(), \" \\t\\n\\r\\0\\x0B\\\\/\") . DIRECTORY_SEPARATOR . trim($state->plotFileName(), \" \\t\\n\\r\\0\\x0B\\\\/\");\n Log::debug(sprintf('Plot filename resolved: %s', $filename));\n $this->setAttribute('plot_file_name', $filename);\n }\n\n if ($state->hasError()) {\n $this->setAttribute('has_error', $state->plotFileName());\n $this->setAttribute('error', $state->plotFileName());\n } else {\n $this->setAttribute('has_error', false);\n $this->setAttribute('error', null);\n }\n\n // Save will write attributes to DB only if there is changes.\n $this->save();\n\n $phase = $this->getAttribute('phase') ?? 0;\n $step = $this->getAttribute('step') ?? 0;\n $progress = $this->getAttribute('percents') ?? 0;\n\n if ($phase !== $state->phase() || $step !== $state->step() || $progress !== $state->progress()) {\n // update worker state\n $this->setAttribute('phase', $state->phase());\n $this->setAttribute('step', $state->step());\n $this->setAttribute('percents', $state->progress());\n $this->save();\n\n Log::debug(sprintf('Worker [%s] state changed. Phase %s->%s, step %s->%s, progress %s->%s]',\n $this->getAttribute('id'),\n $phase, $state->phase(),\n $step, $state->step(),\n $progress, $state->progress()\n ));\n\n // fire worker state changed event if changed\n WorkerStateEvent::dispatch(\n $this->getAttribute('job_id'),\n $phase, $state->phase(),\n $step, $state->step(),\n $progress, $state->progress()\n );\n }\n }", "public function addAnimation()\n {\n $response = array('status' => 500, 'desc' => 'failure');\n\n if ($this->request->ajax()) {\n $id = $_POST['id'];\n $data = Convert::to_pairs($_POST['data']);\n\n $agroup = AnimationGroupTemplate::findOrFail($id);\n $animation = new AnimationTemplate;\n\n $animation->animation_group_id = $id;\n $animation->shuffler_level = json_encode([0, 1], JSON_NUMERIC_CHECK);\n $animation->animation_type_id = $data['animation_type'];\n\n if ($animation->save()) {\n $script = 'console.log(\"hore\");';\n $script .= '$(\"[name=btn_add_action]\").attr(\"id\", ' . $animation->id . ');';\n\n $response = array('status' => 200, 'desc' => 'ok', 'content' => $script);\n }\n }\n\n return $response;\n }", "private function draw_graphs(){\n\t\tfor($i=$this->startingmonth;$i>=0;$i--){\n\t\t\t$this->draw_svg_main_line($i);\n\t\t\t$this->draw_svg_main_dots($i);\n\t\t}\n\t\t$y=0;\n\t\twhile($this->ave_this_year[$y]['year']){\n\t\t\t$this->draw_svg_ave_lines($y);\n\t\t\t$this->draw_year_lines($y);\n\t\t\t$y++;\n\t\t}\n\t\treturn;\n\t}", "public function isVisible(): ?bool {\n\t\treturn Hash::get($this->_config, 'visible');\n\t}", "public function isShowSpinner()\r\n {\r\n return $this->scopeConfig->isSetFlag(\r\n self::XML_PATH_SHOW_SPINNER,\r\n ScopeInterface::SCOPE_STORE\r\n );\r\n }", "public function cacheIsOn()\n {\n return config('personality-insights.cache_on');\n }", "public function setGraphicState(\\SetaPDF_Core_Resource_ExtGState $graphicState) {}", "function wpvideocoach_show_dashboard_slider() {\r\n\tglobal $wpvideocoach_dashboard_slider;\r\n\tif($wpvideocoach_dashboard_slider == 0){\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n}", "protected function getChartNum()\n {\n self::$chartNum++;\n return self::$chartNum;\n }", "public function homechart()\n\t{\n\t\t$query3 = \"SELECT\n\t\tSUM(IF(MONTH(tanggal) = 1, b.jual, 0)) AS Jan,\n\t\tSUM(IF(MONTH(tanggal) = 2, b.jual, 0)) AS Feb,\n\t\tSUM(IF(MONTH(tanggal) = 3, b.jual, 0)) AS Mar,\n\t\tSUM(IF(MONTH(tanggal) = 4, b.jual, 0)) AS Apr,\n\t\tSUM(IF(MONTH(tanggal) = 5, b.jual, 0)) AS May,\n\t\tSUM(IF(MONTH(tanggal) = 6, b.jual, 0)) AS Jun,\n\t\tSUM(IF(MONTH(tanggal) = 7, b.jual, 0)) AS Jul,\n\t\tSUM(IF(MONTH(tanggal) = 8, b.jual, 0)) AS Aug,\n\t\tSUM(IF(MONTH(tanggal) = 9, b.jual, 0)) AS Sep,\n\t\tSUM(IF(MONTH(tanggal) = 10, b.jual, 0)) AS Oct,\n\t\tSUM(IF(MONTH(tanggal) = 11, b.jual, 0)) AS Nov,\n\t\tSUM(IF(MONTH(tanggal) = 12, b.jual, 0)) AS 'Dec'\n\t\tFROM\n\t\tfaktur a \n\t\tjoin detail_faktur b on a.id_faktur=b.id_faktur\";\n\t\t//echo $query3;\n\t\t$query = $this->db->query($query3);\n\t\treturn $query->result();\n\t}", "public function get_chart_js_game_history()\n {\n $points = $this->points();\n\n $scores = $this->get_scores();\n $color_team_1 =\n $scores['team1'] < $scores['team2'] ? '#e3342f' : '#38c172';\n $color_team_2 =\n $scores['team1'] > $scores['team2'] ? '#e3342f' : '#38c172';\n $team_a_scores = [\n [\n 'x' => 0,\n 'y' => 0\n ]\n ];\n $team_b_scores = [\n [\n 'x' => 0,\n 'y' => 0\n ]\n ];\n foreach ($points->get() as $key => $point) {\n /** @var Game_Point $point */\n $team_a_scores[] = [\n 'x' => $key + 1,\n 'y' => (int) $point->score_team_1\n ];\n\n $team_b_scores[] = [\n 'x' => $key + 1,\n 'y' => (int) $point->score_team_2\n ];\n }\n\n $labels = [];\n for ($i = 0; $i <= $points->count(); $i++) {\n $labels[] = $i;\n }\n\n return json_encode([\n 'labels' => $labels,\n 'datasets' => [\n [\n 'label' => 'Team A',\n 'borderColor' => $color_team_1,\n 'backgroundColor' => '#FFF',\n 'fill' => false,\n 'data' => $team_a_scores\n ],\n [\n 'label' => 'Team B',\n 'borderColor' => $color_team_2,\n 'backgroundColor' => '#FFF',\n 'fill' => false,\n 'data' => $team_b_scores\n ]\n ]\n ]);\n }", "function getIndicator() ;", "public function getShowSeconds()\n\t{\n\t\treturn false;\n\t}", "function fiorello_mikado_smooth_page_transitions() {\n\t\t$id = fiorello_mikado_get_page_id();\n\n\t\tif ( fiorello_mikado_get_meta_field_intersect( 'smooth_page_transitions', $id ) === 'yes' && fiorello_mikado_get_meta_field_intersect( 'page_transition_preloader', $id ) === 'yes' ) { ?>\n\t\t\t<div class=\"mkdf-smooth-transition-loader mkdf-mimic-ajax\">\n\t\t\t\t<div class=\"mkdf-st-loader\">\n\t\t\t\t\t<div class=\"mkdf-st-loader1\">\n\t\t\t\t\t\t<?php fiorello_mikado_loading_spinners(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<?php }\n\t}", "function createSvgResult() {\n $this->layout = 'svglayout'; // use the svg layout\n $gdtaGoals = ($this->Session->check('Survey.hierarcy')) ? $this->Session->read('Survey.hierarcy') : array(); // the hierarchy from the session\n $gdtaMainGoal = ($this->Session->check('Survey.mainGoal')) ? $this->Session->read('Survey.mainGoal') : ''; // the main goal from the session\n $type = ($this->Session->check('Survey.type')) ? $this->Session->read('Survey.type') : ''; // the type of survey being taken 'test' or 'user'\n $this->set('gdtaGoals', $gdtaGoals);\n $this->set('gdtaMainGoal', $gdtaMainGoal);\n $this->set('surveyType', $type);\n }", "public function animation($animation)\n {\n $this->option('animation', $animation);\n\n return $this;\n }", "public function isGrading() {\n if ($this->queue_position === null) {\n $this->loadQueueStatus();\n }\n return $this->queue_position === GradingQueue::GRADING;\n }", "function _handleTimePeriod() {\n\t\t$sessKeyStart = 'stats_start_date';\n\t\t$sessKeyEnd = 'stats_end_date';\n\n\t\tif (!$this->isPost()) {\n\t\t\t$startDate = strtotime(Configure::read('Stats.startDate'));\n\t\t\t$endDate = strtotime(date('Y-m-d'));\n\n\t\t\tif ($this->Session->check($sessKeyStart)) {\n\t\t\t\t$startDate = $this->Session->read($sessKeyStart);\n\t\t\t}\n\t\t\tif ($this->Session->check($sessKeyEnd)) {\n\t\t\t\t$endDate = $this->Session->read($sessKeyEnd);\n\t\t\t}\n\n\t\t\tif (isset($this->params['url']['startDate'])) {\n\t\t\t\t$startDate = $this->params['url']['startDate'];\n\t\t\t}\n\t\t\tif (isset($this->params['url']['endDate'])) {\n\t\t\t\t$endDate = $this->params['url']['endDate'];\n\t\t\t}\n\t\t} else {\n\t\t\t$startDate = strtotime($this->cleanupDate($this->data['Statistics']['startDate']));\n\t\t\t$endDate = strtotime($this->cleanupDate($this->data['Statistics']['endDate']));\n\n\t\t\t$this->Session->write($sessKeyStart, $startDate);\n\t\t\t$this->Session->write($sessKeyEnd, $endDate);\n\t\t}\n\n\t\tif ($startDate > $endDate) {\n\t\t\t$msg = __('Sorry, the beginning date must be before the end date.', true);\n\t\t\t$this->Message->add($msg, 'error');\n\n\t\t}\n\n\t\t// determine based on the difference between start and enddate what the type of the diagram should be\n\t\t// If the x-axis should be based on day, month or year\n\t\t$type = 'year';\n\t\t$diff = abs($endDate - $startDate);\n\t\tswitch (true) {\n\t\t\tcase ($diff <= DAY):\n\t\t\t\t$type = 'hour';\n\t\t\t\tbreak;\n\t\t\tcase ($diff <= MONTH + 5 * DAY):\n\t\t\t\t$type = 'day';\n\t\t\t\tbreak;\n\t\t\tcase ($diff <= 2 * YEAR):\n\t\t\t\t$type = 'month';\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->diagramType = $type;\n\n\t\t$format = 'Y-m-d';\n\t\tif ($type == 'hour') {\n\t\t\t$format = 'Y-m-d H:00';\n\t\t}\n\n\t\t$this->startDate = date($format, $startDate);\n\t\t$this->endDate = date($format, $endDate);\n\t\t$this->set(compact('startDate', 'endDate'));\n\t}", "public function getChartHtml()\n {\n $this->calculateEventDimensions();\n $chartNum = $this->getChartNum();\n\n $return = '';\n\n // if (!$this->initialized) $return .= $this->getInitializationHtml();\n\n list($decadeHtml, $yearHtml) = $this->getYearHtml();\n\n $return .= '<div class=\"chart\" id=\"chart-'.$chartNum.'\">'.\n '<div class=\"chart-controls-container\">'.\n '<div class=\"chart-controls-left\"></div>'.\n '<div class=\"chart-controls-right\"></div>'.\n '<div class=\"chart-scroll-container\">'.\n '<div class=\"chart-content\" style=\"width: '.$this->chartWidth.'px\">'.\n '<div class=\"chart-decade-container\">'. $decadeHtml.'</div>'.\n '<div class=\"chart-year-container\">'. $yearHtml.'</div>'.\n '<div class=\"chart-event-container\" style=\"width: '.$this->chartWidth.'px; height: '.$this->chartHeight.'px\">'.\n '<div class=\"chart-event-padding\">'.$this->getEventHtml().'</div>'.\n '</div>'.\n '<div class=\"chart-month-container\" style=\"width: '.$this->chartWidth.'px\"></div>'.\n '</div>'.\n '</div>'.\n '</div>'.\n '<div class=\"chart-info\">'.\n '<div class=\"chart-info-help\">Napsauta sotaa aikajanalla saadaksesi siitä lisätietoja</div>'.\n '</div>'.\n '</div>'.\n '<script type=\"text/javascript\">'.\n 'charts.push('.json_encode(['id' => 'chart-'.$chartNum, 'events' => $this->events, 'groups' => $this->groups]).');'.\n '</script>';\n\n return $return;\n }", "public function iconoEstadoActual(){\n //pendiente -> preparando ->preparado ->entregada->finalizada\n switch ($this->codEstado) {\n\n case 1: //estado pendiente\n return 'fas fa-clock';\n break;\n case 2: //estado pendiente\n return 'fas fa-fire';\n break; \n case 3: //estado preparando\n return 'fas fa-check';\n break; \n case 4: //estado preparado\n return 'fas fa-check-double'; \n break; \n case 5: //estado entregado\n # code...\n break; \n \n\n default:\n # code...\n break;\n }\n\n\n }", "function getjsOnPaint() {return $this->readjsonpaint();}", "public function charts()\n\t{\n\t\t//\n\t\t$loggeduser=\\App::make('authenticator')->getLoggedUser();\n\t\t\n\t\t//var_dump($userinfo);\n\t\t//var_dump($userprofile->first_name);\n\t\t if($loggeduser)\n\t\t\t{\n\t\t\t\t$userinfo=\\App::make('authenticator')->getUserById($loggeduser->id);\n\t\t$userprofile=UserProfile::find($loggeduser->id);\n\t\treturn \\View::make('backend.charts')->with('user',$userprofile);\n\t\t\t}\n\t\t\telse{\n\t\t \t$logged='not login';\n\t\t \treturn \\View::make('users.login');\n\t\t}\n\t}", "function setVisable() {\n $visable = array(\n //type // length // default // NotNull // Indexed // Sequence/Auto // unique // default value\n 'integer' => array( 1,1,1,1,1,1,0),\n 'decimal' => array( 1,1,1,1,0,1,0.0),\n 'float' => array( 1,1,1,1,0,1,0.0),\n 'double' => array( 1,1,1,1,0,1,0),\n 'text' => array( 1,1,1,1,0,1,''),\n 'cblob' => array( 1,0,0,0,0,0),\n 'blob' => array( 1,0,0,0,0,0),\n 'boolean' => array( 1,1,1,1,0,0),\n 'date' => array( 0,1,1,1,0,1,''),\n 'timestamp'=> array( 0,1,1,1,0,1,''),\n 'time' => array( 0,1,1,1,0,1,'')\n );\n \n $vis = $visable[$this->type];\n foreach(array('length','default','notnull','isIndex','sequence','unique') as $k=>$v) {\n if ($vis[$k]) {\n $this->widgets[$v]->show();\n $this->visable[$v] = 1;\n } else {\n $this->widgets[$v]->hide();\n $this->visable[$v] = 0;\n }\n }\n // hide defaults for sequences.\n //print_r(array($this->sequence,$vis[4]));\n if ($this->sequence && $vis[4]) {\n unset($this->default);\n $this->widgets['default']->hide();\n $this->visable['default'] = 0;\n $this->widgets['notnull']->set_active(true);\n $this->notnull = 1;\n $this->widgets['isIndex']->set_active(true);\n $this->isIndex = 1;\n }\n // set defaults if not null and !sequence and it's empty.\n if ($this->notnull && !$this->sequence && !strlen(@$this->default)) {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n if ($this->visable['default'] && \n isset($this->default) && \n $this->default == '' && \n isset($vis[6]) && \n ($this->default !== $vis[6])) \n {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n \n }", "function ipal_java_graphupdate() {\r\nglobal $ipal;\r\nglobal $DB;\r\necho \"\\n\\n<script type=\\\"text/javascript\\\">\\nvar http = false;\\nvar x=\\\"\\\";\\n\\nif(navigator.appName == \\\"Microsoft Internet Explorer\\\") {\\nhttp = new ActiveXObject(\\\"Microsoft.XMLHTTP\\\");\\n} else {\\nhttp = new XMLHttpRequest();\r\n}\";\r\n\r\necho \"\\n\\nfunction replace() {\\nvar t=setTimeout(\\\"replace()\\\",3000);\\nhttp.open(\\\"GET\\\", \\\"graphicshash.php?ipalid=\".$ipal->id.\"\\\", true);\";\r\necho \"\\nhttp.onreadystatechange=function() {\\nif(http.readyState == 4) {\\nif(http.responseText != x){\";\r\necho \"\\nx=http.responseText;\\n\";\r\n$state=$DB->get_record('ipal',array('id'=>$ipal->id));\r\nif($state->preferredbehaviour ==\"Graph\"){\r\necho \"document.getElementById('graphIframe').src=\\\"graphics.php?ipalid=\".$ipal->id.\"\\\"\";\r\n}\r\nelse\r\n{\r\necho \"document.getElementById('graphIframe').src=\\\"gridview.php?id=\".$ipal->id.\"\\\"\";\r\n}\r\n\r\necho \"}\\n}\\n}\\nhttp.send(null);\\n}\\nreplace();\\n</script>\";\r\n\r\n}", "function display( )\r\n\t{\r\n\t\t$this->_setModelState();\r\n\t $model = $this->getModel( $this->get( 'suffix' ) );\r\n\t $state = $model->getState();\r\n\t \t\t\r\n\t\t$date->current = $state->filter_date_from; \r\n\t\t\r\n\t\t$date->month = date( 'm', strtotime($date->current) );\r\n\t\t$date->year = date( 'Y', strtotime($date->current) );\r\n\t\t\r\n\t\t// date time variables\r\n\t\t$date->days = $this->getDays( $date->current );\r\n\t\t$date->hours = $this->getHours( );\r\n\t\t\r\n\t\t// datetime matrix\r\n\t\t$datetime = array( );\r\n\t\tfor ( $i = 0; $i < 3; $i++ )\r\n\t\t{\r\n\t\t\tfor ( $j = 0; $j < 24; $j++ )\r\n\t\t\t{\r\n\t\t\t\t$dayskey = $date->days[$i];\r\n\t\t\t\t$hourskey = $date->hours[$j];\r\n\t\t\t\t$datetime[$dayskey][$hourskey] = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$date->datetime = $datetime;\r\n\t\t\r\n\t\t// navigation dates\r\n\t\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\r\n\t\t\r\n\t\t// aditional variables\r\n\t\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\r\n\t\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\r\n\t\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\r\n\t\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\r\n\t\t$date->nonworkingdays = $this->getNonWorkingDays( );\r\n\t\t\r\n\t\t$view = $this->getView( $this->get( 'suffix' ), 'html' );\r\n\t\t$view->assign( 'date', $date );\r\n\t\t\r\n\t\tparent::display( );\r\n\t}" ]
[ "0.59224045", "0.5508384", "0.5494885", "0.5485116", "0.54485595", "0.54107696", "0.51833314", "0.50292295", "0.4976681", "0.49281514", "0.49083036", "0.49083036", "0.49083036", "0.48390016", "0.48361978", "0.47406563", "0.46791282", "0.46033108", "0.45613772", "0.44695055", "0.44689652", "0.44371653", "0.4435283", "0.4420856", "0.43385017", "0.43316692", "0.4315411", "0.4315341", "0.43044195", "0.42757726", "0.4242337", "0.4219971", "0.4211623", "0.42109224", "0.42007607", "0.41779926", "0.4167562", "0.41644976", "0.41565746", "0.41525334", "0.41475508", "0.41377816", "0.41234168", "0.41223365", "0.41153455", "0.41099438", "0.41010997", "0.4098977", "0.4091175", "0.4086721", "0.40782014", "0.40481997", "0.40462455", "0.40420294", "0.40411505", "0.40382192", "0.4038067", "0.40354562", "0.40317303", "0.4025179", "0.3998775", "0.39927796", "0.3984006", "0.3983243", "0.39813536", "0.3965122", "0.39628726", "0.39628726", "0.39560133", "0.39558116", "0.3952834", "0.39521635", "0.3950724", "0.3946222", "0.39453816", "0.3943893", "0.39369327", "0.39295396", "0.3925868", "0.3925699", "0.3917894", "0.39092562", "0.39063352", "0.38998166", "0.3896106", "0.38941237", "0.38892925", "0.38848296", "0.3874251", "0.38714027", "0.38698965", "0.38678285", "0.38676938", "0.38676807", "0.38663113", "0.38657412", "0.38632634", "0.3858558", "0.385557", "0.3854028" ]
0.6935687
0
getCaptionFontColor function returns a color code for caption. Basic idea to use this is to demonstrate how to centralize your cosmetic attributes for the chart
function getCaptionFontColor() { //Return a hex color code without # //FFC30C - Yellow Color return "666666"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}", "public function getTextColor() {}", "public function getTextColor() {}", "public function getFontColor()\n {\n if (array_key_exists(\"fontColor\", $this->_propDict)) {\n return $this->_propDict[\"fontColor\"];\n } else {\n return null;\n }\n }", "function get_header_textcolor()\n {\n }", "public function getAppearanceTextColor() {}", "public function getCaption() {}", "private function getFontColor()\n {\n if (empty($this->fontColor)) {\n return imagecolorallocatealpha($this->image, rand(0, 255), rand(0, 255), rand(0, 255), rand(0, $this->opacity));\n } else {\n return $this->fontColor[rand(0, count($this->fontColor) - 1)];\n }\n }", "public function getTextColor(): string\n {\n return $this->textColor ?? $this->strokeColor;\n }", "public function getCaption()\n\t{\n\t\tif ($this->caption instanceof Html && $this->caption->title) {\n\t\t\treturn $this->caption->title($this->getDataGrid()\n\t\t\t\t->translate($this->caption->title));\n\t\t} else {\n\t\t\treturn $this->getDataGrid()\n\t\t\t\t->translate($this->caption);\n\t\t}\n\t}", "public function getCaptionClassNames()\n {\n $classes = $this->styles('figure.caption');\n \n $this->extend('updateCaptionClassNames', $classes);\n \n return $classes;\n }", "function header_textcolor()\n {\n }", "function wpvideocoach_get_introduction_text_color()\r\n{\r\n\tglobal $wpvideocoach_introduction_text_color;\r\n\tif(empty($wpvideocoach_introduction_text_color)){\r\n\t\t$wpvideocoach_introduction_text_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_introduction_text_color;\r\n}", "public function getCaption()\n {\n return $this->caption;\n }", "public function getCaption() {\n\t\treturn $this->caption;\n\t}", "public function getCaption()\n {\n return $this->_caption;\n }", "public function getAppearanceFont() {}", "public function getCaption(): string\n {\n return $this->attrs['caption'] ?? '';\n }", "public function getAppearanceTextColorSpace() {}", "public function getTextColor() {\n\t\treturn $this->text_color;\n\t}", "public function getCaptionPosition() {}", "public function getCookieMessageTextColor() {\n return $this->_dataHelper->getColor('message_text_color');\n }", "function wpvideocoach_get_introduction_title_color()\r\n{\r\n\tglobal $wpvideocoach_introduction_title_color;\r\n\tif(empty($wpvideocoach_introduction_title_color)){\r\n\t\t$wpvideocoach_introduction_title_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_introduction_title_color;\r\n}", "function setTitleStyle($font = '', $size = 15, $col = 0x000000)\n {\n $size = intval($size);\n if ($size < 0) {\n $size = 0;\n }\n\n $this->title_font = $font;\n $this->title_font_size = $size;\n $this->title_col = $this->hexcol($col);\n }", "function setTitleStyle($font = '', $size = 15, $col = 0x000000)\n {\n $size = intval($size);\n if ($size < 0) {\n $size = 0;\n }\n\n $this->title_font = $font;\n $this->title_font_size = $size;\n $this->title_col = $this->hexcol($col);\n }", "protected function initCaptionRenderer()\n {\n $this->captionRenderer = new CaptionRenderer();\n }", "function getCaption() {return $this->readCaption();}", "function pl_footer_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'footer_text' ) ) ) ? pl_hash_strip( ploption( 'footer_text' ) ) : '999999';\n\t\n\treturn $color;\n}", "public function getCaption()\n {\n return $this->originalAsset->getCaption();\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public static function summaryChartColouring()\n {\n return [ '#f1592c', '#f3724c', '#f58b6c', '#f7a48c' ];\n }", "public function getFontDescriptor();", "function getColorToBasket($comFulldesc)\n{\n if (isset($comFulldesc)) {\n $comDescString = str_replace(\"&nbsp;\", '',\n htmlspecialchars_decode($comFulldesc));\n }\n\n $needle = \"Цвет:\";\n $findColor = strstr($comDescString, $needle);\n if ($findColor !== false) {\n $wovels = array('Цвет:</span>', 'Цвет:');\n $comColor = str_replace($wovels, \"\", strstr($findColor, \"</p>\", true));\n } else {\n $comColor = \"Цвет как на фото\";\n }\n return $comColor;\n}", "function setLegendTextStyle($font = '', $size = 10, $col = 0x000000, $between = 10)\n {\n $size = intval($size);\n $between = intval($between);\n\n $this->legend_font = $font;\n $this->legend_font_size = $size;\n $this->legend_font_col = $this->hexcol($col);\n\n $this->legend_between_padding = $between;\n }", "function setLegendTextStyle($font = '', $size = 10, $col = 0x000000, $between = 10)\n {\n $this->legend_font = $font;\n $this->legend_font_size = $size;\n $this->legend_font_col = $this->hexcol($col);\n\n $this->legend_between_padding = $between;\n }", "public function getCaptionOffset() {}", "function uabb_theme_text_color( $default ) {\n\t$color = '';\n\n\tif ( $default == '' ) {\n\n\t\t$color = apply_filters( 'uabb/global/text_color', $default );\n\t\t\n\t\tif ( $color == '' ) {\n\t\t\t$color = apply_filters( 'uabb_theme_text_color', $default );\n\t\t}\n\t} else {\n\t\t$color = $default;\n\t}\n\n\treturn $color;\n}", "private function getYLabelsColor() {\n\t\treturn $this->yLabelsColor;\n\t}", "private function getYLabelColor() {\n\t\treturn $this->yLabelColor;\n\t}", "function getModifyCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function getColorLabelByColorId($id){\n\n $atributo = Mage::getStoreConfig('cores/config/codigo_cor');\n $attribute_code=Mage::getModel('eav/entity_attribute')->getIdByCode('catalog_product', $atributo);\n $attributeInfo = Mage::getModel('eav/entity_attribute')->load($attribute_code);\n $attribute_table = Mage::getModel('eav/entity_attribute_source_table')->setAttribute($attributeInfo);\n\n $label = $attribute_table->getOptionText($id);\n return $label;\n }", "public function setTextTitleColor($arrColor)\r\n\t{\r\n\t\t$this->textTitleColor = $arrColor;\r\n\t}", "public function getColorName()\n {\n return $this->color_name;\n }", "public function getFont() {}", "public function getFont() {}", "public function getFont() {}", "private function set_font_color()\n {\n $this->font_color = imagecolorallocate(\n $this->img,\n L_FONT_COLOR_R,\n L_FONT_COLOR_G,\n L_FONT_COLOR_B\n );\n }", "public function renderCaption() {\n if (!empty($this->caption)) {\n return self::html()->tag('<caption{:options}>{:content}</caption>', array('content' => $this->caption, 'options' => $this->captionOptions), $this->captionOptions);\n } else {\n return false;\n }\n }", "public function getTextColors()\n {\n return $this->textColors;\n }", "function pl_header_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'headercolor' ) ) ) ? pl_hash_strip( ploption( 'headercolor' ) ) : '000000';\n\t\n\treturn $color;\t\n}", "public function getColor()\n {\n return\"Yellow\";\n }", "public function getUnderlineColor() {}", "protected function caption_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_caption',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Caption', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'text_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Text Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'caption_background_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'caption_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .widget-image-caption',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'caption_padding',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Padding', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', 'em', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'caption_space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Caption Top Spacing', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 0,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'margin-top: {{SIZE}}{{UNIT}}; margin-bottom: 0px;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "function button_text_hover_color() {\n\t\t\t$link_hover_color = astra_get_option( 'link-h-color' );\n\t\t\t$color = astra_get_option( 'button-h-color' );\n\t\t\tif ( empty( $color ) ) {\n\t\t\t\t$color = astra_get_foreground_color( $link_hover_color );\n\t\t\t}\n\n\t\t\treturn $color;\n\t\t}", "function uabb_theme_button_text_color( $default ) {\n\t$color = '';\n\n\tif ( $default == '' ) {\n\n\t\t$color = apply_filters( 'uabb/global/button_text_color', $default );\n\t\t\t\t\n\t\tif ( $color == '' ) {\n\t\t\t$color = apply_filters( 'uabb_theme_button_text_color', $default );\n\t\t}\n\t} else {\n\t\t$color = $default;\n\t}\n\n\treturn $color;\n}", "function setXAxisTitleStyle($font = '', $size = 12, $col = '000000')\n {\n $this->xaxis_title_font = $font;\n $this->xaxis_title_font_size = intval($size);\n $this->xaxis_title_font_col = $this->hexcol($col);\n }", "private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }", "function SetChordsFont() {\r\n $this->SetFont(\"Arial\", \"B\", 14);\r\n $this->SetTextColor(0, 0, 255);\r\n }", "public function getFontDescriptor() {}", "public function getFontDescriptor() {}", "public function getFontDescriptor() {}", "public function getFontDescriptor() {}", "public function renderCaption()\n {\n if (!empty($this->caption)) {\n return Html::tag('caption', $this->caption, $this->captionOptions);\n }\n\n return false;\n }", "function getCaption() {\n\t\treturn $this->lobSub->lobCaption;\n\t}", "public function getCyan()\n {\n return $this->cyan;\n }", "public static function color(string $text, string $color = null, int $decoration = 0, string $bgColor = null) {}", "public function mombo_main_headings_color() {\n \n \n }", "public function getColor(): string;", "function getAddCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function get_caption($key = 0)\n {\n }", "private function getXLabelColor() {\n\t\treturn $this->xLabelColor;\n\t}", "private function getXLabelsColor() {\n\t\treturn $this->xLabelsColor;\n\t}", "function setYAxisTitleStyle($font = '', $size = 12, $col = '000000')\n {\n $this->yaxis_title_font = $font;\n $this->yaxis_title_font_size = intval($size);\n $this->yaxis_title_font_col = $this->hexcol($col);\n }", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "public function getColor()\n {\n if (array_key_exists(\"color\", $this->_propDict)) {\n return $this->_propDict[\"color\"];\n } else {\n return null;\n }\n }", "public function getColorOption($product)\n {\n\t\t$colorcode = $product->getColor();\n\t\t$attr = $product->getResource()->getAttribute('color');\n\t\tif ($attr->usesSource()) {\n\t\t\t$optionText = $attr->getSource()->getOptionText($colorcode);\n\t\t}\n\t\treturn $optionText;\n }", "private function getCaption()\n\t{\n\t\t$buffer = '';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t// button\n\t\t$link = $this->getCaptionButton();\n\t\t\n\t\t// caption\t\t\n\t\t$buffer .= '<textarea class=\"TextareaDisable\" disabled=\"disabled\">';\n\t\t$buffer .= stripslashes($this->aImg['sCaption']);\n\t\t$buffer .= '</textarea>';\n\t\t$buffer .= '<br /><br />';\n\t\t\t\n\t\t$buffer .= $link;\t\t\t\n\t\treturn $buffer;\t\t\n\t}", "function getFont() { return $this->readFont(); }", "public function setTextColor($color) {}", "function get_tag_color( $tag ) {\n $tag_color = get_tag_data( $tag , 'tag_color' );\n return $tag_color;\n}", "public function get_custom_style_css($attribute, $value, $text_stroke_color) {\r\n\t\t\t// switch attribute\r\n\t\t\tswitch($attribute) {\r\n\t\t\t\tcase 'text-stroke':\r\n\t\t\t\t\treturn '-webkit-text-stroke: ' . $value . ' ' . $text_stroke_color . ';';\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'font-family':\r\n\t\t\t\t\treturn semplice_get_font_family($value);\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\treturn $attribute . ':' . $value . ';';\r\n\t\t\t}\r\n\t\t}", "public function getColorAccent()\n {\n return $this->colorAccent;\n }", "public function getAppearanceFontSize() {}", "public function getDescendantFont() {}", "function getFont() { return $this->_font; }", "function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }", "public function getCurrentTextColor() {\n return $currentTextColor;\n }", "private function retrieve_caption() {\n\t\treturn $this->retrieve_excerpt_only();\n\t}", "public function getColor();", "public function getColor();", "public function getColor();", "public function getColor();", "function _ga_typography_color( $option ) {\n\n\tif ( ! ( $_color = genesis_get_option( $option, GA_CHILDTHEME_FIELD ) ) )\n\t\treturn false;\n\n\t return 'color: ' . $_color . ';';\n\n}", "function setXAxisTextStyle($font = '', $size = 10, $col = 0x000000, $angle = 0)\n {\n $size = intval($size);\n $angle = intval($angle);\n\n if ($angle < -90) {\n $angle = 90;\n }\n if ($angle > 90) {\n $angle = 90;\n }\n\n $this->xaxis_font = $font;\n $this->xaxis_font_size = $size;\n $this->xaxis_font_col = $this->hexcol($col);\n $this->xaxis_font_angle = $angle;\n }", "function getLegend()\n {\n ksort($this->price_arr);\n //print_r($this->price_arr);\n \n foreach ($this->price_arr as $k => $v) {\n //echo \"$k => $v<br>\";\n $ret[$v] = array($k, $this->price_colors[$v]);\n }\n\n return $ret;\n }", "function getFont() {return $this->readFont();}", "function fontStyles()\r\n {\r\n /*\r\n if ($this->_control!=null)\r\n {\r\n if ($this->_control->ParentFont)\r\n {\r\n $parent=$this->_control->Parent;\r\n if ($parent!=null) return($parent->Font->readFontString());\r\n }\r\n }\r\n */\r\n\r\n $textalign=\"\";\r\n switch($this->_align)\r\n {\r\n case taLeft: $textalign=\"text-align: left;\"; break;\r\n case taRight: $textalign=\"text-align: right;\"; break;\r\n case taCenter: $textalign=\"text-align: center;\"; break;\r\n case taJustify: $textalign=\"text-align: justify;\"; break;\r\n }\r\n\r\n $fontstyle=\"\";\r\n switch($this->_style)\r\n {\r\n case fsNormal: $fontstyle=\"font-style: normal;\"; break;\r\n case fsItalic: $fontstyle=\"font-style: italic;\"; break;\r\n case fsOblique: $fontstyle=\"font-style: oblique;\"; break;\r\n }\r\n\r\n // changed to fix RAID#282144\r\n $fontvariant=\"\";\r\n switch($this->_variant)\r\n {\r\n case vaNormal: $fontvariant=\"font-variant: normal;\"; break;\r\n case vaSmallCaps: $fontvariant=\"font-variant: small-caps;\"; break;\r\n }\r\n\r\n $texttransform=\"\";\r\n switch($this->_case)\r\n {\r\n case caCapitalize: $texttransform=\"text-transform: capitalize;\"; break;\r\n case caUpperCase: $texttransform=\"text-transform: uppercase;\"; break;\r\n case caLowerCase: $texttransform=\"text-transform: lowercase;\"; break;\r\n case caNone: $texttransform=\"text-transform: none;\"; break;\r\n }\r\n\r\n $color=\"\";\r\n if ($this->_color!=\"\") $color=\"color: $this->_color;\";\r\n\r\n $lineheight=\"\";\r\n if ($this->_lineheight!=\"\") $lineheight=\"line-height: $this->_lineheight;\";\r\n\r\n $fontweight=\"\";\r\n if ($this->_weight!=\"\") $fontweight=\"font-weight: $this->_weight;\";\r\n\r\n return \" $color$fontweight$textalign$fontstyle$lineheight$fontvariant$texttransform \";\r\n }", "function getLegendData()\n\t {\n // Return the legenditems array\n return array(\n \"#22BB22\" => atktext(\"approved\"),\n \"#FF2222\" => atktext(\"not_approved_yet\"),\n );\n\t }" ]
[ "0.6232591", "0.5990622", "0.59901017", "0.59293044", "0.5877246", "0.58543503", "0.5795254", "0.57243913", "0.5675407", "0.56454533", "0.56267", "0.5616569", "0.55259067", "0.5494671", "0.54927963", "0.54718196", "0.54341197", "0.5401345", "0.5379341", "0.5346611", "0.53232694", "0.53150976", "0.5273444", "0.5267637", "0.5267637", "0.52653843", "0.5238445", "0.5221285", "0.5192972", "0.51929104", "0.51929104", "0.51710796", "0.5160192", "0.5141914", "0.5124057", "0.5113942", "0.511114", "0.50935006", "0.50789374", "0.5077829", "0.50742155", "0.5074074", "0.5072604", "0.5071127", "0.50514907", "0.50514907", "0.50514907", "0.5045798", "0.5038325", "0.503011", "0.50012565", "0.4997835", "0.49970305", "0.49854928", "0.4981145", "0.49672157", "0.49643868", "0.49627733", "0.49583295", "0.49493456", "0.49493456", "0.49493456", "0.49493456", "0.49349743", "0.493369", "0.4927218", "0.49227628", "0.488309", "0.48746273", "0.48678106", "0.4852931", "0.48469326", "0.48277614", "0.48252955", "0.4819856", "0.4819856", "0.48095697", "0.48020008", "0.480174", "0.47977725", "0.4796977", "0.47932455", "0.47820872", "0.47716665", "0.47688094", "0.47562525", "0.47358254", "0.47303882", "0.47260427", "0.47214895", "0.47137806", "0.47137806", "0.47137806", "0.47137806", "0.47109282", "0.47083035", "0.47063544", "0.47011206", "0.46923408", "0.4690823" ]
0.8533714
0
MonthName function converts a numeric integer into a month name Param: $intMonth a numver between 112, otherwise defaults to 1 Param: $flag if true, short name; if true, long name;
function MonthName($intMonth,$flag) { $arShortMonth = array (1=>"Jan", 2=>"Feb", 3=>"Mar", 4=>"Apr", 5=>"May", 6=>"Jun", 7=>"Jul", 8=>"Aug", 9=>"Sep", 10=>"Oct", 11=>"Nov", 12=>"Dec"); $arLongMonth = array (1=>"January", 2=>"February", 3=>"March", 4=>"April", 5=>"May", 6=>"June", 7=>"July", 8=>"August", 9=>"September", 10=>"October", 11=>"November", 12=>"December"); if ($intMonth<1 || $intMonth>12) $intMonth=1; if ($flag) return $arShortMonth[$intMonth]; else return $arLongMonth[$intMonth]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMonthName($var=false){\n\tif (!$var) $var=@$this->actmonth;\n\tif ($this->monthNames) return $this->monthNames[$var-1];\n\tswitch($var){\n\t\tcase 1: return $this->jan;\n\t\tcase 2: return $this->feb;\n\t\tcase 3: return $this->mar;\n\t\tcase 4: return $this->apr;\n\t\tcase 5: return $this->may;\n\t\tcase 6: return $this->jun;\n\t\tcase 7: return $this->jul;\n\t\tcase 8: return $this->aug;\n\t\tcase 9: return $this->sep;\n\t\tcase 10: return $this->oct;\n\t\tcase 11: return $this->nov;\n\t\tcase 12: return $this->dec;\n\t}\n}", "public function IntToMonthName($month) {\n switch ((int)$month) {\n case 1:\n return \"januari\";\n case 2:\n return \"februari\";\n case 3:\n return \"mars\";\n case 4:\n return \"april\";\n case 5:\n return \"maj\";\n case 6:\n return \"juni\";\n case 7:\n return \"juli\";\n case 8:\n return \"augusti\";\n case 9:\n return \"september\";\n case 10:\n return \"oktober\";\n case 11:\n return \"november\";\n case 12:\n return \"december\";\n default:\n return \"not valid month\";\n }\n }", "function monthname($month_number,$abr=false){\n switch($month_number){\n case 1: return $abr?'Jan':'January'; break;\n case 2: return $abr?'Feb':'February'; break;\n case 3: return $abr?'Mar':'March'; break;\n case 4: return $abr?'Apr':'April'; break;\n case 5: return $abr?'May':'May'; break;\n case 6: return $abr?'Jun':'June'; break;\n case 7: return $abr?'Jul':'July'; break;\n case 8: return $abr?'Aug':'August'; break;\n case 9: return $abr?'Sep':'September'; break;\n case 10: return $abr?'Oct':'October'; break;\n case 11: return $abr?'Nov':'November'; break;\n case 12: return $abr?'Dec':'December'; break;\n }\n}", "function monthName($monthNumber)\n{\n switch ($monthNumber) {\n case 1:\n return \"Jan\";\n break;\n case 2:\n return \"Feb\";\n break;\n case 3:\n return \"Mar\";\n break;\n case 4:\n return \"Apr\";\n break;\n case 5:\n return \"May\";\n break;\n case 6:\n return \"Jun\";\n break;\n case 7:\n return \"Jul\";\n break;\n case 8:\n return \"Aug\";\n break;\n case 9:\n return \"Sep\";\n break;\n case 10:\n return \"Oct\";\n break;\n case 11:\n return \"Nov\";\n break;\n case 12:\n return \"Dec\";\n break;\n }\n}", "public function getMonthName($month_number, $abbreviation = false);", "public function GetMonthName() {\n return $this->IntToMonthName($this->GetMonth());\n }", "function getMonthName($monthNumber = 1)\n\t{\n\t\tswitch($monthNumber)\n\t\t{\n\t\t\tcase 1: return 'Jan';\n\t\t\tcase 2: return 'Feb';\n\t\t\tcase 3: return 'Mar';\n\t\t\tcase 4: return 'Apr';\n\t\t\tcase 5: return 'May';\n\t\t\tcase 6: return 'Jun';\n\t\t\tcase 7: return 'Jul';\n\t\t\tcase 8: return 'Aug';\n\t\t\tcase 9: return 'Sep';\n\t\t\tcase 10: return 'Oct';\n\t\t\tcase 11: return 'Nov';\n\t\t\tcase 12: return 'Dec';\n\t\t\t\n\t\t\tdefault: return 'Jan';\n\t\t}\n\t}", "public function toMonth(int $int)\n {\n return date('F', mktime(0, 0, 0, $int, 10));\n }", "public static function nameOfNumberMonth($number) {\n $sg = '';\n switch ($number) {\n case -2:\n $sg = 'Out';\n break;\n case -1:\n $sg = 'Nov';\n break;\n case 0:\n $sg = 'Dez';\n break;\n case 1:\n $sg = 'Jan';\n break;\n case 2:\n $sg = 'Fev';\n break;\n case 3:\n $sg = 'Mar';\n break;\n case 4:\n $sg = 'Abr';\n break;\n case 5:\n $sg = 'Mai';\n break;\n case 6:\n $sg = 'Jun';\n break;\n case 7:\n $sg = 'Jul';\n break;\n case 8:\n $sg = 'Ago';\n break;\n case 9:\n $sg = 'Set';\n break;\n case 10:\n $sg = 'Out';\n break;\n case 11:\n $sg = 'Nov';\n break;\n case 12:\n $sg = 'Dez';\n break;\n default:\n break;\n }\n return $sg;\n }", "public function getMonthName($i)\n {\n // elseif ($i == 2) $bulan = 'feb' ;\n // elseif ($i == 3) $bulan = 'mar' ;\n // elseif ($i == 4) $bulan = 'apr' ;\n // elseif ($i == 5) $bulan = 'mei' ;\n // elseif ($i == 6) $bulan = 'jun' ;\n // elseif ($i == 7) $bulan = 'jul' ;\n // elseif ($i == 8) $bulan = 'ags' ;\n // elseif ($i == 9) $bulan = 'sep' ;\n // elseif ($i == 10) $bulan = 'okt' ;\n // elseif ($i == 11) $bulan = 'nov' ;\n // elseif ($i == 12) $bulan = 'des' ;\n // return $bulan;\n echo \"2\";\n }", "public function getMonthName($month);", "function monthname($var){\n $month_name = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n return $month_name[$var]; \n}", "public function getMonthName($month = \"\"){\n\t\t//if a month is provided - otherwise, use current\n\t\t$month = ($month == \"\")? $this->getMonth(): $month; \n\t\t$month = intval($month);\n\t\t$month_name = date('F', mktime(0, 0, 0, $month, 1, $this->getYear()));\n\t\treturn $month_name;\n\t}", "function numtomonth($nmonth)\n\t {\n\t if($nmonth==1){\n\t return \"January\";\n\t }elseif ($nmonth==2) {\n\t return \"February\";\n\t }elseif ($nmonth==3) {\n\t return \"March\";\n\t }elseif ($nmonth==4) {\n\t return \"April\";\n\t }elseif ($nmonth==5) {\n\t return \"May\";\n\t }elseif ($nmonth==6) {\n\t return \"Jun\";\n\t }elseif ($nmonth==7) {\n\t return \"July\";\n\t }elseif ($nmonth==8) {\n\t return \"August\";\n\t }elseif ($nmonth==9) {\n\t return \"September\";\n\t }elseif ($nmonth==10) {\n\t return \"October\";\n\t }elseif ($nmonth==11) {\n\t return \"November\";\n\t }elseif ($nmonth==12) {\n\t return \"December\";\n\t }else\n\t {\n\t $nmonth=$nmonth-12;\n\t return numtomonth($nmonth);\n\t }\n\t }", "public static function get_month($i) {\n\t\tswitch($i) {\n\t\t\tcase 1:\n\t\t\t\treturn __('January');\n\t\t\tcase 2:\n\t\t\t\treturn __('February');\n\t\t\tcase 3:\n\t\t\t\treturn __('March');\n\t\t\tcase 4:\n\t\t\t\treturn __('April');\n\t\t\tcase 5:\n\t\t\t\treturn __('May');\n\t\t\tcase 6:\n\t\t\t\treturn __('June');\n\t\t\tcase 7:\n\t\t\t\treturn __('July');\n\t\t\tcase 8:\n\t\t\t\treturn __('August');\n\t\t\tcase 9:\n\t\t\t\treturn __('September');\n\t\t\tcase 10:\n\t\t\t\treturn __('October');\n\t\t\tcase 11:\n\t\t\t\treturn __('November');\n\t\t\tcase 12:\n\t\t\t\treturn __('December');\n\t\t\tdefault:\n\t\t\t\treturn 'Invalid Month index \"'.$i.'\"';\n\t\t}\n\t}", "public static function monthNum2Name($monthNum) {\r\n return DateTimeTxt::monthNames(IsoCodes::$isoDE)[$monthNum]; \r\n }", "public function monthName($month) {\n return date('F', mktime(0,0,0, $month,1));\n }", "function numtomonth($nmonth)\n {\n if($nmonth==1){\n return \"January\";\n }elseif ($nmonth==2) {\n return \"February\";\n }elseif ($nmonth==3) {\n return \"March\";\n }elseif ($nmonth==4) {\n return \"April\";\n }elseif ($nmonth==5) {\n return \"May\";\n }elseif ($nmonth==6) {\n return \"Jun\";\n }elseif ($nmonth==7) {\n return \"July\";\n }elseif ($nmonth==8) {\n return \"August\";\n }elseif ($nmonth==9) {\n return \"September\";\n }elseif ($nmonth==10) {\n return \"October\";\n }elseif ($nmonth==11) {\n return \"November\";\n }elseif ($nmonth==12) {\n return \"December\";\n }else\n {\n $nmonth=$nmonth-12;\n return numtomonth($nmonth);\n }\n }", "public function get_month_name($month)\n {\n if($this->month_type == 'short')\n {\n $month_names = array('01' => 'jan', '02' => 'feb', '03' => 'mar', '04' => 'apr', '05' => 'may', '06' => 'jun', '07' => 'jul', '08' => 'aug', '09' => 'sep', '10' => 'oct', '11' => 'nov', '12' => 'dec');\n }\n else\n {\n $month_names = array('01' => 'january', '02' => 'february', '03' => 'march', '04' => 'april', '05' => 'mayl', '06' => 'june', '07' => 'july', '08' => 'august', '09' => 'september', '10' => 'october', '11' => 'november', '12' => 'december');\n }\n\n return ucfirst($month_names[$month]);\n \n }", "public function getMonthName(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\t$timestamp = $this->_timestamp;\n\t\t} else {\n\t\t\t$timestamp = mktime(0, 0, 0, $this->_month, 1, date('Y'));\n\t\t}\n\t\t$locale = $this->getLocale();\n\t\t$months = $locale->getMonthList();\n\t\treturn ucfirst($months[$this->_month-1]);\n\t}", "function getMonthName($code)\n{\n\treturn date(\"F\",strtotime(\"2012-{$code}-01\"));\n}", "public function getAbrevMonthName(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\t$timestamp = $this->_timestamp;\n\t\t} else {\n\t\t\t$timestamp = mktime(0, 0, 0, $this->_month, 1, date('Y'));\n\t\t}\n\t\t$locale = $this->getLocale();\n\t\t$months = $locale->getAbrevMonthList();\n\t\treturn ucfirst($months[$this->_month-1]);\n\t}", "private function getMonthName() {\n\t\treturn ucwords($this->monthNames[$this->month-1]);\n\t}", "function &monthName( $month, $isShort=true )\r\n {\r\n $errorString = \"<b>Locale error</b>: unknown month name\";\r\n $name = \"\";\r\n\r\n if ( $month == \"unknown\" )\r\n return $errorString;\r\n\r\n if ( $isShort )\r\n $long = \"\";\r\n else\r\n $long = \"long\";\r\n\r\n if ( is_numeric( $month ) == true )\r\n {\r\n switch ( $month )\r\n {\r\n case 1 :\r\n {\r\n $month = \"jan\";\r\n break;\r\n }\r\n case 2 :\r\n {\r\n $month = \"feb\";\r\n break;\r\n }\r\n case 3 :\r\n {\r\n $month = \"mar\";\r\n break;\r\n }\r\n case 4 :\r\n {\r\n $month = \"apr\";\r\n break;\r\n }\r\n case 5 :\r\n {\r\n $month = \"may\";\r\n break;\r\n }\r\n case 6 :\r\n {\r\n $month = \"jun\";\r\n break;\r\n }\r\n case 7 :\r\n {\r\n $month = \"jul\";\r\n break;\r\n }\r\n case 8 :\r\n {\r\n $month = \"aug\";\r\n break;\r\n }\r\n case 9 :\r\n {\r\n $month = \"sep\";\r\n break;\r\n }\r\n case 10 :\r\n {\r\n $month = \"oct\";\r\n break;\r\n }\r\n case 11 :\r\n {\r\n $month = \"nov\";\r\n break;\r\n }\r\n case 12 :\r\n {\r\n $month = \"dec\";\r\n break;\r\n }\r\n }\r\n }\r\n\r\n $name =& $this->LocaleIni->read_var( \"RegionalSettings\", $long . $month );\r\n\r\n if ( $name == false )\r\n {\r\n return $errorString;\r\n }\r\n else\r\n {\r\n return $name;\r\n }\r\n }", "function _monthToString($month, $abbr = false)\n\t{\n\t\tswitch ($month)\n\t\t{\n\t\t\tcase 1: return $abbr ? WText::_('WANUARY_SHORT') : WText::_('JANUARY');\n\t\t\tcase 2: return $abbr ? WText::_('FEBRUARY_SHORT') : WText::_('FEBRUARY');\n\t\t\tcase 3: return $abbr ? WText::_('MARCH_SHORT') : WText::_('MARCH');\n\t\t\tcase 4: return $abbr ? WText::_('APRIL_SHORT') : WText::_('APRIL');\n\t\t\tcase 5: return $abbr ? WText::_('MAY_SHORT') : WText::_('MAY');\n\t\t\tcase 6: return $abbr ? WText::_('JUNE_SHORT') : WText::_('JUNE');\n\t\t\tcase 7: return $abbr ? WText::_('JULY_SHORT') : WText::_('JULY');\n\t\t\tcase 8: return $abbr ? WText::_('AUGUST_SHORT') : WText::_('AUGUST');\n\t\t\tcase 9: return $abbr ? WText::_('SEPTEMBER_SHORT') : WText::_('SEPTEMBER');\n\t\t\tcase 10: return $abbr ? WText::_('OCTOBER_SHORT') : WText::_('OCTOBER');\n\t\t\tcase 11: return $abbr ? WText::_('NOVEMBER_SHORT') : WText::_('NOVEMBER');\n\t\t\tcase 12: return $abbr ? WText::_('DECEMBER_SHORT') : WText::_('DECEMBER');\n\t\t}\n\t}", "function yourls_l10n_month_abbrev( $month = '' ){\n\tglobal $yourls_locale_formats;\n\tif( !isset( $yourls_locale_formats ) )\n\t\t$yourls_locale_formats = new YOURLS_Locale_Formats();\n\n\tif( $month === '' )\n\t\treturn $yourls_locale_formats->month_abbrev;\n\n\tif( intval( $month ) > 0 ) {\n $month = sprintf('%02d', intval( $month ) );\n\t\t$month = $yourls_locale_formats->month[ $month ];\n\t\treturn $yourls_locale_formats->month_abbrev[ $month ];\n\t} else {\n\t\treturn $yourls_locale_formats->month_abbrev[ yourls__( $month ) ];\n\t}\n}", "protected function getMonthName($month)\n {\n return $month == 'all' ? '' : 'Bulan ' . bulan($month);\n }", "function month($mes)\n{\n\tif ($mes == 1) return \"Jan\";\n\tif ($mes == 2) return \"Feb\";\n\tif ($mes == 3) return \"Mar\";\n\tif ($mes == 4) return \"Apr\";\n\tif ($mes == 5) return \"May\";\n\tif ($mes == 6) return \"Jun\";\n\tif ($mes == 7) return \"Jul\";\n\tif ($mes == 8) return \"Aug\";\n\tif ($mes == 9) return \"Sept\";\n\tif ($mes == 10) return \"Oct\";\n\tif ($mes == 11) return \"Nob\";\n\tif ($mes == 12) return \"Dec\";\n}", "public static function getMonthName($month)\n {\n switch ($month) {\n case 1:\n return \"Janeiro\";\n case 2:\n return \"Fevereiro\";\n case 3:\n return \"Marco\";\n case 4:\n return \"Abril\";\n case 5:\n return \"Maio\";\n case 6:\n return \"Junho\";\n case 7:\n return \"Julho\";\n case 8:\n return \"Agosto\";\n case 9:\n return \"Setembro\";\n case 10:\n return \"Outubro\";\n case 11:\n return \"Novembro\";\n case 12:\n return \"Dezembro\";\n default:\n return \"\";\n }\n }", "function month_to_string($i) \n {\n if (!is_numeric($i)) return \"\";\n $str = Array(\n 1 => 'Enero',\n 2 => 'Febrero',\n 3 => 'Marzo',\n 4 => 'Abril',\n 5 => 'Mayo',\n 6 => 'Junio',\n 7 => 'Julio',\n 8 => 'Agosto',\n 9 => 'Septiembre',\n 10 => 'Octubre',\n 11 => 'Noviembre',\n 12 => 'Diciembre'\n );\n if (isset($str[intval($i)])) \n return $str[intval($i)];\n else\n return \"\";\n }", "function getMonthName($abbr = false)\r\n {\r\n if($abbr) {\r\n return Data_Calc::getMesNomeAbrev($this->mes);\r\n } else {\r\n return Data_Calc::getMesNomeCompl($this->mes);\r\n }\r\n }", "public function monthControl(){\n\t\t$month = date('m', time());\n\t\t\t\t\n\t\t//remakes $month to the month's name\n\t\tswitch ($month) {\n\t\t\tcase 1:\t$month = \"Januari\";\t\tbreak;\n\t\t\tcase 2:\t$month = \"Februari\";\tbreak;\n\t\t\tcase 3:\t$month = \"Mars\";\t\tbreak;\n\t\t\tcase 4:\t$month = \"April\";\t\tbreak;\n\t\t\tcase 5:\t$month = \"Maj\";\t\t\tbreak;\n\t\t\tcase 6:\t$month = \"Juni\";\t\tbreak;\n\t\t\tcase 7:\t$month = \"Juli\";\t\tbreak;\n\t\t\tcase 8:\t$month = \"Augusti\";\t\tbreak;\n\t\t\tcase 9:\t$month = \"September\";\tbreak;\n\t\t\tcase 10:$month = \"Oktober\";\t\tbreak;\n\t\t\tcase 11:$month = \"November\";\tbreak;\t\n\t\t\tcase 12:$month = \"December\";\tbreak;\n\t\t}\n\t\t\n\t\treturn $month;\n\t}", "private function returnFullMonthName($month) {\n switch ($month) {\n case \"1\":\n return \"January\";\n case \"2\":\n return \"February\";\n case \"3\":\n return \"March\";\n case \"4\":\n return \"April\";\n case \"5\":\n return \"May\";\n case \"6\":\n return \"June\";\n case \"7\":\n return \"July\";\n case \"8\":\n return \"August\";\n case \"9\":\n return \"September\";\n case \"10\":\n return \"October\";\n case \"11\":\n return \"November\";\n case \"12\":\n return \"December\";\n }\n }", "function get_month( $month_number ) {\n\t\treturn $this->month[ sprintf( '%02s', $month_number ) ];\n\t}", "public function get_month_abbrev($month_name)\n {\n }", "public function getMonthName($month){\n\n \treturn $this->monthName[$month];\n }", "function genMonth_Text($m) { \n switch ($m) { \n case '01': $month_text = \"Enero\"; break; \n case '02': $month_text = \"Febrero\"; break; \n case '03': $month_text = \"Marzo\"; break; \n case '04': $month_text = \"Abril\"; break; \n case '05': $month_text = \"Mayo\"; break; \n case '06': $month_text = \"Junio\"; break; \n case '07': $month_text = \"Julio\"; break; \n case '08': $month_text = \"Agosto\"; break; \n case '09': $month_text = \"Septiembre\"; break; \n case '10': $month_text = \"Octubre\"; break; \n case '11': $month_text = \"Noviembre\"; break; \n case '12': $month_text = \"Diciembre\"; break; \n } \n return ($month_text); \n }", "private function returnPartMonthName($month) {\n switch ($month) {\n case \"1\":\n return \"Jan\";\n case \"2\":\n return \"Feb\";\n case \"3\":\n return \"Mar\";\n case \"4\":\n return \"Apr\";\n case \"5\":\n return \"May\";\n case \"6\":\n return \"Jun\";\n case \"7\":\n return \"Jul\";\n case \"8\":\n return \"Aug\";\n case \"9\":\n return \"Sep\";\n case \"10\":\n return \"Oct\";\n case \"11\":\n return \"Nov\";\n case \"12\":\n return \"Dec\";\n }\n }", "function monthNames($format='long')\n {\n $formats = array('one'=>'%b', 'two'=>'%b', 'short'=>'%b', 'long'=>'%B');\n if (!array_key_exists($format,$formats)) {\n $format = 'long';\n }\n $months = array();\n for ($i=1; $i<=12; $i++) {\n $stamp = mktime(0, 0, 0, $i, 1, 2003);\n $month = strftime($formats[$format], $stamp);\n switch($format) {\n case 'one':\n $month = substr($month, 0, 1);\n break;\n case 'two':\n $month = substr($month, 0, 2);\n break;\n }\n $months[$i] = $month;\n }\n return $months;\n }", "function date_month($month) {\n\tswitch ($month) {\n\t\tcase 1:\n\t\t\techo \"Януари\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\techo \"Февруари\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\techo \"Март\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\techo \"Април\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\techo \"Май\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\techo \"Юни\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\techo \"Юли\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\techo \"Август\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\techo \"Септември\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\techo \"Октомври\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\techo \"Ноември\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\techo \"Декември\";\n\t\t\tbreak;\n\t}\n}", "public function getMonthName()\r\n\t{\r\n\t\treturn $this->format('F');\r\n\t}", "function months($short = false)\n{\n $months = [\n 0 => 'Month',\n 1 => 'January',\n 2 => 'February',\n 3 => 'March',\n 4 => 'April',\n 5 => 'May',\n 6 => 'June',\n 7 => 'July',\n 8 => 'August',\n 9 => 'September',\n 10 => 'October',\n 11 => 'November',\n 12 => 'December',\n ];\n\n if ($short)\n {\n foreach ($months as $number => $name)\n {\n $months[$number] = substr($name, 0, 3);\n }\n }\n\n return $months;\n}", "public function getShortNameMonth(string $field = 'created_at'): string\n {\n return $this->parseCarbon($this->$field)->formatLocalized('%b');\n }", "function ruMonthName($month) {\n\n if($month < 1 || $month > 12) $month = 0; else $month--;\n $mn = array('января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря');\n \n return $mn[$month];\n\n }", "function get_month_abbrev( $month_name ) {\n\t\treturn $this->month_abbrev[ $month_name ];\n\t}", "public function getMonthName()\n {\n return $this->currentMonth[\"month\"];\n }", "public function get_month($month_number)\n {\n }", "public function getNameMonth(string $field = 'created_at'): string\n {\n return $this->parseCarbon($this->$field)->formatLocalized('%B');\n }", "function getmonth($txt)\n {\n\t\n\t return substr($txt,5,2);\n }", "public function getMonth() : string\n {\n return date('m', $this->getUnixTimestamp());\n }", "function smarty_modifier_month_format($month)\n{\n\t$month = preg_replace('/^0/', '', $month);\n\tswitch($month) {\n\tcase 1:\n\t\treturn \"January\";\n\t\tbreak;\n\tcase 2:\n\t\treturn \"February\";\n\t\tbreak;\n\tcase 3:\n\t\treturn \"March\";\n\t\tbreak;\n\tcase 4:\n\t\treturn \"April\";\n\t\tbreak;\n\tcase 5:\n\t\treturn \"May\";\n\t\tbreak;\n\tcase 6:\n\t\treturn \"June\";\n\t\tbreak;\n\tcase 7:\n\t\treturn \"July\";\n\t\tbreak;\n\tcase 8:\n\t\treturn \"August\";\n\t\tbreak;\n\tcase 9:\n\t\treturn \"September\";\n\t\tbreak;\n\tcase 10:\n\t\treturn \"October\";\n\t\tbreak;\n\tcase 11:\n\t\treturn \"November\";\n\t\tbreak;\n\tcase 12:\n\t\treturn \"December\";\n\t\tbreak;\n\t}\n}", "public function getMonthAbbr()\r\n\t{\r\n\t\treturn $this->format('M');\r\n\t}", "public function ToMonth($month){\n\t\tswitch( $month ){\n\t\t\tcase 1: $mes = 'Enero';\n\t\t\tbreak;\n\t\t\t case 2: $mes = 'Febrero';\n\t\t\tbreak;\n\t\t\t case 3: $mes = 'Marzo';\n\t\t\tbreak;\n\t\t\t case 4: $mes = 'Abril';\n\t\t\tbreak;\n\t\t\t case 5: $mes = 'Mayo';\n\t\t\t break;\n\t\t\t case 6: $mes = 'Junio';\n\t\t\tbreak;\n\t\t\t case 7: $mes = 'Julio';\n\t\t\t break;\n\t\t\t case 8: $mes = 'Agosto';\n\t\t\tbreak;\n\t\t\t case 9: $mes = 'Septiembre';\n\t\t\t break;\n\t\t\tcase 10: $mes = 'Octubre';\n\t\t\t break;\n\t\t\t case 11: $mes = 'Noviembre';\n\t\t\t break;\n\t\t\t case 12: $mes = 'Diciembre';\n\t\t\tbreak;\n\t\t}\n\t\t return $mes;\n\t}", "function single_month_title($prefix = '', $display = \\true)\n {\n }", "function date_month($date){\r\n\t$month = NULL;\r\n\t$cont = 0;\r\n\tfor($i = 0; $i < strlen($date); $i++){\r\n\t\tif(is_numeric(substr($date, $i, 1))){\r\n\t\t\tif($cont == 1){\r\n\t\t\t\t$month .= substr($date, $i, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($cont > 0){\r\n\t\t\t\treturn $month;\r\n\t\t\t}else{\r\n\t\t\t\t$cont++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $month;\r\n}", "private function setMonthNames()\n\t{\n\t\t$range = range(1,12);\n\t\t$return = array();\n\t\tforeach($range AS $key => $monthNum)\n\t\t{\n\t\t $fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'MMMM');\n\t\t\t$return[$monthNum] = datefmt_format( $fmt , mktime(12,0,0,$monthNum,1,date('Y')));\n\t\t}\n\n\t\treturn $return;\n\t}", "public static function month_str_to_int(string $month){\r\n $month = strtolower($month);\r\nswitch ($month) {\r\n case \"january\":\r\n $month_int = 1;\r\n break;\r\n case \"february\":\r\n $month_int = 2;\r\n break;\r\n case \"march\":\r\n $month_int = 3;\r\n break;\r\n case \"april\":\r\n $month_int = 4;\r\n break;\r\n case \"may\":\r\n $month_int = 5;\r\n break;\r\n case \"june\":\r\n $month_int = 6;\r\n break;\r\n case \"july\":\r\n $month_int = 7;\r\n break;\r\n case \"august\":\r\n $month_int = 8;\r\n break;\r\n case \"september\":\r\n $month_int = 9;\r\n break;\r\n case \"october\":\r\n $month_int = 10;\r\n break;\r\n case \"november\":\r\n $month_int = 11;\r\n break;\r\n case \"december\":\r\n $month_int = 12;\r\n break;\r\n default: die(\"wrong month name\");\r\n\r\n \r\n \r\n } \r\n return $month_int;\r\n }", "function get_str_gesmonth( $mes )\r\n{\r\n if( $mes == 5 ) { $cmonth = \"Ene\"; }\r\n elseif( $mes == 6 ) { $cmonth = \"Feb\"; }\r\n elseif( $mes == 7 ) { $cmonth = \"Mar\"; }\r\n elseif( $mes == 8 ) { $cmonth = \"Abr\"; }\r\n elseif( $mes == 9 ) { $cmonth = \"May\"; }\r\n elseif( $mes == 10 ) { $cmonth = \"Jun\"; }\r\n elseif( $mes == 11 ) { $cmonth = \"Jul\"; }\r\n elseif( $mes == 12 ) { $cmonth = \"Ago\"; }\r\n elseif( $mes == 1 ) { $cmonth = \"Sep\"; }\r\n elseif( $mes == 2 ) { $cmonth = \"Oct\"; }\r\n elseif( $mes == 3 ) { $cmonth = \"Nov\"; }\r\n elseif( $mes == 4 ) { $cmonth = \"Dic\"; }\r\n\r\n return $cmonth;\r\n}", "public static function getMonth($no) {\n\t\t$month = \"\";\n\t\tswitch ($no) {\n\t\t\tcase 1:\n\t\t\t$month = \"JAN\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t$month = \"FEB\";\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t$month = \"MAR\";\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t$month = \"APR\";\n\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t$month = \"MAY\";\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t$month = \"JUN\";\n\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t$month = \"JUL\";\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t$month = \"AUG\";\n\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t$month = \"SEP\";\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t$month = \"OCT\";\n\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t$month = \"NOV\";\n\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t$month = \"DEC\";\n\t\t\tbreak;\n\t\t}\n\t\treturn $month;\n\t}", "function changejpmonth($month)\n{\n\n $jpmonth=\"\";\n switch($month) {\n case \"jan\":\n $jpmonth=\"1月 JAN\";\n break;\n\n case \"feb\":\n $jpmonth=\"2月 FEB\";\n break;\n\n case \"mar\":\n $jpmonth=\"3月 MAR\";\n break;\n\n case \"apr\":\n $jpmonth=\"4月 APR\";\n break;\n\n case \"may\":\n $jpmonth=\"5月 MAY\";\n break;\n\n case \"jun\":\n $jpmonth=\"6月 JUN\";\n break;\n\n case \"jul\":\n $jpmonth=\"7月 JUL\";\n break;\n\n case \"aug\":\n $jpmonth=\"8月 AUG\";\n break;\n\n case \"sep\":\n $jpmonth=\"9月 SEP\";\n break;\n\n case \"oct\":\n $jpmonth=\"10月 OCT\";\n break;\n\n case \"nov\":\n $jpmonth=\"11月 NOV\";\n break;\n\n case \"dec\":\n $jpmonth=\"12月 DEC\";\n break;\n }\n return $jpmonth;\n}", "function mkMonthTitle(){\n\tif (!$this->monthNav){\n\t\t$out=\"<tr><td class=\\\"\".$this->cssMonthTitle.\"\\\" colspan=\\\"\".$this->monthSpan.\"\\\">\";\n\t\t$out.=$this->getMonthName().$this->monthYearDivider.$this->actyear;\n\t\t$out.=\"</td></tr>\\n\";\n\t}\n\telse{\n\t\t$out=\"<tr><td class=\\\"\".$this->cssMonthNav.\"\\\" colspan=\\\"2\\\">\";\n\t\tif ($this->actmonth==1) $out.=$this->mkUrl($this->actyear-1,\"12\");\n\t\telse $out.=$this->mkUrl($this->actyear,$this->actmonth-1);\n\t\t$out.=$this->monthNavBack.\"</a></td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssMonthTitle.\"\\\" colspan=\\\"\".($this->monthSpan-4).\"\\\">\";\n\t\t$out.=$this->getMonthName().$this->monthYearDivider.$this->actyear.\"</td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssMonthNav.\"\\\" colspan=\\\"2\\\">\";\n\t\tif ($this->actmonth==12) $out.=$this->mkUrl($this->actyear+1,\"1\");\n\t\telse $out.=$this->mkUrl($this->actyear,$this->actmonth+1);\n\t\t$out.=$this->monthNavForw.\"</a></td></tr>\\n\";\n\t}\nreturn $out;\n}", "public function get_month( $month_number ) {\n\t\treturn $this->month[ zeroise( $month_number, 2 ) ];\n\t}", "function monthFormat() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_monthFormat = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_monthFormat;\n\t}", "public function getMonthLabel()\r\n {\r\n return \\Type\\DateTime::getMonthExt($this->getMonth());\r\n }", "public function getMonth(): string\n {\n return $this->toLocalizedString('M');\n }", "function month_converter($m) {\n $months = array('01' => get_string('month1', 'report_user_statistics'), '02' => get_string('month2', 'report_user_statistics'), '03' => get_string('month3', 'report_user_statistics'),\n '04' => get_string('month4', 'report_user_statistics'), '05' => get_string('month5', 'report_user_statistics'), '06' => get_string('month6', 'report_user_statistics'),\n '07' => get_string('month7', 'report_user_statistics'), '08' => get_string('month8', 'report_user_statistics'), '09' => get_string('month9', 'report_user_statistics'),\n '10' => get_string('month10', 'report_user_statistics'), '11' => get_string('month11', 'report_user_statistics'), '12' => get_string('month12', 'report_user_statistics'));\n if (is_numeric($m)) {\n return $months[$m];\n } else if (is_string($m)) {\n return array_search($m, $months);\n }\n}", "public function monthToString(string $month) : string\r\n {\r\n $months = [\r\n '01' => 'januari',\r\n '02' => 'februari',\r\n '03' => 'maart',\r\n '04' => 'april',\r\n '05' => 'mei',\r\n '06' => 'juni',\r\n '07' => 'juli',\r\n '08' => 'augustus',\r\n '09' => 'september',\r\n '10' => 'oktober',\r\n '11' => 'november',\r\n '12' => 'december',\r\n ];\r\n\r\n return $months[$month];\r\n }", "function monthdate($date) {\n #print \"monthdate($date)<br>\\n\";\n return trim(substr($date, 5, 2) . substr($date, 8, 2));\n }", "public function get_month_abbrev( $month_name ) {\n\t\treturn $this->month_abbrev[ $month_name ];\n\t}", "public function getMonth($date=null){\n\t\treturn date_format($this->createDate($date),\"m\");\n\t}", "public static function correct_month_name($month){\r\n for ($i=0; $i<=count(self::$db_table_months); $i++){\r\n if ($month == self::$db_table_months[$i]){\r\n $correct = (isset($_GET['lang']) && $_GET['lang']=='en')? ucfirst($month) : self::$serbian_months[$i];\r\n if ((isset($_GET['lang']) && $_GET['lang']=='ru')) $correct = self::$russian_months[$i];\r\n return $correct;\r\n }\r\n }\r\n \r\n }", "public static function getMonthNameFromMonthNumber($monthNumber, $languageIdCode) {\n\t\t//German\n\t\t$monthName[1]['de'] = 'Januar';\n\t\t$monthName[2]['de'] = 'Februar';\n\t\t$monthName[3]['de'] = 'März';\n\t\t$monthName[4]['de'] = 'April';\n\t\t$monthName[5]['de'] = 'Mai';\n\t\t$monthName[6]['de'] = 'Juni';\n\t\t$monthName[7]['de'] = 'Juli';\n\t\t$monthName[8]['de'] = 'August';\n\t\t$monthName[9]['de'] = 'September';\n\t\t$monthName[10]['de'] = 'Oktober';\n\t\t$monthName[11]['de'] = 'November';\n\t\t$monthName[12]['de'] = 'December';\n\t\t//English\n\t\t$monthName[1]['en'] = 'January';\n\t\t$monthName[2]['en'] = 'February';\n\t\t$monthName[3]['en'] = 'March';\n\t\t$monthName[4]['en'] = 'April';\n\t\t$monthName[5]['en'] = 'May';\n\t\t$monthName[6]['en'] = 'June';\n\t\t$monthName[7]['en'] = 'July';\n\t\t$monthName[8]['en'] = 'August';\n\t\t$monthName[9]['en'] = 'September';\n\t\t$monthName[10]['en'] = 'October';\n\t\t$monthName[11]['en'] = 'November';\n\t\t$monthName[12]['en'] = 'December';\n\t\t//French\n\t\t$monthName[1]['fr'] = 'janvier';\n\t\t$monthName[2]['fr'] = 'février';\n\t\t$monthName[3]['fr'] = 'mars';\n\t\t$monthName[4]['fr'] = 'avril';\n\t\t$monthName[5]['fr'] = 'mai';\n\t\t$monthName[6]['fr'] = 'juin';\n\t\t$monthName[7]['fr'] = 'juillet';\n\t\t$monthName[8]['fr'] = 'août';\n\t\t$monthName[9]['fr'] = 'septembre';\n\t\t$monthName[10]['fr'] = 'octobre';\n\t\t$monthName[11]['fr'] = 'novembre';\n\t\t$monthName[12]['fr'] = 'décembre';\n\t\treturn $monthName[$monthNumber][$languageIdCode];\n\t}", "public static function getMonthNames()\n {\n return array( TextHelper::_('COBALT_JANUARY'),\n TextHelper::_('COBALT_FEBRUARY'),\n TextHelper::_('COBALT_MARCH'),\n TextHelper::_('COBALT_APRIL'),\n TextHelper::_('COBALT_MAY'),\n TextHelper::_('COBALT_JUNE'),\n TextHelper::_('COBALT_JULY'),\n TextHelper::_('COBALT_AUGUST'),\n TextHelper::_('COBALT_SEPTEMBER'),\n TextHelper::_('COBALT_OCTOBER'),\n TextHelper::_('COBALT_NOVEMBER'),\n TextHelper::_('COBALT_DECEMBER') );\n }", "function monthchange($mon){\n\t\t\tif ($mon == \"January\"){\n\t\t\t\treturn \"01\";\n\t\t\t} else if ($mon == \"February\"){\n\t\t\t\treturn \"02\";\n\t\t\t} else if ($mon == \"March\"){\n\t\t\t\treturn \"03\";\n\t\t\t} else if ($mon == \"April\"){\n\t\t\t\treturn \"04\";\n\t\t\t} else if ($mon == \"May\"){\n\t\t\t\treturn \"05\";\n\t\t\t} else if ($mon == \"June\"){\n\t\t\t\treturn \"06\";\n\t\t\t} else if ($mon == \"July\"){\n\t\t\t\treturn \"07\";\n\t\t\t} else if ($mon == \"August\"){\n\t\t\t\treturn \"08\";\n\t\t\t} else if ($mon == \"September\"){\n\t\t\t\treturn \"09\";\n\t\t\t} else if ($mon == \"October\"){\n\t\t\t\treturn \"10\";\n\t\t\t} else if ($mon == \"November\"){\n\t\t\t\treturn \"11\";\n\t\t\t} else if ($mon == \"Desember\"){\n\t\t\t\treturn \"12\";\n\t\t\t}\n\t\t}", "function getMonth($selMonth=\"\"){\n\t\t$strMonths = \"\";\n\t\t$strMonths = \"<option value=''>00</option>\";\n\t\tfor($ind=1;$ind<=12;$ind++){\n\t\t\tif($ind == $selMonth)\n\t\t\t\t$strSel = \"selected\";\n\t\t\telse\n\t\t\t\t$strSel = \"\";\n\t\t\t\t\n\t\t\t$strMonths.=\"<option value=\".$ind.\" $strSel>\".(strlen($ind)==1?\"0\".$ind:$ind).\"</option>\";\n\t\t}\n\t\t\n\t\treturn $strMonths;\n\t}", "function monthParamName() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_monthParamName = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_monthParamName;\n\t}", "public static function MonthNumToMonthChaine($numMonth, $langue = \"fr\")\n {\n switch ($langue) :\n case \"fr\":\n $mois = array(\"01\" => \"janvier\",\n \"02\" => \"février\",\n \"03\" => \"mars\",\n \"04\" => \"avril\",\n \"05\" => \"mai\",\n \"06\" => \"juin\",\n \"07\" => \"juillet\",\n \"08\" => \"août\",\n \"09\" => \"septembre\",\n \"10\" => \"octobre\",\n \"11\" => \"novembre\",\n \"12\" => \"décembre\");\n break;\n\n case \"en\":\n case \"uk\":\n $mois = array(\"01\" => \"january\",\n \"02\" => \"february\",\n \"03\" => \"march\",\n \"04\" => \"april\",\n \"05\" => \"may\",\n \"06\" => \"june\",\n \"07\" => \"july\",\n \"08\" => \"august\",\n \"09\" => \"september\",\n \"10\" => \"october\",\n \"11\" => \"november\",\n \"12\" => \"december\");\n break;\n endswitch;\n\n return $mois[$numMonth];\n }", "function jr_translate_months( $month ) {\r\n\r\n\t$translated_months = array (\r\n\t\t'january' \t=> __('January', APP_TD),\r\n\t\t'february' \t=> __('February', APP_TD),\r\n\t\t'march' \t=> __('March', APP_TD),\r\n\t\t'april' \t=> __('April', APP_TD),\r\n\t\t'may' \t\t=> __('May', APP_TD),\r\n\t\t'june' \t\t=> __('June', APP_TD),\r\n\t\t'july' \t\t=> __('July', APP_TD),\r\n\t\t'august' \t=> __('August', APP_TD),\r\n\t\t'september' => __('September', APP_TD),\r\n\t\t'october' \t=> __('October', APP_TD),\r\n\t\t'november' \t=> __('November', APP_TD),\r\n\t\t'december' \t=> __('December', APP_TD),\r\n\t);\r\n\r\n\treturn $translated_months[ strtolower(trim($month)) ];\r\n\r\n}", "function thisMonthName($Calendar, $format='long')\n {\n $months = Calendar_Util_Textual::monthNames($format);\n return $months[$Calendar->thisMonth()];\n }", "function getMonthLabels() {\n\t\treturn array('count_jan', 'count_feb', 'count_mar', 'count_apr', 'count_may', 'count_jun', 'count_jul', 'count_aug', 'count_sep', 'count_oct', 'count_nov', 'count_dec');\n\t}", "public static function getAmericanMonthNameFromNumber($monthNumber) {\n\t\t$r = '';\n\t\tswitch($monthNumber) {\n\t\t\tcase 1;\n\t\t\t$r .= 'January';\n\t\t\tbreak;\n\t\t\tcase 2;\n\t\t\t$r .= 'February';\n\t\t\tbreak;\n\t\t\tcase 3;\n\t\t\t$r .= 'March';\n\t\t\tbreak;\n\t\t\tcase 4;\n\t\t\t$r .= 'April';\n\t\t\tbreak;\n\t\t\tcase 5;\n\t\t\t$r .= 'May';\n\t\t\tbreak;\n\t\t\tcase 6;\n\t\t\t$r .= 'June';\n\t\t\tbreak;\n\t\t\tcase 7;\n\t\t\t$r .= 'July';\n\t\t\tbreak;\n\t\t\tcase 8;\n\t\t\t$r .= 'August';\n\t\t\tbreak;\n\t\t\tcase 9;\n\t\t\t$r .= 'September';\n\t\t\tbreak;\n\t\t\tcase 10;\n\t\t\t$r .= 'October';\n\t\t\tbreak;\n\t\t\tcase 11;\n\t\t\t$r .= 'November';\n\t\t\tbreak;\n\t\t\tcase 12;\n\t\t\t$r .= 'December';\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$r .= '(UNKNOWN MONTH NUMBER: ' . $monthNumber . ')';\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $r;\n\t}", "public function testGetMonthNames()\r\n {\r\n $calendar = new \\tabs\\api\\property\\Calendar(array('month_type' => 'short'));\r\n $this->assertEquals('Jan', $calendar->getMonthName('01'));\r\n $this->assertEquals('Feb', $calendar->getMonthName('02'));\r\n $this->assertEquals('Mar', $calendar->getMonthName('03'));\r\n $this->assertEquals('Apr', $calendar->getMonthName('04'));\r\n $this->assertEquals('May', $calendar->getMonthName('05'));\r\n $this->assertEquals('Jun', $calendar->getMonthName('06'));\r\n $this->assertEquals('Jul', $calendar->getMonthName('07'));\r\n $this->assertEquals('Aug', $calendar->getMonthName('08'));\r\n $this->assertEquals('Sep', $calendar->getMonthName('09'));\r\n $this->assertEquals('Oct', $calendar->getMonthName('10'));\r\n $this->assertEquals('Nov', $calendar->getMonthName('11'));\r\n $this->assertEquals('Dec', $calendar->getMonthName('12'));\r\n }", "function get_month()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"mon\"];\n }", "protected function getMonthNameHTML($mth_num)\n {\n $month_names = $this->getLang('yearbox_months');\n $alt_css = ($mth_num % 2 == 0) ? ' class=\"alt\"' : '';\n return '<th' . $alt_css . '>' . $month_names[$mth_num - 1] . '</th>';\n }", "function convertMiladi($date,$monthname=false) {\r\n\t\t$y = substr($date,0,4);\r\n\t\t$m = substr($date,5,2);\r\n\t\t$d = substr($date,8,2);\r\n\r\n\r\n\t\tif(!$monthname){ // return basic\r\n\t\t\treturn($d.'-'.$m.'-'.$y);\r\n\t\t} else { // return full\r\n\t\t\tswitch ($m){\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t$mn = 'يناير';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\t$mn = ' فبراير';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\t$mn = 'مارس';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\t$mn = 'أبريل';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\t$mn = 'مايو';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\t$mn = 'يونيو';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\t$mn = 'يوليه';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 8:\r\n\t\t\t\t\t$mn = ' أغسطس';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 9:\r\n\t\t\t\t\t$mn = 'سبتمبر';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 10:\r\n\t\t\t\t\t$mn = 'أكتوبر';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 11:\r\n\t\t\t\t\t$mn = 'نوفمبر';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 12:\r\n\t\t\t\t\t$mn = 'ديسمبر';\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn($d.' '.$mn.' '.$y);\r\n\t\t}\r\n\t}", "function Mesabreviado($varmesabrev)\n{\n\tif ($varmesabrev == 1) return \"JAN\";\n\tif ($varmesabrev == 2) return \"FEB\";\n\tif ($varmesabrev == 3) return \"MAR\";\n\tif ($varmesabrev == 4) return \"APR\";\n\tif ($varmesabrev == 5) return \"MAJ\";\n\tif ($varmesabrev == 6) return \"JUN\";\n\tif ($varmesabrev == 7) return \"JUL\";\n\tif ($varmesabrev == 8) return \"AUG\";\n\tif ($varmesabrev == 9) return \"SEP\";\n\tif ($varmesabrev == 10) return \"OCT\";\n\tif ($varmesabrev == 11) return \"NOV\";\n\tif ($varmesabrev == 12) return \"DEC\";\n}", "function prim_options_month() {\n $month = array(\n 'jan' => t('jan'),\n 'feb' => t('feb'),\n 'mar' => t('mar'),\n 'apr' => t('apr'),\n 'may' => t('maj'),\n 'jun' => t('jun'),\n 'jul' => t('jul'),\n 'aug' => t('aug'),\n 'sep' => t('sep'),\n 'oct' => t('okt'),\n 'nov' => t('nov'),\n 'dec' => t('dec'),\n );\n\n return $month;\n}", "static public function getMonth($month)\n {\n return self::$_months[substr($month, 0, 3)];\n }", "public function GetMonth($leadingZero = true) {\n return $leadingZero ? $this->format('m') : $this->format('n');\n }", "protected function get_month_names() {\n\t\tglobal $wp_locale;\n\n\t\t$month_names = [];\n\n\t\tfor ( $i = 1; $i < 13; $i = $i + 1 ) {\n\t\t\t$month_num = zeroise( $i, 2 );\n\t\t\t$month_text = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );\n\t\t\t$month_names[] = array(\n\t\t\t\t'value' => $month_num,\n\t\t\t\t'text' => $month_text,\n\t\t\t\t'label' => sprintf( _x( '%1$s-%2$s', 'month number-name', 'unpublish' ), $month_num, $month_text ),\n\t\t\t);\n\t\t}\n\n\t\treturn $month_names;\n\t}", "function getMonthName()\n {\n return $this->currentMonthName;\n }", "public function all_month_name()\n\t{\n\t\t$res = $this->db->order_by('id', 'asc')->get('months')->result();\n\t\tif($res){\n\t\t\treturn $res;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public static function formMonthFld($field): string\n\t{\n\t\treturn Formatter::setMonthformat($field);\n\t}", "function form_select_month($name, $month, $id='') {\n\n\tglobal $cache2;\n\n\t// are we dealing with timestamp\n\tif ($month > 10000) {\n\t\t$month = fetch_month($month);\n\t}\n\n\t$id = ifr($id, $name);\n\n\treturn form_select($name, $cache2->getCalendarData('months_short'), '', $month, '', '', '', '', '', $id);\n\n}", "public static function getName(int $monthOfYear): string\n {\n $names = [\n 1 => 'January',\n 2 => 'February',\n 3 => 'March',\n 4 => 'April',\n 5 => 'May',\n 6 => 'June',\n 7 => 'July',\n 8 => 'August',\n 9 => 'September',\n 10 => 'October',\n 11 => 'November',\n 12 => 'December',\n ];\n\n return $names[$monthOfYear];\n }", "public function getMonthNames($array) {\n\t\treturn $this->monthNames;\n\t}", "private function getMonthLang($month){\n\t\tswitch($month){\n\t\t\tcase\"01\":return \"Januari\";break;\n\t\t\tcase\"02\":return \"Februari\";break;\n\t\t\tcase\"03\":return \"Maret\";break;\n\t\t\tcase\"04\":return \"April\";break;\n\t\t\tcase\"05\":return \"Mei\";break;\n\t\t\tcase\"06\":return \"Juni\";break;\n\t\t\tcase\"07\":return \"Juli\";break;\n\t\t\tcase\"08\":return \"Agustus\"; break;\n\t\t\tcase\"09\":return \"September\"; break;\n\t\t\tcase\"10\":return \"Oktober\"; break;\n\t\t\tcase\"11\":return \"November\"; break;\n\t\t\tcase\"12\":return \"Desember\"; break;\n\t\t\tcase\"January\":return \"Januari\";break;\n\t\t\tcase\"February\":return \"Februari\";break;\n\t\t\tcase\"March\":return \"Maret\";break;\n\t\t\tcase\"April\":return \"April\";break;\n\t\t\tcase\"May\":return \"Mei\";break;\n\t\t\tcase\"June\":return \"Juni\";break;\n\t\t\tcase\"July\":return \"Juli\";break;\n\t\t\tcase\"August\":return \"Agustus\"; break;\n\t\t\tcase\"September\":return \"September\"; break;\n\t\t\tcase\"October\":return \"Oktober\"; break;\n\t\t\tcase\"November\":return \"November\"; break;\n\t\t\tcase\"Descember\":return \"Desember\"; break;\n\t\t\tcase\"Jan\":return \"Januari\";break;\n\t\t\tcase\"Feb\":return \"Februari\";break;\n\t\t\tcase\"Mar\":return \"Maret\";break;\n\t\t\tcase\"Apr\":return \"April\";break;\n\t\t\tcase\"May\":return \"Mei\";break;\n\t\t\tcase\"Jun\":return \"Juni\";break;\n\t\t\tcase\"Jul\":return \"Juli\";break;\n\t\t\tcase\"Aug\":return \"Agustus\"; break;\n\t\t\tcase\"Sep\":return \"September\"; break;\n\t\t\tcase\"Oct\":return \"Oktober\"; break;\n\t\t\tcase\"Nov\":return \"November\"; break;\n\t\t\tcase\"Dec\":return \"Desember\"; break;\n\t\t\tdefault:return \"Januari\";break;\n\t\t}\n\t}", "public static function getMonthNamesShort()\n {\n return array( TextHelper::_('COBALT_JAN'),\n TextHelper::_('COBALT_FEB'),\n TextHelper::_('COBALT_MAR'),\n TextHelper::_('COBALT_APR'),\n TextHelper::_('COBALT_MAY'),\n TextHelper::_('COBALT_JUN'),\n TextHelper::_('COBALT_JUL'),\n TextHelper::_('COBALT_AUG'),\n TextHelper::_('COBALT_SEP'),\n TextHelper::_('COBALT_OCT'),\n TextHelper::_('COBALT_NOV'),\n TextHelper::_('COBALT_DEC') );\n }", "function nombremescorto($idmes){\n\t$nombremescorto = \"\";\n\tswitch ($idmes) {\n\t\tcase 1:\n\t\t\t$nombremescorto = \"ENE\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$nombremescorto = \"FEB\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$nombremescorto = \"MAR\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\t$nombremescorto = \"ABR\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\t$nombremescorto = \"MAY\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\t$nombremescorto = \"JUN\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\t$nombremescorto = \"JUL\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\t$nombremescorto = \"AGO\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\t$nombremescorto = \"SEP\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\t$nombremescorto = \"OCT\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\t$nombremescorto = \"NOV\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\t$nombremescorto = \"DIC\";\n\t\t\tbreak;\n\n\t}\n\treturn $nombremescorto;\n}", "public function getMonth($leadingZero = false)\r\n\t{\r\n\t\tif ($leadingZero)\r\n\t\t{\r\n\t\t\treturn $this->format('m');\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\treturn $this->format('n');\r\n\t\t}\r\n\t}" ]
[ "0.75161004", "0.74652904", "0.7144807", "0.7098847", "0.7093419", "0.7051912", "0.7020693", "0.6910796", "0.68853194", "0.68797356", "0.6863898", "0.6691211", "0.6668919", "0.6650689", "0.66392004", "0.6626972", "0.65991753", "0.65896904", "0.65835977", "0.65091485", "0.6477627", "0.6450184", "0.64496285", "0.64250576", "0.6401932", "0.639717", "0.6334304", "0.6319071", "0.6290669", "0.62827426", "0.62810177", "0.6213084", "0.6201313", "0.6168117", "0.61605865", "0.6145737", "0.61304796", "0.6129719", "0.6105481", "0.6069402", "0.6059109", "0.6028722", "0.60212874", "0.6020378", "0.5927117", "0.59197515", "0.59172004", "0.58959705", "0.5881416", "0.58790183", "0.58620954", "0.58558095", "0.5845738", "0.5801506", "0.57998395", "0.5786452", "0.57861567", "0.577955", "0.5753543", "0.57464534", "0.57453084", "0.5724679", "0.5721401", "0.57133174", "0.57017523", "0.5681313", "0.56762016", "0.567117", "0.56640196", "0.5636974", "0.56197226", "0.56147265", "0.55719733", "0.5566039", "0.55614275", "0.5559307", "0.5553994", "0.5532046", "0.5477475", "0.547397", "0.5467212", "0.5439642", "0.54289037", "0.5416638", "0.54073596", "0.5407017", "0.54053533", "0.5399683", "0.538639", "0.5378748", "0.5368699", "0.5356323", "0.53529465", "0.5328011", "0.5305316", "0.52978057", "0.5289662", "0.52376336", "0.52344126", "0.52338815" ]
0.80633587
0
Checks the credentials, if correct the LoggedIn session is set to true.
public function doLogin($username) { $_SESSION[Strings::$sessionLocation] = true; $_SESSION[Strings::$sessionUsername] = $username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkAuth()\n {\n $this->isAuthenticated = false;\n $isLoggedIn = is_user_logged_in();\n\n if ($isLoggedIn) {\n $this->username = wp_get_current_user()->user_login;\n $id = wp_get_current_user()->ID;\n $meta = get_user_meta($id, 'wp_capabilities', false);\n foreach ($meta[0] as $key => $value) {\n $k = strtoupper($key);\n if (($k == $this->PluginRole) or\n ($k == $this->AdminRole)) {\n $this->isAuthenticated = true;\n }\n }\n }\n }", "public static function checkCredentials()\n {\n if (null === self::username() || null === self::password()) {\n echo self::errorMessage();\n die(1);\n }\n\n return true;\n }", "public function checkCredentials()\n\t{\n\t\t$user = $this->_getLoggedUser();\n\t\tif (null === $user) {\n\t\t\t$_SESSION['url'] = $_SERVER['REQUEST_URI'];\n\t\t\t$this->redirectTo();\n\t\t}\n\t\treturn $user;\n\t}", "private function checkSession()\n\t\t{\n\t\t\tif(!empty($_SESSION['auth_username']) && !empty($_SESSION['auth_password']))\n\t\t\t\treturn $this->check($_SESSION['auth_username'], $_SESSION['auth_password']);\n\t\t}", "public function checkLogin() {\n\n /* Check if user has been remembered */\n if (isset($_COOKIE['cookname']) && isset($_COOKIE['cookid'])) {\n $this->username = $_SESSION['username'] = $_COOKIE['cookname'];\n $this->userid = $_SESSION['user_id'] = $_COOKIE['cookid'];\n }\n\n /* Username and userid have been set and not guest */\n if (isset($_SESSION['username']) && isset($_SESSION['user_id']) &&\n $_SESSION['username'] != GUEST_NAME) {\n /* Confirm that username and userid are valid */\n if ($this->connection->confirmUserID($_SESSION['username'], $_SESSION['user_id']) != 0) {\n /* Variables are incorrect, user not logged in */\n unset($_SESSION['username']);\n unset($_SESSION['user_id']);\n return false;\n }\n\n /* User is logged in, set class variables */\n $this->userinfo = $this->connection->getUserInfo($_SESSION['username']);\n $this->username = $this->userinfo['username'];\n $this->userid = $this->userinfo['user_id'];\n $this->userlevel = $this->userinfo['userlevel'];\n return true;\n }\n /* User not logged in */ else {\n return false;\n }\n }", "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 }", "public function is_logged_in()\n\t{\n\t\t/** if username and password are saved in sessions, user is logged in * */\n\t\tif (isset($_SESSION[self::$cookie_name_prefix .self::USERNAME]) AND isset($_SESSION[self::$cookie_name_prefix .self::PASSWORD]))\n\t\t{\n\t\t\t$this->logged_in = true;\n\t\t\t$this->load_properties_by_session();\n\t\t\treturn true;\n\t\t}\n\t\telseif (isset($_COOKIE[self::$cookie_name_prefix .self::USERNAME]) && isset($_COOKIE[self::$cookie_name_prefix .self::PASSWORD]))\n\t\t{\n\t\t\tif ($this->is_valid($_COOKIE[self::$cookie_name_prefix .self::USERNAME], $_COOKIE[self::$cookie_name_prefix .self::PASSWORD]))\n\t\t\t{\n\t\t\t\tROCKETS_HTTP::redirect(FILE_SUCCESS);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->logout();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "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 checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "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}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "protected function check_logged_in(){\n\n\t\t$this->load->model('patoauth/patoauth_model', 'patoauth');\n\n\t/*\n\t\tTRY TO AUTOLOGIN */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\t$this->patoauth->autologin();\n\n\t/*\n\t\tIF STILLS NO LOGGED IN GET OUT OF HERE */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\tredirect(site_url('auth/login'));\n\t}", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "public function checkAuth() {\n\n /*\n * Dummy stuff - just to test the authentication loop\n */\n if ($_SERVER['PHP_AUTH_USER'] === $this->config['general']['admin']['user'] && $_SERVER['PHP_AUTH_PW'] === $this->config['general']['admin']['password']) {\n return true;\n }\n\n return false;\n }", "public static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "private function compare_with_login()\n {\n }", "public function is_logged()\n {\n // set a variable to determine how to validate authentication data\n $validate_using = NULL;\n\n if (\n get_cookie($this->config->item('auth_cookie_id'), TRUE)\n && get_cookie($this->config->item('auth_cookie_key'), TRUE)\n ) {\n // store cookie informations in variables\n $encryptedUserIDs = get_cookie($this->config->item('auth_cookie_id'), TRUE);\n $enckey = get_cookie($this->config->item('auth_cookie_key'), TRUE);\n\n $validate_using = 'cookie';\n } else {\n // store session informations in variables\n $encryptedUserIDs = $this->session->userdata($this->config->item('auth_session_id'));\n $enckey = $this->session->userdata($this->config->item('auth_session_enkey'));\n\n $validate_using = 'session';\n }\n\n // check if any data is available\n if (empty($encryptedUserIDs) || empty($enckey)) {\n return FALSE;\n }\n\n // decrypt user IDs\n $userIDs = $this->encryption->decrypt($encryptedUserIDs);\n\n $userArray = explode('-', $userIDs);\n\n // return status\n return $this->auth_model->check_session($userArray[0], $userArray[1], $enckey, $validate_using);\n }", "public function isLoggedIn() {\n if (!property_exists($this, 'loggedIn')) {\n $this->loggedIn = false;\n $user = $this->getCurrentUser();\n if ($user) {\n $pass = $_SESSION['pass'];\n $this->loggedIn = password_verify($pass, $user->password);\n }\n }\n return $this->loggedIn;\n }", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }", "public function isLoggedIn()\r\n {\r\n if ($this->session->has('AUTH_NAME') AND $this->session->has('AUTH_EMAIL') AND $this->session->has('AUTH_CREATED') AND $this->session->has('AUTH_UPDATED')) {\r\n return true;\r\n }\r\n return false;\r\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 }", "public function checkLoggedIn() {\r\n\t\t$bLoggedIn = Mage::getSingleton('customer/session')->isLoggedIn();\r\n\t\tif (!$this->checkAllowed()) {\r\n\t\t\t$bLoggedIn = false;\r\n\t\t}\r\n\t\treturn $bLoggedIn;\r\n\t}", "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 }", "protected function isUserAllowedToLogin() {}", "public function authenticate(){\n $user = $_SERVER['PHP_AUTH_USER'];\n $pass = $_SERVER['PHP_AUTH_PW'];\n\n if(!empty($user) && $this->api_config['allowed_users'][$user] === $pass){\n return True;\n }\n return False;\n }", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function _logged() {\r\n\t\tif (isset ( $_SESSION ['uid'], $_SESSION ['hash'] )) {\r\n\t\t\t\r\n\t\t\t$uid = $_SESSION ['uid'];\r\n\t\t\t$email = $_SESSION ['email'];\r\n\t\t\t$hash = $_SESSION ['hash'];\r\n\t\t\t$sql = \"SELECT password FROM users WHERE id = ?\";\r\n\t\t\t$query = $this->app->db->query ( $sql, array (\r\n\t\t\t\t\t$uid \r\n\t\t\t) );\r\n\t\t\t$row = $query->fetch ();\r\n\t\t\tif ($hash == trim ( $row ['password'] )) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($this->login ())\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 }", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public static function check()\n {\n if (!empty($_SESSION['LOGGED_IN_USER'])){\n return true;\n } else{\n return false;\n }\n }", "public function checkAuthentication() \n {\n if(!isset($this->userInfo['admin_id']) && empty($this->userInfo['admin_id'])) \n {\n redirect('login/loginPage');\n }\n }", "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 checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "function checkLogin () {\r\n //check is session has user\r\n if (isset($_SESSION['user'])) {\r\n //check if the credentials match\r\n if (verifyUser($_SESSION['user']['name'], $_SESSION['user']['hash'])) {\r\n return true;\r\n }\r\n }\r\n //returns false by default\r\n return false;\r\n}", "function authenticationNeeded()\n {\n\n // define all the global variables\n global $user;\n\n // check if user has 2-factor authentication enabled\n if (!$user->twoFactorEnabled()) {\n return false;\n }\n\n // check if secret key has been setup\n if ($user->get2FactorCode() == \"\") {\n return false;\n }\n\n // check if current session has been authenticated\n if (isset($_SESSION[\"authenticated\"])) {\n if ($_SESSION[\"authenticated\"] == true) {\n return false;\n }\n }\n\n // if no errors then ask for authentication\n return true;\n }", "public function isLogged()\n {\n if (!isset($_SESSION['userID'])) {\n return false;\n }\n $this->userID = $_SESSION['userID'];\n $this->vcsLogin = $_SESSION['vcsLogin'];\n $this->vcsPasswd = $_SESSION['vcsPasswd'];\n $this->vcsLang = $_SESSION['lang'];\n $this->project = $_SESSION['project'];\n $this->anonymousIdent = $_SESSION['anonymousIdent'];\n $this->isAnonymous = $_SESSION['isAnonymous'];\n $this->haveKarma = $_SESSION['haveKarma'];\n $this->email = $_SESSION['email'];\n\n $this->authService = ( isset($_SESSION['authService']) ) ? $_SESSION['authService'] : false;\n $this->authServiceID = ( isset($_SESSION['authServiceID']) ) ? $_SESSION['authServiceID'] : false;\n\n ProjectManager::getInstance()->setProject($this->project);\n\n $this->userConf = isset($_SESSION['userConf'])\n ? $_SESSION['userConf']\n : $this->defaultConf;\n\n $this->updateLastConnect();\n\n return true;\n }", "public function verifyLoggedUser(): bool\n {\n $sessionUsername = filter_var($this->session->get('log_in_username'), FILTER_SANITIZE_STRING);\n $sessionLogInTime = filter_var($this->session->get('log_in_time'), FILTER_SANITIZE_STRING);\n if (empty($sessionUsername) || empty($sessionLogInTime)) {\n return false;\n }\n\n $user = $this->userModel->getUserByUsernameAndHashedLogInDate($sessionUsername, $sessionLogInTime);\n\n if (empty($user)) {\n return false;\n }\n\n return true;\n }", "public function checkAuthentication() {}", "public static function checkAuth() {\n if(session(\"auth_token\", null) == null){ return false; }\n \n $apiresponse = ApiController::doRequest(\"GET\", \"/users/me\", [\"bearer\" => session(\"auth_token\")], []);\n if($apiresponse->getStatusCode() == 200) {\n $apibodystr = (string)$apiresponse->getBody();\n $apibody = \\GuzzleHttp\\json_decode($apibodystr);\n session([\"auth_user\" => new User($apibody)]);\n return true; \n }\n \n return false;\n }", "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 }", "public function logged_in()\n\t{\n\t\t$access_key = $this->get_access_key();\n\t\t$access_secret = $this->get_access_secret();\n\n\t\t$logged_in = false;\n\n\t\tif ($this->get_access_key() !== null && $this->get_access_secret() !== null)\n\t\t{\n\t\t\t$logged_in = true;\n\t\t}\n\n\t\treturn $logged_in;\n\t}", "private function checkLogin() {\n if (isset($_SESSION['login'])) {\n if ($_SESSION['login'] == true) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "private function checkIfLoggedIn()\n {\n if (!session()->has('user')) {\n abort(403, 'You are not logged in.');\n }\n }", "public function checkLoggedIn()\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t \n\t\t\t\t$query = $this->_db->prepare( \"SELECT username FROM login WHERE username=:username\" );\n \n \n\t\t\t\t$query->bindParam( \":username\", $_SESSION[ 'username' ], PDO::PARAM_STR );\n\n\t\t\t\t$query->execute();\n\t\t\t\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\n\t\t\t$row = $query->fetch();\n\t\t\t\n \n\t\t\t$loggedInUser = $row[ 'username' ];\n \n //if the user is not logged in\n\t\t\tif( !isset( $loggedInUser ) )\n\t\t\t{\n //head to the log in page\n\t\t\t\theader( 'Location: login.php' );\n\n\t\t\t}\n\t\t\t\n\t\t}", "function checkLogin(){\n global $database; //The database connection\n\n /* Username and userid have been set and not guest */\n if(isset($_SESSION['username'])){\n return true;\n }\n /* User not logged in */\n else{\n return false;\n }\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "function verifyAuth()\n\t{\n\t\tsanitizeRequest($_POST);\n\t\tsanitizeRequest($_GET);\n\t\t\n\t\t$currentUser = UserService::getInstance()->getCurrentUser();\n\t\tif (!$currentUser || !$currentUser->getSessionId()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$payload = JWT::decode($currentUser->getSessionId(), SERVER_KEY, array('HS256'));\n\t\t\t$sessionId = UserService::getInstance()->getSessionId($currentUser->getId());\n\t\t\tif ($sessionId === $currentUser->getSessionId() &&\n\t\t\t\t\t$currentUser->getId() === $payload->id &&\n\t\t\t\t\t$currentUser->getEmail() === $payload->email) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tif ($currentUser->isRemember() && $e->getMessage() === 'Expired token') {\n\t\t\t\t$currentUser->extendSession();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function auth(){\n\t\tif( !isset($_SESSION) || !isset($_SESSION['userId']) ) {\n\t\t\treturn false;\n\t\t} elseif( !parent::fetchFromDB($_SESSION['userId']) ){\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn ( $this->checkIp() && $this->checkSessionId() );\n\t\t}\n\t}", "public function hasLogin()\r\n\t{\r\n\t\treturn (!empty($this->username) && !empty($this->password));\r\n\t}", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "protected function _logged_in()\n\t{\n\t\t$authentic = Auth::instance();\n\t\t\n\t\tif ($authentic->logged_in())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\t\n\t\t}\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}", "function checkLogin() {\n /* Check if user has been remembered */\n if (isset($_COOKIE['cook_VenusetP_UserEmail']) && isset($_COOKIE['cook_Venueset_UserPassword'])) {\n $varUserEmail = $_COOKIE['cook_VenusetP_UserEmail'];\n $varUserPassword = $_COOKIE['cook_Venueset_UserPassword'];\n /* Confirm that username and password are valid */\n $arrUserFlds = array('pkUserID', 'UserEmail', 'UserPassword', 'UserFirstName');\n $varUserWhere = ' 1 AND UserEmail = \\'' . $varUserEmail . '\\' AND UserPassword = \\'' . md5(trim($varUserPassword)) . '\\'';\n //echo '<pre>';print_r($varUserWhere);exit;\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if (count($arrUserList) > 0) {\n /* $_SESSION['VenusetP_UserEmail'] = $arrUserList[0]['UserEmail'];\n $_SESSION['VenusetP_UserID'] = $arrUserList[0]['pkUserID'];\n $_SESSION['VenusetP_UserName'] = $arrUserList[0]['UserFirstName']; */\n }\n return true;\n } else {\n return false;\n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "protected function _checkAndRedirect() {\n $auth = $this->_checkAuthentication();\n if(true === $auth) { // authentication required, redirects to login page\n $user = $this->getCurrentUser();\n if(null === $user) { // user doesn't appear do be logged in\n $this->flashMessenger()->addErrorMessage(IControllerMessages::FATAL_ERROR_NOT_AUTHENTIFICATED);\n $this->redirect()->toRoute(IRouteStore::LOGIN); // break;\n return;\n }\n else {\n \treturn $user;\n }\n }\n else {\n \texit;\n \treturn false;\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 }", "public function isLoggedIn()\n {\n if (isset($_SESSION['username'], $_SESSION['email'])) {\n return true;\n } else {\n $url=URL::getURI('login/required');\n header(\"location:$url\");\n }\n }", "public function logged_in()\n\t{\n\t\t$status = FALSE;\n\n\t\t// Get the user from the session\n\t\t$user = $this->_session->get($this->_config['session_key']);\n\n\t\tif ( ! is_object($user))\n\t\t{\n\t\t\t// Attempt auto login\n\t\t\tif ($this->auto_login())\n\t\t\t{\n\t\t\t\t// Success, get the user back out of the session\n\t\t\t\t$user = $this->_session->get($this->_config['session_key']);\n\t\t\t}\n\t\t}\n\n\t\t// check from DB if set in config\n\t\tif ($this->_config['strong_check'])\n\t\t{\n\t\t\t$user = $this->_get_object($user, TRUE);\n\t\t}\n\n\t\tif (is_object($user)\n\t\t\tAND is_subclass_of($user, 'Model_MangoRauth_User')\n\t\t\tAND $user->loaded()\n\t\t\tAND $user->is_active\n\t\t)\n\t\t{\n\t\t\t// Everything is okay so far\n\t\t\t$status = TRUE;\n\t\t}\n\n\t\treturn $status;\n\t}", "public function isLoggedIn()\r\n {\r\n $storage = new AuthenticationSession();\r\n return (!$storage->isEmpty() && $storage->read() instanceof AuthenticationResult);\r\n }", "public function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\n }", "protected function isLogin()\n {\n $skey = \\Web\\Config\\Auth::$prefix . $this->sessionId;\n if (\\Web\\Config\\Auth::$username != $this->gdata($skey)) {\n return false;\n }else{\n $this->gexpire($skey, \\Web\\Config\\Auth::$expire);\n return true;\n }\n }", "public function isLoggedIn(){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('checklogin');\n\t}", "public function auth() {\n\t\t\t// Check if user has not a session\n\t\t\tif (!$this->session->has('user')) return false;\n\n\t\t\t// Get the user from session\n\t\t\t$user = $this->session->get('user');\n\t\t\t$field = array_keys($user)[1] ?? null;\n\t\t\t$value = array_values($user)[1] ?? null;\n\n\t\t\t// If user does not exists\n\t\t\tif (!$this->user->exists($field, $value)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Else\n\t\t\treturn true;\n\t\t}", "public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }", "public function checkLogin(): bool{\n\t\treturn isset($_SESSION['user']['role']);\n\t}", "public function userIsLoggedIn() {\n return auth()->check() ;\n }", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "public static function verifyLogin():bool\n\t{\n\n\t\tif (\n\t\t\t!isset($_SESSION[User::SESSION])\n\t\t\t||\n\t\t\t!$_SESSION[User::SESSION]\n\t\t\t||\n\t\t\t!(int)$_SESSION[User::SESSION]['iduser'] > 0\n\t\t)\n\t\t{\n\t\t\n\t\t\treturn false;\n\t\t\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t} \n\n\t}", "public function check() {\n $check = $this->mysqli->query(\"SELECT * FROM user_info WHERE email='$this->email' && password ='$this->password' LIMIT 1\") or die($this->mysqli->error);\n $count = $check->num_rows;\n\n if ($count) {\n while($rows = $check->fetch_array(MYSQLI_ASSOC)){\n $this->loginID = $rows['loginID'];\n $_SESSION['loginID'] = $this->loginID;\n }\n $_SESSION['email'] = $this->email;\n $this->result .= \"Successfully Logged In\";\n } else {\n $this->result .= \"Sign In error!! Please try again\";\n }\n }", "public static function loggedin()\r\n {\r\n if (Maker::get('logged_in_user') != null) {\r\n return Maker::get('logged_in_user');\r\n }\r\n\r\n $query = Mysql::query(\r\n 'SELECT u.* FROM sessions s LEFT JOIN users u ON s.userid=u.id\r\n WHERE s.sessid=%s AND s.password=u.password AND u.username=%s AND s.userid=%u AND s.ip=%b',\r\n Session::instance()->password,\r\n Session::instance()->username,\r\n Session::instance()->userid,\r\n ip()->realip\r\n );\r\n\r\n if ($query->rows == 1) {\r\n Maker::set('logged_in_user', $query->row);\r\n return true;\r\n }\r\n Maker::set('logged_in_user', null);\r\n return false;\r\n }", "function isAuth()\n {\n $db = $this->getDatabaseConnection();\n $sesPrefix = $db->dsn['database'];\n if (empty($_SERVER['PHP_AUTH_USER'])) {\n @session_start();\n }\n if (!empty($_SESSION[__CLASS__][$sesPrefix .'-auth'])) {\n // in session...\n $a = unserialize($_SESSION[__CLASS__][$sesPrefix .'-auth']);\n $u = DB_DataObject::factory('core_company');\n if ($u->get($a->id)) { //&& strlen($u->passwd)) {\n return true;\n }\n $_SESSION[__CLASS__][$sesPrefix .'-auth'] = '';\n \n }\n // not in session or not matched...\n \n \n return false;\n \n }", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\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 chkLogin()\r\n {\r\n global $cookie_prefix;\r\n\t\t\r\n if(\r\n isset($_COOKIE[$cookie_prefix . \"id\"])\r\n &&\r\n isset($_COOKIE[$cookie_prefix . \"pass\"])\r\n )\r\n\t{\r\n #<!-- Sanitize ID -->\r\n $id = $_COOKIE[$cookie_prefix . \"id\"];\r\n\t\t/*$id = mysql_real_escape_string($id);\r\n\t\t$id = strip_tags($id);*/\r\n\t\t$id = parent::protect($id);\r\n\t\t\t\r\n #<!-- Sanitize Pass -->\r\n\t\t$pass = $_COOKIE[$cookie_prefix . \"pass\"];\r\n\t\t/*$pass = mysql_real_escape_string($pass);\r\n\t\t$pass = strip_tags($pass);*/\r\n\t\t$pass = parent::protect($pass);\r\n\t\t\r\n $query = mysql_query(\"SELECT * FROM `hxm_members` WHERE `id` = '$id' AND `password` = '$pass'\");\r\n $result = mysql_num_rows($query);\r\n $data = mysql_fetch_array($query);\r\n\t\t\t\r\n if( $result != 1 )\r\n {\r\n header(\"Location: \" . AUTH);\r\n }\r\n\t\t\t\r\n if( $data[\"group\"] == \"0\" )\r\n {\r\n header(\"Location: \" . AUTH);\r\n }\r\n\t}\r\n\telse\r\n\t{\r\n header(\"Location: \" . AUTH);\r\n\t\t\t\t\r\n\t}\r\n }", "public function _check_login()\n {\n\n }", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\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 }", "function checkLogin() {\r\n if(getSession('pass')===null) { //test if 'pass' is null\r\n return false; //returns false indicating 'pass' was null\r\n }\r\n else {\r\n return getSession('pass'); //returns the value, indicating the user is logged in\r\n }\r\n}", "public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }", "function checkUserSignedIn() {\n\t@session_start();\t//Start the session with no warning in case it already exists\n\n\t//If the user Id is not set, return false\n\tif (!isset($_SESSION['userId']))\n\t\treturn FALSE;\n\n\t//Attempt to get the user id with the session data\n\t$userId = getUserId($_SESSION['username'], $_SESSION['password']);\n\n\t//If the gathered user id is -1 or it is different from the previous userId (which should never happen)\n\tif($userId == '-1' || $userId != $_SESSION['userId']) {\n\t\tuserSignOut();\t//perform a sign out\n\t\treturn FALSE;\t//and return false\n\t}\n\n\t//If all the checks are fine return true\n\treturn TRUE;\n}", "public function isLogin() : bool\n {\n\n\n return (bool) Session::key()->currentUser;\n\n //return $this->validate();\n\n }", "public function authLogin(): bool\n {\n if (!empty($_SESSION['sessionId'])) {\n return true;\n }\n\n return false;\n }", "public static function isAuthenticated() {\n\n return isset($_SESSION[Security::SESSION_USER]) && $_SESSION[Security::SESSION_USER]->id > 0;\n\n }", "protected function loginIfRequested() {}", "public static function granted(): bool\n {\n global $Users;\n\n // Check login form and verify.\n if (!empty($_POST['user']) AND !empty($_POST['pass']) AND isset($Users[$_POST['user']]) AND password_verify($_POST['pass'], $Users[$_POST['user']]))\n {\n if (isset($_POST['remember']))\n {\n setcookie(session_name(), session_id(), strtotime('+1 Month'), '/', $_SERVER['HTTP_HOST'], true, true);\n }\n\n $_SESSION['loggedIn'] = true;\n\n return true;\n }\n\n // Check sessions.\n if (isset($_SESSION) AND isset($_SESSION['loggedIn']) AND $_SESSION['loggedIn'] === true)\n {\n return true;\n }\n\n return false;\n }", "public function authenticate()\n {\n /* authenticate if the login credentials are correct */\n $db = Sweia::getInstance()->getDB();\n $args = array(\n \":email\" => $this->getEmail(),\n \":password\" => $this->password\n );\n $sql = \"SELECT email,uid FROM \" . SystemTables::DB_TBL_USER . \" WHERE email = ':email' AND password = ':password' AND status != 4 LIMIT 1\";\n $res = $db->query($sql, $args);\n if ($res && $db->resultNumRows($res) == 1)\n {\n $data = $db->fetchObject($res);\n $this->uid = 1;\n return true;\n }\n\n return false;\n }", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "public function checkUserLogin()\n {\n if (isset($_SESSION[\"user_id\"])) {\n $status = true;\n } else {\n $status = false;\n }\n return $status;\n }", "protected function hasLoginBeenProcessed() {}", "public function checkLogin() {\n if (!$this->isLoggedIn()) {\n Router::getInstance()->redirect('login');\n }\n return $this->getCurrentUser();\n }", "public function isAuthenticated(){\n return $_SESSION['loggedIn'];\n }", "public static function is_logged_in()\n {\n if (isset($_SESSION['id']) and isset($_SESSION['username']) and isset($_SESSION['role_name'])){\n return true;\n }else{\n return false;\n }\n }", "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}", "function loggedIn() {\n\t\treturn isset($_SESSION['username']);\n\t}", "public static function checkIsLogged(): bool\n {\n $db = DbManager::openDB();\n if (!DbManager::tableExists($db, 'Users')) {\n Self::createTables($db);\n }\n\n if (!isset($auth)) {\n $auth = new Auth(DbManager::openDB(), null, null, false);\n }\n\n if ($auth->isLoggedIn()) {\n $isLogged = true;\n } else {\n $isLogged = false;\n }\n return $isLogged;\n }", "private function _checkAuth()\n { if(!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendResponse(401);\n }\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Password is invalid');\n }\n }" ]
[ "0.74131954", "0.7312797", "0.7286231", "0.7178735", "0.7157975", "0.7142332", "0.7106648", "0.7104867", "0.7069757", "0.7027854", "0.70036083", "0.6982118", "0.6962405", "0.6922792", "0.68994653", "0.68857527", "0.6879094", "0.6866214", "0.6853381", "0.682701", "0.6816029", "0.68033075", "0.67980534", "0.6788946", "0.67885095", "0.6771194", "0.67697275", "0.6758547", "0.6757448", "0.67466134", "0.6743636", "0.6743636", "0.67382395", "0.6737492", "0.67359984", "0.6718051", "0.671734", "0.671725", "0.67045814", "0.67045265", "0.6693945", "0.6687192", "0.6685569", "0.6684456", "0.66831934", "0.6681186", "0.6677498", "0.66608757", "0.665996", "0.6654709", "0.6646271", "0.66399854", "0.6635913", "0.66202813", "0.66097176", "0.6602854", "0.659879", "0.6588894", "0.6586768", "0.6576406", "0.6576309", "0.6572498", "0.6571739", "0.65694606", "0.65692574", "0.65646726", "0.6539916", "0.65396047", "0.65369457", "0.653294", "0.6532323", "0.6528534", "0.65273184", "0.65190005", "0.65101385", "0.6509478", "0.6505966", "0.6504179", "0.6499226", "0.64965785", "0.64963496", "0.6495989", "0.6495826", "0.64923984", "0.6486155", "0.64854914", "0.64854753", "0.6484725", "0.64777267", "0.6476027", "0.64753044", "0.64752775", "0.6473874", "0.6471813", "0.6467252", "0.6455885", "0.64540356", "0.6451527", "0.6450837", "0.6447858", "0.64408743" ]
0.0
-1
When a user wants to logout, the session is returned to be null.
public function doLogout($message = '') { $_SESSION[Strings::$sessionLocation] = null; $this->save($message); header(Strings::$headerRedirectString); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logout()\n {\n return $this->_user->logout('/inloggen');\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\t$success = parent::logOut();\n\n\t\tif ( !$_SESSION['login'] ) {\n\t\t\treturn $this->createAnswer( 0,\"log out cuccess\");\n\t\t}else{\n\t\t\treturn $this->createAnswer( 1,\"something went wrong \",403);\n\t\t}\n\t\t\n\t}", "private static function logout() {\n\t\t$key = Request::getCookie('session');\n\t\t$session = Session::getByKey($key);\n\t\tif ($session)\n\t\t\t$session->delete();\n\t\tOutput::deleteCookie('session');\n\t\tEnvironment::getCurrent()->notifySessionChanged(null);\n\t\tself::$loggedOut->call();\n\t}", "public function logout() {\r\n\t\tSession::set('login', FALSE, self::$namespace);\r\n\t}", "public static function logout(){\n \n //Tornando se sessão User nulla\n $_SESSION[User::SESSION] = null;\n \n }", "public function getLogout()\n {\n\n // If login correct\n Auth::logout();\n Session::flush();\n\n // Todo return something;\n }", "public function logoutAction()\n {\n $session = $this->getSession();\n $session->remove('loggedIn');\n $session->remove('name');\n $session->remove('username');\n $session->remove('user_id');\n $session->save();\n return new RedirectResponse('/login');\n }", "public function logout()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth])) {\t\n\t\t\tSessionManager::instance()->trashLoginCreadentials();\n\t\t}\n\t}", "public function Logout() \n {\n unset($_SESSION['user']);\n }", "private function logout() {\n $_SESSION['user'] = null;\n $_SESSION['valid'] = false;\n }", "public function logout()\r\n {\r\n return $this->session->unset_userdata($this->key);\r\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}", "function logout()\n {\n $user = $this->getAuthenticatedUser();\n if (!$user) return;\n\n unset($_SESSION['MFW_authenticated_user']);\n }", "public function getLogout()\n {\n if ($this->request->session()->has('logged-admin-user')) {\n $this->request->session()->forget('logged-admin-user');\n $this->request->session()->save();\n }\n return redirect()->action('Admin\\AdminController@getLogin');\n }", "public function logout(){\n session_unset($_SESSION[\"user\"]);\n }", "public function logout(){\n $cookie = setcookie($this->security->crypt('user'), null, -1, '/');\n if($cookie){\n session_start();\n\n $session = session_destroy();\n if($session){\n return ['status' => true, 'data' => true];\n }else{\n setcookie($this->security->crypt('user'), null, time() + 60 * 60 * 24 * 30, '/');\n return ['status' => true, 'data' => 'Session failed'];\n }\n }else{\n return ['status' => false, 'data' => 'Cookie failed'];\n }\n }", "Public Function Logout()\n\t{\n\t\tunset($_SESSION['User']);\n\t}", "public function logout()\n {\n\t\t$data = $this->call(array(), \"GET\", \"logout.json\");\n\t\tunset($_SESSION['session_id']);\n\t\t$this->session_id = null;\n\t\tsession_destroy();\n\t\treturn $data;\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 logout()\n {\n $this->session->remove('user');\n }", "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}", "abstract protected function logout();", "public static function logout();", "abstract public function logout();", "public function logoutAction()\r\n\t{\r\n\t\treturn $this->dispatcher->forward(array(\r\n\t\t\t\t'controller' => 'session',\r\n\t\t\t\t'action' => 'remove'\r\n\t\t));\r\n\t}", "function user_logout() {\n session_destroy();\n}", "public static function logOut()\r\n {\r\n (new Session())->remove(static::$userIdField);\r\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();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function LogOut()\n {\n $uid = $_SESSION['uid'];\n\n if(session_destroy()) {\n $result = $this->db->delete('sessions', array('fk_uid' => $uid));\n if($result) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function logout() {\n\t\tif ($this->isLoggedIn ()) { //only the logged in user may call logout.\n\t\t\t//Remove session data\n\t\t\tunset ( $this->session );\n\t\t\t$this->updateSession ();\n\t\t\tunset ($_SESSION['uid']);\n\t\t\tsession_destroy();\n\t\t}\n\t\techo '<reply action=\"ok\" />';\n\t}", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "public function logout()\n {\n try\n {\n $this->dispatch(\n new LogOut()\n );\n }\n catch (\\Exception $e)\n {\n return redirect()->route('auth');\n }\n\n // user is not logged in yet\n return redirect()->route('auth');\n }", "function logout_get()\n {\n // // Authenticate user (by session)\n // // Check if a user is currently logged in\n if(!$this->session->userdata('LoggedIn')){\n die(\"Login Required\");\n }\n\n $this->session->sess_destroy();\n $this->response(array('status' => 'success'));\n }", "public function getLogout()\n {\n if (\\Session::exists('adminLoginLogs')) {\n $adminLoginLogsData = \\Session::get('adminLoginLogs');\n if($adminLoginLogsData != NULL)\n {\n $adminLoginLogs = \\App\\Models\\AdminLoginLogs::find($adminLoginLogsData->id);\n if($adminLoginLogs != NULL)\n {\n $adminLoginLogs->logout_at = \\Carbon::now()->toDateTimeString();\n $adminLoginLogs->duration = diffInMinutes($adminLoginLogs->login_at, $adminLoginLogs->logout_at);\n }\n $admin = auth()->user();\n $admin->login_log_id = (NULL);\n $admin->save();\n }\n }\n auth()->logout();\n if (\\Session::exists('navigationPermissions')) {\n \\Session::remove('navigationPermissions');\n }\n if (\\Session::exists('navigations')) {\n \\Session::remove('navigations');\n }\n if (\\Session::exists('adminLoginLogs')) {\n \\Session::remove('adminLoginLogs');\n }\n return redirect()->route('admin.login')->with(['success' => __('validation.logged_out_successfully')]);\n }", "public function logOut(): Response\n {\n // We get the SESSION object\n $session = $this->get('session');\n $isLogged = $session->get('userID');\n\n // If the user is logged : he is ALLOWED to log out\n if($isLogged)\n {\n // We reset some SESSION variables\n $session->set('userID', 0);\n $session->set('isAdmin', false);\n }\n\n // We redirect the user to the homepage, whatever the result is\n return $this->redirect($this->generateUrl('homepage'));\n }", "public function logout()\n\t\t{\n\t\t\treturn $this->end_session();\n\t\t}", "private function _logout(){\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n // Identity exists; get it\r\n $auth->clearIdentity();\r\n $this->user = false;\r\n\r\n header('Location: '.WEBROOT ) ;\r\n }\r\n }", "public static function Logout()\n {\n Session::CloseSession();\n }", "public function logoutUser()\n\t{\n\t\treturn $this->cnuser->logout($this->request->header('Authorization'));\n\n\t\t//return \"logged Out!\";\n\t}", "public static function logout()\n {\n $id = Session::get(static::$_auth_name);\n\n Session::remove(static::$_auth_name);\n Cookie::remove(static::$_auth_name);\n\n #Dispatch loggedout event\n EventManager::dispatchEvent(self::EVENT_ON_LOGGED_OUT, $id);\n return true;\n }", "public function logOut(){\n $_SESSION=[];\n session_destroy();\n }", "function logout(){\n global $database; //The database connection\n\n\n /* Unset PHP session variables */\n unset($_SESSION['username']);\n\n /* Reflect fact that user has logged out */\n $this->isLogged = false;\n header(\"Location: login.php\");\n }", "public function logout() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n unset($s->$key);\n $this->setAuthed(false);\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 getLogout(){\n unset($_SESSION['userId']);\n unset($_SESSION['userName']);\n unset($_SESSION['userEmail']);\n header(\"Location: \". BASE_URL);\n }", "function log_out()\n{\n global $current_user;\n setcookie('session', '', time() - SESSION_COOKIE_DURATION);\n $current_user = NULL;\n}", "public function getLogout()\n {\n Auth::logout();\n\n \\Session::forget('user');\n\n\n return redirect('/');\n }", "public function logout() { \n \n session_destroy(); \n }", "public function logout(){\r\n if(isset($_SESSION['user'])){\r\n session_destroy();\r\n header('Location:'.ROUTE);\r\n }\r\n }", "public static function logout()\n {\n return self::getInstance()->_logout();\n }", "public function logout()\n {\n $user = LSPrincipal::getUser();\n $logout = $user->userLogout();\n \n // Verifying if the user left completely\n if (($logout === true)) {\n return true;\n } else {\n return false;\n }\n }", "function logout(){\r\n\t\t$action_details=array();\r\n\t\t$action_details['table_name']='users';\r\n\t\t$action_details['row_id']=$this->user_id;\r\n\t\t$action_details['operation']='Logged Out';\r\n\t\t$this->createActionLog($action_details);\r\n\t\t//$_SESSION['user_id'] = null;\r\n\t\treturn true;\r\n\t}", "public function logout() {\n $session_key = $this->getSessionKey();\n if ($this->Session->valid() && $this->Session->check($session_key)) {\n $ses = $this->Session->read($session_key);\n if (!empty($ses) && is_array($ses)) {\n $this->Session->delete($session_key);\n $this->Session->delete($this->config['prefixo_sessao'] . '.frompage');\n }\n }\n if ($this->config['auto_redirecionamento'] && !empty($this->config['pagina_logout'])) {\n $this->redirecionar($this->config['pagina_logout']);\n }\n }", "public function logout(){\n $session = new Zend_Session_Namespace('Auth');\n unset($session->User);\n Zend_Session::namespaceUnset('Auth');\n\n App_Cookie::unsetCookie (\"ulogin\");\n App_Cookie::unsetCookie (\"uloginhash\");\n }", "function user_logout(){\n $_SESSION['user'] = '';\n}", "public static function logout()\n {\n $currentSession = SessionService::getCurrent();\n if (!is_null($currentSession)) {\n SessionService::setCurrent(null);\n return self::invalidateSession($currentSession[\"guid\"]);\n }\n return true;\n }", "public function logout() {\r\n\t\tSession::delete($this->_sessionName);\r\n\t}", "public function logout()\n {\n $this->session->end();\n }", "public static function logout()\n\t{\n\t\t$_SESSION['loggedin'] = false;\n\t\t$_SESSION['showchallenge'] = null;\n\t\t$_SESSION['adminlastchosen'] = null;\n\t\t$_SESSION['login'] = '';\n\t\t$_SESSION['user_id'] = '';\n\t\t$_SESSION['email'] = '';\n\t\tsetcookie('logged_in', '');\n\t\tsetcookie('username', '');\n\t}", "static function logout()\n {\n session_destroy();\n }", "function logout()\n\t{\n\t\t$_SESSION['member']['au_id'] = null;\n\t\t$_SESSION['member']['au_name'] = null;\n\t\t$_SESSION['member']['au_username'] = null;\n\t\t$_SESSION['member']['au_email'] = null;\n\t\t$_SESSION['admin']['au_id'] = null;\n\t\t$_SESSION['admin']['au_name'] = null;\n\t\t$_SESSION['admin']['au_username'] = null;\n\t\t$_SESSION['admin']['au_email'] = null;\n\t\t$data = array('status' => '200', 'msg' => '7');\n\t\treturn $data;\n\t}", "function logout() {\n User::destroyLoginSession();\n header( \"Location: \" . APP_URL );\n}", "public function Logout()\r\n {\r\n session_unset();\r\n \r\n //Set l'ID de la session a null\r\n $_SESSION['uid'] = null;\r\n \r\n //Echo la vue de connexion\r\n echo view('login');\r\n }", "function log_out() {\n global $current_user;\n setcookie('session', '', time() - SESSION_COOKIE_DURATION); // Expire the cookie by subtracting time.\n $current_user = NULL;\n}", "function logout() {\n\tif (isset($_SESSION['user_id'])) {\n\t\tunset($_SESSION['user_id']);\n\t}\n}", "public function LogOut()\n {\n session_destroy();\n }", "public function getLogout()\n {\n if (!Sentry::check())\n {\n // user is not logged in, why to logout again, hacker?\n return Redirect::to('/');\n }\n\n Sentry::logout();\n return Redirect::to('/');\n }", "public function Logout() \n {\n session_unset();\n session_destroy();\n }", "function logOut(){\n\n if($this->session->has_userdata('userId')){\n\n //empty session values\n $sessionData = array('userId','loginStatus');\n $this->session->unset_userdata($sessionData);\n\n\n //redirect to login form\n redirect('members');\n }\n else{\n\n //redirect to home page\n redirect(site_url());\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 logout()\n {\n return $this->loginService->logout();\n }", "public function logout() {\n $this->session->unsetUserData();\n return true;\n }", "public function logout() {\n if ($this->User->checkIfClientIsLoggedIn($_SESSION)) {\n $this->User->logoutClient($_SESSION);\n }\n else {\n redirect();\n }\n }", "public static function logout() {\n $_SESSION['user'] = null;\n Redirect::to('/login', array('message' => 'Olet kirjautunut ulos.'));\n }", "public function auth_logout()\r\n {\r\n $_SESSION['usr'] = null;\r\n session_destroy();\r\n\r\n return true;\r\n }", "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 }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "public function logout(){\n\t\n\t\t$accessor = BankAccessor::create();\n\t\t\n\t\t//\tGets the current user and their token\n\t\t$user = $accessor->getCurrentUser();\n\t\t$token = Cookie::get('BankingSession');\n\t\t\n\t\t//\tIf the logout was successful delete the cookie\n\t\tif ($accessor->logout($user->ID, $token) == 0) {\n\t\t\t\n\t\t\tCookie::force_expiry(\"BankingSession\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function logoutAction()\n {\n QuizSessionService::endSession();\n return new ResponseModel(ResponseModel::STATUS, true);\n }", "public function logout()\n {\n return $this->auth->logout();\n }", "abstract protected function logoutImpl(): void;", "private function logout() {\n }", "public function logout()\n\t{\n\t\t$unset_array = array('set_id', 'access_pass', 'username');\n\t\t$this->session->unset_userdata($unset_array);\n\t}", "public function logOut(){\n session_unset();\n // Borra todas las variables de sesión \n $_SESSION = array(); \n // Finalmente, destruye la sesión \n session_destroy(); \n $resultado = array(\"success\"=>true);\n return $resultado;\n }", "public function logoutUser(){\n\t\t \n\t\t// UC 2 3: User tells the system he wants to log out\n\t\tif($this->view->userTryQuit()){\n\t\t\t\n\t\t\t// UC 2 4: The system logs the user out and presents a feedback message\n\t\t\t$this->model->logoutUser();\n\t\t\t$this->view->removeCredentials();\n\t\t\t\n\t\t\t// does not /* redirects to self */\n\t\t\t$this->view->storeMessage(\"Du har blivit utloggad\");\n\t\t\treturn $this->view->showLogin(false);\n\t\t\t\n\t\t// UC 2 1: The system presents a logout choice\t\n\t\t} else {\n\t\t\treturn $this->view->showLogin(true);\n\t\t}\n\t}", "public function get_logout()\n\t{\n\t\tAuth::logout();\n\t\treturn Redirect::route('home')->with('message', 'You are now logged out!'); \n\t}", "public function action_logout(){\n\t\tAuth::instance()->logout();\n \n\t\t#redirect to the user account and then the signin page if logout worked as expected\n\t\tHTTP::redirect('/');\t\n\n\t}", "function 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}", "function logout() {\n\t}" ]
[ "0.76927483", "0.7637352", "0.7557203", "0.7519175", "0.74897796", "0.7475519", "0.74734765", "0.74223876", "0.7407034", "0.7385174", "0.73758626", "0.73521185", "0.73419976", "0.734172", "0.7329475", "0.73267126", "0.73198104", "0.73075217", "0.73051906", "0.72971433", "0.72959346", "0.72902083", "0.728991", "0.7287004", "0.72821844", "0.7280301", "0.7279667", "0.7276831", "0.72667736", "0.7265239", "0.7265239", "0.7265239", "0.7265239", "0.7265239", "0.7265239", "0.7265239", "0.7265239", "0.7265239", "0.7265239", "0.72577494", "0.72568804", "0.7249173", "0.72487384", "0.7240619", "0.7237351", "0.7227216", "0.7224409", "0.7223258", "0.72229576", "0.7220165", "0.72176826", "0.72038245", "0.720103", "0.7195122", "0.7194656", "0.71856445", "0.7181591", "0.71779484", "0.71743387", "0.71734065", "0.71699584", "0.7168719", "0.71620494", "0.7160031", "0.7156692", "0.71546793", "0.7153677", "0.7152038", "0.7152007", "0.7150635", "0.71485096", "0.71418643", "0.71418244", "0.71394885", "0.7130713", "0.7127311", "0.71256715", "0.71241397", "0.71183157", "0.71129787", "0.711059", "0.71095496", "0.7109382", "0.7097639", "0.70969296", "0.709455", "0.7093521", "0.7084258", "0.7083729", "0.7083281", "0.7080884", "0.7078253", "0.707342", "0.70726424", "0.7071411", "0.7065938", "0.70644754", "0.70632285", "0.7055058", "0.70523775", "0.70508885" ]
0.0
-1
Function for checking if a user is currently logged in or not.
public function isLoggedIn() { if(!(isset($_SESSION[Strings::$sessionLocation])) || $_SESSION[Strings::$sessionLocation] === false) { return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "public function isCurrentlyLoggedIn() {}", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "function wv_is_user_loggedin() {\n $output = 0;\n if (is_user_logged_in()) {\n $output = 1;\n } else {\n $output = 0;\n }\n return $output;\n }", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }", "static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }", "function is_user_logged_in()\n{\n global $current_user;\n return ($current_user != NULL);\n}", "function is_user_logged_in()\n{\n global $current_user;\n\n // if $current_user is not NULL, then a user is logged in!\n return ($current_user != NULL);\n}", "public function is_user_logged_in()\n {\n $result = (boolean)self::getUser();\n return $result;\n }", "function is_logged_in()\n {\n //check session\n //return logged in user_id or false\n }", "public function isloggedin()\n {\n return Session::userIsLoggedIn();\n }", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "public static function is_user_logged_in() {\r\n if (isset($_SESSION['user_id'])) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "function is_logged_in()\n\t{\n\t\treturn require_login();\n\t}", "public function isUserLoggedIn()\n {\n return $this->_customerSession->isLoggedIn();\n }", "function is_user_logged_in() {\n global $current_user;\n\n return ($current_user != NULL); // if $current_user is not NULL, return true, else false\n}", "function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }", "function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }", "public function isUserLoggedIn() \n {\n if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_logged_in'])) {\n return false;\n } else {\n return true;\n }\n }", "public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }", "public function isLoggedIn() {\n\t\treturn (bool) $this->getLoggedInUser();\n\t}", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "public function isUserLoggedIn()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "public function is_logged_in() {\n\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "public function is_loggedin()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "public function isLoggedIn()\n {\n // check session for user id\n if(isset($_SESSION['user']['id'])) {\n // return true;\n return $_SESSION['user']['id'];\n }\n else {\n return false;\n }\n }", "function isUserLoggedIn()\r\n\t{\r\n\t\t\tglobal $con;\r\n\t\t\t$return = false;\r\n\t\t\tif (isset($_SESSION['USER_ID']) && ($_SESSION['USER_ID'] > 0) && ($_SESSION['USER_ID'] != ''))\r\n\t\t\t{\r\n\t\t\t\t$id = $_SESSION['USER_ID'];\r\n\t\t\t\tif ($this->chkValidUser($id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$return = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t}", "function isLoggedIn() {\n\treturn isset($_SESSION['user']);\n}", "public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }", "public function is_logged_in()\n\t{\n\t\treturn ($this->session->userdata('iduser') != FALSE);\n\t}", "public function is_logged_in()\n {\n return isset($this->user);\n }", "public function is_loggedin(){\n if(isset($_SESSION['user_session'])){\n return true;\n }\n return false;\n }", "function getUserIsLoggedIn() {\r\n // Check session variable\r\n if (isset($_SESSION[\"currentUser\"]))\r\n return true;\r\n\r\n // else\r\n return false;\r\n}", "public static function check()\n {\n if (!empty($_SESSION['LOGGED_IN_USER'])){\n return true;\n } else{\n return false;\n }\n }", "public function loggedIn()\n {\n return $this->user() != null;\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user_id']);\n}", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function is_user_logged_in() {\n if ( $session_id = in('session_id') ) {\n return user()->check_session_id( $session_id );\n }\n else if ( is_user_logged_in() ) return wp_get_current_user()->ID;\n else return false;\n }", "public static function isUserLoggedIn(): bool\n {\n if (isset($_SESSION['user_id'])) return true;\n return false;\n }", "public function isLoggedIn() {\n\t\t\treturn $this->bLoggedInUser;\n\t\t}", "protected function is_logged_in( )\n\t{\n\t\t$this->user = $this->php_session->get('user');\n\t\tif( is_null($this->user))\n\t\t\treturn False;\n\t\tif( ! $this->is_timed_out() )\n\t\t\treturn False;\n\t\t$this->user['last_active'] = time();\n\t\t$this->php_session->set('user' , $this->user );\n\n\t\t//apply user permissions globally\n\t\t//@see user_helper\n\t\tapply_global_perms( $this->user );\n\n\n\t\t\n\t\treturn True;\n\t}", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "protected function isLoggedIn()\n\t{\n\t\treturn is_user_logged_in();\n\t}", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public static function isLoggedIn()\n {\n return !is_null(SessionService::getCurrent());\n }", "public function logged_in()\n\t{\n\t\t$status = FALSE;\n\n\t\t// Get the user from the session\n\t\t$user = $this->_session->get($this->_config['session_key']);\n\n\t\tif ( ! is_object($user))\n\t\t{\n\t\t\t// Attempt auto login\n\t\t\tif ($this->auto_login())\n\t\t\t{\n\t\t\t\t// Success, get the user back out of the session\n\t\t\t\t$user = $this->_session->get($this->_config['session_key']);\n\t\t\t}\n\t\t}\n\n\t\t// check from DB if set in config\n\t\tif ($this->_config['strong_check'])\n\t\t{\n\t\t\t$user = $this->_get_object($user, TRUE);\n\t\t}\n\n\t\tif (is_object($user)\n\t\t\tAND is_subclass_of($user, 'Model_MangoRauth_User')\n\t\t\tAND $user->loaded()\n\t\t\tAND $user->is_active\n\t\t)\n\t\t{\n\t\t\t// Everything is okay so far\n\t\t\t$status = TRUE;\n\t\t}\n\n\t\treturn $status;\n\t}", "function loggedIn() {\n\t\treturn isset($_SESSION['username']);\n\t}", "private function checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }", "public function is_logged_in()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "public static function isLoggedIn()\n {\n if(isset($_SESSION[static::$sessionKey]))\n return (self::getUser(false) ? true : false);\n \n return false;\n }", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }", "public function is_logged_in()\n\t{\n\t\tif(isset($_SESSION['userSession']))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }", "public static function loggedIn(): bool\n {\n // Check if user is in the session\n return isset($_SESSION['user']);\n }", "public static function isLoggedIn()\n {\n self::startSession();\n return isset($_SESSION['user']);\n }", "public function getIsUserLoggedIn()\n {\n if (!isset($this->isUserLoggedIn)) {\n $userId = $this->getFamilyGraph()->getUserId();\n $this->isUserLoggedIn = (!empty($userId));\n }\n \n return $this->isUserLoggedIn;\n }", "function is_user_logged_in() {\n\t$user = wp_get_current_user();\n\n\tif ( empty( $user->ID ) )\n\t\treturn false;\n\n\treturn true;\n}", "public function loggedIn()\n {\n $CI = &get_instance();\n if ($CI->session->has_userdata('user_id')) {\n return true;\n } else {\n return false;\n }\n }", "public function isUserLoggedIn() {\n\n $this->restartSession();\n\n if ($this->checkLogin() == false) {\n return false;\n } else {\n return true;\n }\n }", "public function userIsLoggedIn() {\n return auth()->check() ;\n }", "public function isLoggedIn();", "public function isLoggedIn();", "function isUserLoggedIn()\n\t{\n\t\tglobal $loggedInUser,$db,$db_table_prefix;\n\t\t\n\t\t$sql = \"SELECT User_ID,\n\t\t\t\tPassword\n\t\t\t\tFROM \".$db_table_prefix.\"Users\n\t\t\t\tWHERE\n\t\t\t\tUser_ID = '\".$db->sql_escape($loggedInUser->user_id).\"'\n\t\t\t\tAND \n\t\t\t\tPassword = '\".$db->sql_escape($loggedInUser->hash_pw).\"' \n\t\t\t\tAND\n\t\t\t\tActive = 1\n\t\t\t\tLIMIT 1\";\n\t\t\n\t\tif($loggedInUser == NULL)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Query the database to ensure they haven't been removed or disabled\n\t\t\tif(returns_result($sql) > 0)\n\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// No result returned kill the user session, user removed or disabled\n\t\t\t\t$loggedInUser->userLogOut();\n\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "function loggedIn()\n\t{\n\t\treturn $this->hasFunction(AUTH_FUNCTION_LOGGED_IN_ATTRIBUTE);\n\t}", "public static function isLoggedIn()\r\n\t\t{\r\n\r\n\t\t\tif(isset($_SESSION['user_session']))\r\n\t\t\t{\r\n\r\n\t\t\t\treturn $_SESSION['user_session'];\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function IsLoggedIn()\n\t{\n\t\t\n\t\tif(isset($_SESSION['User']) && $_SESSION['User'] != null)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isLoggedUser()\n {\n return $this->container->get('user')->isLogged();\n }", "function logged_in() \n {\n return isset($_SESSION['current_username']);\n }", "function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "function is_logged_in()\n{\n return isset($_SESSION['user']);\n}", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "public static function isLoggedIN()\n {\n if (\\Auth::check() )\n {\n //get current username\n\t\t\t$user = Session::get('username');\n\t\t\treturn $user;\n }\n else\n {\n //DENIED ACCESS. Kick Out\n Session::set_flash('error', 'Please Login');\n Response::redirect('user/login');\n }\n }", "public function is_logged_in() {\n\t\treturn is_a($this->user, 'WP_User');\n\t}", "public static function checkIfUserIsLogged(){\r\n\t\tif(isset($_SESSION[SessionUtil::$KEY_USER_LOGGED])){\r\n\t\t\treturn $_SESSION[SessionUtil::$KEY_USER_LOGGED];\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "function isLoggedIn() {\n\t\tif (isset($_SESSION[\"UID\"]) && !empty($_SESSION[\"UID\"])) {\n\t\t\t// logged in\n\t\t\treturn TRUE ;\n\t\t} else {\n\t\t\t// not logged in\n\t\t\treturn FALSE ;\n\t\t}\n\t}", "public function is_logged_in()\n {\n // Check if user session has been set\n if (isset($_SESSION['session'])) {\n return true;\n }\n }", "function logged_in() {\n\t\n\treturn isset( $_SESSION['user_id'] );\n}", "private function if_user_logged_in()\n {\n\n session_start();\n\n if(!empty($_SESSION)){\n\n if(isset($_SESSION[\"user_id\"]) && isset($_SESSION[\"user_type\"])){\n \n return true;\n\n }else{\n\n return false;\n }\n\n }else{\n\n return false;\n }\n }", "public function isLoggedIn()\n\t{\n\t\tif( isset($_SESSION['username']) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function is_logged_in() {\n\t\t\treturn $this->logged_in;\n\t\t}", "public function is_logged_in(){\n\t\treturn $this->_state_is_logged_in;\n\t}", "public function user_is_logged_in()\n \t{\n\n \t\tif(!$this->session->userdata('is_logged_in'))\n \t\t{\n \t\t\treturn FALSE;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn TRUE;\n \t\t}\n\n \t}", "public function isLoggedIn() {\n\t\treturn $this->loggedIn;\n\t}", "public function is_facebook_user_logged_in(){\n\t\treturn $this->session->userdata('current_fb_user_id') != FALSE;\n\t}", "public function isLoggedIn() {\n\t\treturn $this->isLoggedin;\n\t}", "public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "public function is_logged_in(){\r\n\t\t\treturn $this->logged_in;\r\n\t\t}" ]
[ "0.8470185", "0.84182245", "0.8369745", "0.8337277", "0.8335983", "0.8335983", "0.831586", "0.8312709", "0.82547545", "0.8250588", "0.8223358", "0.8221309", "0.8179276", "0.81488985", "0.8136568", "0.81245434", "0.81224453", "0.81077695", "0.80807716", "0.8061728", "0.8052918", "0.80523556", "0.804899", "0.8047215", "0.804039", "0.802914", "0.80251914", "0.80237585", "0.8015526", "0.8010994", "0.8007308", "0.80013704", "0.7990849", "0.7987125", "0.7984289", "0.79821604", "0.7965747", "0.7961938", "0.7959008", "0.7945662", "0.7944575", "0.79436564", "0.7943066", "0.7940281", "0.7934275", "0.793229", "0.7929852", "0.79247856", "0.79247856", "0.79213387", "0.79146755", "0.7899226", "0.78929913", "0.78883386", "0.78871304", "0.78865165", "0.78851515", "0.7882895", "0.78796583", "0.7870154", "0.7868354", "0.7866754", "0.78642267", "0.7859855", "0.78567874", "0.78563917", "0.78562444", "0.7850801", "0.7849872", "0.7843307", "0.78424776", "0.7842346", "0.78342366", "0.78342366", "0.78329843", "0.78319466", "0.781427", "0.7813965", "0.7804553", "0.7799726", "0.77979726", "0.7795674", "0.7792261", "0.7790213", "0.7784324", "0.77799934", "0.77714175", "0.77713394", "0.7769664", "0.7761729", "0.77606386", "0.7760443", "0.7759676", "0.77596277", "0.77579576", "0.77518773", "0.775166", "0.7736551", "0.77345985", "0.77292114", "0.77273005" ]
0.0
-1
These functions were originally located in a MessageView class that now is deleted. Function for saving a message to the session.
public function save($string) { $_SESSION[Strings::$message] = $string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save()\n {\n /* BENCHMARK */ $this->benchmark->mark('func_save_start');\n\n $message=$this->get_input_vals();\n\n // create conversation or get\n \tif (0==$message['cid'] &&\n is_numeric($message['uid']))\n \t{\n $this->load->model('node_model');\n\n $other_user=$this->node_model->get_node($message['uid']);\n\n \t\t// create new conversation\n $users=array(\n 0=>$this->user,\n 1=>$other_user\n );\n \t\t\t$message['cid']=$this->conversation_model->create_conversation($users,$this->user);\n \t}\n\n // save the message\n \t$participants=$this->conversation_model->get_conversation_users($message['cid']);\n\n \t$this->message_model->save_message($this->user,$message['message'],$message['cid'],$participants);\n\n // get a new message panel for appending to the message stream\n $data['m']=$this->message_model->get_latest_message($this->user,array('conversation_id'=>$message['cid']));\n $data['user']=$this->user;\n \t$message_panel=$this->load->view(\"template/node/message\",$data,true);\n\n /* BENCHMARK */ $this->benchmark->mark('func_save_end');\n\n // success\n \texit(json_encode($message_panel));\n }", "function saveSession() {}", "protected function save(): void\n\t{\n\t\t$this->session->set($this->flashKey, $this->flashRecord);\n\t}", "function saveMsgForLater()\n{\n global $db, $errors, $successes;\n $query = $db->prepare(\"INSERT INTO messages(type, text, session_id) VALUES(:type, :text, :session_id)\");\n $params = [\n \"type\" => \"error\",\n \"text\" => \"\",\n \"session_id\" => session_id()\n ];\n\n if (count($errors) > 0) {\n foreach ($errors as $msg) {\n $params[\"text\"] = $msg;\n $query->execute($params);\n }\n }\n\n $params[\"type\"] = \"success\";\n if (count($successes) > 0) {\n foreach ($successes as $msg) {\n $params[\"text\"] = $msg;\n $query->execute($params);\n }\n }\n}", "public function save()\n {\n\n // Doesn't exist yet -- Insert it\n if( $this->id == -1 )\n {\n $sql = 'INSERT INTO messages (recipient, sender, annotation)\n VALUES (?, ?, ?);';\n $params = array( $this->recipient, $this->sender, $this->annotation );\n $query = $this->db->query( $sql, $params );\n }\n\n // Already exists -- Update it\n else \n {\n $sql = 'UPDATE messages\n SET recipient = ?, sender = ?, annotation = ?\n WHERE id = ?';\n $params = array( $this->id, $this->recipient->id, $this->sender->id, $this->annotation->id );\n $query = $this->db->query( $sql, $params );\n }\n }", "public function record($msg) {\r\n \r\n // Busca a sessão portoweb existente\r\n $sessao = new Zend_Session_Namespace('portoweb');\r\n \r\n // Grava a mensagem na sessao\r\n $sessao->mensagemSistema = $msg;\r\n \r\n }", "private function getSavedMessage() : string {\n\n\t\tif ($this->messageWasSetAndShouldNotBeRemovedDuringThisRequest) {\n\t\t\treturn $_SESSION[self::$messageSessionIndex];\n\t\t}\n\n\t\tif (isset($_SESSION[self::$messageSessionIndex])) {\n\t\t\t$message = $_SESSION[self::$messageSessionIndex];\n\t\t\tunset($_SESSION[self::$messageSessionIndex]);\n\t\t\treturn $message;\n\t\t}\n\t\treturn \"\";\n\t}", "function notificationMsg($type, $message){\n \\Session::put($type, $message);\n}", "protected function messagesToSession() {\n\t\t$_SESSION['messages'] = $this->messages;\n\t\t$_SESSION['fieldMessages'] = $this->fieldMessages;\n\t}", "function saveMessage($data) {\n \n if ($this->save($data)) {\n return true;\n } else {\n return false;\n }\n \n }", "public function actionSaveMessage(): Response\n {\n $this->requirePostRequest();\n $this->requireAcceptsJson();\n\n $message = new SystemMessage();\n $message->key = Craft::$app->getRequest()->getRequiredBodyParam('key');\n $message->subject = Craft::$app->getRequest()->getRequiredBodyParam('subject');\n $message->body = Craft::$app->getRequest()->getRequiredBodyParam('body');\n\n if (Craft::$app->getIsMultiSite()) {\n $language = Craft::$app->getRequest()->getBodyParam('language');\n } else {\n $language = Craft::$app->getSites()->getPrimarySite()->language;\n }\n\n if (Craft::$app->getSystemMessages()->saveMessage($message, $language)) {\n return $this->asJson(['success' => true]);\n }\n\n return $this->asErrorJson(Craft::t('app', 'There was a problem saving your message.'));\n }", "function HTTP_SessionServer_SaveHandler_write($id, $sess_data)\n{\n $GLOBALS['__session']->put($GLOBALS['__sessionName'], $sess_data);\n return true;\n}", "public function saveThis()\n {\n \t\tPersistentSession::getInstance()->saveOrUpdate($this);\n }", "function setMessage($message=''){\n $_SESSION['message'] = $message;\n }", "public function save()\n\t{\n\t\tif($this->beforeSave())\n\t\t{\n\t\t\tif(is_array($this->value))\n\t\t\t{\n\t\t\t\tforeach($this->value as $key=>$session)\n\t\t\t\t{\n\t\t\t\t\t$_SESSION[$key] = $session;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(is_string($this->value) and is_string($this->name))\n\t\t\t{\n\t\t\t\t$_SESSION[$this->name] = $this->value;\n\t\t\t}\n\t\t\t$this->afterSave();\n\t\t}\n\t}", "function saveMsgReceived($profile_id, $msg, $conv, $msg_id, $date, $template=0, $watson_context=null, $account){\n\t\tglobal $db;\n\t\t$date = gettype($date)=='string'?$date:date('Y-m-d G:i:s', $date);\n\t\t$statement = $db->prepare('INSERT INTO msg_conversation (by_bot, profile_id, conv_id, msg_id, template_msg, msg, watson_context, date, accountID) VALUES (0, :profile_id, :conv, :msg_id, :template, :msg, :watson_context, :date, :account)');\n\t\t$statement->execute(array(':profile_id' => $profile_id, ':conv' => $conv, ':msg_id' => $msg_id, ':template'=>$template, ':msg' => $msg, ':watson_context'=>$watson_context, ':date'=>$date, ':account'=>$account));\n\t}", "protected function _setSessionMessages($messages) {}", "public function saveSession(): void {\n\t\t$_SESSION[self::SESSION_NAME] = $this;\n\t}", "public function saveTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\t// Incoming\n\t\t$fields = Request::getArray('fields', array(), 'post');\n\n\t\t// Load the record\n\t\t$row = Message\\Component::blank()->set($fields);\n\n\t\t// Store content\n\t\tif (!$row->save())\n\t\t{\n\t\t\t$this->setError($row->getError(), 'error');\n\t\t\treturn $this->editTask($row);\n\t\t}\n\n\t\tNotify::success(Lang::txt('Message Action saved'));\n\n\t\t// Redirect\n\t\tif ($this->getTask() == 'apply')\n\t\t{\n\t\t\treturn $this->editTask($row);\n\t\t}\n\n\t\t// Redirect\n\t\t$this->cancelTask();\n\t}", "public function set_session_message($msg_content,\n $msg_mode='info',\n $dismiss=false)\n {\n if ( empty( $msg_content ) ) return;\n if ( empty( $msg_mode ) ) return;\n\n $current_msg_array= $this->get_msg_from_session();\n// rasolo_debug_to_file($current_msg_array,'$current_msg_array_before');\n $current_msg_array[]= [\n 'msg_txt' => $msg_content,\n 'msg_mode' => $msg_mode,\n 'is_dismiss' => $dismiss,\n ];\n $srl_current_msg_array=serialize( $current_msg_array);\n// $srl_current_msg_array=serialize( array());\n $_SESSION[ self::$SESSION_KEY ]= $srl_current_msg_array;\n// rasolo_debug_to_file($_SESSION,'$session_after_storing');\n// rasolo_debug_to_file(false,null);\n\n// global $messages;\n $this->messages[]=array(\n 'msg_txt'=>$msg_content,\n 'is_dismiss'=>$dismiss,\n 'msg_mode'=>$msg_mode\n );\n }", "public function save() {\r\n \t$this->mailBody=substr($this->mailBody,0,65536); // Limit for MySql Text field\r\n \treturn parent::save();\r\n }", "function saveToSession() {\n\t\t// Unset sessions since this info is elsewhere in the database\n\t\tunset($this->_questions);\n\t\ttx_wecassessment_sessiondata::storeSessionData($this, $this->getPID());\n\t}", "private function check_message(){\t\t\tif(isset($_SESSION['message'])){\r\n\t\t\t\t// Add it as an attribute and erase the stored version\r\n\t\t\t\t\r\n\t\t\t\t$this->message = $_SESSION['message'];\r\n\t\t\t\tunset($_SESSION['message']);\r\n\t\t\t}else{\r\n\t\t\t\t$this->message=\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "function setMessage($message, $status) {\n\t$_SESSION['message']['content'] = $message;\n\t$_SESSION['message']['status'] = $status;\n}", "public function saveMessage($user, $recepient, $message) {\n\t\t# Assume User is Logged in, $user -> User Object\n\t\t$this->_sql->raw_query('INSERT INTO epi_messages VALUES (NULL, '. $user->_id .', '. $recepient .', \"'. htmlentities($message) .'\") ');\n\t}", "public function store()\n {\n $message = new Message(Request::all());\n\n $message->creator_id = user()->id;\n $message->updater_id = user()->id;\n $message->createSlug();\n $message->setReceiverByName(Request::get('receiver_name'));\n\n $okay = $message->save();\n\n if ($okay) {\n // Reset the message counter cache of the receiving user:\n Cache::forget(User::CACHE_KEY_MESSAGES.$message->receiver_id);\n\n $this->alertFlash(trans('messages::message_sent'));\n return Redirect::to('messages/outbox');\n } else {\n return Redirect::to('messages/create')->withInput()->withErrors($message->getErrors());\n }\n }", "public function save(Message $message) : bool\n {\n return DB::table($this->TABLE)->insert(\n $this->dump($message)\n );\n }", "private function store()\n {\n $this->session->set('sergsxm_form_'.$this->formId, $this->parameters);\n }", "function add_message($msg, $msg_type = MSG_TYPE_SUCCESS) {\n if (!isset($_SESSION['message']))\n $_SESSION['message'] = [];\n $_SESSION['message'][] = ['type' => $msg_type, 'message' => htmlentities($msg, ENT_QUOTES)];\n}", "public function saveMessage($message, $level = MigrationBase::MESSAGE_ERROR) {\n $this->showMessage($message, $level);\n }", "public function msg_save($data) {\n $this->db->insert('chat_message', $data);\n return true;\n }", "private function check_message ()\n\t{\t\tif (isset($_SESSION['message']))\n\t\t{\n\t\t\t// Add it as an attribute and erase the stored version\n\t\t\t$this->message = $_SESSION['message'];\n\t\t\tunset($_SESSION['message']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->message = \"\";\n\t\t}\n\t}", "function saveMsgSent($profile_id, $msg, $conv, $msg_id, $date, $template=0, $watson_msg=0, $context=null, $account){\n\t\tglobal $db;\n\t\t$date = gettype($date)=='string'?$date:date('Y-m-d G:i:s', $date);\n\t\t$statement = $db->prepare('INSERT INTO msg_conversation (by_bot, profile_id, conv_id, msg_id, template_msg, msg, watson_msg, is_read, watson_context, date, accountID) VALUES (1, :profile_id, :conv, :msg_id, :template, :msg, :watson_msg, :read, :context, :date, :account)');\n\t\t$statement->execute(array(':profile_id' => $profile_id, ':conv' => $conv, ':msg_id' => $msg_id, ':template'=>$template, ':msg' => $msg, ':watson_msg'=>$watson_msg, ':read'=>true, ':context'=>$context, ':date'=>$date, ':account'=>$account));\n\t}", "protected function save() {\n $saved = parent::save();\n if ($saved !== false) {\n $message = \"This record has been saved.\";\n I2CE::getConfig()->setIfIsSet( $message, \"/modules/forms/page_feedback_messages/person_child_save\" );\n } else {\n $message = \"This record has not been saved.\";\n I2CE::getConfig()->setIfIsSet( $message, \"/modules/forms/page_feedback_messages/person_child_not_save\" ); \n }\n $this->userMessage($message);\n $this->setRedirect( \"view?id=\" . $this->getPrimary()->getParent() );\n return $saved;\n }", "public function save_message($conv_id, $msg_to, $msg_body)\n {\n $message = new Message;\n $message->conversation_id = $conv_id;\n $message->user_id_from = Auth::user()->id;\n $message->user_id_to = $msg_to;\n $message->text = $msg_body;\n $message->save();\n }", "public function message($msg=\"\"){// $msg its optional it may not be sent.\r\n\t\t\r\n\t\t if (!empty($msg)){\r\n\t\t\t \r\n\t\t\t // here \"set_message\"\r\n\t\t\t // make sure you understand why $this->message = $msg wouldn't work.//-> difference between global array SESSION and a object Session.\r\n\t\t\t $_SESSION['message']=$msg;\r\n\t\t\t \r\n\t\t }else{\r\n\t\t\t // here \"get_message\"\r\n\t\t\t return $this->message;\r\n\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public static function sessionWriteHandler();", "public function save($message = null)\n {\n return $this->message($message ?: $this->getMessage('success'));\n }", "public function store() {\n\t\t// test the DB-Connection\n\t\ttry {\n\t $pdo = DB::connection('mysql')->getPdo();\n\t }\n\t catch(PDOException $exception) {\n\t return Response::make('Database error! ' . $exception->getCode() . ' - ' . $exception->getMessage());\n\t }\n\n\t\t$message = Message::firstOrCreate(array(\n\t\t\t'fb_id' => Input::get('message.fb_id'),\n\t\t\t'message_type' => Input::get('message.message_type'),\n\t\t\t'to_user_id' => Input::get('message.to_user_id')\n\t\t));\n\n\t\t$message->from_user_id = Input::get('message.from_user_id');\n\t\t$message->subject = Input::get('message.subject');\n\t\t$message->text = Input::get('message.text');\n\n\t\t$message->save();\n\n\t return '{ \"message\":'.$message.' }';\n\t}", "public function save()\n {\n if (empty($this->userId) || ! $this->createdAt instanceof \\DateTime) {\n throw new \\Exception('Message cannot be saved, parameters missing');\n }\n\n $params = [\n ':message' => $this->message,\n ':createdAt' => $this->createdAt->format('Y-m-d H:i:s'),\n ':userId' => $this->userId\n ];\n\n if (empty($this->id)) {\n $sql = 'INSERT INTO messages (message, createdAt, userId) VALUES (:message, :createdAt, :userId)';\n } else {\n $sql = 'UPDATE messages set message = :message, createdAt = :createdAt, userId = :userId WHERE id = :id';\n $params[':id'] = $this->id;\n }\n $this->saveModel($sql, $params);\n return $this;\n }", "private function saveSession() {\n $connection = \\Drupal::database();\n $select = $connection->select('conreg_payment_sessions', 'S');\n $select->addField('S', 'paysessionid');\n $select->condition('S.payid', $this->payId);\n $select->condition('S.session_id', $this->sessionId);\n // We only want to save if not already on table.\n if (empty($select->execute()->fetchField())) {\n $connection->insert('conreg_payment_sessions')->fields(['payid' => $this->payId, 'session_id' => $this->sessionId])->execute();\n }\n}", "protected function _write($message)\n {\n $data = array();\n foreach ($this->_columnMap as $messageField => $modelField) {\n $data[$modelField] = $message[$messageField];\n }\n $model = new $this->_modelName();\n $model->fromArray($data);\n $model->save();\n }", "public function storeSession() {}", "function setSessionMessage($tag_id, $message) {\n\t$_SESSION['message'] = array('id' => $tag_id, 'message' => $message);\n}", "public function add_message()\n {\n $result = $this->message->verify_message();\n if($result != NULL)\n {\n $this->session->set_flashdata('errors', $result);\n redirect('/messages/'.$this->session->userdata(\"selected_user_to_view\").'');\n }\n else\n {\n $this->message->add_message($this->input->post(NULL, TRUE));\n redirect('/messages/'.$this->session->userdata(\"selected_user_to_view\").'');\n }\n }", "function StoreMessage($To, $CC, $Subject, $message, $MFrom, $wid) {\n\n $midq = \"SELECT mid FROM Messages ORDER BY mid\";\n\t\t$wfhist = $this->query($midq);\n\t\tforeach($wfhist as $row){\n $mid = $row['mid'] + 1;\n }\n\n $rid = $_SESSION['rid'];\n\t\t$dateSent = date('F j, Y');\n\t\t$timeSent = date('Hi');\n\t\t$timeZone = date('e');\n\t\t$MStatus = \"Unread\";\n\t\t$OpenLinkSrc = \"https://\".$_SESSION['domain'].\"/showMessage.php?mid=\".$mid.\"\";\n\n $newmessage = htmlentities($message);\n $newsubject = htmlentities($Subject);\n\t\t//echo \"New Message: \".$newmessage.\"\";\n\t\t//Insert into Messages\n $messageq = \"INSERT INTO Messages (mid,MTo,CC,Subject,Message,MFrom,rid,wid,dateSent,timeSent,timeZone,MStatus,OpenLink) VALUES ($mid,'$To','$CC','$newsubject','$newmessage','$MFrom','$rid','$wid','$dateSent','$timeSent','$timeZone','$MStatus','$OpenLinkSrc')\";\n\t\t//$messageq = \"INSERT INTO Messages (mid,MTo,CC,Subject,Message,MFrom,rid,wid) VALUES ($mid,'$To','$CC','$newsubject','$newmessage','$MFrom','$rid','$wid')\";\n $InsertMessageHistory = $this->query($messageq);\n\t\t//$InsertMessageHistory = sqlsrv_query($conn, $messageq);\n }", "function storeSessionData($sessionData, $pid) {\n\t\t$GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_wecassessment_pi1:' . $pid, $sessionData);\n\t\t$GLOBALS['TSFE']->fe_user->sesData_change = true;\n\t\t$GLOBALS['TSFE']->fe_user->storeSessionData();\t\t\n\t}", "protected function save()\n\t{\n\t\t\\XF::app()->session()->set('xenforoUpgradeService', [\n\t\t\t'cookieJar' => $this->getCookies(),\n\t\t\t'email' => $this->email,\n\t\t\t'password' => $this->password,\n\t\t\t'availableProducts' => $this->availableProducts,\n\t\t\t'availableVersions' => $this->availableVersions,\n\t\t\t'selectedLicense' => $this->selectedLicense,\n\t\t\t'selectedProduct' => $this->selectedProduct,\n\t\t\t'selectedVersion' => $this->selectedVersion\n\t\t]);\n\t}", "protected function saveMessage($message) {\n $path = Yii::getAlias($this->fileTransportPath);\n\n\n $dir = Yii::getAlias('@app/runtime/smser');\n\n try {\n if (!FileHelper::createDirectory($dir)) {\n throw new \\Exception('无法创建目录:' . $dir);\n }\n\n $filename = $dir . DIRECTORY_SEPARATOR . time() . mt_rand(1000, 9999) . '.msg';\n if (!touch($filename)) {\n throw new \\Exception('无法创建文件:' . $filename);\n }\n\n if (!file_put_contents($filename, \"TO - $mobile\" . PHP_EOL . \"CONTENT - $content\")) {\n throw new \\Exception('短信发送失败!');\n }\n\n return true;\n } catch (\\Exception $e) {\n $this->message = $e->getMessage();\n return false;\n }\n\n\n if (!is_dir($path)) {\n mkdir($path, 0777, true);\n }\n if ($this->fileTransportCallback !== null) {\n $file = $path . '/' . call_user_func($this->fileTransportCallback, $this, $message);\n } else {\n $file = $path . '/' . $this->generateMessageFileName();\n }\n file_put_contents($file, $message->toString());\n\n return true;\n }", "public function sendMessage()\n {\n $userId = auth()->user()->id;\n\n // Save the message\n Message::create([\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n 'message' => $this->message,\n ]);\n\n // Remove the value of the message after saving\n $this->message = \"\";\n\n // Prompt the server that we sent a message\n $this->dispatchBrowserEvent('chat-send-message', [\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n ]);\n }", "private function save_message( $params ) {\n\n // Setup the author, slug, and title for the post\n $author_id = get_current_user_id();\n if ( $author_id == 0 || !current_user_can( 'edit_posts' ) ) {\n return false;\n } // Not logged in\n\n $title = $this->create_title( $params['operation_message'] );\n\n $args = array(\n 'comment_status' => 'closed',\n 'ping_status' => 'closed',\n 'post_author' => $author_id,\n 'post_name' => sanitize_title( $title ),\n 'post_title' => $title,\n 'post_status' => 'publish',\n 'post_type' => 'operation_message',\n );\n\n if ( !empty( $params['operation_message']['om_publish_at_date'] ) ) {\n\n $string_time = $params['operation_message']['om_publish_at_date'] . ' ' . $params['operation_message']['om_publish_at_hour'] . ':' . $params['operation_message']['om_publish_at_minute'];\n $publish_time = strtotime( $string_time );\n $publish_time = date_i18n( 'Y-m-d H:i:s', $publish_time );\n $publish_time_gmt = date_i18n( 'Y-m-d H:i:s', strtotime( $string_time . ' -1 hours' ) );\n\n $args['post_date'] = $publish_time;\n $args['post_date_gmt'] = $publish_time_gmt;\n\n }\n\n if ( empty( $params['operation_message']['om_archive_at_date'] ) ) {\n\n $tomorrow = date_i18n( 'Y-m-d', strtotime( '+1 days' ) );\n\n }\n\n if ( empty( $params['operation_message']['om_custom_municipality'] ) ) {\n\n if ( in_array( 'operation_message', SK_Municipality_Adaptation_Settings::valid_post_types() ) ) {\n\n $municipality = sanitize_title( $params['operation_message']['om_municipality'] );\n $municipality = strtolower( $municipality );\n\n }\n\n }\n\n // If the page doesn't already exist, then create it\n // Set the post ID so that we know the post was created successfully\n $post_id = wp_insert_post(\n $args,\n true// return error on failure\n );\n\n if ( !is_wp_error( $post_id ) ) {\n\n if ( count( $params ) > 0 && is_array( $params ) ) {\n\n foreach ( $params['operation_message'] as $key => $value ) {\n\n update_post_meta( $post_id, $key, $value );\n if ( isset( $tomorrow ) ) {\n\n update_post_meta( $post_id, 'om_archive_at_date', $tomorrow );\n update_post_meta( $post_id, 'om_archive_at_hour', '16' );\n update_post_meta( $post_id, 'om_archive_at_minute', '00' );\n\n }\n\n if ( isset( $municipality ) ) {\n\n update_post_meta( $post_id, 'municipality_adaptation', $municipality );\n\n }\n\n }\n\n return true;\n\n }\n\n }\n\n return false;\n\n }", "public function save()\n {\n // Session should be started\n if ($this->_pStorage->status() === PHP_SESSION_ACTIVE) {\n // Get and save current UID\n $this->_pStorage->setOffset(self::UID, $this->_iCRC, APPLICATION_NAME);\n } else {\n throw new \\Foundation\\Exception\\BadMethodCallException('The session was not successfully started.');\n }\n }", "function set_message($message){\r\n if(!empty($message)){\r\n $_SESSION['message'] = $message;\r\n }else{\r\n $message = \"\";\r\n }\r\n}", "public function writeMessage ()\n {\n $authObject = new Authenticate();\n $authObject->validateWriteMessage($_GET[\"controller\"]);\n \n $body = $_POST[\"body\"];\n $subject = $_POST[\"subject\"];\n \n $sentto = $_POST[\"sentto\"];\n \n $this->createUser();\n \n if (($this->_objUser->messageSend($body, $subject, $sentto)) == false) {\n $this->setCustomMessage(\"ErrorMessage\", \"Problem in sending message\");\n } else {\n $this->setCustomMessage(\"SuccessMessage\", \"Message sent successfully\");\n }\n }", "function getMessage()\r\n{\r\n $message = $_SESSION['message'];\r\n return $message;\r\n}", "private function saveSourceMessage()\n\t{\n\t\t$sourceMessage = new SourceMessage();\n\t\t$sourceMessage->category = $this->category;\n\t\t$sourceMessage->message = $this->message;\n\t\t\n\t\tif ($sourceMessage->save()){\n\t\t\t$this->id = $sourceMessage->id;\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "function set_message($type, $message)\n{\n $_SESSION[$type] = $message;\n $_SESSION[$type . '_time'] = time();\n}", "public function storeSessionData() {}", "public function storeSessionData() {}", "function save()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\t$post\t= JRequest::get('post');\n\t\tif (!($user->authorise('core.create', 'com_gmapfp') and empty($post['id'])) and !($user->authorise('core.edit', 'com_gmapfp') and !empty($post['id'])))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_CREATE_RECORD_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\t$returnid=$model->store($post);\n\t\t\tif ($returnid>0) {\n\t\t\t\t$msg = JText::_( 'GMAPFP_SAVED' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMAPFP_SAVED_ERROR' );\n\t\t\t}\n\t\t}\n\n\t\t$link = 'index.php?option=com_gmapfp&controller=gmapfp&task=view';\n\t\t// Check the table in so it can be edited.... we are done with it anyway\n\t\t$this->setRedirect($link, $msg);\n\t}", "function set_message_key($key, $val)\n{\n if(!isset($_SESSION[$key]))\n {\n $_SESSION[$key] = $val;\n }\n}", "function flash_message($type, $message) {\n $_SESSION['message'] = array('type' => $type, 'message' => $message);\n if (isset($_SESSION['message'])) {\n\t\tprint_r( $_SESSION['message']);\n\t}\n}", "protected function _saveToSession()\n {\n $this->sessionData['_options'] = $this->_options;\n $this->sessionData['_selectedIndex'] = $this->_selectedIndex;\n $this->sessionData['safeMode'] = $this->safeMode;\n }", "public function store()\n\t{\n\t\tif (!$this->validate()) {\n\t\t\treturn $this->getRedirect()\n\t\t\t->withErrors($this->validator)\n\t\t\t->withInput();\n\t\t} else {\n\t\t\t// store\n\t\t\t$message = new Message;\n\t\t\t$message->name = \\Input::get('name');\n\t\t\t$message->project_id = \\Input::get('project_id');\n\t\t\t$message->user_id = \\Input::get('user_id');\n\t\t\t$message->save();\n\n\t\t\t// redirect\n\t\t\t\\Flash::push('success', 'Successfully created message!');\n\n\t\t\treturn $this->getRedirect();\n\t\t}\n\t}", "public function store()\n\t{\n\t\t$rules = array(\n\t\t 'message_id' => '', \n\t\t 'message' \t\t=> 'alpha_dash',\n\t\t);\n\n\t\t$messageId = Input::get('message_id');\n\t\t$message_text = Input::get('message');\n\n\t\t$validator = Validator::make(Input::all(), $rules);\n\t\t\n\t\tif ($validator->fails()) {\n\n\t\t return Redirect::to('message')\n\t\t ->withErrors($validator) \n\t\t ->withInput(); \n\t\t} else {\n\n\t\t\t$message = new Messagedetail;\n\t\t\t$message->message_text = $message_text;\n\t\t\t$message->message_id = $messageId;\n\t\t\t$message->user_id = Auth::user()->id;\n\t\t\t\n\n\t\t\t$result = $message->save();\n\n\t\t\tif ($result) {\n\t\t\t\treturn Redirect::to('message')->with('result', array('status' => 'alert-success', 'message' => 'Input success' ));\n\t\t\t} else {\n\t\t\t\treturn Redirect::to('message')->withInput(); \n\t\t\t}\n\t\t}\n\t}", "public function saveToSession()\n {\n $_SESSION[PMF_SESSION_CURRENT_USER] = $this->getUserId();\n }", "function flash($message, $level = 'info')\n{\n session()->put('flash_message', $message);\n session()->put('flash_message_level', $level);\n}", "function set_message($msg)\n{\n if (!empty($msg)) {\n $_SESSION['message'] = $msg;\n } else {\n $msg = \"\";\n }\n}", "function saveDataToSession(){\n\t\t$data = $this->getData();\n\t\tunset($data[\"AccountInfo\"]);\n\t\tunset($data[\"LoginDetails\"]);\n\t\tunset($data[\"LoggedInAsNote\"]);\n\t\tunset($data[\"PasswordCheck1\"]);\n\t\tunset($data[\"PasswordCheck2\"]);\n\t\tSession::set(\"FormInfo.{$this->FormName()}.data\", $data);\n\t}", "function savepage()\r\n\t{\r\n\t\t$model\t\t=& $this->getModel( 'Formsession' );\r\n\t\t$model->savePage();\r\n\t}", "public function savesubmit(){\n\t\t$this->autoRender = false;\n\t\t if($this->request->is('POST')){ \n\t\t\t //\n\t\t \n\t\t\t$this->Session->write('project.aftersave', 'sent');\n//\t\t\t$this->Session->write('brief.type', $this->name);\n\t\t\t$this->Session->write('brief.type', $this->params['controller']);\n\t\t\t$this->Session->write('brief.id', $this->Email->id);\n\t\t\t \n\t\t\t \n\t\t\t//echo 'aftersave';\t\n\t\t\t //$this->redirect(array('controller'=>'projects', 'action' => 'view', $this->Session->read('project.id') ));\n\n\t\t }\t\t\n\t}", "public function save()\n {\n Session::clear(\"Checkout.PostageID\");\n \n // Extend our save operation\n $this->extend(\"onBeforeSave\");\n\n // Save cart items\n Session::set(\n \"Checkout.ShoppingCart.Items\",\n serialize($this->items)\n );\n\n // Save cart discounts\n Session::set(\n \"Checkout.ShoppingCart.Discount\",\n serialize($this->discount)\n );\n\n // Update available postage\n if ($data = Session::get(\"Form.Form_PostageForm.data\")) {\n $country = $data[\"Country\"];\n $code = $data[\"ZipCode\"];\n $this->setAvailablePostage($country, $code);\n }\n }", "function saveToSession($data, $name = '') {\n\t\tif(!$name) $name = $this->owner->FormName();\n\n\t\t\\Session::set(\"FormInfo.{$name}.data\", $data);\n\t}", "function save_message($objet) {\n\t\t$date = date(\"Y-m-d H:i:s\");\n\t\t\n\t\t$sql = \"INSERT INTO \n\t\t\t\t\tadmon_messages(request_id, user_from, message, date)\n\t\t\t\tVALUES\n\t\t\t\t\t('\".$objet['request_id'].\"', '\".$objet['from'].\"', '\".$objet['message'].\"', '\".$date.\"')\";\n\t\t$result = $this -> query($sql);\n\t\t\n\t\treturn $result;\n\t}", "public function saveDataToSession()\n {\n $data = $this->getData();\n $data = Sanitizer::remove_from_data_array($data);\n $this->setSessionData($data);\n }", "abstract public function persistSessionToken() ;", "public function save()\n {\n if($this->id != -1)\n {\n $this->update_subject();\n }\n else\n {\n $this->insert_subject();\n }\n }", "public function save()\r\n\t{\r\n\t\t// Check for request forgeries\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\r\n\t\t$post\t= JRequest::get('post');\r\n\t\t$cid \t= JRequest::getVar( 'cid', array(), 'post', 'array' );\r\n\t\tJArrayHelper::toInteger($cid);\r\n\t\t\r\n\t\t$model = $this->getModel('languages');\r\n\t\t\r\n\t\tif ($model->store($cid, $post)) {\r\n\t\t\t$msg = JText::_( 'LANGUAGES_SAVED' );\r\n\t\t} else {\r\n\t\t\t$msg = JText::_( 'Error Saving Languages:' .$model->getErrors());\r\n\t\t}\r\n\r\n\t\t// Check the table in so it can be edited.... we are done with it anyway\r\n\t\t$link = 'index.php?option=com_joomfish';\r\n\t\t$this->setRedirect($link, $msg);\r\n\t}", "public function save($card, $message){\n $this->entityManager->persist($card);\n $this->entityManager->flush();\n if($message){\n $this->session->getFlashBag()->add('success', 'The card has been updated');\n }\n }", "function sess_write($key, $value) {\n\tif (empty($_COOKIE[session_name()]) && empty($value))\n\t{\n\t\treturn TRUE;\n\t}\n\t\n\t$Controller = getInstance()->Controller;\n\t\n\t$Session = new AppModel('Session');\n\t\n\t$result = $Session->findById($key);\n\t\n\t$user_id = 0;\n\t\n\tif (isset($Controller->User->user['id'])) \n\t{\n\t\t$user_id = $Controller->User->user['id'];\n\t}\n\t\n\tif (isset($result['Session']['id'])) \n\t{\n\t\t$Session->save(array('hostname'=>$_SERVER['REMOTE_ADDR'],'session'=>$value),array('id'=>$key));\n\t}\n\telse \n\t{\n\t $Session->create(array('id'=>$key,'hostname'=>$_SERVER['REMOTE_ADDR'],'session'=>$value));\n\t}\n\t\n\treturn TRUE;\n}", "public function actionWriteMessage() {\n\t\ttry {\n\t\t\treturn $this->getService('SupportMessage')->add();\n\t\t} catch (Exception $e) {\n\t\t\treturn $this->sendError('You reached some error');\n\t\t}\n\t}", "function edit_message() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$postid = make_safe(\"int\",$_POST['post_id']);\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$posts->get_post($postid)) {\n\t\tfatal_error(\"Invalid post specified. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->edit_post($postid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"showthread.php?t=$threadid\");\t\t\n}", "public function isSessionMessage() {}", "public function store()\n {\n if(Request::ajax()) {\n $message = new Message();\n $message->name = Input::get('name');\n $message->message = Input::get('message');\n $message->save(); \n\n }else{\n return \"You don't have permission\";\n }\n }", "public function Save()\r\n\t\t{\r\n\t\t\t$db = new Db();\r\n\t\t\t$sql = \"INSERT INTO tbl_users (naam, voornaam, email, wachtwoord)\r\n\t\t\tVALUES ('\".$db->conn->real_escape_string($this->m_sName).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_sFirstname).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_sEmail).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_sPassword).\"'\r\n\t\t\t)\";\r\n\t\t\t$db->conn->query($sql);\r\n\r\n\t\t\t//user_id van de geregistreerde gebruiker in de session variabele opslaan\r\n\t\t\t$user_id = $db->conn->insert_id;\r\n\t\t\t$_SESSION['user_id'] = $user_id;\r\n\t\t}", "public function addMsg() {\n //get msg and id \n $arrData[\"message\"] = $this->input->post(\"msg\");\n $arrData[\"user_id\"] = $this->session->userdata('user_id');\n //add msg to chat database \n $this->user_model->insertMsg($arrData);\n\n redirect('login/home', false);\n }", "function flash($message)\n{\n session()->flash('message', $message);\n}", "public\n function actionSave()\n {\n $model = new Message();\n if ($model->load(Yii::$app->request->post())) {\n // получаем изображение для последующего сохранения\n $file = UploadedFile::getInstance($model, 'link');\n if ($file && $file->tempName) {\n $fileName = self::_saveFile($model, $file);\n if ($fileName) {\n $model->link = $fileName;\n }\n }\n if ($model->save(false)) {\n return $this->redirect('index');\n }\n }\n return $this->redirect('index');\n }", "function save_messages( $messages ) {\n\t\tglobal $post, $post_ID;\n\n\t\t$messages['bbp_notice'] = array(\n\t\t\t1 => __( 'Notice updated.', 'bbpress-notices' ),\n\t\t\t4 => __( 'Notice updated.', 'bbpress-notices' ),\n\t\t\t6 => __( 'Notice published.', 'bbpress-notices' ),\n\t\t\t7 => __( 'Notice saved.', 'bbpress-notices' ),\n\t\t\t8 => __( 'Notice submitted.', 'bbpress-notices' )\n\t\t);\n\n\t\treturn $messages;\n\t}", "public function store(Request $request)\n {\n $request->validate([\n 'message' => 'required',\n 'message_id' => 'required'\n ]);\n\n // Temporary logic\n $user = Auth::user();\n $message = new Message;\n \n $message->message = $request->message;\n $message->user_id = Auth::user()->id;\n if($user->hasRole('admin') || $user->hasRole('user') || $user->hasRole('ap')){\n $message->reply_to = $request->message_id;\n }\n \n $last_message = Message::where('last_message_for', $request->message_id)->first();\n if($last_message){\n $last_message->last_message_for = null;\n $last_message->save();\n }\n\n if($message->save()){\n if(!$last_message){\n Message::where('id', $message->id)->update(['last_message_for' => $request->message_id]);\n }\n\n Message::where('id', $message->id)->update(['last_message_for' => $request->message_id]);\n $new_message = Message::with('user', 'recipient')->where('id', $message->id)->get();\n broadcast(new MessageSent($user, $new_message))->toOthers();\n return $new_message;\n }\n }", "function setFlash($type, $message)\n{\n $_SESSION['message'] = [$type, $message];\n}", "public function save() {\r\n if (!isset($this->id)) {\r\n global $db;\r\n \r\n $query = \"INSERT INTO `notification` (Message, ObjectReference, ObjectId, TimeStamp) VALUES (?, ?, ?, ?)\";\r\n \r\n $statement = $db->prepare($query);\r\n \r\n if ($statement == FALSE) {\r\n display_db_error($db->error);\r\n }\r\n \r\n $statement->bind_param(\"ssis\", $this->message, $this->objectReference, $this->objectId, $this->timeStamp);\r\n \r\n $success = $statement->execute();\r\n \r\n if ($success) {\r\n $notificationId = $db->insert_id;\r\n $statement->close();\r\n return $notificationId;\r\n } else {\r\n display_db_error($db->error);\r\n }\r\n } else {\r\n global $db;\r\n \r\n $query = \"UPDATE `notification` SET Message = ?, ObjectReference = ?, ObjectId = ?, TimeStamp = ? WHERE Notification_id = ?\";\r\n \r\n $statement = $db->prepare($query);\r\n \r\n if ($statement == FALSE) {\r\n display_db_error($db->error);\r\n }\r\n \r\n $statement->bind_param(\"ssisi\", $this->message, $this->objectReference, $this->objectId, $this->timeStamp, $this->id);\r\n \r\n $success = $statement->execute();\r\n \r\n if ($success) {\r\n $statement->close();\r\n } else {\r\n display_db_error($db->error);\r\n }\r\n }\r\n }", "function save()\n\t{\n\t\t$this->store() ;\n\t\t$link = 'index.php?option=com_arts_curriculum';\n\t\t$this->setRedirect( $link, $this->msg);\n\t}", "protected function flash()\n\t{\n\t\t$this->session->flash($this->sessionKey, $this->bag->toJson());\n\t}", "function SaveSession() {\n $q = \"INSERT INTO `\" . TblSysSession . \"` SET\n `user_type`='\" . $this->user_type . \"',\n `user_id`='\" . $this->user_id . \"',\n `login`='\" . $this->login . \"',\n `email`='\" . $this->email . \"',\n `time`='\" . $this->logintime . \"',\n `session_id`='\" . $this->session_id . \"',\n `ip`='\" . $this->ip . \"',\n `ip2`='\" . $this->ip2 . \"',\n `user_hash`='\" . $this->user_hash . \"'\n \";\n $this->db->db_Query($q);\n //echo '<br> $q='.$q.' $this->db->result='.$this->db->result;\n if (!$this->db->result)\n return false;\n return true;\n }", "public function sendMessage(){\n //Gets the recievers id\n $userId = $_POST[\"userIdForMessage\"];\n //gets the message text\n $messageText = $_POST[\"messageText\"];\n //Makes sure not of the above variables are empty\n if(empty($userId) == false && empty($messageText) == false){\n //Gets the other users name\n $usersName = $this->individualGroupModel->getTheUsersName($userId); \n //Checks if the users have already been connected\n $groupUserToUserConnection = $this->individualGroupModel->checkGroupMessageConnection($userId); \n\n //If the size of groupuser to user connection is 0 means the users have never messaged before\n if(sizeof($groupUserToUserConnection) == 0){\n $groupInfo = $this->individualGroupModel->getGroupInformation($_SESSION['current_group']); \n $this->individualGroupModel->createGroupMessageConnectionRecord($userId, $usersName, $groupInfo);\n }\n //Insert message\n $this->individualGroupModel->sendMessageFromGroup($userId, $messageText, $usersName); \n //redirect to the group page\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }else{\n //redirect\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }\n }", "function doSavePlayer() {\n\t\tif(!LibTools::isAdmin()) {\n\t\t\treturn;\n\t\t}\n\t\t$savePlayer = $_POST['savePlayer'];\n\t\t$pseudo = $savePlayer[\"pseudo\"];\n\t\t$prenom = $savePlayer[\"prenom\"];\n\t\t$nom \t= $savePlayer[\"nom\"];\n\t\t$mail\t= $savePlayer[\"mail\"];\n\t\t$tel\t= $savePlayer[\"tel\"];\n\t\t\n\t\tSs::get()->dao->playerDao->save($this->id, $pseudo, $prenom, $nom, $mail, $tel);\n\t}", "public function addMessageAction(){\n if (!$this->_validateFormKey()) return $this->_redirect('inchoo/tickets');\n\n if ($this->getRequest()->isPost()) {\n $ticketId = $this->getRequest()->getPost('ticket_id');\n $message = Mage::getModel('inchoo_tickets/message');\n\n $message->setTicket_id($ticketId)\n ->setMessage($this->getRequest()->getPost('message'))\n ->setAuthor(true); // true=customer\n\n if ($message->validateMessage()) $message->save();\n }\n\n $this->_redirect(\"inchoo/tickets/view/ticket/$ticketId\");\n }", "public\tfunction\tsave()\n\t\t{\n\t\t}", "public function store()\n\t{\n $response['success']=true;\n $message= New Message;\n $message->text= Input::get('text');\n $message->ticket_id= Input::get('ticket_id');\n $message->user_id= 15;\n $message->save();\n $response['message']=array('text'=>$message->text,'name'=>$message->user->profile->name,'created'=>$message->created_at);\n return $response;\n\t}" ]
[ "0.7069534", "0.68828976", "0.65439385", "0.65314984", "0.6490935", "0.6409848", "0.63511276", "0.6346633", "0.6311775", "0.620563", "0.61426276", "0.612741", "0.6115879", "0.6071533", "0.6045948", "0.5988397", "0.59733033", "0.5972189", "0.59654236", "0.59636277", "0.59286827", "0.592794", "0.59255433", "0.5911729", "0.59057015", "0.59005785", "0.5869695", "0.5852447", "0.58490944", "0.5824602", "0.5822614", "0.58139515", "0.58066136", "0.5801445", "0.5794479", "0.57919025", "0.57838476", "0.5780199", "0.57521087", "0.5749007", "0.57483923", "0.5738561", "0.5734843", "0.5733032", "0.5727226", "0.57245487", "0.57185125", "0.5715854", "0.5713126", "0.5710739", "0.5700249", "0.5685912", "0.56754816", "0.5659511", "0.56570995", "0.5642956", "0.5634599", "0.5631281", "0.5630225", "0.5627937", "0.5617373", "0.560604", "0.5592382", "0.55889654", "0.5588864", "0.5586327", "0.5583724", "0.5570539", "0.5561935", "0.55612135", "0.5537436", "0.5531027", "0.5530693", "0.5526739", "0.5526377", "0.5526344", "0.5512204", "0.5507916", "0.5498189", "0.5481731", "0.54801345", "0.5479893", "0.5475999", "0.54751533", "0.5471271", "0.54657674", "0.54644907", "0.5463801", "0.5462135", "0.54568833", "0.54522854", "0.5451944", "0.5447512", "0.5438774", "0.5433311", "0.5431325", "0.54251105", "0.54201055", "0.54194033", "0.5416658" ]
0.62418205
9
Function for retrieving the message, present it, and delete it.
public function load() { if(isset($_SESSION[Strings::$message])) { $ret = $_SESSION[Strings::$message]; } else { $ret = Strings::$emptyString; } $_SESSION[Strings::$message] = Strings::$emptyString; return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messageDelete(Message $message);", "public function delete() {\n\t\t$message = $this->discussion->message(['id' => $this->request->id]);\n\n\t\tif ($this->discussion->pull_message($message)) {\n\t\t\treturn $this->render(['head' => true, 'status' => 204]);\n\t\t}\n\n\t\treturn $this->render(['head' => true, 'status' => 400]);\n\t}", "public function action_delete() {\n\t\t$id = $this->request->param('id');\n\t\tif($id) {\n\t\t\t$message = ORM::factory('Message', $id);\n\t\t\tif($message->loaded()) {\n\t\t\t\ttry {\n\t\t\t\t\t$message->delete();\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$this->_set_msg('Could not delete message because another user is tied to it', 'error');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->redirect($this->request->referrer());\n\t\t}\n\t\t$this->_set_content('message_delete');\n\t}", "abstract public function deleteMessage($messageNo, $mailboxPath=null);", "public function action_Delete_Message()\n\t{\n\t\t// load item\n\t\t$item = ORM::factory('Ticket_Message', $this->request->param('id'));\n\n\t\tif ( ! $item->loaded())\n\t\t\t$this->not_found('Could not find ticket message to delete. Already deleted maybe?');\n\n\t\t$ticket_id = $item->ticket->id;\n\n\t\t$item->deleted_at = date('Y-m-d H:i:s');\n\t\t$item->save();\n\n\t\tHTTP::redirect('Ticket/Detail/'.$ticket_id);\n\t}", "public function delete()\n {\n parent::delete();\n $receiptHandle = $this->job->getReceiptHandle();\n $this->mns->deleteMessage($receiptHandle);\n }", "function delete($id) {\n $this->message = ORM::factory('message', $id);\n if ( ! $this->message->loaded)\n Event::run('system.404');\n if ( ! $this->message->is_allowed($this->user->id))\n Event::run('system.403');\n \n $this->message->delete($this->user->id);\n url::redirect('messages');\n }", "public function delete()\n {\n parent::delete();\n $this->azure->deleteMessage($this->job);\n }", "public function get_and_delete_message($msg_type=false)\n {\n $response=$this->get_message($msg_type);\n $this->delete_messages();\n return $response;\n }", "function qa_pm_delete($userid, $handle, $cookieid, $message, $box)\n{\n\trequire_once QA_INCLUDE_DIR . 'db/messages.php';\n\n\tqa_db_message_user_hide($message['messageid'], $box);\n\tqa_db_message_delete($message['messageid'], false);\n}", "public function deleteMessage(Zend_Queue_Message $message)\n {\n \treturn $this->_pheanstalk->delete($message->handle);\n }", "public function deleteMessage(){\n\t\t\n\t\tuser_login_required();\n\n\t\t$messageID = postInt(\"messageID\");\n\n\t\t//Check whether the user own or not conversation message\n\t\tif(!components()->conversations->isOwnerMessage(userID, $messageID))\n\t\t\tRest_fatal_error(401, \"You do not own this conversation message!\");\n\t\t\n\t\tif(!components()->conversations->deleteConversationMessage($messageID))\n\t\t\tRest_fatal_error(500, \"Could not delete conversation message!\");\n\t\t\n\t\treturn array(\"success\" => \"Conversation message has been successfully deleted!\");\n\t}", "public function delete($message_id){\n $message = Message::where('id', '=', $message_id)->firstOrFail();\n // Remove from database\n $message->delete();\n\n Session::flash('success', 'You have correctly removed that message' );\n return back();\n }", "public function delete()\n {\n parent::delete();\n\n $this->sqs->deleteMessage([\n 'QueueUrl' => $this->queue, 'ReceiptHandle' => $this->job->getReceiptHandle(),\n ]);\n }", "public static function removeMessage() {\n $con = pg_connect(\"host=\".CON_HOST.\" dbname=\".CON_DBNAME.\" user=\".CON_USER.\" password=\".CON_PASSWORD.\"\")\n or die (\"Could not connect to server.\");\n\n if($_REQUEST['id'] > 1) {\n $query = \"UPDATE message SET removed = true WHERE message_id = \". $_REQUEST['id'];\n }\n\n pg_query($con, $query) or die(\"Cannot execute the query.\");\n return true;\n }", "public function getEventDel($id , $message);", "function private_messages_delete( int $message_id ) : mixed\n{\n // Require users to be logged in to run this action\n user_restrict_to_users();\n\n // Sanitize the data\n $user_id = sanitize(user_get_id(), 'int', 1);\n $message_id = sanitize($message_id, 'int', 0);\n $timestamp = time();\n\n // Error: Message ID not found\n if(!database_row_exists('users_private_messages', $message_id))\n return __('users_message_not_found');\n\n // Fetch some data regarding the message\n $dmessage = mysqli_fetch_array(query(\" SELECT users_private_messages.deleted_by_recipient AS 'pm_deleted_r' ,\n users_private_messages.deleted_by_sender AS 'pm_deleted_s' ,\n users_private_messages.fk_users_recipient AS 'pm_recipient' ,\n users_private_messages.fk_users_sender AS 'pm_sender'\n FROM users_private_messages\n WHERE users_private_messages.id = '$message_id' \"));\n\n // Determine whether user is sender or recipient\n $user_is_sender = ((int)$dmessage['pm_sender'] === $user_id);\n\n // Error: Message is already deleted\n if(($user_is_sender && $dmessage['pm_deleted_s']) || (!$user_is_sender && $dmessage['pm_deleted_r']))\n return __('users_message_predeleted');\n\n // Error: Message does not belong to user\n if((int)$dmessage['pm_recipient'] !== $user_id && (int)$dmessage['pm_sender'] !== $user_id)\n return __('users_message_ownership');\n\n // If both sender and recipient deleted the message, or if the message is sent to self, hard delete it\n if((!$user_is_sender && $dmessage['pm_deleted_s']) || ($user_is_sender && $dmessage['pm_deleted_r']) || ((int)$dmessage['pm_recipient'] === (int)$dmessage['pm_sender']))\n query(\" DELETE FROM users_private_messages\n WHERE users_private_messages.id = '$message_id' \");\n\n // Otherwise soft delete it\n else if($user_is_sender)\n query(\" UPDATE users_private_messages\n SET users_private_messages.deleted_by_sender = 1\n WHERE users_private_messages.id = '$message_id' \");\n else\n query(\" UPDATE users_private_messages\n SET users_private_messages.deleted_by_recipient = 1 ,\n users_private_messages.read_at = '$timestamp'\n WHERE users_private_messages.id = '$message_id' \");\n\n // All went well, return NULL\n return NULL;\n}", "public function removeMessage(MessageRepositoryInterface $message): PodiumResponse;", "function delete_message($chatID, $msgID) {\n file_get_contents(API_URL . \"deleteMessage?chat_id=\" . $chatID . \"&message_id=\" . $msgID);\n}", "public function delete()\n {\n $this->sqs_client->DeleteMessage([\n 'QueueUrl' => 'https://sqs.us-east-1.amazonaws.com/947603853016/rs-video-harvester.fifo',\n 'ReceiptHandle' => $message['ReceiptHandle']\n ]);\n\n return TRUE;\n }", "public function destroy($message_id)\n {\n if(auth()->user()->hasPermissionTo('Delete Message') OR \n (Gate::allows('Administrator', auth()->user()))){\n $message = $this->model->show($message_id); \n $details= $message->title; \n \n if (($message->delete($message_id))AND ($message->trashed())) {\n return redirect()->back()->with([\n 'success' => \"You Have Deleted $details From The message List Successfully\",\n ]);\n }\n } else{\n return redirect()->back()->with([\n 'error' => \"You Dont have Access To Delete A message\",\n ]);\n }\n }", "public function testDeleteValidMessage(){\n\t\t//created a new message, and insert into the database\n\t\t$newMessage = new Message (null, $this->VALID_MESSAGE_ID, $this->VALID_LISTING_Id, $this->VALID_ORG_ID, $this->VALID_MESSAGE_ID, $this->VALID_MESSAGE_TEXT);\n\t\t$newMessage->insert($this->getPDO());\n\n\t\t//grab the data from guzzle and enforece that the status codes are correct\n\t\t$response = $this->guzzle->delete('http://bootcamp-coders.cnm.edu/~cberaun2/bread-basket/public_html/php/api/message/' . $newMessage->getMessage(), ['headers' => ['XRSF-TOKEN' => $this->token]]);\n\t\t$this->assertSame($response-GetStatusCode(), 200);\n\t\t$body = $response->getBody();\n\t\t$retrievedMessage = json_decode($body);\n\t\t$this->assertSame(200, $retrievedMessage->status);\n\n\t\t//try retriving entry from database and ensuring it was deleted\n\t\t$deletedMess = Message::getMessageByMessageId($this->PDO(), $newMessage->getMessageId());\n\t\t$this->assertNull($deletedMess);\n\t}", "public function destroy(Message $message)\n\t{\n\t\t//\n\t\t$message->delete();\n\n \\Alert::success('Data berhasil didelete!', 'Berhasil!');\n\n return redirect('messages');\n\t}", "function messageDeleteRaw(TextChannelInterface $channel, string $messageID);", "public function destroy(int $id)\n {\n /** @var Message $message */\n $message = Message::findOrFail($id);\n\n if ($message->receiver_id != user()->id and $message->creator_id != user()->id) {\n $this->alertError(trans('app.access_denied'));\n return null;\n }\n\n if ($message->creator_id == user()->id) {\n $message->creator_visible = false;\n $message->save();\n }\n\n if ($message->receiver_id == user()->id) {\n $message->receiver_visible = false;\n $message->save();\n }\n\n if ((! $message->creator_visible or $message->sent_by_system) and ! $message->receiver_visible) {\n Message::destroy($id);\n }\n\n $this->alertFlash(trans('app.deleted', ['Message']));\n return Redirect::to('messages/inbox');\n }", "public function execute()\n {\n $message = $this->_getMessage();\n\n try{\n $this->_resourceMessageFactory\n ->create()\n ->delete($message);\n } catch (\\Exception $e) {\n $this->messageManager\n ->addErrorMessage(\n __(\n 'Error was occurred: %1. Message is not deleted.',\n $e->getMessage()\n )\n );\n return $this->_redirect(\n 'contact_us/message/reply',\n ['id' => $message->getId()]\n );\n }\n\n $this->messageManager\n ->addSuccessMessage(\n __('Message was deleted.')\n );\n\n return $this->_redirectToIndex();\n }", "public function delete_sended_message() {\n // First we delete the message from recipient table\n $this->delete_received_message();\n // Then we detach or actually delete the whole message from message table\n $this->db->query(\"DELETE FROM `message` WHERE id = ?\", array(\n $this->id\n ));\n\n return ($this->db->error()) ? false : true;\n }", "public function destroy(Message $message) {\n //\n }", "private function delete_message(ConversationMessage $message) : bool {\n\n\t\t//Check if we have to delete an image\n\t\tif($message->has_image_path()){\n\n\t\t\t//Get system path of the image\n\t\t\t$img_sys_path = path_user_data($message->get_image_path(), true);\n\n\t\t\tif(file_exists($img_sys_path)){\n\t\t\t\tunlink($img_sys_path);\n\t\t\t}\n\n\t\t}\n\n\t\t//Delete message from the database\n\t\t$conditions = \"ID = ?\";\n\t\t$condValues = array($message->get_id());\n\t\treturn CS::get()->db->deleteEntry(self::MESSAGES_TABLE, $conditions, $condValues);\n\n\t}", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function destroy(Message $message)\n {\n //\n }", "public function readone() {\n\t\t$msg = Core_Ipc_Messages::find(['stream' => md5($this->stream)], ['limit' => 1, 'order' => 'msgid']);\n\t\tif(empty($msg)) {\n\t\t\treturn false;\n\t\t}\n\t\t$msg->delete();\n\t\treturn $msg->instance;\n\t}", "public function delete_messages()\n {\n $this->message=array();\n Session::instance()->delete(\"hana_message\");\n }", "public function messageDelete($id)\n {\n $deletemessage=Messages::find($id)->delete();\n return redirect()->back();\n }", "public function deleteMessage( $id )\n\t{\n\t\t$record = Message::find( $id );\n\t\t$record->delete();\n\t}", "function GST_deleteMessage($message_GUID, $check_if_read=TRUE)\n\t{\n $this->GST_setClassDB();\n \n\t\t$GUIDs = explode('|', $message_GUID);\n\t\t$affected = 0;\n \n\t\tfor($i=0; $i<count($GUIDs); $i++)\n\t\t{\n $query = $this->DB->query(\"DELETE FROM guestbook WHERE message_GUID='\".$GUIDs[$i].\"' \".\n ($check_if_read ? \"AND condition!='UNREAD' \" : \"\").\"AND \".\n \"(user_GUID='\".$_SESSION['__user_GUID'].\"' OR writer_GUID='\".$_SESSION['__user_GUID'].\"')\");\n $query->run();\n\t\t\tif($query->affected_rows == 1) { $affected--; }\n\t\t}\n \n\t\tUser::USR_setGstCounter($affected);\n \n\t\treturn $affected;\n\t}", "function ppmess_shortcode_delete_commun(){\n\t\n\t$data = array();\n\t$current_user = wp_get_current_user();\n\t\n\t/*----------------- Delete single communication -----------------*/\n\tif(isset($_GET['message_id']) && isset($_GET['post_id']) && $_GET['token_delete_commun']){\n\t\t\t\t\t\n\t\t$delete_token = md5(SALT_DELETE_COMMUN_PPMESS . $_GET['message_id'] . $_GET['post_id'] . $current_user->ID );\n\t\t\n\t\tif($delete_token == $_GET['token_delete_commun']){\n\t\t\t\n\t\t\t$result = ppmess_get_single_commun($_GET['message_id'], $_GET['post_id'], $current_user->ID);\n\t\t\t\n\t\t\tif( ! empty($result) ){\n\t\t\t\t\n\t\t\t\t$user2_id = ppmess_get_user2($result[0]['message_id'], $result[0]['post_id'], $current_user->ID);\n\t\t\t\t$user2 = get_userdata($user2_id);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn array('error' => 'empty_result');\n\t\t\t}\n\t\t}else{\n\t\t\treturn array('error' => 'token_fail');\n\t\t}\n\t}else{\n\t\treturn array('error' => 'isset_fail');\n\t}\n\n\t$post_to_delete = get_post($result[0]['post_id']);\n\t$unread_messages = ppmess_all_unread_messages($result[0]['message_id'], $result[0]['post_id'], $current_user->ID);\n\t\n\t$data = array(\n\t\t'error'\t\t\t\t=>\tFALSE,\n\t\t'user2_login_name'\t=>\t!empty($user2) ? $user2->user_login : '',\n\t\t'user2_id'\t\t\t=>\t!empty($user2_id) ? $user2_id : '', \n\t\t'logged_user'\t\t=>\t!empty($current_user) ? $current_user->user_login : '',\n\t\t'logged_user_id'\t=>\t!empty($current_user) ? $current_user->ID : '',\t\n\t\t'post_title'\t\t=> isset($post_to_delete) ? $post_to_delete->post_title : '',\n\t\t'post_url'\t\t\t=>\tisset($post_to_delete) ? $post_to_delete->guid : '',\n\t\t'post_author_id'\t=> \tisset($post_to_delete) ? $post_to_delete->post_author : '',\n\t\t'post_id'\t\t\t=> isset($post_to_delete) ? $post_to_delete->ID : '',\n\t\t'message_id'\t\t=>\tisset($result[0]['message_id']) ? $result[0]['message_id'] : '',\n\t\t'unread_messages'\t=> isset($unread_messages) ? $unread_messages : 0\n\t);\n\t\n\treturn $data;\n}", "public function deleteMessage(Request $request)\n {\n $messageId = $request->messageId;\n $getMessgeById = Contacts::find($messageId);\n if($getMessgeById->delete()){\n Session::flash('danger','Message deleted successfully');\n return redirect()->back();\n }\n else{\n Session::flash('danger','sorry ! message could not be deleted.');\n return redirect()->back();\n }\n }", "function admin_delete($id = null){\r\n\t\tif (!$id) {\r\n $this->Session->setFlash(__('Invalid id for Message', true), 'admin_flash_good');\r\n $this->redirect(array('action' => 'message'));\r\n }\r\n if (!isset($this->params['named']['token']) || ($this->params['named']['token'] != $this->params['_Token']['key'])) {\r\n $blackHoleCallback = $this->Security->blackHoleCallback;\r\n $this->$blackHoleCallback();\r\n }\r\n\t\t$this->data = $this->Message->read(null, $id);\r\n\t\t$mid = $this->data['Message']['receiver_id'];\r\n if ($this->Message->delete($id)) {\r\n $this->Session->setFlash(__('Message deleted', true), 'admin_flash_good');\r\n $this->redirect(array('controller'=>'messages','action' => 'index/'.$mid.''));\r\n }\t\r\n\t}", "public function reviveMessage(MessageRepositoryInterface $message): PodiumResponse;", "public function destroy(Message $message)\n {\n $jabatan = Auth::user()->jabatan;\n\n $message->delete();\n\n if ($jabatan == 'admin') {\n return redirect('dashboard/admin/message')->with('status', 'The message has been deleted');\n } else {\n return redirect('dashboard/user/message')->with('status', 'The message has been deleted');\n }\n }", "public function destroy($id)\n {\n die('here');\n $message = message::findOrFail($id);\n $deleted_Caslaw_title = $message->title;\n $message->delete();\n\n return redirect()->route('messages.index')->with('message', 'message '. $deleted_Caslaw_title.' Successfully Deleted!');\n }", "public function deleteMessage($messageId);", "public function destroy(Message $message)\n {\n $message->delete();\n return response()->json(['status' => 'success'], 204);\n }", "function admin_mail_delete( int $message_id ) : mixed\n{\n // Only administrators can delete admin mail\n user_restrict_to_administrators();\n\n // Sanitize the message id\n $message_id = sanitize($message_id, 'int', 0);\n\n // Error: Message ID not found\n if(!database_row_exists('users_private_messages', $message_id))\n return __('users_message_not_found');\n\n // Fetch some data regarding the message\n $dmessage = mysqli_fetch_array(query(\" SELECT users_private_messages.fk_users_recipient AS 'pm_recipient' ,\n users_private_messages.fk_users_sender AS 'pm_sender' ,\n users_private_messages.hide_from_admin_mail AS 'pm_hide'\n FROM users_private_messages\n WHERE users_private_messages.id = '$message_id'\"));\n\n // Error: Can not delete messages hidden from the admin inbox\n if($dmessage['pm_hide'])\n return __('users_message_ownership');\n\n // Error: Message does not belong to user\n if($dmessage['pm_recipient'] && $dmessage['pm_sender'])\n return __('users_message_ownership');\n\n // Hard delete the message\n query(\" DELETE FROM users_private_messages\n WHERE users_private_messages.id = '$message_id' \");\n\n // All went well, return NULL\n return NULL;\n}", "public function destroy(Message $message)\n {\n $this->authorize(Policy::DELETE, $message);\n\n dispatch_now(new Delete($message, user()));\n }", "public function show($id)\n {\n $msg = Message::find($id);\n $msg->delete();\n return redirect()->action(\"MessageController@index\");\n }", "public function destroy($id)\n {\n //\n $message=Message::find($id);\n $message->delete();\n return redirect('s_message')->with('success','تم حذف الطلب بنجاح');\n }", "public function destroy(Request $request, Message $message)\n {\n\n\n DB::table('message_inbox')\n ->where([\n ['message_id','=',$message->id],\n ['user_id','=',$request->user()->id],\n ])\n ->delete();\n return redirect('/message');\n }", "function remove_message($db, $id)\n{\n\t$sql = \"DELETE from messages where id = :id\";\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$id));\n\treturn;\n}", "public function delete_received_message() {\n\n $this->db->query(\"DELETE FROM message_recipient WHERE message_id = ?\", array(\n $this->id\n ));\n\n return ($this->db->error()) ? false : true;\n }", "public function destroy(MessageThreadMessage $message)\n {\n $message->delete();\n return sendTrueResponse();\n }", "public function delete_msg($id){\n\n\n\t\t$this->query(\"DELETE FROM `my_cart`.`messege` WHERE `id` = '$id'\");\n\n\t}", "public function destroy(Message $message)\n {\n // Delete message\n $message->delete();\n\n // Return to admin page (message index)\n return redirect('/admin');\n }", "public function destroy($id)\n {\n $message = Message::findOrFail($id);\n Message::destroy($id);\n Toastr::success('message deleted!', 'Done', [\"positionClass\" => \"toast-top-right\"]);\n return redirect('admin/message');\n }", "function deleteMessage($chatID, $message_id) {\n global $bot;\n\n $data = array();\n $data['chat_id'] = $chatID;\n $data['message_id'] = $message_id;\n\n return $bot->TelegramApi(\"deleteMessage\", $data);\n}", "public function destroy($id, Message $message)\n {\n $message = $message->find($id);\n if (! $message){\n return redirect('adminpanel/messages')->withFlashMessage(' عذرا . لم نجد ما تبحث عنه فى بيانات الموقع ');\n }\n\n $message->delete();\n return redirect('adminpanel/messages')->withFlashMessage(' تم حذف الرساله بنجاح ');\n }", "function deleteMessages($messageId){\n\t\t\t//load data from persistence object\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getMessageFileName();\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setMessageFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->persistenceManager->deleteMessage($messageId);\n\t\t\t\n\t\t}", "abstract public function get_message();", "private function check_message(){\t\t\tif(isset($_SESSION['message'])){\r\n\t\t\t\t// Add it as an attribute and erase the stored version\r\n\t\t\t\t\r\n\t\t\t\t$this->message = $_SESSION['message'];\r\n\t\t\t\tunset($_SESSION['message']);\r\n\t\t\t}else{\r\n\t\t\t\t$this->message=\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public static function DeleteMessage(Request $request) {\n if ($request->msg_id) {\n Usermessage::destroy($request->msg_id);\n }\n }", "public static function popMessage() {\n if (isset($_COOKIE[self::$_name])) {\n $message = unserialize($_COOKIE[self::$_name]);\n setcookie(self::$_name, \"\", time() - self::$_time, self::$_path);\n } else {\n $message = NULL;\n }\n return $message;\n }", "public function destroy($id)\n {\n \n $message = Message::destroy($id);\n \n \n Flash::success('El mensaje ha sido eliminado');\n \n return redirect()->route('admin.messages.index');\n }", "public function testRemoveMessageWrong()\n {\n // Récupération des containers\n $appartmentRepository = $this->getContainer()->get(AppartmentRepository::class);\n $messageRepository = $this->getContainer()->get(MessageRepository::class);\n $entityManager = $this->getContainer()->get(EntityManagerInterface::class);\n $notificationService = $this->getContainer()->get(NotificationService::class);\n $templating = $this->getContainer()->get(\\Twig_Environment::class);\n\n $MessageService = new MessageService($appartmentRepository, $messageRepository, $entityManager, $notificationService, $templating);\n\n $result = $MessageService->removeMessage(999);\n\n $this->assertArrayHasKey('delete', $result);\n $this->assertArrayHasKey('data', $result);\n $this->assertEquals('Message non trouvé', $result['data']);\n }", "function ppmess_delete_commun($message_id, $post_id, $user_logged){\n\t\n\tglobal $wpdb;\t\n\t\n\t// default state: npr. for user_id = 1 and user_id = 2 \"_1_2\" OR \"_2_1\"\n\t$new_status = '__'; // deaktiviranje aktivnosti diskusije za trenutnog korisnika\n\t$search_status = '_' . $user_logged; // trenutni status u bazi ( pocetan vrednost je \"_NUMBER\" - znaci da je diskusija aktuelna za korisnika user_NUMBER )\n\t\t\t\t\t\t\t\t\t\t// ako nema broja NUMBER u koloni show_status diskusija za korisnika NUMBER vise nije aktivna\n\t$new_sent_to = 0;\t\t\t\t\t\t\t\t\t\n\t// get current status for desired communicatiion\n\t$query = \"SELECT show_status FROM {$wpdb->prefix}private_messages WHERE message_id = $message_id AND post_id = $post_id AND message_parent = 0 AND (receiver_id = $user_logged OR sender_id = $user_logged)\";\n\t$current_status = $wpdb->get_results( $query, ARRAY_A );\n\t\n\tif( $wpdb->num_rows == 1 ){\n\t\tforeach($current_status as $status){\n\t\t\t$new_value = str_replace($search_status, $new_status, $status['show_status']); \n\t\t}\n\t}else{\n\t\treturn FALSE;\n\t}\n\t\n\treturn $wpdb->query(\n\t\t$wpdb->prepare(\"UPDATE {$wpdb->prefix}private_messages SET show_status = %s, sent_to = %d WHERE (message_id = %d AND post_id = %d AND message_parent = 0\n\t\t\tAND (receiver_id = %d OR sender_id = %d)) OR (post_id = %d AND message_parent = %d AND (receiver_id = %d OR sender_id = %d))\", \n\t\t\t$new_value, $new_sent_to, $message_id, $post_id, $user_logged, $user_logged, $post_id, $message_id, $user_logged, $user_logged)\n\t);\t\n}", "public function getmessage()\n {\n return array_shift($this->storage);\n }", "public function remove_message($message_id){\n\t\tglobal $con;\n\t\t$query=\"DELETE FROM referral_chat WHERE message_id=\\\"$message_id\\\"\n\t\t\t\tLIMIT 1\";\n\t\treturn $this->update($con,$query);\n\t}", "public function delete_message($message_id, $user_id=null, $log_as_event=false)\n {\n return $this->call('gst_message_delete', $message_id, $user_id, $log_as_event);\n }", "public function delete($args)\n {\n // Security check\n if (!SecurityUtil::checkPermission('InterCom::', '::', ACCESS_COMMENT)) {\n return LogUtil::registerPermissionError();;\n }\n\n // Argument check - make sure that all required arguments are present, if\n // not then set an appropriate error message and return\n if ((!isset($args['msg_id']) || !is_numeric($args['msg_id'])) ||\n (!in_array($args['msg_type'], array('msg_inbox', 'msg_outbox', 'msg_stored')))) {\n return LogUtil::registerArgsError();\n }\n\n $obj['msg_id'] = $args['msg_id'];\n $obj[$args['msg_type']] = 0;\n\n $pntable = DBUtil::getTables();\n $msgcolumn = $pntable['intercom_column'];\n\n $where = 'WHERE ' . $msgcolumn['msg_id'] . ' =\\'' . $args['msg_id'] . '\\' AND ';\n if ($args['msg_type'] == 'msg_inbox' || $args['msg_type'] == 'msg_stored') {\n $where .= $msgcolumn['to_userid'] . '=' . UserUtil::getVar('uid');\n } else {\n $where .= $msgcolumn['from_userid'] . '=' . UserUtil::getVar('uid');\n }\n\n $res = DBUtil::updateObject($obj, 'intercom', $where, 'msg_id');\n if ($res === false) {\n return LogUtil::registerError($this->__('Error! Could not delete message.'), null, ModUtil::url('InterCom', 'user', 'inbox'));\n }\n\n return ModUtil::apiFunc('InterCom', 'user', 'optimize_db');\n }", "public function destroy(Message $message) {\n $message->delete();\n return redirect()\n ->route('messages')\n ->with('sessionMessage', 'Запись удалена.');\n }", "public function destroy($id)\n {\n\n $message = Message::findOrFail($id);\n $message->delete();\n Session::flash('success_message', 'Message successfully deleted!');\n return redirect()->route('messages.index');\n }", "protected function prgReadMessage()\n\t{\n\t\tif( !$this->isSimpleMode() || !isset($_SESSION[\"message_edit\"]) )\n\t\t\treturn;\n\t\t\t\n\t\t$this->setMessage( $_SESSION[\"message_edit\"] );\n\t\t$this->messageType = $_SESSION[\"message_edit_type\"];\n\t\t\n\t\tunset($_SESSION[\"message_edit\"]);\n\t}", "public function testDeleteMessageOkay()\n {\n $this->deleteMessageTest(true);\n }", "public function destroy($id)\n {\n //DB::table('messages')->where('id', $id)->delete();\n $message = Message::findOrFail($id)->delete();\n\n\n return redirect()->route('messages.index');\n }", "public function destroy($id)\n {\n $item = Message::find($id);\n $item->delete();\n Alert::success('موفقیت', 'آیتم مورد نظر حذف شد');\n return redirect()->back();\n }", "private function check_message ()\n\t{\t\tif (isset($_SESSION['message']))\n\t\t{\n\t\t\t// Add it as an attribute and erase the stored version\n\t\t\t$this->message = $_SESSION['message'];\n\t\t\tunset($_SESSION['message']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->message = \"\";\n\t\t}\n\t}", "public function clear_message() {\n unset($_SESSION['message']);\n }", "public function destroy($id)\n {\n // Eliminiar mensaje con la clase BD\n /* DB::table('messages')->where('id', $id)->delete(); */\n\n $message = Message::findOrFail($id);\n \n $message->delete();\n\n // Redireccionar\n return redirect()->route('mensajes.index');\n\n \n }", "public function deleteMessage($messageId)\n {\n\n $db = $this->getDb();\n $orm = $this->getOrm();\n $user = $this->getUser();\n\n // erst mal eventuelle receiver & aspekte des users löschen\n $orm->deleteWhere( 'BuizMessageReceiver', 'vid = '.$user->getId().' and id_message = '.$messageId );\n $orm->deleteWhere('BuizMessageAspect', 'id_message='.$messageId.' and id_receiver = '.$user->getId() );\n\n $sql = <<<SQL\nSELECT\n\tmsg.flag_sender_deleted,\n\tmsg.id_sender,\n\tcount(recv.rowid) as num_receiver\nFROM\n\tbuiz_message msg\nLEFT JOIN\n\tbuiz_message_receiver recv\n\t\tON recv.id_message = msg.rowid AND recv.vid = {$user->getId()}\nWHERE\n \tmsg.rowid = {$messageId}\n \t\tAND NOT recv.flag_deleted = true\nGROUP BY\n\tmsg.id_sender,\n\tmsg.flag_sender_deleted\nSQL;\n\n $tmpData = $db->select($sql)->get();\n\n if (!$tmpData) {\n // ok sollte nicht passieren\n return;\n }\n\n if( $tmpData['id_sender'] == $user->getId() ) {\n\n // nur löschen wenn keine receiver mehr da sind\n if( $tmpData['num_receiver'] ) {\n $orm->update( 'BuizMessage', $messageId, array('flag_sender_deleted'=>true) );\n return;\n }\n\n } else {\n\n // löschen wenn deleted flag\n if( 't' != $tmpData['flag_sender_deleted'] ) {\n return;\n }\n\n }\n\n $orm->delete('BuizMessage', $messageId);\n\n // referenz tabellen leeren\n $orm->deleteWhere('BuizMessageAspect', 'id_message='.$messageId); // aspekt flags\n $orm->deleteWhere('BuizTask', 'id_message='.$messageId); // eventueller task aspekt\n $orm->deleteWhere('BuizAppointment', 'id_message='.$messageId); // eventueller appointment aspekt\n $orm->deleteWhere('BuizMessageReceiver', 'vid='.$messageId); // alle receiver\n $orm->deleteWhere('BuizDataIndex', 'vid='.$messageId); // fulltext index der db\n $orm->deleteWhere('BuizDataLink', 'vid='.$messageId); // referenzen\n $orm->deleteWhere('BuizEntityAttachment', 'vid='.$messageId); // attachments\n\n }", "public function testDeleteMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n $message_id=227845;\n $result = $apiInstance->deleteMessage($message_id, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }", "function delete($id=null) {\n\t\t\t\t\t$id=base64_decode($id);\n\t\t\t\t\t\n\t\t\t\t\t$this->SentBox->id = (int)$id;\n\t\t\t\t\t\n\t\t\t\t\t$this->SentBox->delete($id);\n\t\t\t\t\t\n\t\t\t\t\t//$this->Session->setFlash('The Sent item with id: '.$id.' from SentBox has been Deleted Successfully!!');\n\t\t\t\t\t\n\t\t\t\t\t$this->redirect(array('action'=>'index'));\n\t}", "function ppmess_shortcode_delete_communication_view(){\n\t\n\tglobal $post;\n\t$data = ppmess_shortcode_delete_commun();\n?>\n\t<h3><?php echo esc_html__( 'Delete communication', 'ppmess' ); ?></h3>\n\t\t\n<?php\n\tif( $data['error'] !== FALSE ):\t?>\n\t\t<!-- Error occurred -->\n\t\t<div class=\"ppmess-info-dark\">\n\t\t\t<?php echo esc_html__('Error occurred: ', 'ppmess');\t?>\n\t\t\t\t<a class=\"post-link-ppmess\" href=\"<?php echo esc_url(get_permalink($post)); ?>\"><?php echo __('Go Back', 'ppmess'); ?></a>\n\t\t\t\t<?php // echo $data['error']; \t?>\n\t\t</div>\n<?php \n\telse:\t?>\t\n\t\t<div id=\"ppmessDeleteCommun\">\n\t\t\t<div class=\"user-info-delete-commun\">\n\t\t\t\t<?php echo esc_html__('Communication bitween', 'ppmess'); ?>\n\t\t\t\t<span class=\"span-mark\" title=\"<?php echo esc_attr__('Info of the logged user', 'ppmess'); ?>\">\n\t\t\t\t\t<?php echo esc_html($data['logged_user']); ?>\n\t\t\t\t</span>\n\t\t\t\t<?php echo $data['logged_user_id'] == $data['post_author_id'] ? ' (' . esc_html__('author of the post', 'ppmess') . ') ' : '';\t?>\n\t\t\t\t&#x21d4;\n\t\t\t\t<span class=\"span-mark\" title=\"<?php echo esc_attr__('Info of the user 2', 'ppmess'); ?>\">\n\t\t\t\t\t<?php echo esc_html($data['user2_login_name']);\t?>\n\t\t\t\t</span>\n\t\t\t\t<?php echo $data['user2_id'] == $data['post_author_id'] ? ' (' . esc_html__('author of the post', 'ppmess') . ') ' : '';\n\t\t\t\t\t\techo esc_html__('refers to post:', 'ppmess'); ?>\n\t\t\t\t\t<a class=\"post-link-ppmess\" href=\"<?php echo esc_url( $data['post_url'] ); ?>\" title=\"<?php echo esc_attr( $data['post_title'] ); ?>\">\n\t\t\t\t\t\t<?php echo $data['post_title']; ?>\n\t\t\t\t\t</a>\n\t\t\t\t\t<strong><?php echo esc_html__('will be deleted !', 'ppmess'); ?></strong>\n\t\t\t\t\t<br/>\n\t\t\t\t\t<span class=\"colorMark-1\"><?php echo esc_html__('unread messages', 'ppmess') . '(' . $data['unread_messages'] . ')'; ?></span> \n\t\t\t</div>\n\t\t\t\n\t\t\t<?php\t$token_delete_commun = md5(SALT_DELETE_COMMUN_PPMESS . $data['message_id'] . $data['post_id'] . $data['logged_user_id']);\t?>\n\t\t\t\n\t\t\t<!--------------------- Delete communication --------------------->\n\t\t\t<div class=\"confirm-delete-commun\">\n\t\t\t\t<?php // Confirm delete\n\t\t\t\t\t$link = admin_url('admin-ajax.php?action=ppmess_delete_commun&confirm_delete=1&post_id=' . $data['post_id'] . '&message_id=' . $data['message_id'] . '&token_delete_commun=' . $token_delete_commun . '&go_back_url=' . get_permalink($post));\n\t\t\t\t\techo '<a class=\"ppmess-tag-a ppmess-delete-commun-confirm\" data-post_id=\"' . $data['post_id'] . '\" data-message_id=\"' . $data['message_id'] . '\" data-confirm_delete=\"1\" data-token_delete_commun=\"' . $token_delete_commun . '\" data-go_back_url=\"' . get_permalink($post) . '\" href=\"' . $link . '\">' . esc_html__('Confirm delete', 'ppmess') . '</a>';\n\t\t\t\t?>\n\t\t\t\t<!-- Cancel delete --->\n\t\t\t\t<a class=\"ppmess-tag-a ppmess-delete-commun-cancel\" style=\"font-size:0.83em;\" href=\"<?php echo esc_url(get_permalink($post)); ?>\"><?php echo esc_html__('Cancel', 'ppmess'); ?></a>\n\t\t\t</div>\n\t\t</div><!-- ppmessDeleteCommun -->\n<?php\t\n\tendif;\n}", "public function getDelete($id)\n\t{\n\t\t$bm = MessageModel::find($id);\n\t\t$bm->delete();\n\t\treturn Redirect::to('admin/messages')->with('messages','Data has been deleted');\n\t}", "public function destroy($id)\n {\n $message = Message::findOrFail($id);\n $message->delete();\n \n return ['message' => 'delete message'];\n }", "function delete($id=\"\")\n { \n $output['success'] = FALSE;\n $ceklogin = $this->cek_session->islogin();\n $output['logged_in'] = $ceklogin;\n $output['message'] = \"fail to sdelete Message\";\n if($ceklogin)\n {\n $this->mongo_db->select_db(\"Users\");\n $this->mongo_db->select_collection(\"Inbox\"); \n $this->mongo_db->remove(array('_id' => $this->mongo_db->mongoid($id)));\n $url = current_url();\n $this->m_user->tulis_log(\"Delete Message User\",$url,\"API Unity\");\n $output['success'] = TRUE;\n $output['message'] = \"Message is deleted\";\n }\n echo json_encode($output);\n }", "public function destroy(Message $message)\n {\n $this->authorize('delete', $message);\n\n foreach (Message::AUDIO_FORMATS as $ext) {\n Storage::delete('audio/'.$message->url.$ext);\n }\n\n $message->delete();\n\n return redirect()->route('messages.index');\n }", "function deleteMessage($messageId){\r\n //$GLOBALS['link'] = connect();\r\n mysqli_query($GLOBALS['link'], 'delete from messages where `id`='. $messageId .';')or die(mysqli_error($GLOBALS['link']));\r\n\r\n return mysqli_affected_rows($GLOBALS['link']);\r\n}", "public function delete( $msgNum )\r\n {\r\n if ( $this->state != self::STATE_TRANSACTION )\r\n {\r\n throw new ezcMailTransportException( \"Can't call delete() on the POP3 transport when not successfully logged in.\" );\r\n }\r\n\r\n $this->connection->sendData( \"DELE {$msgNum}\" );\r\n $response = $this->connection->getLine();\r\n\r\n if ( !$this->isPositiveResponse( $response ) )\r\n {\r\n throw new ezcMailTransportException( \"The POP3 server could not delete the message: {$response}.\" );\r\n }\r\n }", "function Admin_Messages_admin_delete($args)\n{\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n list($mid,\n $objectid,\n $confirmation) = pnVarCleanFromInput('mid',\n 'objectid',\n 'confirmation');\n\n\n // User functions of this type can be called by other modules. If this\n // happens then the calling module will be able to pass in arguments to\n // this function through the $args parameter. Hence we extract these\n // arguments *after* we have obtained any form-based input through\n // pnVarCleanFromInput().\n extract($args);\n\n // At this stage we check to see if we have been passed $objecmid, the\n // generic item identifier. This could have been passed in by a hook or\n // through some other function calling this as part of a larger module, but\n // if it exists it overrides $mid\n //\n // Note that this module couuld just use $objecmid everywhere to avoid all\n // of this munging of variables, but then the resultant code is less\n // descriptive, especially where multiple objects are being used. The\n // decision of which of these ways to go is up to the module developer\n if (!empty($objectid)) {\n $mid = $objectid;\n } \n\n // The user API function is called. This takes the item ID which we\n // obtained from the input and gets us the information on the appropriate\n // item. If the item does not exist we post an appropriate message and\n // return\n $item = pnModAPIFunc('Admin_Messages',\n 'user',\n 'get',\n array('mid' => $mid));\n\n if ($item == false) {\n return pnVarPrepHTMLDisplay(_ADMINMESSAGESNOSUCHITEM);\n }\n\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing. However,\n // in this case we had to wait until we could obtain the item name to\n // complete the instance information so this is the first chance we get to\n // do the check\n if (!pnSecAuthAction(0, 'Admin_Messages::', \"$item[title]::$mid\", ACCESS_DELETE)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Check for confirmation. \n if (empty($confirmation)) {\n // No confirmation yet - display a suitable form to obtain confirmation\n // of this action from the user\n\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n \t$pnRender =& new pnRender('Admin_Messages');\n\n\t // As Admin output changes often, we do not want caching.\n \t$pnRender->caching = false;\n\n // Add the message id\n\t\t$pnRender->assign('mid', $mid);\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('admin_messages_admin_delete.htm');\n }\n\n // If we get here it means that the user has confirmed the action\n\n // Confirm authorisation code. This checks that the form had a valid\n // authorisation code attached to it. If it did not then the function will\n // proceed no further as it is possible that this is an attempt at sending\n // in false data to the system\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n return true;\n }\n\n // The API function is called. Note that the name of the API function and\n // the name of this function are identical, this helps a lot when\n // programming more complex modules. The arguments to the function are\n // passed in as their own arguments array.\n //\n // The return value of the function is checked here, and if the function\n // suceeded then an appropriate message is posted. Note that if the\n // function did not succeed then the API function should have already\n // posted a failure message so no action is required\n if (pnModAPIFunc('Admin_Messages',\n 'admin',\n 'delete',\n array('mid' => $mid))) {\n // Success\n pnSessionSetVar('statusmsg', _ADMINMESSAGESDELETED);\n }\n\n // This function generated no output, and so now it is complete we redirect\n // the user to an appropriate page for them to carry on their work\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n \n // Return\n return true;\n}", "private function act_mdel($raw) {\n\t\treturn \"<a class=\\\"msg-delete\\\" data-done=\\\"0\\\" data-recid=\\\"{$raw['id']}\\\" href=\\\"#\\\">Delete Message</a>\";\n\t}" ]
[ "0.7165039", "0.70746726", "0.6632186", "0.65899706", "0.65297425", "0.65070647", "0.6403707", "0.63769984", "0.6239005", "0.6159924", "0.6130472", "0.60903484", "0.6079431", "0.607659", "0.6022567", "0.601643", "0.60094184", "0.59993154", "0.59977055", "0.59827805", "0.5962874", "0.59095913", "0.59062207", "0.5878645", "0.5875784", "0.58755", "0.5869282", "0.5847875", "0.5839818", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.5836901", "0.58273846", "0.5803785", "0.5790077", "0.57780015", "0.5774394", "0.5765931", "0.57437354", "0.57432985", "0.5730076", "0.5691037", "0.5677505", "0.5671076", "0.5649239", "0.56317854", "0.5630653", "0.5613058", "0.5612933", "0.5600748", "0.55907625", "0.5588788", "0.55772364", "0.5575398", "0.55743766", "0.55656904", "0.5561771", "0.55459404", "0.552559", "0.5515582", "0.5505681", "0.5504627", "0.54798186", "0.547321", "0.54712135", "0.5470505", "0.545831", "0.54558325", "0.5435355", "0.54269594", "0.542132", "0.54182774", "0.5417641", "0.54061717", "0.5404328", "0.54014164", "0.53901184", "0.53837633", "0.5382478", "0.5378533", "0.5370055", "0.53649276", "0.5361767", "0.5361198", "0.53553176", "0.53551525", "0.5355072", "0.5330313", "0.5327451", "0.53253955", "0.5312544" ]
0.0
-1
public function lista($organigrama_id = '', $estado2 = '', $condicion = '')
public function lista($where = '', $group = '') { $sql = "SELECT * FROM f_listado_cargos() " . $where . " " . $group; //echo "---->".$sql; $this->_db = new Cargos(); return new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listar_anuncios($opcao){\n $arrayAnuncios=[];\n //Peciso disto por causa de pesquisas pelo nome/localizacao e pelas pesquisas das caracteristicas\n $saber=0;\n $nova=\"\";\n if($opcao==-1)$saber=2;\n if(!strcmp($opcao[0],\"*\")==true){\n\n for ($i=0; $i <strlen($opcao) ; $i++) {\n if($i!=0) $nova.=$opcao[$i];\n\n }\n $saber++;\n $opcao=$nova;\n }\n //\n global $mybd;\n if($opcao==-1 && $saber==2){\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where anu_estado=1;\");\n }else if(!strcmp($opcao,\"\") && $saber==0){\n //devolve todos os anuncios\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio;\");\n }else if(strcmp($opcao,\"\") && $saber==0){ //devolve todos os anuncios COM AS caracteristicas especificas\n $query=\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where anu_estado=1 $opcao;\";\n $STH = $mybd->DBH->prepare($query);\n }else if($saber==1){\n\n //pesquisa todos os anuncios com pesquisa de nome\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio WHERE (anu_titulo LIKE '%$opcao%' OR anu_morada LIKE '%$opcao%') and anu_estado=1;\");\n $STH->bindParam(1, $opcao);\n }\n $STH->execute();\n $STH->setFetchMode(PDO::FETCH_OBJ);\n $i=0;\n\t\t\twhile($row = $STH->fetch()){\n $arrayAnuncios[$i]=new Anuncio($row->anu_id,$row->anu_titulo,$row->anu_descricao,$row->uti_id,$row->anu_morada,$row->anu_telefone,$row->anu_email,$row->anu_codigopostal,$row->anu_data,$row->anu_disponibilidade,$row->anu_estado,$row->anu_preco,null,$row->anu_wcprivativo,$row->anu_mobilada,$row->anu_utensilios,$row->anu_internet,$row->anu_raparigas,$row->anu_rapazes,$row->anu_despesas,$row->anu_animais,$row->anu_latitude,$row->anu_longitude);\n $i++;\n }\n return $arrayAnuncios;\n }", "function listar_anuncios_anunciante($id_anunciante,$estado_anuncio){\n $arrayAnuncios=[];\n global $mybd;\n if($id_anunciante==-5){//devolve anuncios de proprietario\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio $estado_anuncio;\");\n }else if($estado_anuncio==-4){//devolve anuncios de proprietario\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where uti_id=? ;\");\n $STH->bindParam(1, $id_anunciante);\n }else if($estado_anuncio==-6){//devolve anuncios de proprietario\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where uti_id=? and anu_estado!=4;\");\n $STH->bindParam(1, $id_anunciante);\n }else if($id_anunciante==-2){//mostra todos anuncios pendentes de anunciantes\n $STH = $mybd->DBH->prepare(\"Select anu_id,anuncio.uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco,utilizador.uti_id from anuncio,utilizador where utilizador.uti_id=anuncio.uti_id and uti_tipo=2 ;\");\n }else if($id_anunciante==-1){//mostra anuncios anunciante por estado\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where anu_estado=?;\");\n $STH->bindParam(1, $estado_anuncio);\n } else if($estado_anuncio!=-4 ){//mostra anuncios anunciante por estado e por utilizador\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where uti_id=? and anu_estado=?;\");\n $STH->bindParam(1, $id_anunciante);\n $STH->bindParam(2, $estado_anuncio);\n }\n $STH->execute();\n $STH->setFetchMode(PDO::FETCH_OBJ);\n $i=0;\n\t\twhile($row = $STH->fetch()){\n\t\t\t\t$arrayAnuncios[$i]=new Anuncio($row->anu_id,$row->anu_titulo,$row->anu_descricao,$row->uti_id,$row->anu_morada,$row->anu_telefone,$row->anu_email,$row->anu_codigopostal,$row->anu_data,$row->anu_disponibilidade,$row->anu_estado,$row->anu_preco,null,$row->anu_wcprivativo,$row->anu_mobilada,$row->anu_utensilios,$row->anu_internet,$row->anu_raparigas,$row->anu_rapazes,$row->anu_despesas,$row->anu_animais,$row->anu_latitude,$row->anu_longitude);\n $i++;\n }\n return $arrayAnuncios;\n }", "public function listar($inicio = 0, $cantidad = 0, $excepcion = NULL, $condicion = NULL, $idCurso = NULL) {\n global $sql, $configuracion;\n\n /* * * Validar la fila inicial de la consulta ** */\n if (!is_int($inicio) || $inicio < 0) {\n $inicio = 0;\n }\n\n /* * * Validar la cantidad de registros requeridos en la consulta ** */\n if (!is_int($cantidad) || $cantidad <= 0) {\n $cantidad = 0;\n }\n\n /* * * Validar que la condición sea una cadena de texto ** */\n if (!is_string($condicion)) {\n $condicion = '';\n }\n\n /* * * Validar que la excepción sea un arreglo y contenga elementos ** */\n if (isset($excepcion) && is_array($excepcion) && count($excepcion)) {\n $excepcion = implode(',', $excepcion);\n $condicion .= 'ac.id NOT IN (' . $excepcion . ') AND ';\n }\n\n /* * * Definir el orden de presentación de los datos ** */\n if ($this->listaAscendente) {\n $orden = 'ac.fecha_publicacion ASC';\n } else {\n $orden = 'ac.fecha_publicacion DESC';\n }\n\n $tablas = array(\n 'ac' => 'actividades_curso'\n );\n\n $columnas = array(\n 'id' => 'ac.id',\n 'idCurso' => 'ac.id_curso',\n 'idUsuario' => 'ac.id_usuario',\n 'titulo' => 'ac.titulo',\n 'descripcion' => 'ac.descripcion',\n 'fechaPublicacion' => 'UNIX_TIMESTAMP(ac.fecha_publicacion)',\n 'fechaLimite' => 'UNIX_TIMESTAMP(ac.fecha_limite)',\n 'diasRestantes' => 'DATEDIFF(ac.fecha_limite, NOW())'\n );\n\n $condicion .= 'ac.id_curso = \"'.$idCurso.'\"';\n\n if (is_null($this->registros)) {\n $sql->seleccionar($tablas, $columnas, $condicion);\n $this->registros = $sql->filasDevueltas;\n }\n\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion, '', $orden, $inicio, $cantidad);\n\n $lista = array();\n if ($sql->filasDevueltas) {\n\n while ($actividad = $sql->filaEnObjeto($consulta)) {\n $actividad->icono = $configuracion['SERVIDOR']['media'] . $configuracion['RUTAS']['imagenesEstilos'] . 'activity.png';\n $lista[] = $actividad;\n }\n }\n\n return $lista;\n }", "function idiomas_disponibles($id_palabra,$estado) {\n\t\n\t\tif ($estado==0) { $sql_estado='AND traducciones.estado = 0'; }\n\t\telseif ($estado==1) { $sql_estado='AND traducciones.estado = 1'; }\n\t\telseif ($estado==2) { $sql_estado='AND traducciones.estado = 2'; }\n\t\telse { $sql_estado=''; } \n\t\t$query = \"SELECT \n\t\ttraducciones.estado,traducciones.id_palabra,traducciones.id_idioma,\n\t\tidiomas.id_idioma,idiomas.idioma \n\t\tFROM traducciones, idiomas\n\t\tWHERE traducciones.id_palabra = '$id_palabra'\n\t\tAND traducciones.id_idioma = idiomas.id_idioma\n\t\t$sql_estado\n\t\tGROUP BY idiomas.id_idioma\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t}", "public function listarSocios() {\r\n $sql = \"select j.nombre,j.apellido,j.cedula,j.fechanac, j.porcentaje, m.nombre from juntadirectiva as j, municipio as m \"\r\n\t\t .\" where j.ciudadnac = m.id\";\t\t\r\n $respuesta = $this->object->ejecutar($sql);\r\n $this->construirListadoSocio($respuesta);\r\n }", "public static function lista($arConfiguracao = array(), $arWhere = array())\n {\n if (!empty($arConfiguracao) && is_array($arConfiguracao)) {\n extract($arConfiguracao);\n }\n \n $oDimensao = new Dimensao();\n //$sql = $oDimensao->lista('string', $_SESSION['par']['itrid'], $arWhere );\n $sql = $oDimensao->lista('string', $_SESSION['par']['itrid']);\n \n // CABEÇALHO da lista\n $arCabecalho = array(\"Comando\",\"Descrição da Subação\");\n \n // parametros que cofiguram as colunas da lista, a ordem do array equivale a ordem do cabeçalho\n $arParamCol[0] = array(\"type\" => Lista::TYPESTRING,\n \"style\" => \"width:1200px;\",\n \"html\" => \"{dimcod}.{arecod}.{indcod} - {sbadsc}\",\n \"align\" => \"left\");\n /*$arParamCol[1] = array(\"type\" => Lista::TYPESTRING,\n //\"style\" => \"color:red;\",\n \"html\" => \"<img src=\\\"/imagens/fluxodoc.gif\\\" border=0 title=\\\"\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"\\\">\",\n \"align\" => \"center\");\n */\n $acao = \"<center>\n\t\t\t\t <!-- input onclick=\\\"\\\" {checked} type=\\\"checkbox\\\" name=\\\"rdo_grupo\\\" id=\\\"rdo_grupo_{gpdid}\\\" value=\\\"{gpdid}\\\" -->\n\t\t\t\t <img border=\\\"0\\\" src=\\\"../imagens/alterar.gif\\\" onclick=\\\"popupSubacao({sbaid})\\\" >\n\t\t\t\t <center>\";\n \n // ARRAY de parametros de configuração da tabela\n $arConfig = array(//\"style\" => \"width:95%;\",\n \"totalLinha\" => false,\n \"totalRegistro\" => true);\n \n $oPaginacaoAjax = new PaginacaoAjax();\n $oPaginacaoAjax->setNrPaginaAtual($nrPaginaAtual);\n $oPaginacaoAjax->setNrRegPorPagina($nrRegPorPagina);\n $oPaginacaoAjax->setNrBlocoPaginacaoMaximo($nrBlocoPaginacaoMaximo);\n $oPaginacaoAjax->setNrBlocoAtual($nrBlocoAtual);\n $oPaginacaoAjax->setDiv('divLista');\n $oPaginacaoAjax->setCabecalho($arCabecalho);\n $oPaginacaoAjax->setSql($sql);\n $oPaginacaoAjax->setAcao($acao);\n $oPaginacaoAjax->setParamCol($arParamCol);\n $oPaginacaoAjax->setConfig($arConfig);\n $oPaginacaoAjax->show();\n }", "public function getFiltroOrganigrama()\n {\n $resultado = array();\n $sql = \"\n SELECT STRING_AGG(v.unidad_administrativa,',') AS o_resultado FROM ( \nSELECT CAST(o.unidad_administrativa AS CHARACTER VARYING)\nFROM cargos c\nINNER JOIN organigramas o ON c.organigrama_id = o.id\nWHERE c.baja_logica = 1\nGROUP BY o.unidad_administrativa\nORDER BY o.unidad_administrativa\n) AS v\n \";\n $this->_db = new Cargos();\n $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql));\n if (count($arr) > 0) {\n /**\n * Para agregar un valor nulo al inicio se añade una coma\n */\n $res = $arr[0]->o_resultado;\n $resultado = explode(\",\", $res);\n }\n return $resultado;\n }", "public function listar_asignacion_controlador(/*$privilegio,$codigo*/){\n\t\n\t$tabla=\"\";\n\n\t//Consulta para la busqueda de asignación de hardware \n\t//Para la búsqueda se utilizo una tabla dinamica de la plantilla de Gentellas Master\n\t$consulta=\"SELECT *,T1.hiserie FROM hardware_ingreso as T1, estado_info_hardware as T2, estado_asignacion_hardware as T3, tipo_hardware as T4, marca_hardware as T5, modelo_hardware as T6, color_hardware as T7, informe_ingreso_hardware as T8 WHERE T1.estadoinfoharcodigo=T2.estadoinfoharcodigo AND T2.estadoinfoharnombre='APROBADO' AND T1.estadoasigharcodigo=T3.estadoasigharcodigo AND T3.estadoasigharnombre='NO ASIGNADO' AND T1.tipohardwarecodigo=T4.tipohardwarecodigo AND T1.marcahardwarecodigo=T5.marcahardwarecodigo AND T1.modelohardwarecodigo=T6.modelohardwarecodigo AND T1.colorhardwarecodigo=T7.colorhardwarecodigo AND T1.icodigo=T8.icodigo\n\t\";\n\n\t$conexion = mainModel::conectar();\n\t$datos = $conexion->query($consulta);\n\t$datos= $datos->fetchAll();\n\n\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t$tabla.='\n\t\n\t<thead>\n\t<tr>\n\t<th>#</th>\n\t<th>COD. DE INVENTARIO</th>\n\t<th>SERIE DEL HARDWARE</th>\n\t<th>TIPO DE HARDWARE</th>\n\t<th>MARCA DE HARDWARE</th>\n\t<th>MODELO DE HARDWARE</th>\n\t<th>COLOR DE HARDWARE</th>\n\t<th>FECHA DE INGRESO</th>\n\t\n\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t$tabla.='\n\t<th>ACCIONES</th>\n\t\n\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\n\t\t\t\t\t\t//}\n\t$tabla.='</tr>\n\t</thead>\n\t<tbody>';\n\t\n\t$contador=0;\n\tforeach ($datos as $rows) {\n\t\t$contador=$contador+1;\n\t\t$a=$rows['hiserie'];\n\t\t$tabla.='\n\t\t<tr>\n\t\t<td>'.$contador.'</td>\n\t\t<td>'.$a.'</td>\n\t\t<td>'.$rows['serireexterno'].'</td>\n\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t<td>'.$rows['hifecha'].'</td>\n\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t$tabla.='\n\t\t<td>\n\t\t<form method=\"POST\" action=\"'.SERVERURL.'asignacioninfo/\">\n\t\t<input type=\"hidden\" value=\"'.($a).'\" name=\"codigo\">\n\t\t<button type=\"submit\" class=\"btn btn-primary\"><i class=\"fa fa-folder-open-o\"></i> Ingresar</button>\n\t\t</form> \n\t\t</td>\n\n\t\t\n\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "function list_aprov_nomina($id='',$id_sucursal='',$tipo='',$status='',$fecha=''){\n\t\t$sQuery=\"SELECT * FROM control_salida_extra WHERE 1 = 1 \";\n\t\tif($id) {\t$sQuery.=\"AND id = '$id' \";\t}\n\t\tif($id_sucursal) {\t$sQuery.=\"AND id_sucursal = '$id_sucursal' \";\t}\n\t\tif($tipo)\t{\t$sQuery.=\"AND tipo = '$tipo' \";\t}\n\t\tif($status)\t{\t$sQuery.=\"AND status = '$status' \";\t}\n\t\tif($fecha)\t{\t$sQuery.=\"AND fecha <= '$fecha' \";\t}\n\t\t\n\t\t$sQuery.=\"ORDER BY id_por_sucursal DESC \";\n\t\t\n\t//\tdie($sQuery);\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\n\t\t\t\n\t}", "function 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 }", "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 }", "function listar_simbolos_arasaac($id_tipo_palabra,$letra,$id_tipo_simbolo,$registrado,$marco,$contraste,$tipo_letra,$mayusculas,$minusculas,$castellano,$ruso,$rumano,$arabe,$chino,$bulgaro,$polaco,$ingles,$frances,$catalan) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND simbolos.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($minusculas == 1 && $mayusculas == 1) {\n\t\t \t$sql_mayusculas='AND (simbolos.inf_mayusculas=1 OR simbolos.inf_mayusculas=0)';\n\t\t} elseif ($minusculas == 1) { \n\t\t $sql_mayusculas='AND (simbolos.inf_mayusculas=0)';\n\t\t} elseif ($mayusculas == 1) { \n\t\t\t$sql_mayusculas='AND (simbolos.inf_mayusculas=1)';\n\t\t} elseif ($minusculas == 0 && $mayusculas == 0) { \n\t\t\t$sql_mayusculas='AND (simbolos.inf_mayusculas=1 OR simbolos.inf_mayusculas=0)';\n\t\t}\n\t\t\n\t\t\n\t\tif ($castellano==0 &&($ruso==1 || $rumano==1 || $arabe==1 || $chino==1 || $bulgaro==1 || $polaco==1 || $ingles==1 || $frances==1 || $catalan==1)) { \n\t\t\n\t\t\t$sql_idioma_superior='AND simbolos.sup_con_texto=0 ';\n\t\t\t$sql_idioma_inferior='AND (simbolos.inf_idioma=99999 ';\n\t\t\t\t\tif ($castellano==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=0 '; } \n\t\t\t\t\tif ($ruso==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=1 '; } \n\t\t\t\t\tif ($rumano==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=2 '; } \n\t\t\t\t\tif ($arabe==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=3 '; } \n\t\t\t\t\tif ($chino==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=4 '; } \n\t\t\t\t\tif ($bulgaro==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=5 '; } \n\t\t\t\t\tif ($polaco==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=6 '; } \n\t\t\t\t\tif ($ingles==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=7 '; }\n\t\t\t\t\tif ($frances==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=8 '; }\n\t\t\t\t\tif ($catalan==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=9 '; } \n\t\t\t$sql_idioma_inferior.= ' )';\t\t\t\n\t\t\n\t\t} elseif ($castellano==1) { \n\t\t\n\t\t\tif ($ruso==1 || $rumano==1 || $arabe==1 || $chino==1 || $bulgaro==1 || $polaco==1 || $ingles==1 || $frances==1 || $catalan==1) {\n\t\t\t\n\t\t\t$sql_idioma_inferior='AND simbolos.inf_idioma=0 ';\n\t\t\t$sql_idioma_superior='AND (simbolos.inf_idioma=99999 ';\n\t\t\t\t\tif ($ruso==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=1 '; } \n\t\t\t\t\tif ($rumano==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=2 '; } \n\t\t\t\t\tif ($arabe==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=3 '; } \n\t\t\t\t\tif ($chino==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=4 '; } \n\t\t\t\t\tif ($bulgaro==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=5 '; } \n\t\t\t\t\tif ($polaco==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=6 '; } \n\t\t\t\t\tif ($ingles==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=7 '; }\n\t\t\t\t\tif ($frances==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=8 '; }\n\t\t\t\t\tif ($catalan==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=9 '; } \n\t\t\t$sql_idioma_superior.= ' )';\n\t\t\t\n\t\t\t} elseif ($ruso==0 && $rumano==0 && $arabe==0 && $chino==0 && $bulgaro==0 && $polaco==0 && $ingles==0 && $frances==0 && $catalan==0) {\n\t\t\t\n\t\t\t\t$sql_idioma_superior='AND simbolos.sup_con_texto=0 ';\n\t\t\t\t$sql_idioma_inferior='AND simbolos.inf_idioma=0 ';\n\t\t\t\n\t\t\t}\n\t\t\n\t\t} elseif ($castellano==0 && $ruso==0 && $rumano==0 && $arabe==0 && $chino==0 && $bulgaro==0 && $polaco==0 && $ingles==0 && $frances==0 && $catalan==0) {\n\t\t\n\t\t\t$sql_idioma_inferior='';\n\t\t\t$sql_idioma_inferior='';\n\t\t}\n\t\t\n\t\tif ($tipo_letra==99) { $sql_tipo_letra=''; } \n\t\telse { $sql_tipo_letra='AND (simbolos.sup_font='.$tipo_letra.' OR simbolos.inf_font='.$tipo_letra.')'; }\n\t\t\n\t\tif ($id_tipo_palabra==99) { $sql_tipo_palabra=''; } \n\t\telse { $sql_tipo_palabra='AND palabras.id_tipo_palabra='.$id_tipo_palabra.''; }\n\t\t\n\t\tif ($marco==99) { $sql_marco=''; } \n\t\telse { $sql_marco='AND simbolos.marco='.$marco.''; }\n\t\t\n\t\tif ($contraste==99) { $sql_contraste=''; } \n\t\telse { $sql_contraste='AND simbolos.contraste='.$contraste.''; }\n\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo=tipos_simbolos.id_tipo'; } \n\t\telse { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo='.$id_tipo_simbolo.' AND tipos_simbolos.id_tipo='.$id_tipo_simbolo.''; }\n\t\t\n\t\tif ($letra=='todas') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT simbolos.*, palabras.*, tipos_simbolos.*\n\t\tFROM simbolos, palabras, tipos_simbolos\n\t\tWHERE simbolos.id_palabra=palabras.id_palabra\n\t\t$sql_tipo_simbolo\n\t\t$sql_tipo_palabra\n\t\t$sql_marco\n\t\t$sql_contraste\n\t\t$sql_tipo_letra\n\t\t$sql_mayusculas\n\t\t$sql_idioma_inferior\n\t\t$sql_idioma_superior\n\t\t$mostrar_registradas\n\t\tAND palabras.palabra LIKE '$sql_letra%%'\n\t\tORDER BY palabras.palabra asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function flistadotabulador($parametro1,$parametro2){\n\t\t $this->fconectar();\n\t\t if($parametro1!=\"\")//por codigo\n\t\t\t$sql = \"SELECT tabulador.idtabulador , precio_total_tab from tabulador WHERE (idtabulador='$parametro1') \";\n\t\t\t\n\t\t\t$sql1=\"select idtabulador, desc_ciud as nombre_ciudad_origen, desc_parr as nombre_parroquia_origen, desc_muni as nombre_municipio_origen, desc_esta as nombre_estado_origen, desc_pais as nombre_pais_origen\n\t\t\tfrom tabulador, ciudad, parroquia, municipio, estado, pais where (idtabulador='$parametro1' and tabulador.idciudad_origen_tabulador=ciudad.idciudad and ciudad.idparroquia=parroquia.idparroquia and parroquia.idmunicipio=municipio.idmunicipio and municipio.idestado=estado.idestado and estado.idpais=pais.idpais)\";\n\t\t\t\n\t\t\t$sql2=\"select idtabulador, desc_ciud as nombre_ciudad_destino, desc_parr as nombre_parroquia_destino, desc_muni as nombre_municipio_destino, desc_esta as nombre_estado_destino, desc_pais as nombre_pais_destino\n\t\t\tfrom tabulador, ciudad, parroquia, municipio, estado, pais where (idtabulador='$parametro1' and tabulador.idciudad_destino_tabulador=ciudad.idciudad and ciudad.idparroquia=parroquia.idparroquia and parroquia.idmunicipio=municipio.idmunicipio and municipio.idestado=estado.idestado and estado.idpais=pais.idpais)\";\n\n\t\t\t\n\t\t if($parametro2!=\"\")//por nombre\n\t\t\t$sql = \"SELECT tabulador.idtabulador , (SELECT CONCAT_WS(' ', desc_esta, ' ') from estado WHERE tabulador.idciudad_origen_tabulador=estado.idestado )\n\t\t\tAS nombre_estado_origen, (SELECT CONCAT_WS(' ', desc_esta, ' ') from estado WHERE tabulador.idciudad_destino_tabulador=estado.idestado )\n\t\t\tAS nombre_estado_destino , precio_total_tab from tabulador, estado WHERE (precio_total_tab='$parametro2' and tabulador.idciudad_origen_tabulador=estado.idestado) \";\n\t\t\t\n\t\t $cursor=$this->ffiltro($sql);\n\t\t $cursor1=$this->ffiltro($sql1);\n\t\t $cursor2=$this->ffiltro($sql2);\n\t\t $contador = 0;\n\t\t $encontrado=false;\n\t\t \n\t\t if ($laRow=$this->fproximo($cursor)){\n\t\t\t\tDO\n\t\t\t\t{\n\t\t\t\t $filas [$contador][1] = $laRow[\"idtabulador\"];\n\t\t\t\t $filas [$contador][2] = $laRow[\"precio_total_tab\"];\t\t\t\t \n\t\t\t\t}\n\t\t\t\tWHILE ($laRow=$this->fproximo($cursor));\n\t\t\t\tif ($laRow1=$this->fproximo($cursor1)){\n\t\t\t\tDO\n\t\t\t\t{\n\t\t\t\t $filas [$contador][3] = $laRow1[\"nombre_pais_origen\"];\n\t\t\t\t $filas [$contador][4] = $laRow1[\"nombre_estado_origen\"];\n\t\t\t\t $filas [$contador][5] = $laRow1[\"nombre_municipio_origen\"];\n\t\t\t\t $filas [$contador][6] = $laRow1[\"nombre_parroquia_origen\"];\n\t\t\t\t $filas [$contador][7] = $laRow1[\"nombre_ciudad_origen\"];\n\t\t\t\t}\n\t\t\t\tWHILE ($laRow1=$this->fproximo($cursor1));\n\t\t\t\tif ($laRow2=$this->fproximo($cursor2)){\n\t\t\t\tDO\n\t\t\t\t{\n\t\t\t\t $filas [$contador][8] = $laRow2[\"nombre_pais_destino\"];\n\t\t\t\t $filas [$contador][9] = $laRow2[\"nombre_estado_destino\"];\n\t\t\t\t $filas [$contador][10] = $laRow2[\"nombre_municipio_destino\"];\n\t\t\t\t $filas [$contador][11] = $laRow2[\"nombre_parroquia_destino\"];\n\t\t\t\t $filas [$contador][12] = $laRow2[\"nombre_ciudad_destino\"];\n\t\t\t\t $contador++;\n\t\t\t\t}\n\t\t\t\tWHILE ($laRow2=$this->fproximo($cursor2));\n\t\t }\n\t\t\t\t$encontrado=true;\n\t\t }\n\t\t if($encontrado)\n\t\t\t\treturn $filas;\n\t\t else\n\t\t\t\treturn 99;\t \n\t\t\t\n\t\t\t$this->fcierrafiltro($cursor);\n\t\t\t$this->fdesconectar();\n\t\t}\n\t\t\t\n }", "function lista_proveedores($ubicacion,$idfamilia,$idservicio,$interno,$activo,$texto)\n\t{\n\n\t\t$condicion =\" WHERE 1 \";\n\n\t\tif ($idfamilia!='') $condicion.= \" AND cs.IDFAMILIA ='$idfamilia'\";\n\t\tif ($activo!='') $condicion.= \" AND (cp.ACTIVO = $activo)\";\n\t\tif ($idservicio!='') $condicion.= \" AND (cps.IDSERVICIO = '$idservicio' OR cps.IDSERVICIO ='0' )\";\n\t\tif ($interno!='') $condicion.= \" AND cp.INTERNO = '$interno' \";\n\t\tif ($texto!='') $condicion.= \" AND (cp.NOMBRECOMERCIAL like '%$texto%' OR cp.NOMBREFISCAL like '%$texto%')\";\n\n\t\t/* QUERY BUSCA LOA PROVEEDORES QUE PRESTAN EL SERVICIO*/\n\n\t\t$sql=\"\n\t\t\tSELECT \n\t\t\t\tcp.IDPROVEEDOR\n\t\t\tFROM \n\t\t\t$this->catalogo.catalogo_proveedor cp\n\t\t\t\tLEFT JOIN $this->catalogo.catalogo_proveedor_servicio cps ON cps.IDPROVEEDOR = cp.IDPROVEEDOR \n\t\t\t\tLEFT JOIN $this->catalogo.catalogo_servicio cs ON cs.IDSERVICIO = cps.IDSERVICIO\n\t\t\t\t$condicion\n\t\t\t\t\n\t\t\tGROUP BY cps.IDPROVEEDOR\n\t\t\torder by cp.INTERNO DESC, cp.NOMBRECOMERCIAL ASC\n\t\t\";\n\n\n\t\t\t//\techo $sql;\n\t\t\t\t$res_prv= $this->query($sql);\n\t\t\t\t$lista_prov= array();\n\t\t\t\t$prov = new proveedor();\n\t\t\t\t$poli = new poligono();\n\t\t\t\t$circulo = new circulo();\n\t\t\t\t$point= array('lat'=>$ubicacion->latitud,'lng'=>$ubicacion->longitud);\n\n\t\t\t\tif ($ubicacion->cveentidad1==0){\n\t\t\t\t\twhile ($reg=$res_prv->fetch_object())\n\t\t\t\t\t{\n\t\t\t\t\t\t$lista_prov[$reg->IDPROVEEDOR][DISTANCIA]='';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twhile ($reg_prv=$res_prv->fetch_object())\n\t\t\t\t\t{\n\t\t\t\t\t\t$prov->carga_datos($reg_prv->IDPROVEEDOR);\n\t\t\t\t\t\t$distancia= geoDistancia($ubicacion->latitud,$ubicacion->longitud,$prov->latitud,$prov->longitud,$prov->lee_parametro('UNIDAD_LONGITUD'));\n\t\t\t\t\t\t$sw=0;\n\n\t\t\t\t\t\t$condicion=\"\";\n\t\t\t\t\t\t$condicion.= \" cuf.CVEPAIS = '$ubicacion->cvepais'\";\n\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD1 in ('$ubicacion->cveentidad1','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD2 in ('$ubicacion->cveentidad2','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD3 in ('$ubicacion->cveentidad3','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD4 in ('$ubicacion->cveentidad4','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD5 in ('$ubicacion->cveentidad5','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD6 in ('$ubicacion->cveentidad6','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD7 in ('$ubicacion->cveentidad7','0'))\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$condicion.= \" OR (\"; \n\n\t\t\t\t\t\tif ($ubicacion->cveentidad1!='0') $condicion.= \" (cuf.CVEENTIDAD1 = '$ubicacion->cveentidad1')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad2!='0') $condicion.= \" AND (cuf.CVEENTIDAD2 = '$ubicacion->cveentidad2')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad3!='0') $condicion.= \" AND (cuf.CVEENTIDAD3 = '$ubicacion->cveentidad3')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad4!='0') $condicion.= \" AND (cuf.CVEENTIDAD4 = '$ubicacion->cveentidad4')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad5!='0') $condicion.= \" AND (cuf.CVEENTIDAD5 = '$ubicacion->cveentidad5')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad6!='0') $condicion.= \" AND (cuf.CVEENTIDAD6 = '$ubicacion->cveentidad6')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad7!='0') $condicion.= \" AND (cuf.CVEENTIDAD7 = '$ubicacion->cveentidad7')\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$condicion .= \" )\";\n\n\t\t\t\t\t\t/* QUERY BUSCA LAS UNIDADES FEDERATIVAS QUE COINCIDAN CON LA UBICACION PARA CADA PROVEEDOR*/\n\t\t\t\t\t\t$sql=\"\n\t\t\tSELECT \n\t\t\t\tcpsxuf.IDPROVEEDOR, cpsxuf.IDUNIDADFEDERATIVA,cpsxuf.ARRAMBITO\n\t\t\tFROM\n\t\t\t $this->catalogo.catalogo_proveedor_servicio_x_unidad_federativa cpsxuf\n\t\t\t\tLEFT JOIN $this->catalogo.catalogo_unidadfederativa cuf ON $condicion\n\t\t\tWHERE \n\t\t\t\tcpsxuf.IDUNIDADFEDERATIVA = cuf.IDUNIDADFEDERATIVA\n\t\t\t\tAND\tcpsxuf.IDPROVEEDOR ='$reg_prv->IDPROVEEDOR'\n\t\t\t\tand cpsxuf.IDSERVICIO IN ('$idservicio', '0')\n\t\t\t\tORDER BY 3 DESC\n\t\t\t\";\n\t\t\t\t\t//echo $sql;\n\t\t\t$res_prv_entid= $this->query($sql);\n\t\t\twhile ($reg_prv_entid= $res_prv_entid->fetch_object())\n\t\t\t{\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][DISTANCIA]= $distancia;\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][AMBITO]=\t$reg_prv_entid->ARRAMBITO;\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][TIPOPOLIGONO] ='ENTIDAD';\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][ID] = $reg_prv_entid->IDUNIDADFEDERATIVA;\n\t\t\t\tif ($reg_prv_entid->ARRAMBITO=='LOC') $sw=1; // si hubo algun entidad LOC se activa el sw\n\n\t\t\t}\n\t\t\tif (($ubicacion->latitud !='' )&& ($ubicacion->longitud!=''))\n\t\t\t{\n\t\t\t\t$sql=\"\n\t\t\t\tSELECT \n\t\t\t\t\tcpsxp.IDPROVEEDOR, cpsxp.IDPOLIGONO\n\t\t\t\tFROM \n\t\t\t\t$this->catalogo.catalogo_proveedor_servicio_x_poligono cpsxp\n\t\t\t\tWHERE\n\t\t\t\t\tcpsxp.IDPROVEEDOR ='$reg_prv->IDPROVEEDOR'\n\t\t\t\t\";\n\t\t\t\t$res_prv_poli= $this->query($sql);\n\t\t\t\twhile ($reg_prv_poli = $res_prv_poli->fetch_object())\n\t\t\t\t{\n\t\t\t\t\t// verifica si el punto esta incluido en el poligono\n\t\t\t\t\t$in = pointInPolygon($point,$poli->lee_vertices($reg_prv_poli->IDPOLIGONO));\n\t\t\t\t\tif (( $in ) && ($sw==0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][DISTANCIA]= $distancia;\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][AMBITO]=\t$reg_prv_poli->ARRAMBITO;\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][TIPOPOLIGONO] ='POLIGONO';\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][ID] = $reg_prv_poli->IDPOLIGONO;\n\t\t\t\t\t\tif ($reg_prv_poli->ARRAMBITO=='LOC') $sw=1; // si hubo algun poligono LOC se activa el sw\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$sql=\"\n\t\t\t\tSELECT \n\t\t\t\t\tcpsxc.IDPROVEEDOR, cpsxc.IDCIRCULO\n\t\t\t\tFROM\n\t\t\t\t$this->catalogo.catalogo_proveedor_servicio_x_circulo cpsxc\n\t\t\t\tWHERE\n\t\t\t\t\tcpsxc.IDPROVEEDOR='$res_prv->IDPROVEEDOR'\n\t\t\t\t\";\n\n\t\t\t\t$res_prv_circ = $this->query($sql);\n\t\t\t\twhile ($reg_prv_circ = $res_prv_circ->fetch_object())\n\t\t\t\t{\n\t\t\t\t\t$circulo->leer($reg_prv_circ->IDCIRCULO);\n\t\t\t\t\t$vertices = $circulo->verticesCircle($circulo->latitud,$circulo->longitud,$circulo->radio,$circulo->idmedida);\n\t\t\t\t\t$in= pointInPolygon($point,$vertices);\n\n\t\t\t\t\tif (($in ) && ($sw==0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][DISTANCIA]= $distancia;\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][AMBITO]=\t$reg_prv_circ->ARRAMBITO;\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][TIPOPOLIGONO] ='CIRCULO';\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][ID] = $reg_prv_circ->IDCIRCULO;\n\t\t\t\t\t\tif ($reg_prv_circ->ARRAMBITO=='LOC') $sw=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // fin de la busqueda por LATITUD Y LONGITUD\n\n\n\n\n\n\t\t\t\t\t} // fin del while del proveedor\n\t\t\t\t}\n\n\t\t\t\t/* LEE LAS PROPORCIONES DE LA FORMULA DEL RANKING */\n\t\t\t\t$sql=\"\n\t\t\tSELECT \t\n\t\t\t\tELEMENTO,PROPORCION \n\t\t\tFROM \n\t\t\t$this->catalogo.catalogo_proporciones_ranking\n\t\t\t\";\n\t\t\t$result=$this->query($sql);\n\n\t\t\twhile($reg = $result->fetch_object())\n\t\t\t$proporcion[$reg->ELEMENTO] = $reg->PROPORCION;\n\n\n\t\t\t$max_costo_int=0;\n\t\t\t$max_costo_ext=0;\n\n\n\t\t\t/* OBTENER DATOS PARA EVALUAR EL RANKING */\n\t\t\tforeach ($lista_prov as $idproveedor=>$proveedor)\n\t\t\t{\n\t\t\t\t$sql=\"\n\t\tSELECT \n\t\t\tIF (cp.ARREVALRANKING='SKILL',IF (cp.SKILL>0,cp.SKILL/100,0), IF (cp.CDE>0,cp.CDE/100,0)) VALRANKING,\n\t\t\tIF (cpscn.MONTOLOCAL IS NULL,0,cpscn.MONTOLOCAL) COSTO,\n\t\t\tIF (cp.EVALSATISFACCION>0,cp.EVALSATISFACCION/100,0) EVALSATISFACCION ,\n\t\t\tcp.EVALINFRAESTRUCTURA EVALINFRAESTRUCTURA,\n\t\t\tcp.EVALFIDELIDAD EVALFIDELIDAD,\n\t\t\tcp.INTERNO\n\t\tFROM \n\t\t$this->catalogo.catalogo_proveedor cp\n\t\t\tLEFT JOIN $this->catalogo.catalogo_proveedor_servicio_costo_negociado cpscn ON cpscn.IDPROVEEDOR = cp.IDPROVEEDOR AND cpscn.IDSERVICIO = '$idservicio' AND cpscn.IDCOSTO = 1\n\t\tWHERE \n\t\t\tcp.IDPROVEEDOR = '$idproveedor' \n\t\t\";\n\t\t//\t\t\t\techo $sql;\n\t\t$result = $this->query($sql);\n\n\t\twhile ($reg=$result->fetch_object())\n\t\t{\n\t\t\tif ($reg->INTERNO){\n\t\t\t\t$temp_prov_int[$idproveedor][VALRANKING] = $reg->VALRANKING;\n\t\t\t\t$temp_prov_int[$idproveedor][COSTO] = $reg->COSTO;\n\t\t\t\t$temp_prov_int[$idproveedor][EVALSATISFACCION] = $reg->EVALSATISFACCION;\n\t\t\t\t$temp_prov_int[$idproveedor][EVALINFRAESTRUCTURA] = $reg->EVALINFRAESTRUCTURA;\n\t\t\t\t$temp_prov_int[$idproveedor][EVALFIDELIDAD] = $reg->EVALFIDELIDAD;\n\t\t\t\tif ($reg->COSTO > $max_costo_int) $max_costo_int= $reg->COSTO;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$temp_prov_ext[$idproveedor][VALRANKING] = $reg->VALRANKING;\n\t\t\t\t$temp_prov_ext[$idproveedor][COSTO] = $reg->COSTO;\n\t\t\t\t$temp_prov_ext[$idproveedor][EVALSATISFACCION] = $reg->EVALSATISFACCION;\n\t\t\t\t$temp_prov_ext[$idproveedor][EVALINFRAESTRUCTURA] = $reg->EVALINFRAESTRUCTURA;\n\t\t\t\t$temp_prov_ext[$idproveedor][EVALFIDELIDAD] = $reg->EVALFIDELIDAD;\n\t\t\t\tif ($reg->COSTO > $max_costo_ext) $max_costo_ext= $reg->COSTO;\n\t\t\t}\n\t\t}\n\n\t\t\t}\n\n\t\t\t/*calcula el Ranking de proveedores internos */\n\n\t\t\tforeach ($temp_prov_int as $idproveedor=>$proveedor)\n\t\t\t{\n\t\t\t\t$valranking = round($proveedor[VALRANKING] * $proporcion[CDE_SKILL],4);\n\t\t\t\t$valcosto = ($proveedor[COSTO]==0)?0:(1-($proveedor[COSTO]/$max_costo_int))*$proporcion[COSTO];\n\t\t\t\t$evalsatisfaccion = round($proveedor[EVALSATISFACCION] * $proporcion[SATISFACCION],2);\n\t\t\t\t$evalinfraestructura = round($proveedor[EVALINFRAESTRUCTURA] * $proporcion[INFRAESTRUCTURA],2);\n\t\t\t\t$evalfidelidad = round($proveedor[EVALFIDELIDAD] * $proporcion[FIDELIDAD],2);\n\t\t\t\t$lista_prov_int[$idproveedor][RANKING] = ($valranking + $valcosto+$evalsatisfaccion + $evalinfraestructura + $evalfidelidad)*100;\n\t\t\t}\n\n\t\t\t/*calcula el Ranking de proveedores externos */\n\t\t\tforeach ($temp_prov_ext as $idproveedor=>$proveedor)\n\t\t\t{\n\t\t\t\t$valranking = round($proveedor[VALRANKING] * $proporcion[CDE_SKILL],4);\n\t\t\t\t$valcosto = ($proveedor[COSTO]==0)?0:(1-($proveedor[COSTO]/$max_costo_ext))*$proporcion[COSTO];\n\t\t\t\t$evalsatisfaccion = round($proveedor[EVALSATISFACCION] * $proporcion[SATISFACCION],2);\n\t\t\t\t$evalinfraestructura = round($proveedor[EVALINFRAESTRUCTURA] * $proporcion[INFRAESTRUCTURA],2);\n\t\t\t\t$evalfidelidad = round($proveedor[EVALFIDELIDAD] * $proporcion[FIDELIDAD],2);\n\t\t\t\t$lista_prov_ext[$idproveedor][RANKING] = ($valranking + $valcosto+$evalsatisfaccion + $evalinfraestructura + $evalfidelidad)*100;\n\t\t\t}\n\n\t\t\t$temp_prov_int = ordernarArray($lista_prov_int,'RANKING',1);\n\t\t\t$temp_prov_ext = ordernarArray($lista_prov_ext,'RANKING',1);\n\n\n\t\t\tforeach ($temp_prov_int as $idproveedor => $proveedor)\n\t\t\t{\n\t\t\t\t$lista_ordenada[$idproveedor] = $lista_prov[$idproveedor];\n\t\t\t\t$lista_ordenada[$idproveedor][RANKING] = $lista_prov_int[$idproveedor][RANKING];\n\t\t\t}\n\t\t\tforeach ($temp_prov_ext as $idproveedor => $proveedor)\n\t\t\t{\n\t\t\t\t$lista_ordenada[$idproveedor] = $lista_prov[$idproveedor];\n\t\t\t\t$lista_ordenada[$idproveedor][RANKING] = $lista_prov_ext[$idproveedor][RANKING];\n\t\t\t}\n\t\t\t/* DEVUELVE EL ARRAY*/\n\t\t\treturn $lista_ordenada ;\n\n\t}", "public function getListaAsignacionAmbienteFisicosaAmbientesLogicos($datos) {\n $o_DMantenimientoGeneral = new DMantenimientoGeneral();\n $resultado = $o_DMantenimientoGeneral->getArrayAsignacionAmbienteFisicosaAmbientesLogicos($datos);\n $resultadoArray = array();\n foreach ($resultado as $fila) {\n if ($fila[6] == '1') {\n if ($_SESSION[\"permiso_formulario_servicio\"][201][\"DESACTIVAR_AMB_FISICO_X_AMB_LOGICO\"] == 1) {\n $fila[7] = \"<a href='#' onclick=\\\"irActivaryDesactivarAsignacionAmbFisicoaAmbLogico('\" . $fila[0] . \"','\" . $fila[1] . \"','\" . $fila[2] . \"','\" . $fila[6] . \"');\\\"><img src='../../../../fastmedical_front/imagen/icono/agt_action_success.png' title='Desactivar'/></a>\";\n } else {\n $fila[7] = \"<img src='../../../../fastmedical_front/imagen/icono/agt_action_success.png' title='Activado'/>\";\n }\n } else {\n if ($_SESSION[\"permiso_formulario_servicio\"][201][\"ACTIVAR_AMB_FISICO_X_AMB_LOGICO\"] == 1) {\n $fila[7] = \"<a href='#' onclick=\\\"irActivaryDesactivarAsignacionAmbFisicoaAmbLogico('\" . $fila[0] . \"','\" . $fila[1] . \"','\" . $fila[2] . \"','\" . $fila[6] . \"');\\\"><img src='../../../../fastmedical_front/imagen/icono/agt_action_fail.png' title='Activar'/></a>\";\n } else {\n $fila[7] = \"<img src='../../../../fastmedical_front/imagen/icono/agt_action_fail.png' title='Desactivado'/>\";\n }\n }\n if ($_SESSION[\"permiso_formulario_servicio\"][201][\"ELIMINAR_AMB_FISICO_X_AMB_LOGICO\"] == 1) {\n $fila[8] = \"<a href='#' onclick=\\\"irEliminarAsignacionAmbFisicoaAmbLogico('\" . $fila[0] . \"','\" . $fila[1] . \"','\" . $fila[2] . \"');\\\"><img src='../../../../fastmedical_front/imagen/icono/delete.png' title='Eliminar'/></a>\";\n } else {\n $fila[8] = \"\";\n }\n\n\n array_push($resultadoArray, $fila);\n }\n return $resultadoArray;\n }", "function listar_simbolos_arasaac_limit($id_tipo_palabra,$letra,$id_tipo_simbolo,$inicial,$cantidad,$registrado,$marco,$contraste,$tipo_letra,$mayusculas,$minusculas,$castellano,$ruso,$rumano,$arabe,$chino,$bulgaro,$polaco,$ingles,$frances,$catalan) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND simbolos.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($castellano==0 &&($ruso==1 || $rumano==1 || $arabe==1 || $chino==1 || $bulgaro==1 || $polaco==1 || $ingles==1 || $frances==1 || $catalan==1)) { \n\t\t\n\t\t\t$sql_idioma_superior='AND simbolos.sup_con_texto=0 ';\n\t\t\t$sql_idioma_inferior='AND (simbolos.inf_idioma=99999 ';\n\t\t\t\t\tif ($castellano==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=0 '; } \n\t\t\t\t\tif ($ruso==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=1 '; } \n\t\t\t\t\tif ($rumano==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=2 '; } \n\t\t\t\t\tif ($arabe==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=3 '; } \n\t\t\t\t\tif ($chino==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=4 '; } \n\t\t\t\t\tif ($bulgaro==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=5 '; } \n\t\t\t\t\tif ($polaco==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=6 '; } \n\t\t\t\t\tif ($ingles==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=7 '; }\n\t\t\t\t\tif ($frances==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=8 '; }\n\t\t\t\t\tif ($catalan==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=9 '; } \n\t\t\t$sql_idioma_inferior.= ' )';\t\t\t\n\t\t\n\t\t} elseif ($castellano==1) { \n\t\t\n\t\t\tif ($ruso==1 || $rumano==1 || $arabe==1 || $chino==1 || $bulgaro==1 || $polaco==1 || $ingles==1 || $frances==1 || $catalan==1) {\n\t\t\t\n\t\t\t\t$sql_idioma_inferior='AND simbolos.inf_idioma=0 ';\n\t\t\t\t$sql_idioma_superior='AND (simbolos.inf_idioma=99999 ';\n\t\t\t\t\t\tif ($ruso==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=1 '; } \n\t\t\t\t\t\tif ($rumano==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=2 '; } \n\t\t\t\t\t\tif ($arabe==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=3 '; } \n\t\t\t\t\t\tif ($chino==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=4 '; } \n\t\t\t\t\t\tif ($bulgaro==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=5 '; } \n\t\t\t\t\t\tif ($polaco==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=6 '; } \n\t\t\t\t\t\tif ($ingles==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=7 '; }\n\t\t\t\t\t\tif ($frances==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=8 '; }\n\t\t\t\t\t\tif ($catalan==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=9 '; } \n\t\t\t\t$sql_idioma_superior.= ' )';\n\t\t\t\n\t\t\t} elseif ($ruso==0 && $rumano==0 && $arabe==0 && $chino==0 && $bulgaro==0 && $polaco==0 && $ingles==0 && $frances==0 && $catalan==0) {\n\t\t\t\n\t\t\t\t$sql_idioma_superior='AND simbolos.sup_con_texto=0 ';\n\t\t\t\t$sql_idioma_inferior='AND simbolos.inf_idioma=0 ';\n\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\t} elseif ($castellano==0 && $ruso==0 && $rumano==0 && $arabe==0 && $chino==0 && $bulgaro==0 && $polaco==0 && $ingles==0 && $frances==0 && $catalan==0) {\n\t\t\n\t\t\t$sql_idioma_inferior='';\n\t\t\t$sql_idioma_inferior='';\n\t\t}\n\t\t\n\t\t\n\t\tif ($minusculas == 1 && $mayusculas == 1) {\n\t\t \t$sql_mayusculas='AND (simbolos.inf_mayusculas=1 OR simbolos.inf_mayusculas=0)';\n\t\t} elseif ($minusculas == 1) { \n\t\t $sql_mayusculas='AND (simbolos.inf_mayusculas=0)';\n\t\t} elseif ($mayusculas == 1) { \n\t\t\t$sql_mayusculas='AND (simbolos.inf_mayusculas=1)';\n\t\t} elseif ($minusculas == 0 && $mayusculas == 0) { \n\t\t\t$sql_mayusculas='AND (simbolos.inf_mayusculas=1 OR simbolos.inf_mayusculas=0)';\n\t\t}\n\t\t\n\t\tif ($tipo_letra==99) { $sql_tipo_letra=''; } \n\t\telse { $sql_tipo_letra='AND (simbolos.sup_font='.$tipo_letra.' OR simbolos.inf_font='.$tipo_letra.')'; }\n\t\t\n\t\tif ($id_tipo_palabra==99) { $sql_tipo_palabra=''; } \n\t\telse { $sql_tipo_palabra='AND palabras.id_tipo_palabra='.$id_tipo_palabra.''; }\n\t\t\n\t\tif ($marco==99) { $sql_marco=''; } \n\t\telse { $sql_marco='AND simbolos.marco='.$marco.''; }\n\t\t\n\t\tif ($contraste==99) { $sql_contraste=''; } \n\t\telse { $sql_contraste='AND simbolos.contraste='.$contraste.''; }\n\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo=tipos_simbolos.id_tipo'; } \n\t\telse { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo='.$id_tipo_simbolo.' AND tipos_simbolos.id_tipo='.$id_tipo_simbolo.''; }\n\t\t\n\t\tif ($letra=='todas') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT simbolos.*, palabras.*, tipos_simbolos.*\n\t\tFROM simbolos, palabras, tipos_simbolos\n\t\tWHERE simbolos.id_palabra=palabras.id_palabra\n\t\t$sql_tipo_simbolo\n\t\t$sql_tipo_palabra\n\t\t$sql_marco\n\t\t$sql_contraste\n\t\t$sql_tipo_letra\n\t\t$mostrar_registradas\n\t\t$sql_mayusculas\n\t\t$sql_idioma_inferior\n\t\t$sql_idioma_superior\n\t\tAND palabras.palabra LIKE '$sql_letra%%'\n\t\tORDER BY palabras.palabra asc\n\t\tLIMIT $inicial,$cantidad\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function listarAtletas($id,$liga){\n //$sql = \"SELECT `EntrenadoresAthlete`.`id`, `EntrenadoresAthlete`.`coache_id`, `CdeportivoUser`.`athlete_id`, `CdeportivoUser`.`cdeportivo_id`, `CdeportivoUser`.`nivelrendimiento`,`Coache`.`id`, `Coache`.`user_id`, `Coache`.`liga_id`, `Coache`.`disponibilidad`, `Coache`.`descripcion` FROM `sporte`.`entrenadores_athletes` AS `EntrenadoresAthlete` LEFT JOIN `sporte`.`cdeportivo_users` AS `CdeportivoUser` ON (`EntrenadoresAthlete`.`cdeportivo_id` = `CdeportivoUser`.`cdeportivo_id`) LEFT JOIN `sporte`.`athletes` AS `Athlete` ON (`CdeportivoUser`.`athlete_id`=`Athlete`.`id`) LEFT JOIN `sporte`.`coaches` AS `Coache` ON (`EntrenadoresAthlete`.`coache_id` = `Coache`.`id`) WHERE `Coache`.`liga_id`=:em and `Coache`.`user_id`=:enSELECT `EntrenadoresAthlete`.`id`, `EntrenadoresAthlete`.`coache_id`, `CdeportivoUser`.`athlete_id`, `User`.nombre,`User`.apellido, `CdeportivoUser`.`cdeportivo_id`, `CdeportivoUser`.`nivelrendimiento`, `Coache`.`user_id`, `Coache`.`liga_id` FROM `sporte`.`entrenadores_athletes` AS `EntrenadoresAthlete` LEFT JOIN `sporte`.`cdeportivo_users` AS `CdeportivoUser` ON (`EntrenadoresAthlete`.`cdeportivo_id` = `CdeportivoUser`.`cdeportivo_id`) LEFT JOIN `sporte`.`athletes` AS `Athlete` ON (`CdeportivoUser`.`athlete_id`=`Athlete`.`id`) LEFT JOIN `sporte`.`users` AS `User` ON (`Athlete`.`user_id`=`User`.`id`) LEFT JOIN `sporte`.`coaches` AS `Coache` ON (`EntrenadoresAthlete`.`coache_id` = `Coache`.`id`) WHERE `Coache`.`liga_id`= :em and `Coache`.`user_id`= :en\";\n $sql=\"SELECT `EntrenadoresAthlete`.`id`, `EntrenadoresAthlete`.`coache_id`, `CdeportivoUser`.`athlete_id`, `User`.nombre,`User`.apellido, `CdeportivoUser`.`cdeportivo_id`, `CdeportivoUser`.`nivelrendimiento`, `Coache`.`user_id`, `Coache`.`liga_id` FROM `sporte`.`entrenadores_athletes` AS `EntrenadoresAthlete` LEFT JOIN `sporte`.`cdeportivo_users` AS `CdeportivoUser` ON (`EntrenadoresAthlete`.`cdeportivo_id` = `CdeportivoUser`.`cdeportivo_id`) LEFT JOIN `sporte`.`athletes` AS `Athlete` ON (`CdeportivoUser`.`athlete_id`=`Athlete`.`id`) LEFT JOIN `sporte`.`users` AS `User` ON (`Athlete`.`user_id`=`User`.`id`) LEFT JOIN `sporte`.`coaches` AS `Coache` ON (`EntrenadoresAthlete`.`coache_id` = `Coache`.`id`) WHERE `Coache`.`liga_id`= :em and `Coache`.`user_id`= :en\";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->bindParam(\":em\", $liga);\n $sentencia->bindParam(\":en\", $id);\n $sentencia->execute(); \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "public function listaEmpresa($autorizado,$empresa)\n {\n $conexao=Conexao::getConnection();\n $result=array();\n $sql =\"SELECT '' CodEmpresa,'=>Selecionar Empresa<=' Empresa \";\n $sql.=\"UNION ALL \";\n \n $sql.=\"SELECT DISTINCT \";\n $sql.=\" empresa.cod_empresa CodEmpresa ,des_empresa Empresa \";\n $sql.=\" FROM tb_setores_autorizados setorautorizado \";\n \n $sql.=\" inner join tb_empresas empresa on\";\n $sql.=\" setorautorizado.cod_empresa=empresa.cod_empresa \";\n \n \n if ($autorizado!=\"\")\n {\n $sql.= \" WHERE cod_autorizado=?\";\n $smtm=$conexao -> prepare($sql);\n \n $smtm->bindValue(1,$autorizado);\n \n }\n elseif ($codEmpresa != \"\" )\n {\n $sql.= \" WHERE cod_autorizado=? AND \";\n $sql.= \" cod_empresa =?\";\n \n $smtm=$conexao -> prepare($sql);\n \n $smtm->bindValue(1,$autorizado);\n $smtm->bindValue(2,$empresa);\n \n }\n \n $smtm->execute();\n $result=$smtm->fetchAll(PDO::FETCH_ASSOC);\n $conexao=null;\n\n $html=\"\";\n foreach ($result as $key=>$coluna){\n\n if ( $key=='' )\n {\n $html.='<option disabled selected value=\"'. $coluna[\"CodEmpresa\"] .'\">' .$coluna[\"Empresa\"] .\"</option>\"; \n }\n else\n {\n $html.='<option value=\"'. $coluna[\"CodEmpresa\"] .'\">' .$coluna[\"Empresa\"] .\"</option>\"; \n }\n }\n return $html;\n\n }", "function listar($camposMostrar,$campo,$operador,$valor,$separador,$inicio,$fin)\n\t\t{\n\t\t\t$tablas=\"menciones*\".$this->tabla;\n\t\t\t$campos=\"en.mencion*en.apellidos*en.mencion\".$campo;\n\t\t\t$operadores=\"=*=*=\".$operador;\n\t\t\t$valores=\"me.id*\".$valor;\n\t\t\t$config=new config($tablas,$this->id,\"en.codigo*en.apellidos*en.nombres*en.maestria*me.nombre*en.anoEgreso*en.ofEnlace\",$campos,$operadores,$valores,\"AND*AND\",\"\",\"\",\"me*en\",$inicio,$fin);\n\t\t\t$config->enlazar();\n\t\t\t$a=$config->conn->crearConsultaMultiple();\n\t\t\treturn $a;\n\t\t}", "function Denuncias_tomadas($org_cod_organizacion)\n {\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia INNER JOIN denuncias_organizacion ON denuncia.de_cod_denuncia=denuncias_organizacion.de_cod_denuncia INNER JOIN organizacion ON denuncias_organizacion.org_cod_organizacion=organizacion.org_cod_organizacion WHERE organizacion.org_cod_organizacion=? AND denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($org_cod_organizacion));\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n}", "function listarConceptoCta(){\n\t\t$this->procedimiento='pre.f_concepto_cta_sel';\n\t\t$this->transaccion='PRE_CCTA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_concepto_cta','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_auxiliar','int4');\n\t\t$this->captura('id_cuenta','int4');\n\t\t$this->captura('id_concepto_ingas','int4');\n\t\t\n\t\t$this->captura('id_centro_costo','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t \n\t \n\t $this->captura('nro_cuenta','varchar');\n $this->captura('nombre_cuenta','varchar');\n $this->captura('desc_gestion','int4');\n $this->captura('id_gestion','int4');\n $this->captura('desc_centro_costo','text');\n $this->captura('desc_auxiliar','text');\n $this->captura('desc_cuenta','text');\n \n $this->captura('codigo_partida','varchar');\n $this->captura('nombre_partida','varchar');\n $this->captura('desc_partida','text');\n \n \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function listar_valores($tipo, $id){\n $contratista = \"\";\n $contratante = \"\";\n \n // Si viene algun dato y es contratista\n if ($tipo == \"contratista\" && $id != \"\") {\n $contratista = \"AND c.Fk_Id_Terceros = {$id}\";\n }\n \n // Si viene algun dato y es contratista\n if ($tipo == \"contratante\" && $id != \"\") {\n $contratista = \"AND c.Fk_Id_Terceros_Contratante = {$id}\";\n }\n\n $sql =\n \"SELECT\n c.Pk_Id_Contrato,\n c.Numero,\n c.Objeto,\n tc.Nombre AS Contratante,\n tbl_terceros.Nombre AS Contratista,\n c.Fecha_Inicial,\n c.Fecha_Vencimiento,\n c.Plazo AS Plazo_Inicial,\n c.Valor_Inicial,\n (\n SELECT\n ifnull(SUM(contratos_pagos.Valor_Pago), 0)\n FROM\n contratos\n LEFT JOIN contratos_pagos ON contratos_pagos.Fk_Id_Contratos = contratos.Pk_Id_Contrato\n WHERE\n contratos.Pk_Id_Contrato = c.Pk_Id_Contrato\n GROUP BY\n contratos.Pk_Id_Contrato\n ) AS Pagado,\n (\n SELECT\n IFNULL(SUM(adiciones.Plazo), 0)\n FROM\n contratos_adiciones AS adiciones\n WHERE\n adiciones.Fk_Id_Contrato = c.Pk_Id_Contrato\n ) AS Plazo_Adiciones,\n (\n SELECT\n IFNULL(\n SUM(contratos_adiciones.Valor),\n 0\n )\n FROM\n contratos_adiciones\n WHERE\n contratos_adiciones.Fk_Id_Contrato = c.Pk_Id_Contrato\n ) AS Valor_Adiciones,\n tbl_estados.Estado,\n tcc.Nombre AS CentroCosto\n FROM\n contratos AS c\n LEFT JOIN tbl_terceros ON c.Fk_Id_Terceros = tbl_terceros.Pk_Id_Terceros\n LEFT JOIN tbl_estados ON c.Fk_Id_Estado = tbl_estados.Pk_Id_Estado\n LEFT JOIN tbl_terceros AS tc ON c.Fk_Id_Terceros_Contratante = tc.Pk_Id_Terceros\n INNER JOIN tbl_terceros AS tcc ON tcc.Pk_Id_Terceros = c.Fk_Id_Terceros_CentrodeCostos\n WHERE c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')}\n {$contratista}\n ORDER BY\n c.Fk_Id_Estado ASC,\n c.Fecha_Inicial DESC\";\n\n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }", "public function filtrarListaAlumnos($tipo_filtro, $valor)\n {\n //`al`.`carrera_especialidad`\n $filtro = \"\";\n switch ($tipo_filtro){\n case \"1\":\n //Filtro por sexo\n $filtro = \" AND p.sexo = \".$valor;\n break;\n case \"2\":\n //Filtro por municipio\n $filtro = \" AND al.id_municipio = \".$valor;\n break;\n case \"3\":\n //Filtro por por estatus de la cuenta (activa/inactva)\n $filtro = \" AND p.estatus = \".$valor;\n break;\n case \"4\":\n //Filtro por por Id de iniversidad\n $filtro = \" AND al.id_universidad = \".$valor;\n break;\n case \"5\":\n //Filtro por tipo de procedenceia\n $filtro = \" AND al.tipo_procedencia = \".$valor;\n break;\n case \"6\":\n //Filtro por carrera\n $filtro = \" AND al.carrera_especialidad = \".$valor;\n break;\n default:\n $filtro = \"\";\n break;\n }\n $query = \"SELECT \n al.id_alumno, p.nombre, p.app, \n p.apm, p.telefono, p.sexo, \n p.estatus AS estatus_p, al.id_municipio, \n al.id_universidad, al.id_persona, \n al.matricula, al.nombre_uni, al.carrera_especialidad, \n al.email, al.fecha_registro, al.perfil_image, al.estatus \n AS estatus_al, tp.id_tipo_procedencia, tp.tipo_procedencia\n FROM alumno al,persona p , tipo_procedencia tp\n WHERE al.id_persona = p.id_persona \n AND al.id_tipo_procedencia_fk = tp.id_tipo_procedencia\n AND p.estatus = 1 \".$filtro.\" ORDER BY `p`.`nombre` ASC\";\n $this->connect();\n $result = $this->getData($query);\n $this->close();\n return $result;\n }", "public function listar_asignados_controlador(/*$privilegio,$codigo*/){\n\t\t\t\t\t\n\t\t\t\t\t$tabla=\"\";\n\n\t\t\t\t\t$consulta=\"SELECT *,T1.hardwareqr FROM hardware as T1, hardware_ingreso as T2, estado_info_hardware as T3, estado_asignacion_hardware as T4, tipo_hardware as T5, marca_hardware as T6, modelo_hardware as T7, color_hardware as T8, informe_ingreso_hardware as T9, empleados as T10, cargo as T11, departemento as T12, empresa as T13 WHERE T1.hiserie=T2.hiserie AND T2.estadoinfoharcodigo=T3.estadoinfoharcodigo AND T3.estadoinfoharnombre='APROBADO' AND T2.estadoasigharcodigo=T4.estadoasigharcodigo AND T4.estadoasigharnombre='ASIGNADO' AND T2.tipohardwarecodigo=T5.tipohardwarecodigo AND T2.marcahardwarecodigo=T6.marcahardwarecodigo AND T2.modelohardwarecodigo=T7.modelohardwarecodigo AND T2.colorhardwarecodigo=T8.colorhardwarecodigo AND T2.icodigo=T9.icodigo AND T1.empleadocodigo=T10.empleadocodigo AND T10.cargocodigo=T11.cargocodigo AND T11.departamentocodigo=T12.departamentocodigo AND T12.empresacodigo=T13.empresacodigo\n\t\t\t\t\t\";\n\n\t\t\t\t\t$conexion = mainModel::conectar();\n\t\t\t\t\t$datos = $conexion->query($consulta);\n\t\t\t\t\t$datos= $datos->fetchAll();\n\n\t\t\t\t\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>#</th>\n\t\t\t\t\t<th>COD. DE INVENTARIO</th>\n\t\t\t\t\t<th>SERIE DEL HARDWARE</th>\n\t\t\t\t\t<th>CÓDIGO QR DEL HARDWARE ASIGNADO</th>\n\t\t\t\t\t<th>HARDWARE DE INGRESO</th>\n\t\t\t\t\t<th>MARCA DE HARDWARE</th>\n\t\t\t\t\t<th>MODELO DE HARDWARE</th>\n\t\t\t\t\t<th>COLOR DE HARDWARE</th>\n\t\t\t\t\t<th>FECHA DE INGRESO</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t<th>ACCIONES</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t$tabla.='</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>';\n\t\t\t\t\t\n\t\t\t\t\t$contador=0;\n\t\t\t\t\tforeach ($datos as $rows) {\n\t\t\t\t\t\t$contador=$contador+1;\n\t\t\t\t\t\t$a=$rows['hardwareqr'];\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>'.$contador.'</td>\n\t\t\t\t\t\t<td>'.$rows['hiserie'].'</td>\n\t\t\t\t\t\t<td>'.$rows['serireexterno'].'</td>\n\t\t\t\t\t\t<td>'.$a.'</td>\n\t\t\t\t\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['hifecha'].'</td>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<form method=\"POST\" action=\"'.SERVERURL.'asignadosinfo/\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"'.trim($rows['hiserie']).'\" name=\"codigo\">\n\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\"> Información</button>\n\t\t\t\t\t\t</form> \n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "public function ConsultarAsistenciaDiarias()\n {\n try {\n $datos = $_REQUEST;\n $filtros = array_filter($datos);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n if($filtros['permiso'] != 1) {\n $id = $dbm->BuscarIProfesorTitular($filtros['grupoid']);\n if(!$id) {\n return new View(\"No se han encontrado profesores en el grupo consultado\", Response::HTTP_PARTIAL_CONTENT);\n }\n\n $usuario = $dbm->getRepositorioById('Usuario', 'profesorid', $id[0][\"profesorid\"]);\n if(!$usuario) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n \n }\n if($usuario->getUsuarioid() != $filtros['usuarioid']) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n }\n } \n $respuesta = $this->asistenciasDiarias($filtros, $dbm);\n if($respuesta['error']) {\n return new View($respuesta['mensaje'], Response::HTTP_PARTIAL_CONTENT);\n }\n return new View($respuesta, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "public function listaProjetosDistribuidosAction()\n {\n if ($this->_request->getParam(\"qtde\")) {\n $this->intTamPag = $this->_request->getParam(\"qtde\");\n }\n $order = array();\n\n //==== parametro de ordenacao ======//\n if ($this->_request->getParam(\"ordem\")) {\n $ordem = $this->_request->getParam(\"ordem\");\n if ($ordem == \"ASC\") {\n $novaOrdem = \"DESC\";\n } else {\n $novaOrdem = \"ASC\";\n }\n } else {\n $ordem = \"ASC\";\n $novaOrdem = \"ASC\";\n }\n\n //==== campo de ordenacao ======//\n if ($this->_request->getParam(\"campo\")) {\n $campo = $this->_request->getParam(\"campo\");\n $order = array($campo . \" \" . $ordem);\n $ordenacao = \"&campo=\" . $campo . \"&ordem=\" . $ordem;\n } else {\n $campo = null;\n $order = array(2, 5, 6); //Pronac,Produto,DescricaoAnalise\n $ordenacao = null;\n }\n\n $pag = 1;\n $get = Zend_Registry::get('get');\n\n if (isset($get->pag)) {\n $pag = $get->pag;\n }\n $inicio = ($pag > 1) ? ($pag - 1) * $this->intTamPag : 0;\n\n /* ================== PAGINACAO ======================*/\n $where = array();\n\n if (isset($get->pronac) && !empty($get->pronac)) {\n $where['Pronac = ?'] = $get->pronac;\n $this->view->pronac = $get->pronac;\n }\n\n if (isset($get->estado) && !empty($get->estado)) {\n if ($get->estado == 1) {\n $situacao = 'Em an�lise';\n } else {\n $situacao = '<font color=red>Concluida</font>';\n }\n $where['Situacao = ?'] = $situacao;\n $this->view->estado = $get->estado;\n }\n\n if (isset($get->orgao) && !empty($get->orgao)) {\n $where['idOrgao = ?'] = $get->orgao;\n $this->view->orgao = $get->orgao;\n }\n\n $vwProjetoDistribuidoVinculada = new vwProjetoDistribuidoVinculada();\n $total = $vwProjetoDistribuidoVinculada->buscarUnidades($where, $order, null, null, true);\n $fim = $inicio + $this->intTamPag;\n\n $totalPag = (int) (($total % $this->intTamPag == 0) ? ($total / $this->intTamPag) : (($total / $this->intTamPag) + 1));\n $tamanho = ($fim > $total) ? $total - $inicio : $this->intTamPag;\n\n $busca = $vwProjetoDistribuidoVinculada->buscarUnidades($where, $order, $tamanho, $inicio);\n\n $paginacao = array(\n \"pag\" => $pag,\n \"qtde\" => $this->intTamPag,\n \"campo\" => $campo,\n \"ordem\" => $ordem,\n \"ordenacao\" => $ordenacao,\n \"novaOrdem\" => $novaOrdem,\n \"total\" => $total,\n \"inicio\" => ($inicio + 1),\n \"fim\" => $fim,\n \"totalPag\" => $totalPag,\n \"Itenspag\" => $this->intTamPag,\n \"tamanho\" => $tamanho,\n );\n\n $this->view->paginacao = $paginacao;\n $this->view->qtdDocumentos = $total;\n $this->view->dados = $busca;\n $this->view->intTamPag = $this->intTamPag;\n }", "function listarUnActoPorIdyTitulo($id, $titulo) {\r\n $query = \"SELECT * FROM programas WHERE id_Programa LIKE \".$id.\" AND titulo LIKE '\".$titulo.\"';\";\r\n $database = new Database();\r\n $resultado = $database->getConn()->query($query);\r\n \r\n $arr = array();\r\n \r\n while ($row = $resultado->fetch(PDO::FETCH_ASSOC)) {\r\n $programa = new Programa();\r\n $programa->id=$row[\"id_Programa\"];\r\n $programa->titulo=$row[\"titulo\"];\r\n $programa->fecha=$row[\"fecha\"];\r\n $programa->enUso=$row[\"enUso\"];\r\n $programa->categoria=$row[\"id_Categoria\"];\r\n array_push($arr, $programa);\r\n }\r\n $paraDevolver = json_encode($arr);\r\n return $paraDevolver;\r\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 }", "function listar_simbolos($id_tipo_palabra,$letra,$id_tipo_simbolo,$idioma,$registrado) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND simbolos.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo_palabra==99) { $sql_tipo_palabra=''; } \n\t\telse { $sql_tipo_palabra='AND palabras.id_tipo_palabra='.$id_tipo_palabra.''; }\n\t\t\n\t\tif ($idioma==99) { $sql_idioma=''; } \n\t\telseif ($idioma==98) { $sql_idioma='AND simbolos.castellano=1'; }\n\t\telseif ($idioma==97) { $sql_idioma='AND simbolos.castellano=0 AND simbolos.id_idioma=0'; } \n\t\telse { $sql_idioma='AND simbolos.id_idioma='.$idioma.''; }\n\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo=tipos_simbolos.id_tipo'; } \n\t\telse { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo='.$id_tipo_simbolo.' AND tipos_simbolos.id_tipo='.$id_tipo_simbolo.''; }\n\t\t\n\t\tif ($letra=='todas') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT simbolos.*, palabras.*, tipos_simbolos.*\n\t\tFROM simbolos, palabras, tipos_simbolos\n\t\tWHERE simbolos.id_palabra=palabras.id_palabra\n\t\t$sql_tipo_simbolo\n\t\t$sql_tipo_palabra\n\t\t$sql_idioma\n\t\t$mostrar_registradas\n\t\tAND palabras.palabra LIKE '$sql_letra%%'\n\t\tORDER BY palabras.palabra asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function listarSolicitudModalidades()\r\n {\r\n $this->procedimiento = 'adq.f_solicitud_modalidades_sel';\r\n $this->transaccion = 'ADQ_SOLMODAL_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\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_solicitud', 'int4');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('id_solicitud_ext', 'int4');\r\n $this->captura('presu_revertido', 'varchar');\r\n $this->captura('fecha_apro', 'date');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('id_funcionario_aprobador', 'int4');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('id_gestion', 'int4');\r\n $this->captura('tipo', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('justificacion', 'text');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('lugar_entrega', 'varchar');\r\n $this->captura('extendida', 'varchar');\r\n\r\n $this->captura('posibles_proveedores', 'text');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('comite_calificacion', 'text');\r\n $this->captura('id_categoria_compra', 'int4');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('fecha_soli', 'date');\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\r\n $this->captura('id_uo', 'integer');\r\n\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('desc_funcionario_apro', 'text');\r\n $this->captura('desc_uo', 'text');\r\n $this->captura('desc_gestion', 'integer');\r\n $this->captura('desc_moneda', 'varchar');\r\n $this->captura('desc_depto', 'varchar');\r\n $this->captura('desc_proceso_macro', 'varchar');\r\n $this->captura('desc_categoria_compra', 'varchar');\r\n $this->captura('id_proceso_macro', 'integer');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('desc_funcionario_rpc', 'text');\r\n $this->captura('obs', 'text');\r\n $this->captura('instruc_rpc', 'varchar');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('id_proveedor', 'integer');\r\n $this->captura('id_funcionario_supervisor', 'integer');\r\n $this->captura('desc_funcionario_supervisor', 'text');\r\n $this->captura('ai_habilitado', 'varchar');\r\n $this->captura('id_cargo_rpc', 'integer');\r\n $this->captura('id_cargo_rpc_ai', 'integer');\r\n $this->captura('tipo_concepto', 'varchar');\r\n $this->captura('revisado_asistente', 'varchar');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('dias_plazo_entrega', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('precontrato', 'varchar');\r\n $this->captura('update_enable', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('contador_estados', 'bigint');\r\n\r\n $this->captura('nro_po', 'varchar');\r\n $this->captura('fecha_po', 'date');\r\n\r\n $this->captura('importe_total', 'numeric');\r\n $this->captura('prioridad', 'varchar');\r\n $this->captura('id_prioridad', 'integer');\r\n $this->captura('list_proceso', 'integer[]');\r\n\r\n $this->captura('cuce', 'varchar');\r\n $this->captura('fecha_conclusion', 'date');\r\n $this->captura('presupuesto_aprobado', 'varchar');\r\n\r\n $this->captura('tipo_modalidad', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n //echo($this->consulta);exit;\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function returnAnuncioAll($status = \"online\"){\n\n $objAnuncio = new StatusAnuncioDAO();\n #retorna o id dos registros que representam o estado online ou inativo, sendo o valor default sempre online.\n $this->arrayStatusId = $objAnuncio->retornaRegStatus($status);\n\n\n #faz a junção das tabelas relacionadas ao anuncio, verificando usuário e se vai retornar os anuncios ativos ou inativos.\n $sql = \"SELECT * FROM Anuncio\n INNER JOIN Forma_pagamento ON Anuncio.anuncio_id = Forma_pagamento.forma_pag_anuncio_ref\n INNER JOIN Link ON Anuncio.anuncio_id = Link.link_anuncio_ref\n INNER JOIN Endereco ON Anuncio.anuncio_endereco = Endereco.endereco_id\n INNER JOIN Horario_funcionamento ON Anuncio.anuncio_id = Horario_funcionamento.horario_func_anuncio_ref\n INNER JOIN Cont_views ON Anuncio.anuncio_id = Cont_views.cont_views_anuncio_ref\n INNER JOIN Plano_saude ON Anuncio.anuncio_id = Plano_saude.plano_saude_anuncio_ref\n INNER JOIN Facilidades ON Anuncio.anuncio_id = Facilidades.facilidades_anuncio_ref\n INNER JOIN Sub_categoria ON Anuncio.anuncio_categoria = Sub_categoria.sub_categoria_id\n INNER JOIN Categoria ON Sub_categoria.sub_categoria_cat_ref = Categoria.tipo_categoria_id\n WHERE Anuncio.anuncio_excluido = 0 AND (\";\n\n\n #verifica se os argumentos foram passados com sucesso. Somemte se os argumentos estiverem corretos que será executado a consulta.\n if($status === \"online\" || $status === \"inativo\"){\n\n for ($i = 0; $i < count($this->arrayStatusId); $i++) {\n\n $sql .= \" Anuncio.anuncio_status = \" . $this->arrayStatusId[$i]['status_anuncio_id'];//estamos trabalhando com arrays associativos.\n\n #se $i + 1 for iqual ao tamanho total do array, significa que a proxima iteração será a ultima.\n if (($i + 1) != count($this->arrayStatusId)) {\n $sql .= \" OR \";\n } else {\n #Na ultima iteração recebe o ';'\n $sql .= \") ORDER BY Anuncio.anuncio_titulo ASC, Anuncio.anuncio_id ASC;\";\n }\n\n }\n\n #caso ocorrer tudo certo retorna a visualização da tabela.\n if($row = $this->runSelect($sql)){\n\n\n return $row;\n\n } else {\n\n // echo \"A consulta não retonou dados para o inner join curriculo \" . $sql;\n }\n\n } else {\n\n // echo \"Favor verificar os agumentos passados\";\n\n }\n\n\n }", "public function getComentarios($idAnuncio){ \n /*$query = \"SELECT fc.idUser, fc.idComentario, fc.idAnuncio, fc.comentario, fc.idPadre, fc.fecha, fu.nick, fu2.nick nickPadre\n FROM final_comentario fc INNER JOIN final_usuario fu USING(idUser) LEFT JOIN final_usuario fu2 ON(fc.idPadre = fu2.idUser) \n WHERE idAnuncio = '\".$idAnuncio.\"' ORDER BY fecha ASC\"; */\n \n $query = \"SELECT fc.idAnuncio, fc.idComentario, fc.idUser, fu.nick, fc.comentario, fc.idPadre, fc.fecha, aux2.nick nickPadre\n FROM final_comentario fc INNER JOIN final_usuario fu ON(fc.idUser=fu.idUser) LEFT JOIN\n (SELECT aux.idComentario, fu.nick\n FROM (SELECT fc2.idComentario, fc2.idUser FROM final_comentario fc1 INNER JOIN final_comentario fc2 ON (fc1.idPadre=fc2.idComentario)) aux\n INNER JOIN final_usuario fu ON(aux.idUser=fu.idUser)) aux2 ON (fc.idPadre=aux2.idComentario)\n WHERE fc.idAnuncio = '\".$idAnuncio.\"' ORDER BY fc.fecha ASC\";\n \n return $this->con->action($query); \n }", "function listar_simbolos_especiales($id_tipo_palabra,$letra,$id_tipo_simbolo,$idioma,$registrado) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND simbolos_especiales.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo_palabra==99) { $sql_tipo_palabra=''; } \n\t\telse { $sql_tipo_palabra='AND palabras.id_tipo_palabra='.$id_tipo_palabra.''; }\n\t\t\n\t\tif ($idioma==99) { $sql_idioma=''; } \n\t\telseif ($idioma==98) { $sql_idioma='AND simbolos_especiales.castellano=1'; }\n\t\telseif ($idioma==97) { $sql_idioma='AND simbolos_especiales.castellano=0 AND simbolos_especiales.id_idioma=0'; } \n\t\telse { $sql_idioma='AND simbolos_especiales.id_idioma='.$idioma.''; }\n\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo_simbolo='AND simbolos_especiales.id_tipo_simbolo=tipos_simbolos.id_tipo'; } \n\t\telse { $sql_tipo_simbolo='AND simbolos_especiales.id_tipo_simbolo='.$id_tipo_simbolo.' AND tipos_simbolos.id_tipo='.$id_tipo_simbolo.''; }\n\t\t\n\t\tif ($letra=='todas') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT simbolos_especiales.*, palabras.*, tipos_simbolos.*\n\t\tFROM simbolos_especiales, palabras, tipos_simbolos\n\t\tWHERE simbolos_especiales.id_palabra=palabras.id_palabra\n\t\t$sql_tipo_simbolo\n\t\t$sql_tipo_palabra\n\t\t$sql_idioma\n\t\t$mostrar_registradas\n\t\tAND palabras.palabra LIKE '$sql_letra%%'\n\t\tORDER BY palabras.palabra asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function listaAmbientesFisicos($idSedeEmpresa, $nomAmbienteFisico) {\n $rs = $this->dMantenimientoGeneral->spListaAmbientesFisicos($idSedeEmpresa, $nomAmbienteFisico);\n $resultadoArray = array();\n\n foreach ($rs as $fila) {\n $fila[\"vNombreAmbienteFisico\"] = htmlentities($fila[2]);\n $fila[\"vDescAmbienteFisico\"] = htmlentities($fila[3]);\n\n\n /* if($fila[\"bActivo\"]==1)\n $fila[\"chk_activo\"] = \"<input type='checkbox' checked disabled>\";\n else\n $fila[\"chk_activo\"] = \"<input type='checkbox' disabled>\"; */\n $datos = base64_encode($fila[0] . \"|\" . $fila[1] . \"|\" . ($fila[2]) . \"|\" . ($fila[3]) . \"|\" . $fila[4] . \"|\" . $fila[5] . \"|\" . $fila[6] . \"|\" . $fila[7] . \"|\" . $fila[8] . \"|\" . $fila[9] . \"|\" . $fila[10]);\n $opciones = \"\";\n if ($_SESSION[\"permiso_formulario_servicio\"][202][\"ELIMINAR_AMB_FISICO\"] == 1) {\n $opciones .= \"<a href='#' onclick=\\\"eliminarAmbienteFisico('eliminar',$fila[0]);\\\"><img src='../../../../fastmedical_front/imagen/icono/op_rechazado.gif' alt='Eliminar' title='Eliminar' border='0'/></a>&nbsp;&nbsp;&nbsp;&nbsp;\";\n }\n if ($_SESSION[\"permiso_formulario_servicio\"][202][\"EDITAR_AMB_FISICO\"] == 1) {\n $opciones .= \"<a href='#' onclick=\\\"CargarVentana('popupMantAmbFisico','Registro de Ambientes Físicos','../mantenimientogeneral/manteAmbienteFisico.php?\" .\n \"datos=$datos&accion=actualizar','500','320',false,true,'',1,'',10,10,10,10);\\\">\" .\n \"<img src='../../../../fastmedical_front/imagen/icono/editar.png' alt='Editar' title='Editar' border='0'/></a>&nbsp;&nbsp;&nbsp;&nbsp;\";\n }\n if ($_SESSION[\"permiso_formulario_servicio\"][202][\"AGREGAR_SERVICIO_X_AMB_FISICO\"] == 1) {\n $opciones .= \"<a href='#' onclick=\\\"mostrarAmbFisicoxServBasico($fila[0],'$fila[vNombreAmbienteFisico]');\\\"><img src='../../../../fastmedical_front/imagen/icono/exec.gif' alt='Servicios' title='Servicios' border='0'/></a>&nbsp;&nbsp;&nbsp;&nbsp;\";\n }\n\n //if($_SESSION[\"permiso_formulario_servicio\"][202][\"AGREGAR_SERVICIO_X_AMB_FISICO\"]==1){\n $opciones .= \"<a href='#' onclick=\\\"mostrarMantCamaxAmbFisico($fila[0],'$fila[vNombreAmbienteFisico]');\\\"><img src='../../../../fastmedical_front/imagen/icono/cama.jpg' alt='Camas' title='Camas' border='0'/></a>\";\n //}\n $fila[\"opciones\"] = $opciones;\n array_push($resultadoArray, $fila);\n }\n return $resultadoArray;\n }", "public function citas_aplicarFiltrosCitas($fechaInicial, $fechaFinal, $usuarios, $tipoCita, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif(sizeof($usuarios) > 0){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(sizeof($usuarios) > 1){\n\t\t\t\t\t$andOr = \"OR\";\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$andOr = \"AND\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_agendaCitas_usuarios AS ACU ON ACU.idAgendaCita = C.idAgendaCita WHERE ( \";\t\n\t\t\t\t\n\t\t\t\tfor ($i=0; $i < sizeof($usuarios); $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif($i == 0){\n\t\t\t\t\t\t$opt = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$opt = $andOr;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$idUsuario = $usuarios[$i];\n\t\t\t\t\t$adicionQuery .= \" $opt ACU.idUsuario = '$idUsuario' \";\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" ) AND ACU.estado = 'A'\";\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( C.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($tipoCita != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND TC.idTipoCita = '$tipoCita' \";\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND C.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t C.idAgendaCita,\n\t\t\t\t\t\t C.fecha,\n\t\t\t\t\t\t DATE_FORMAT(C.horaInicio, '%H:%i') as horaInicio,\n\t\t\t\t\t\t C.fechaFin,\n\t\t\t\t\t\t DATE_FORMAT(C.horaFin, '%H:%i') as horaFin,\n\t\t\t\t\t\t C.duracionHoras,\n\t\t\t\t\t\t C.duracionMinutos,\n\t\t\t\t\t\t C.estado,\n\t\t\t\t\t\t C.observaciones,\n\t\t\t\t\t\t C.motivoCancelacion,\n\t\t\t\t\t\t C.idUsuarioCancela,\n\t\t\t\t\t\t C.idMascota,\n\t\t\t\t\t\t C.idSucursal,\n\t\t\t\t\t\t C.idTipoCita,\n\t\t\t\t\t\t C.idPropietario,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario,\n\t\t\t\t\t\t TC.nombre AS nombreTipoCita\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_agendaCitas AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = C.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuarioCancela\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_tiposCita AS TC ON TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (C.idAgendaCita)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (C.idAgendaCita) DESC; \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function agregarListInsumos($permission, $ot ,$idcliente){\n $data['permission'] = $permission; \n $data['plantilla'] = $this->Notapedidos->getPlantillaPorCliente($idcliente);\n $data['ot'] = $ot;\n $this->load->view(ALM.'notapedido/insumolist',$data);\n \n }", "public function consulta_asistencia()\n {\n $fecha_reporte = cambiaf_a_mysql($this->txt_fecha_desde->Text);\n $dir = $this->drop_direcciones->SelectedValue;\n $cod_organizacion = usuario_actual('cod_organizacion');\n\n // se obtienen las justificaciones del día seleccionado\n $sql=\"SELECT (p.cedula) as cedula_just, p.nombres, p.apellidos, j.codigo, jd.fecha_desde, jd.hora_desde,\n jd.fecha_hasta, jd.hora_hasta, jd.observaciones, jd.lun, jd.mar, jd.mie, jd.jue, jd.vie,\n tf.descripcion as descripcion_falta, tj.descripcion as descripcion_tipo_justificacion\n\t\t\t\t\t FROM asistencias.justificaciones as j, asistencias.justificaciones_dias as jd,\n\t\t\t\t\t\t asistencias.justificaciones_personas as jp, organizacion.personas as p, organizacion.personas_nivel_dir as n, asistencias.tipo_faltas tf, asistencias.tipo_justificaciones tj\n\t\t\t\t\t\tWHERE ((p.cedula = jp.cedula) and\n\t\t\t\t\t\t (p.cedula = n.cedula) and (jd.codigo_tipo_falta = tf.codigo) and (tj.id = jd.codigo_tipo_justificacion) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t (jd.fecha_desde <= '$fecha_reporte') and\n\t\t\t\t\t\t\t (jd.fecha_hasta >= '$fecha_reporte') and\n\t\t\t\t\t\t\t (j.estatus='1') and (j.codigo=jd.codigo_just) and (j.codigo=jp.codigo_just))\n\t\t\t\t\t\tORDER BY p.nombres, p.apellidos, jp.cedula \";\n $this->justificaciones=cargar_data($sql,$this); \n\n // se obtiene el horario vigente para la fecha seleccionada\n $this->horario_vigente = obtener_horario_vigente($cod_organizacion,$fecha_reporte,$this);\n \n // se realizan las consultas para mostrar los listados\n // Se consultan los asistentes\n $sql=\"SELECT (p.cedula) as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre,\n e.cedula, e.fecha, MIN(e.hora) as entrada, MAX(e.hora) as salida\n FROM asistencias.entrada_salida as e, organizacion.personas as p, organizacion.personas_nivel_dir as n\n WHERE ((p.cedula = e.cedula) and\n (p.cedula = n.cedula) and\n (n.cod_direccion LIKE '$dir%') and\n (p.fecha_ingreso <= '$fecha_reporte') and\n (e.fecha <= '$fecha_reporte') and\n (e.fecha >= '$fecha_reporte'))\n GROUP BY e.cedula\n ORDER BY entrada, p.nombres, p.apellidos \";\n $this->asistentes=cargar_data($sql,$this);\n $this->ind_asistentes = count($this->asistentes);\n\n // se consultan los inasistentes\n $sql2=\"SELECT p.cedula as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre\n\t\t\t\t\t\t\t\t\t FROM organizacion.personas as p, asistencias.personas_status_asistencias as s,\n\t\t\t\t\t\t\t\t\t organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t WHERE ((s.status_asistencia = '1') and\n\t\t\t\t\t\t\t\t\t \t\t (s.cedula = p.cedula) and\n\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t (p.cedula not in\n\t\t\t\t\t\t\t\t\t (SELECT e.cedula\n\t\t\t\t\t\t\t\t\t\t FROM asistencias.entrada_salida as e, organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t\t \t WHERE ((e.fecha = '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%'))\n\t\t\t\t\t\t\t\t\t\t\t GROUP BY e.cedula)))\n\t\t\t\t\t\t\t\t\t ORDER BY p.nombres, p.apellidos\";\n $this->inasistentes=cargar_data($sql2,$this);\n\n\n // Se consultan los asistentes para comparar inconsistencia de horas en el marcado\n // Si le falta hora\n $inconsistentes = array();\n foreach($this->asistentes as $arreglo){\n \n $sql2=\"SELECT COUNT(*) as n_horas FROM asistencias.entrada_salida as e\n\t\t\t WHERE e.fecha = '$fecha_reporte' AND e.cedula = '$arreglo[cedula_integrantes]' \";\n $resultado2=cargar_data($sql2,$this);\n if(!empty($resultado2)){\n if ($resultado2[0][n_horas]%2!=0) {//impar\n array_unshift($inconsistentes, array('cedula'=>$arreglo[cedula_integrantes], 'nombre'=>$arreglo[nombre],'salida'=>$arreglo[salida]));\n }//fin si\n }//fin si\n }//fin each\n\n\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n //$this->DataGrid_fj->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n if(!empty($inconsistentes)){\n $this->DataGrid_fh->DataSource=$inconsistentes;\n $this->DataGrid_fh->dataBind();\n }\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n $this->DataGrid->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n $this->DataGrid->DataSource=$this->asistentes;\n $this->DataGrid->dataBind();\n\n\n $this->DataGrid_ina->Caption=\"Inasistentes el d&iacute;a \".$this->txt_fecha_desde->Text;\n $this->DataGrid_ina->DataSource=$this->inasistentes;\n $this->DataGrid_ina->dataBind();\n\n /* Por un error que no supe identificar, el cual suma un numero adicional a la variable\n * de inasistentes no justificados, he tenido que sacarla del procedimiento donde normalmente\n * se contaba y tuve que realizarla por resta en esta sección.\n */\n $this->ind_inasistentes_no_just = count($this->inasistentes) - $this->ind_inasistentes_si_just;\n\n $this->Repeater->DataSource = $this->justificaciones;\n $this->Repeater->dataBind();\n\n $xale=rand(100,99999);\n // Se realiza la construcción del gráfico para indicadores\n\n $chart = new PieChart();\n $dataSet = new XYDataSet();\n if ($this->ind_asistentes>=1) {$dataSet->addPoint(new Point(\"Funcionarios Asistentes: (\".$this->ind_asistentes.\")\", $this->ind_asistentes));};\n if ($this->ind_inasistentes_no_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes NO JUSTIFICADOS: (\".$this->ind_inasistentes_no_just.\")\", $this->ind_inasistentes_no_just));};\n if ($this->ind_inasistentes_si_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes JUSTIFICADOS: (\".$this->ind_inasistentes_si_just.\")\", $this->ind_inasistentes_si_just));};\n $chart->setDataSet($dataSet);\n $chart->setTitle(\"Porcentajes de Asistencias / Inasistencias del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_01.png\");\n $chart->render(\"imagenes/temporales/\".$xale.\"_01.png\");\n $this->grafico1->ImageUrl = \"imagenes/temporales/\".$xale.\"_01.png\";\n\n\n $chart2 = new PieChart();\n $dataSet2 = new XYDataSet();\n $this->ind_asistentes_no_retrasados=$this->ind_asistentes-$this->ind_asistentes_tarde_no_just-$this->ind_asistentes_tarde_si_just;\n if ($this->ind_asistentes_no_retrasados>=1) {$dataSet2->addPoint(new Point(\"Puntuales: (\".$this->ind_asistentes_no_retrasados.\")\", $this->ind_asistentes_no_retrasados));};\n if ($this->ind_asistentes_tarde_no_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales NO JUSTIFICADOS: (\".$this->ind_asistentes_tarde_no_just.\")\", $this->ind_asistentes_tarde_no_just));};\n if ($this->ind_asistentes_tarde_si_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales JUSTIFICADOS: (\".$this->ind_asistentes_tarde_si_just.\")\", $this->ind_asistentes_tarde_si_just));};\n $chart2->setDataSet($dataSet2);\n $chart2->setTitle(\"Porcentajes de Retrasos del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_02.png\");\n $chart2->render(\"imagenes/temporales/\".$xale.\"_02.png\");\n $this->grafico2->ImageUrl = \"imagenes/temporales/\".$xale.\"_02.png\";\n\n // si la consulta de asistentes tiene resultados se habilita la impresion, sino, se deshabilita\n if (!empty($this->asistentes)) {$this->btn_imprimir->Enabled = true;} else {$this->btn_imprimir->Enabled = false;}\n\n }", "function listar($objeto){\n\t\t$condicion.=(!empty($objeto['id']))?' AND r.id='.$objeto['id']:'';\n\t// Filtra por los insumos preparados\n\t\t$condicion.=(!empty($objeto['insumos_preparados']))?' AND ids_insumos_preparados!=\\'\\'':'';\n\t// Filtra por tipo\n\t\t$condicion.=(!empty($objeto['tipo'])) ? ' AND p.tipo_producto = '.$objeto['tipo'] : '';\n\t// Filtros\n\t\t$condicion.=(!empty($objeto['filtro']) && $objeto['filtro'] == 'insumos_preparados_formula') ? ' AND (p.tipo_producto = 8 OR p.tipo_producto = 9) ' : '';\n\n\n\t// Ordena la consulta si existe\n\t\t$condicion.=(!empty($objeto['orden']))?' ORDER BY '.$objeto['orden']:'';\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tp.id AS idProducto, p.nombre, p.costo_servicio AS costo,\n\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad, p.factor as multiplo,\n\t\t\t\t\t(SELECT\n\t\t\t\t\t\tnombre\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad, u.factor, p.tipo_producto,\n\t\t\t\t\tr.ids_insumos_preparados AS insumos_preparados, r.ids_insumos AS insumos,\n\t\t\t\t\tr.preparacion, r.ganancia, ROUND(p.precio, 2) AS precio, p.codigo, p.minimos\n\t\t\t\tFROM\n\t\t\t\t\tapp_productos p\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_campos_foodware f\n\t\t\t\t\tON\n\t\t\t\t\t\tp.id = f.id_producto\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tcom_recetas r\n\t\t\t\t\tON\n\t\t\t\t\t\tr.id = p.id\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\tON\n\t\t\t\t\t\tu.id = p.id_unidad_compra\n\t\t\t\tWHERE\n\t\t\t\t\tp.status = 1 AND (p.tipo_producto = 8 OR p.tipo_producto = 9)\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "function listar_diccionario_idiomas_palabras($id_tipo,$letra,$id_idioma) {\n\t\t\t\n\t\tif ($letra=='todas') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\tif ($id_tipo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND palabras.id_tipo_palabra='.$id_tipo.''; }\n\t\t\n\t\t$query = \"SELECT DISTINCT traducciones_\".$id_idioma.\".*, palabras.*\n\t\tFROM traducciones_\".$id_idioma.\", palabras\n\t\tWHERE traducciones_\".$id_idioma.\".traduccion LIKE '$sql_letra%%' \n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabras.id_palabra\n\t\t$sql_tipo \n\t\tORDER BY traducciones_\".$id_idioma.\".traduccion asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function listarAction()\n {\n /* Recibo parámetros propios del grid */\n $sidx = $this->getRequest()->getParam('sidx'); /* Obtiene la dirección de ordenamiento ASC o DESC */\n $sord = $this->getRequest()->getParam('sord'); /* Obttiene la columna de orden - Es decir, la columna donde ha dado click el usuario para ordenar */\n $page = $this->getRequest()->getParam('page'); /* La página solicitado */\n $limit = $this->getRequest()->getParam('rows'); /* El número de filas solicitado */\n\n /* Recibo otros parámetros que envío */\n $txtBuscar = $this->getRequest()->getParam('txtBuscar'); /* Texto a buscar */\n $todaOficina = $this->getRequest()->getParam('todaOficina'); \n $dependencia_busca_id = $this->getRequest()->getParam('dependencia_busca_id'); \n\n /* Al ingresar por primera vez no existe el parámetro 'rows' por lo tanto lo hacemos igual a 1, para que no exista problema en la división $total_pages = ceil($count/$limit) */\n if(!$limit) $limit = 1;\n\n if(!$dependencia_busca_id){\n $dependencia_busca_id = $this->_usuario->dependencia_id;\n }\n \n $usuario_id = $this->_usuario->id; \n\n if($todaOficina){\n \n $where = \"a.dependencia_id = $dependencia_busca_id AND a.tipomovimiento_id IN (1,2,3,5,7) AND a.procesado = FALSE AND \"; \n \n } else {\n \n $where = \"a.dependencia_id = $dependencia_busca_id AND a.usuario_id = $usuario_id AND a.tipomovimiento_id IN (1,2,3,5,7) AND a.procesado = FALSE AND \"; \n \n }\n \n $where .= \"a.documento_id||c.nombre||b.firma||b.cargo||b.asunto ILIKE '%$txtBuscar%'\";\n\n /* Paso Array a formato Json */\n $count = $this->_modeloMovimiento->Count($where);\n\n if( $count > 0 ) {\n $total_pages = ceil($count/$limit);\n } else {\n $total_pages = 0;\n }\n if ($page > $total_pages) $page=$total_pages;\n\n $start = $limit * $page - $limit; // do not put $limit*($page - 1)\n if ($start<0) $start=0;\n\n $rsArray = $this->_modeloMovimiento->getList($sidx,$sord,$start,$limit,$where);\n\n $response = new stdClass(); \n $response->page = $page;\n $response->total = $total_pages;\n $response->records = $count;\n\n $i = 0;\n\n //$urlReportes = 'http://localhost:10088/misreportes/gidoc/';\n //$urlrptDocumento = $urlReportes.'rptDocumento2.php';\n \n //$urlReportes = 'http://localhost:10088/misreportes/gidoc/';\n \n foreach ($rsArray as $fila) {\n $id = $fila['id'];\n $documento_id = $fila['documento_id'];\n $secuencia = $fila['secuencia']; \n $expediente_id = $fila['expediente_id']; \n $tipomovimiento_id = $fila['tipomovimiento_id'];\n\n $linkEdita = \"<a href='#' onClick=editaDesdeLink($id) >$expediente_id-$secuencia</a>\";\n \n $urlrptDocumento = \"/gidoc/rptdocumento/index/documento_id/$documento_id\"; \n \n $linkVerArchivo = '';\n if($fila['archivo']){\n $linkVerArchivo = \"<a target='_blank' href='/uploads/\".$fila['archivo'].\"'><span class='ui-icon ui-icon-document'></span></a>\";\n } else {\n /* Si es Documento interno */\n if($fila['origen'] == 1){\n $linkVerArchivo = \"<a target='_blank' href='$urlrptDocumento' ><span class='ui-icon ui-icon-document'></span></a>\";\n }\n }\n\n if($fila['usuario_destino']){\n $derivadoA = $fila['oficina_destino'].'/'.$fila['usuario_destino']; \n } else {\n $derivadoA = $fila['oficina_destino']; \n }\n\n /* Preparo botón para firma o deshacer firma */\n $boton = '';\n if($tipomovimiento_id == 1 ){ /* Si está solo registrado */\n\n if($this->_config->general->opcionFirma){\n /* Si es Doc. Personal */\n if($fila['tipo'] == 1) {\n /* Mostrar botón para firmar */\n if(!$fila['firma']) { \n $boton = \"<div><button type='button' onclick='firmar($documento_id)' >Firmar</button></div>\";\n } else {\n $boton = \"<div><button type='button' onclick='deshacer_firma($documento_id)' >Retirar Firma</button></div>\";\n }\n } else { /* Si es doc. Interno */\n /* Muestro el botón firmar o deshacer firma si el Usuario activo es jefe y la oficina orígen es la oficina del usuario activo . */\n if($this->_usuario->jefe_de !== null and $fila['doc_dependencia_id'] == $this->_usuario->dependencia_id) {\n if(!$fila['firma']) { \n $boton = \"<div><button type='button' onclick='firmar($documento_id)' >Firmar</button></div>\";\n } else {\n $boton = \"<div><button type='button' onclick='deshacer_firma($documento_id)' >Retirar Firma</button></div>\";\n }\n }\n\n }\n }\n \n }\n\n /* Fin: Preparo botón para firma o deshacer firma */ \n \n $linkVerArchivo = '';\n if($fila['archivo']){\n $linkVerArchivo = \"<a target='_blank' href='/uploads/\".$fila['archivo'].\"'><span class='ui-icon ui-icon-document'></span></a>\";\n } else {\n /* Si es Documento interno */\n if($fila['origen'] == 1){\n if($fila['clasificacion_id'] <> 22){ /* Si es diferente de \"Confidencial\", podrá verse el documento */\n $linkVerArchivo = \"<a target='_blank' href='$urlrptDocumento' ><span class='ui-icon ui-icon-document'></span></a>\";\n }\n\n $linkVerArchivo .= $boton;\n \n }\n }\n\n \n /* Para mostrar tambien los archivos subidos */\n $linkVerArchivo .= $fila['archivos'];\n \n $response->rows[$i]['id'] = $id;\n $response->rows[$i]['cell'] = array($linkEdita, $fila['dependencia_origen'], $fila['firma'], \n $fila['cargo'], $fila['documento'], $fila['fecha_documento'],\n $fila['asunto'],$linkVerArchivo, $derivadoA,\n $fila['acciones'], $fila['tipomovimiento_id'], $fila['origen'], $fila['tipo']);\n $i++;\n }\n \n $this->_helper->json($response); /* */\n }", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function getObras($id_usuario);", "function listarUnActoPorTitulo($titulo) {\r\n $query = \"SELECT * FROM programas WHERE titulo LIKE '\".$titulo.\"';\";\r\n $database = new Database();\r\n $resultado = $database->getConn()->query($query);\r\n \r\n $arr = array();\r\n \r\n while ($row = $resultado->fetch(PDO::FETCH_ASSOC)) {\r\n $programa = new Programa();\r\n $programa->id=$row[\"id_Programa\"];\r\n $programa->titulo=$row[\"titulo\"];\r\n $programa->fecha=$row[\"fecha\"];\r\n $programa->enUso=$row[\"enUso\"];\r\n $programa->categoria=$row[\"id_Categoria\"];\r\n array_push($arr, $programa);\r\n }\r\n $paraDevolver = json_encode($arr);\r\n return $paraDevolver;\r\n \r\n }", "function contratos_por_estado($id_estado){\n $sql =\n \"SELECT\n c.Numero,\n c.Objeto,\n c.Lugar,\n c.Valor_Inicial,\n c.Acta_Inicio,\n c.Fecha_Acta_Inicio,\n c.Plazo,\n c.Fecha_Vencimiento,\n c.Fecha_Inicial,\n t.Nombre AS Contratista,\n e.Estado \n FROM\n contratos AS c\n INNER JOIN tbl_terceros AS t ON c.Fk_Id_Terceros = t.Pk_Id_Terceros\n INNER JOIN tbl_estados AS e ON c.Fk_Id_Estado = e.Pk_Id_Estado \n WHERE\n c.Fk_Id_Estado = $id_estado \n AND c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')} \n ORDER BY\n c.Numero ASC\";\n \n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }", "private function f_ListarValidado(){\n $lobj_AccesoZona = new cls_AccesoZona;\n //creo la peticion\n $pet = array(\n 'operacion' => 'buscarZonas',\n 'codigo_usuario' => $_SESSION['Con']['Nombre']\n );\n //guardo los datos en el objeto y gestiono para obtener una respuesta\n $lobj_AccesoZona->setPeticion($pet);\n $zona = $lobj_AccesoZona->gestionar();\n $cadenaBusqueda = ' where codigo_zona in(';\n if($zona['success'] == 1){\n for($x = 0;$x < count($zona['registros']) - 1; $x++){\n $cadenaBusqueda .= $zona['registros'][$x].',';\n }\n $cadenaBusqueda .= $zona['registros'][count($zona['registros']) - 1].' ';\n }\n $cadenaBusqueda .= \") \";\n $cadenaBusqueda .= ($this->aa_Atributos['valor']=='')?'':\"and nombre_finca like '%\".$this->aa_Atributos['valor'].\"%'\";\n $ls_SqlBase=\"SELECT * FROM agronomia.vfinca $cadenaBusqueda\";\n $orden = ' order by codigo_productor,letra';\n $ls_Sql = $this->f_ArmarPaginacion($ls_SqlBase,$orden);\n $x=0;\n $la_respuesta=array();\n $this->f_Con();\n $lr_tabla=$this->f_Filtro($ls_Sql);\n while($la_registros=$this->f_Arreglo($lr_tabla)){\n $la_respuesta[$x]['codigo']=$la_registros['codigo_productor'];\n $la_respuesta[$x]['nombre']=$la_registros['codigo_productor'].'-'.$la_registros['letra'];\n $la_respuesta[$x]['id_finca']=$la_registros['id_finca'];\n $x++;\n }\n $this->f_Cierra($lr_tabla);\n $this->f_Des();\n $this->aa_Atributos['registros'] = $la_respuesta;\n $lb_Enc=($x == 0)?false:true;\n return $lb_Enc;\n }", "function getListOpcional()\n{\n global $conn;\n /*\n *query da disciplina\n */\n $sqld = \"SELECT\n cat_id,\n cat_titulo\n\n FROM \".TABLE_PREFIX.\"_categoria\n WHERE cat_status=1 AND cat_area='Disciplinas'\n ORDER BY cat_titulo\";\n\n $opc = array();\n if(!$qryd = $conn->prepare($sqld))\n echo divAlert($conn->error, 'error');\n\n else {\n\n $qryd->execute();\n $qryd->bind_result($id, $titulo);\n\n while ($qryd->fetch())\n $opc[$id] = $titulo;\n\n $qryd->close();\n\n\n }\n\n return $opc;\n}", "public function BuscaOrganizacionalTodosVerMas($tupla)\r\n {\r\n //$dbl = new Mysql($encryt->Decrypt_Text($_SESSION[BaseDato]), $encryt->Decrypt_Text($_SESSION[LoginBD]), $encryt->Decrypt_Text($_SESSION[PwdBD]) );\r\n $Nivls = \"\";\r\n { \r\n //$Consulta3=\"select id as id_organizacion,parent_id as organizacion_padre, title as identificacion from mos_organizacion where id in ($tupla[id_organizacion])\";\r\n $Consulta3=\"select * from mos_documentos_estrorg_arbolproc where IDDoc='\".$tupla[IDDoc].\"' and tipo='EO'\"; \r\n $Resp3 = $this->dbl->query($Consulta3,array()); \r\n foreach ($Resp3 as $Fila3) \r\n { \r\n $Nivls .= $this->BuscaOrganizacional(array('id_organizacion' => $Fila3[id_organizacion_proceso])).\"<br /><br />\";\r\n }\r\n if($Nivls!='')\r\n $Nivls=substr($Nivls,0,strlen($Nivls)-6);\r\n else\r\n $Nivls='-- Sin información --';\r\n }\r\n \r\n if (strlen($Nivls)>200){\r\n $string = explode($Nivls, '<br /><br />');\r\n $valor_final = '';\r\n foreach ($string as $value) {\r\n $valor_final .= $value;\r\n if (strlen($valor_final)>200){\r\n return substr($valor_final, 0, 200) . '.. <br/>\r\n <a href=\"#\" tok=\"' .$tupla[IDDoc]. '-doc\" class=\"ver-mas\">\r\n <i class=\"glyphicon glyphicon-search\" href=\"#search\"></i> Ver Mas\r\n <input type=\"hidden\" id=\"ver-mas-' .$tupla[IDDoc]. '-doc\" value=\"'.$Nivls.'\"/>\r\n </a>';\r\n }\r\n $valor_final .= \"<br /><br />\";\r\n \r\n }\r\n \r\n return substr($Nivls, 0, 200) . '.. <br/>\r\n <a href=\"#\" tok=\"' .$tupla[IDDoc]. '-doc\" class=\"ver-mas\">\r\n <i class=\"glyphicon glyphicon-search\" href=\"#search\"></i> Ver Mas\r\n <input type=\"hidden\" id=\"ver-mas-' .$tupla[IDDoc]. '-doc\" value=\"'.$Nivls.'\"/>\r\n </a>';\r\n }\r\n //return $tupla[analisis_causal];\r\n \r\n return $Nivls;\r\n\r\n }", "function listar_originales_idioma($registrado,$id_tipo,$letra,$filtrado,$orden,$id_subtema,$id_idioma,$tipo_pictograma,$txt_locate,$sql) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND palabras.id_tipo_palabra='.$id_tipo.''; }\n\t\t\t\n\t\tif (isset($sql) && $sql !='') { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\t\t'.$sql; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t} else {\n\t\t\t\n\t\t\tif ($id_subtema==99999) { \n\t\t\t\t$sql_subtema=''; \n\t\t\t\t$subtema_tabla='';\n\t\t\t\t$subtema_tabla_from='';\n\t\t\t} \n\t\t\telse { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\tAND palabra_subtema.id_subtema='.$id_subtema.''; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($letra==\"\") { $sql_letra=''; } \n\t\telse { \n\t\t\n\t\t\tswitch ($txt_locate) { \n\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 2:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion='$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}\t\n\t\t\n\t\tif ($filtrado==1) { $sql_filtrado='imagenes.ultima_modificacion'; } \n\t\telseif ($filtrado==2) { $sql_filtrado='palabras.palabra'; }\n\t\t\n\t\t$query = \"SELECT COUNT(*)\n\t\tFROM palabra_imagen, imagenes, palabras, traducciones_\".$id_idioma.\" $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabra_imagen.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabras.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".traduccion IS NOT NULL\n\t\t$sql_letra\n\t\t$sql_tipo\n\t\t$sql_subtema\t\n\t\tAND imagenes.id_tipo_imagen=$tipo_pictograma\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$mostrar_registradas\n\t\tORDER BY $sql_filtrado $orden\";\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$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row[0];\n\t\t\n\t}", "public function listar_abonos_ver_table($idGenAbono) {\n $dato = [];\n\n //--- Datos del Logeado ---//\n $userdata = $this->session->all_userdata();\n //--- datos ---//\n $abonos_detalle = $this->app_model->get_detalle_abono_by_idGenAbono($idGenAbono);\n $ivaTipos = $this->app_model->get_iva_tipos();\n $empresa = $this->app_model->get_empresas();\n if ($abonos_detalle) {\n foreach ($abonos_detalle as $key => $value) {\n\n $idGenAbono = \"'\" . $value['idGenAbono'] . \"'\";\n\n $opcines_iva = \"\";\n\n if (isset($ivaTipos)):\n for ($j = 0; $j < count($ivaTipos); $j++) :\n if ($ivaTipos[$j]['valorIva'] == $value['iva']):\n $opcines_iva .= '<option selected value=\"' . $ivaTipos[$j]['valorIva'] . '\">' . $ivaTipos[$j]['descripcion'] . '</option>';\n else:\n $opcines_iva .= '<option value=\"' . $ivaTipos[$j]['valorIva'] . '\">' . $ivaTipos[$j]['descripcion'] . '</option>';\n endif;\n endfor;\n endif;\n\n //--- control de stock ---//\n $cantidad = \"\";\n if ($empresa[0]['stock'] == 0) {\n $cantidad = '<input type=\"text\" value=\"' . $value[\"cantidad\"] . '\" id=\"cantProd' . $value[\"idProducto\"] . '\" onkeyup=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $value[\"stock\"] . ',' . $value[\"cantidad\"] . ',' . $empresa[0]['stock'] . ')\" class=\"form-control\" disabled>';\n } elseif ($empresa[0]['stock'] == 1) {\n $cantidad = '<input type=\"text\" value=\"' . $value[\"cantidad\"] . '\" id=\"cantProd' . $value[\"idProducto\"] . '\" onkeyup=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $value[\"stock\"] . ',' . $value[\"cantidad\"] . ',' . $empresa[0]['stock'] . ')\" class=\"form-control\" disabled>';\n }\n\n $dato[] = array(\n $value[\"idProducto\"],\n $value['codigo'],\n $value['nombre'],\n $cantidad,\n $value['stock'],\n '<div class=\"input-group\">' .\n '<span class=\"input-group-addon\">$</span>' .\n '<input type=\"text\" value=\"' . $value[\"precio\"] . '\" id=\"precioProd' . $value[\"idProducto\"] . '\"class=\"form-control\" disabled >' .\n '</div>',\n '<div class=\"input-group\">' .\n '<span class=\"input-group-addon\">%</span>' .\n '<input type=\"text\" value=\"' . $value[\"descuento\"] . '\" id=\"descProd' . $value[\"idProducto\"] . '\" onkeyup=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $empresa[0][\"stock\"] . ')\" class=\"form-control\" disabled>' .\n '</div>',\n '<div class=\"input-group\">' .\n '<span class=\"input-group-addon\">$</span>' .\n '<input type=\"text\" value=\"' . $value[\"subTotal\"] . '\" id=\"subTotalProd' . $value[\"idProducto\"] . '\" readonly class=\"form-control\">' .\n '</div>',\n '<select id=\"selectIva' . $value[\"idProducto\"] . '\" onchange=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $empresa[0][\"stock\"] . ')\" class=\"select-full\" required disabled>\n <option value=\"0\">IVA</option>' .\n $opcines_iva .\n '</select>',\n \"DT_RowId\" => $value['idProducto']\n );\n }\n }\n\n $aa = array(\n 'sEcho' => 1,\n 'iTotalRecords' => count($dato),\n 'iTotalDisplayRecords' => 10,\n 'aaData' => $dato\n );\n echo json_encode($aa);\n }", "function listarDetallePeriodoAgencia(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERDETAG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n $this->setParametro('id_agencia','id_agencia','int4');\n $this->setParametro('tipo','tipo','varchar');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta','int4');\n $this->captura('tipo','varchar');\n $this->captura('fecha','text');\n $this->captura('pnr','varchar');\n $this->captura('apellido','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto_boleto','numeric');\n $this->captura('comision','numeric');\n $this->captura('monto_credito_debito','numeric');\n $this->captura('ajuste','varchar');\n $this->captura('garantia','varchar');\n $this->captura('autorizacion_deposito','varchar');\n $this->captura('monto_credito_debito_mb','numeric');\n $this->captura('tipo_cambio','numeric');\n $this->captura('cierre_periodo','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function membrosFamilia($id_destino_fk, $codigo_familia)\n {\n // familia.id_destino_fk = ? AND familia.codigo_familia = ? ORDER BY familia.email DESC\";\n\n $sql = \"SELECT \n familia.nome,\n familia.rg,\n familia.email,\n familia.telefone1,\n familia.telefone2,\n familia.valor_na_epoca,\n familia.valor_de_venda,\n familia.id_vendedor_fk,\n categoria.nome_categoria as categoriaPassagem,\n login.nome as vendedor,\n ponto_encontro.id_destino_fk,\n ponto_de_encontro.descricao,\n ponto_de_encontro.horario\n \n FROM familia\n INNER JOIN login ON login.id_login = familia.id_vendedor_fk\n INNER JOIN passagem ON passagem.id_passagem = familia.id_passagem_fk\n INNER JOIN categoria ON categoria.id_categoria = passagem.id_categoria_fk\n INNER JOIN ponto_encontro ON ponto_encontro.codigo_familia = familia.codigo_familia\n INNER JOIN ponto_de_encontro ON ponto_de_encontro.id_ponto_encontro = ponto_encontro.id_ponto_de_encontro_fk\n \n WHERE familia.viagem_finalizada = 'NAO' AND \n familia.id_destino_fk = ? AND familia.codigo_familia = ? ORDER BY familia.email DESC\";\n\n $stmt = Connect::getInstance()->prepare($sql);\n $stmt->bindValue(1, $id_destino_fk);\n $stmt->bindValue(2, $codigo_familia);\n $stmt->execute();\n\n if ($stmt->rowCount() > 0) {\n $resultado = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n return $resultado;\n } else {\n return [\"<h1>Foi não</h1>\"];\n }\n }", "public function BuscaOrganizacionalTodosVerMas($tupla)\n {\n $Nivls = \"\";\n \n //print_r($tupla);\n $Resp3 = explode(',', $tupla[id_area]);//, $pieces)\n foreach ($Resp3 as $Fila3) \n { \n $Nivls .= $this->arbol->BuscaOrganizacional(array('id_organizacion' => $Fila3)).\"<br /><br />\";\n }\n if($Nivls!='')\n $Nivls=substr($Nivls,0,strlen($Nivls)-6);\n else\n $Nivls='-- Sin información --';\n \n \n if (strlen($Nivls)>200){\n $string = explode($Nivls, '<br /><br />');\n $valor_final = '';\n foreach ($string as $value) {\n $valor_final .= $value;\n if (strlen($valor_final)>200){\n return substr($valor_final, 0, 200) . '.. <br/>\n <a href=\"#\" tok=\"' .$tupla[id]. '-doc\" class=\"ver-mas\">\n <i class=\"glyphicon glyphicon-search\" href=\"#search\"></i> Ver Mas\n <input type=\"hidden\" id=\"ver-mas-' .$tupla[id]. '-doc\" value=\"'.$Nivls.'\"/>\n </a>';\n }\n $valor_final .= \"<br /><br />\";\n \n }\n \n return substr($Nivls, 0, 200) . '.. <br/>\n <a href=\"#\" tok=\"' .$tupla[id]. '-doc\" class=\"ver-mas\">\n <i class=\"glyphicon glyphicon-search\" href=\"#search\"></i> Ver Mas\n <input type=\"hidden\" id=\"ver-mas-' .$tupla[id]. '-doc\" value=\"'.$Nivls.'\"/>\n </a>';\n }\n //return $tupla[analisis_causal];\n \n return $Nivls;\n\n }", "public function ConsultarAsignaciones($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVA($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $inserto = 0;\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $ruta= \"<a href='/\".$fila['Ruta'].\"'>Descargar Archivo</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['Modulo'],$fila['TipoArchivo'], $ruta ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "public function index() {\n $anuncio = new anuncios();\n //$usuario = new usuario();\n \n // $pag = \"inicial\";\n // $result = \"\";\n // if (isset($_GET['pag']) && !empty($_GET['pag'])){\n // $pag=$_GET['pag'];\n // }\n // if (isset($_GET['result']) && !empty($_GET['result'])){\n // $result=$_GET['result'];\n // }\n \n $refat = 1;\n $qtdPag = 2;\n if (isset($_GET['refat']) && !empty($_GET['refat'])){\n $refat = $_GET['refat'];\n }\n \n if (isset($_GET['filtros'])){\n $filtros = $this->iniciarFiltros($_GET['filtros']);\n if (!empty($filtros['categoria'])){\n $anuncio->setIDCategoria($filtros['categoria']);\n }\n if (!empty($filtros['preco'])){\n $preco = explode(\"-\", $filtros['preco']);\n //print_r($preco);\n $anuncio->setValor($preco);\n }\n if (!empty($filtros['estado'])){\n $anuncio->setEstado($filtros['estado']);\n }\n } else {\n $filtros = $this->iniciarFiltros();\n }\n \n //$filtros = array(\n // 'categoria' => '',\n // 'preco' => '',\n // 'estado' => ''\n //);\n \n //if (isset($_GET['filtros'])){\n // $filtros = $_GET['filtros'];\n // if (!empty($filtros['categoria'])){\n // $anuncio->setIDCategoria($filtros['categoria']);\n // }\n // if (!empty($filtros['preco'])){\n // $preco = explode(\"-\", $filtros['preco']);\n // //print_r($preco);\n // $anuncio->setValor($preco);\n // }\n // if (!empty($filtros['estado'])){\n // $anuncio->setEstado($filtros['estado']);\n // }\n //}\n \n $result = $anuncio->selecionarALLAnuncios($refat, $qtdPag);\n if ($anuncio->numRows() == 1){\n $result = array();\n $result[] = $anuncio->result();\n }\n \n $resultQTD = $anuncio->getQTDAnuncios();\n $totAnuncios = $resultQTD['qtd'];\n \n //$categorias = $cat->selecionarAllCategorias();\n //if ($cat->numRows() == 1){\n // $categorias = array();\n // $categorias[] = $cat->result();\n //}\n \n //$usuario->selecionarALLUser();\n //$totUsuarios = $usuario->numRows();\n \n //$totalPag = ceil($totAnuncios / $qtdPag);\n \n $dados = $this->getTemplateDados();\n $dados[\"refat\"] = $refat;\n $dados[\"filtros\"] = $filtros;\n $dados[\"result\"] = $result;\n //$dados[\"categorias\"] = $categorias;\n $dados[\"totAnuncios\"] = $totAnuncios;\n //$dados[\"totUsuarios\"] = $totUsuarios;\n $dados[\"totalPag\"] = ceil($totAnuncios / $qtdPag);\n \n $this->loadTemplate(\"inicial\", $dados);\n }", "public function listar_abonos_detalle_table($idGenAbono) {\n $dato = [];\n\n //--- Datos del Logeado ---//\n $userdata = $this->session->all_userdata();\n //--- datos ---//\n $abonos_detalle = $this->app_model->get_detalle_abono_by_idGenAbono($idGenAbono);\n $ivaTipos = $this->app_model->get_iva_tipos();\n $empresa = $this->app_model->get_empresas();\n if ($abonos_detalle) {\n foreach ($abonos_detalle as $key => $value) {\n\n $idGenAbono = \"'\" . $value['idGenAbono'] . \"'\";\n\n $opcines_iva = \"\";\n\n if (isset($ivaTipos)):\n for ($j = 0; $j < count($ivaTipos); $j++) :\n if ($ivaTipos[$j]['valorIva'] == $value['iva']):\n $opcines_iva .= '<option selected value=\"' . $ivaTipos[$j]['valorIva'] . '\">' . $ivaTipos[$j]['descripcion'] . '</option>';\n else:\n $opcines_iva .= '<option value=\"' . $ivaTipos[$j]['valorIva'] . '\">' . $ivaTipos[$j]['descripcion'] . '</option>';\n endif;\n endfor;\n endif;\n\n //--- control de stock ---//\n $cantidad = \"\";\n if ($empresa[0]['stock'] == 0) {\n $cantidad = '<input type=\"text\" value=\"' . $value[\"cantidad\"] . '\" id=\"cantProd' . $value[\"idProducto\"] . '\" onkeyup=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $value[\"stock\"] . ',' . $value[\"cantidad\"] . ',' . $empresa[0]['stock'] . ')\" class=\"form-control\">';\n } elseif ($empresa[0]['stock'] == 1) {\n $cantidad = '<input type=\"text\" value=\"' . $value[\"cantidad\"] . '\" id=\"cantProd' . $value[\"idProducto\"] . '\" onkeyup=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $value[\"stock\"] . ',' . $value[\"cantidad\"] . ',' . $empresa[0]['stock'] . ')\" class=\"form-control\">';\n }\n\n $dato[] = array(\n $value[\"idProducto\"],\n $value['codigo'],\n $value['nombre'],\n $cantidad,\n $value['stock'],\n '<div class=\"input-group\">' .\n '<span class=\"input-group-addon\">$</span>' .\n '<input type=\"text\" value=\"' . $value[\"precio\"] . '\" id=\"precioProd' . $value[\"idProducto\"] . '\" disabled class=\"form-control\">' .\n '</div>',\n '<div class=\"input-group\">' .\n '<span class=\"input-group-addon\">%</span>' .\n '<input type=\"text\" value=\"' . $value[\"descuento\"] . '\" id=\"descProd' . $value[\"idProducto\"] . '\" onkeyup=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $empresa[0][\"stock\"] . ')\" class=\"form-control\">' .\n '</div>',\n '<div class=\"input-group\">' .\n '<span class=\"input-group-addon\">$</span>' .\n '<input type=\"text\" value=\"' . $value[\"subTotal\"] . '\" id=\"subTotalProd' . $value[\"idProducto\"] . '\" readonly class=\"form-control\">' .\n '</div>',\n '<select id=\"selectIva' . $value[\"idProducto\"] . '\" onchange=\"calculoAbonoEditar(' . $value[\"idProducto\"] . ',' . $empresa[0][\"stock\"] . ')\" class=\"select-full\" required>\n <option value=\"0\">IVA</option>' .\n $opcines_iva .\n '</select>',\n '<i class=\"icon-remove4\" onclick=\"deleteRowListaAbonoEditar(' . $value[\"idProducto\"] . ')\"></i>',\n \"DT_RowId\" => $value['idProducto']\n );\n }\n }\n\n $aa = array(\n 'sEcho' => 1,\n 'iTotalRecords' => count($dato),\n 'iTotalDisplayRecords' => 10,\n 'aaData' => $dato\n );\n echo json_encode($aa);\n }", "public function listar_anunciosByUser($id_cliente){\n return $this->anunciosDAO->selectAllByUser($id_cliente);\n }", "public function listar_reacontrasignados_controlador(/*$privilegio,$codigo*/){\n\t\t\t\t\t\n\t\t\t\t\t$tabla=\"\";\n\t\t\t\t\t$consulta=\"SELECT *,T1.hardwareqr FROM hardware as T1, hardware_ingreso as T2, estado_info_hardware as T3, estado_asignacion_hardware as T4, tipo_hardware as T5, marca_hardware as T6, modelo_hardware as T7, color_hardware as T8, informe_ingreso_hardware as T9, empleados as T10, cargo as T11, departemento as T12, empresa as T13 WHERE T1.hiserie=T2.hiserie AND T2.estadoinfoharcodigo=T3.estadoinfoharcodigo AND T3.estadoinfoharnombre='APROBADO' AND T2.estadoasigharcodigo=T4.estadoasigharcodigo AND T4.estadoasigharnombre='REASIGNADO' AND T2.tipohardwarecodigo=T5.tipohardwarecodigo AND T2.marcahardwarecodigo=T6.marcahardwarecodigo AND T2.modelohardwarecodigo=T7.modelohardwarecodigo AND T2.colorhardwarecodigo=T8.colorhardwarecodigo AND T2.icodigo=T9.icodigo AND T1.empleadocodigo=T10.empleadocodigo AND T10.cargocodigo=T11.cargocodigo AND T11.departamentocodigo=T12.departamentocodigo AND T12.empresacodigo=T13.empresacodigo\n\t\t\t\t\t\";\n\n\t\t\t\t\t$conexion = mainModel::conectar();\n\t\t\t\t\t$datos = $conexion->query($consulta);\n\t\t\t\t\t$datos= $datos->fetchAll();\n\n\t\t\t\t\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>#</th>\n\t\t\t\t\t<th>SERIE DEL HARDWARE</th>\n\t\t\t\t\t<th>CÓDIGO QR</th>\n\t\t\t\t\t<th>HARDWARE DE INGRESO</th>\n\t\t\t\t\t<th>MARCA DE HARDWARE</th>\n\t\t\t\t\t<th>MODELO DE HARDWARE</th>\n\t\t\t\t\t<th>COLOR DE HARDWARE</th>\n\t\t\t\t\t<th>FECHA DE INGRESO</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t<th>ACCIONES</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t$tabla.='</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>';\n\t\t\t\t\t\n\t\t\t\t\t$contador=0;\n\t\t\t\t\tforeach ($datos as $rows) {\n\t\t\t\t\t\t$contador=$contador+1;\n\t\t\t\t\t\t$a=$rows['hardwareqr'];\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>'.$contador.'</td>\n\t\t\t\t\t\t<td>'.$rows['hiserie'].'</td>\n\t\t\t\t\t\t<td>'.$a.'</td>\n\t\t\t\t\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['hifecha'].'</td>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<form method=\"POST\" action=\"'.SERVERURL.'reasignadosinfo/\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$rows['hiserie'].'\" name=\"codigo\">\n\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\"> Información</button>\n\t\t\t\t\t\t</form> \n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "public function listar_liberados_controlador(/*$privilegio,$codigo*/){\n\t\t\t\t\t\n\t\t\t\t\t$tabla=\"\";\n\t\t\t\t\t//Consulta para la busqueda de reasignación de hardware \n\t\t\t\t\t//Para la búsqueda se utilizo una tabla dinamica de la plantilla de Gentellas Master\n\t\t\t\t\t$consulta=\"SELECT *,T1.hardwareqr FROM hardware as T1, hardware_ingreso as T2, estado_info_hardware as T3, estado_asignacion_hardware as T4, tipo_hardware as T5, marca_hardware as T6, modelo_hardware as T7, color_hardware as T8, informe_ingreso_hardware as T9, empleados as T10, cargo as T11, departemento as T12, empresa as T13 WHERE T1.hiserie=T2.hiserie AND T2.estadoinfoharcodigo=T3.estadoinfoharcodigo AND T3.estadoinfoharnombre='APROBADO' AND T2.estadoasigharcodigo=T4.estadoasigharcodigo AND T4.estadoasigharnombre='NO REASIGNADO' AND T2.tipohardwarecodigo=T5.tipohardwarecodigo AND T2.marcahardwarecodigo=T6.marcahardwarecodigo AND T2.modelohardwarecodigo=T7.modelohardwarecodigo AND T2.colorhardwarecodigo=T8.colorhardwarecodigo AND T2.icodigo=T9.icodigo AND T1.empleadocodigo=T10.empleadocodigo AND T10.cargocodigo=T11.cargocodigo AND T11.departamentocodigo=T12.departamentocodigo AND T12.empresacodigo=T13.empresacodigo\n\t\t\t\t\t\";\n\n\t\t\t\t\t$conexion = mainModel::conectar();\n\t\t\t\t\t$datos = $conexion->query($consulta);\n\t\t\t\t\t$datos= $datos->fetchAll();\n\n\t\t\t\t\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>#</th>\n\t\t\t\t\t<th>COD. DE INVENTARIO</th>\n\t\t\t\t\t<th>SERIE DEL HARDWARE</th>\n\t\t\t\t\t<th>TIPO DE HARDWARE</th>\n\t\t\t\t\t<th>MARCA DE HARDWARE</th>\n\t\t\t\t\t<th>MODELO DE HARDWARE</th>\n\t\t\t\t\t<th>COLOR DE HARDWARE</th>\n\t\t\t\t\t<th>FECHA DE INGRESO</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t<th>ACCIONES</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t$tabla.='</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>';\n\t\t\t\t\t\n\t\t\t\t\t$contador=0;\n\t\t\t\t\tforeach ($datos as $rows) {\n\t\t\t\t\t\t$contador=$contador+1;\n\t\t\t\t\t\t$a=$rows['hiserie'];\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>'.$contador.'</td>\n\t\t\t\t\t\t<td>'.$rows['hiserie'].'</td>\n\t\t\t\t\t\t<td>'.$rows['serireexterno'].'</td>\n\t\t\t\t\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['hifecha'].'</td>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<form method=\"POST\" action=\"'.SERVERURL.'reasignacioninfo/\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"'.($a).'\" name=\"codigo\">\n\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\"><i class=\"fa fa-folder-open-o\"></i> Ingresar</button>\n\t\t\t\t\t\t</form> \n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "public function listaEstante($codEmpresa,$codArquivo,$codCorredor,$codEstante)\n {\n $conexao=Conexao::getConnection();\n $result=array();\n $sql =\"SELECT '' CodEstante,'=>Selecionar Estante<=' Estante \";\n $sql.=\"UNION ALL \";\n \n \n $sql.=\"SELECT cod_estante CodEstante ,des_estante Estante \";\n $sql.=\" FROM tb_estantes \";\n \n $smtm=$conexao -> prepare($sql);\n \n if ($codEstante != \"\" )\n {\n $sql.= \" WHERE cod_empresa =? AND \";\n $sql.= \" cod_arquivo =? AND \";\n $sql.= \" cod_corredor=? AND \";\n $sql.= \" cod_estante =? \";\n \n $smtm=$conexao->prepare($sql);\n \n $smtm->bindValue(1,$codEmpresa);\n $smtm->bindValue(2,$codArquivo);\n $smtm->bindValue(3,$codCorredor);\n $smtm->bindValue(4,$codEstante);\n \n \n }\n else if ($codCorredor != \"\" )\n {\n $sql.= \" WHERE cod_empresa =? AND \";\n $sql.= \" cod_arquivo =? AND \";\n $sql.= \" cod_corredor=? \";\n \n $smtm=$conexao->prepare($sql);\n \n $smtm->bindValue(1,$codEmpresa);\n $smtm->bindValue(2,$codArquivo);\n $smtm->bindValue(3,$codCorredor);\n \n \n }\n else if ($codArquivo != \"\" )\n {\n \n $sql.= \" WHERE cod_empresa =? AND \";\n $sql.= \" cod_arquivo =? \";\n \n $smtm=$conexao->prepare($sql);\n \n $smtm->bindValue(1,$codEmpresa);\n $smtm->bindValue(2,$codArquivo);\n \n \n } \n $smtm->execute();\n $result=$smtm->fetchAll(PDO::FETCH_ASSOC);\n $conexao=null;\n $html=\"\";\n foreach ($result as $key=>$coluna){\n\n if ( $key=='' )\n {\n $html.='<option disabled selected value=\"'. $coluna[\"CodEstante\"] .'\">' .$coluna[\"Estante\"] .\"</option>\"; \n }\n else\n {\n $html.='<option value=\"'. $coluna[\"CodEstante\"] .'\">' .$coluna[\"Estante\"] .\"</option>\"; \n }\n }\n return $html;\n }", "function listarAgendadas($id) \n\t{\n\t\t$this->db->select('*');\n\t\t\n\t\t$this->db->from('Auditoria');\n\n\t\t$this->db->where('statusID', $id);\n\n\t\t$this->db->join('Projeto' , 'Projeto.projetoID = Auditoria.projetoID');\n\n\t\t$this->db->join('Departamento' , 'Departamento.departamentoID = Projeto.departamentoID');\n\n\t\t$this->db->join('Unidade' , 'Unidade.unidadeID = Departamento.unidadeID');\n\n\t\t$this->db->join('Usuario' , 'Usuario.usuarioID = Auditoria.auditorID');\n\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query->result();\n\t}", "function listarTareaProgramada($datos){\n conectar($conexion);\n /*Declaracion de variables para implementar determinado Top en la consulta*/\n $varIng1 = ((isset($datos['radicado'])?$datos['radicado']:'') != '');\n $varIng2 = ((isset($datos['nomDesti'])?$datos['nomDesti']:'') != '');\n $varIng3 = ((isset($datos['correoElectro'])?$datos['correoElectro']:'') != '');\n $varIng4 = ((isset($datos['fechaIni'])?$datos['fechaIni']:'') != '');\n $varIng5 = ((isset($datos['estado'])?$datos['estado']:'') != '');\n /*Funcion que determina un Top a la consulta cuando se consultan datos*/\n if($varIng1 != '' || $varIng2 != '' || $varIng3 != '' || $varIng4 != '' || $varIng5 != ''){\n $top=\"1000\";\n }\n else{\n $top=\"50\";\n }\n $sql = \"SELECT OID,DS_NOMDESTINATARIO,DS_CORREODESTINATARIO,DS_ASUNTODESTINATARIO,DS_MENSAJEDESTINATARIO,SN_COPIA,CD_USUENVIA,DS_HOSTENVIA,DT_FECHAENVIA,SN_ESTADO\n FROM ADM_CORREOFRONTEND\n WHERE 1=1 \";\n if((isset($varIng1)?$varIng1:'') != ''){\n $sql.= \" AND OID = '\" . $datos['radicado']. \"'\";\n }\n if((isset($varIng2)?$varIng2:'') != ''){\n $sql.= \" AND DS_NOMDESTINATARIO LIKE '%\".$datos['nomDesti'].\"%'\";\n }\n if((isset($varIng3)?$varIng3:'') != ''){\n $sql.= \" AND DS_CORREODESTINATARIO = '\".$datos['correoElectro'].\"'\";\n }\n if((isset($varIng4)?$varIng4:'') != ''){\n $sql.= \" AND CAST(DT_FECHAENVIA AS DATE) BETWEEN '\" . $datos['fechaIni']. \"' AND '\" . $datos['fechaFin']. \"'\";\n }\n if((isset($varIng5)?$varIng5:'') != ''){\n $sql.= \" AND SN_ESTADO = '\" . $datos['estado']. \"'\";\n }\n /*Ordenamos por el Consecutivo*/\n if((isset($datos['numCodigo'])?$datos['numCodigo']:'') == '' & (isset($datos['nomDocumento'])?$datos['nomDocumento']:'') == ''\n & (isset($datos['fechaIni'])?$datos['fechaIni']:'')){\n }\n $sql.=\" ORDER BY OID DESC\n LIMIT $top\";\n $sqlQuery=mysqli_query($conexion,$sql) or die (\"Error al momento de listar los envíos de correo \".mysqli_error($conexion));\n echo '\n <div class=\"table-responsive\">\n <table class=\"table table-striped table-bordered table-hover\" style=\"width:100%;\">\n <thead>\n <tr>\n <th scope=\"col\" style=\"width:4%;text-align:center;\"># Radicado</th>\n <th scope=\"col\" style=\"width:20%;text-align:center;\">Nombre destinatario</th>\n <th scope=\"col\" style=\"width:20%;text-align:center;\">Correo electronico</th>\n <th scope=\"col\" style=\"width:10%;text-align:center;\">Usuario envío</th>\n <th scope=\"col\" style=\"width:10%;text-align:center;\">Fecha envío</th>\n <th scope=\"col\" style=\"width:2%;text-align:center;\">Estado</th>\n <th scope=\"col\" style=\"width:2%;text-align:center;\">Editar/Visualizar</th>\n </tr>\n </thead>\n <tbody>\n ';\n $i = 0;\n while($row = mysqli_fetch_array($sqlQuery)){\n $oid = $row['OID'];\n switch ($row['SN_ESTADO']) {\n case '0':\n $url = \"frontEnd.php?oid=$oid\";\n // $img = \"assets/img/edit.png\";\n $img = \"assets/img/ver.png\";\n $title='Visualizar';\n $content = '<i class=\"fa fa-circle text-danger\"></i>';\n break;\n case '1':\n $url = \"frontEnd.php?oid=$oid\";\n $img = \"assets/img/ver.png\";\n $title = 'Visualizar';\n $content = '<i class=\"fa fa-circle text-info\"></i>';\n break;\n }\n echo '\n <tr>\n <th scope=\"row\" style=\"text-align:center;\">'.$row['OID'].'</th>\n <td scope=\"row\">'.$row['DS_NOMDESTINATARIO'].'</td>\n <td scope=\"row\">'.$row['DS_CORREODESTINATARIO'].'</td>\n <td scope=\"row\">'.$row['CD_USUENVIA'].'</td>\n <td scope=\"row\">'.$row['DT_FECHAENVIA'].'</td>\n <td scope=\"row\" style=\"text-align:center;\">'.$content.'</td>\n <td scope=\"row\" style=\"text-align:center;\"><a href=\"'.$url.'\" data-toggle=\"tooltip\" title=\"'.$title.'\"><img class=\"addPagare\" id=\"addPagare\" title=\"\" src=\"'.$img.'\" width=\"20\" height=\"20\"></a> </td>\n </tr>\n ';\n $i++;\n }\n if($i == 1){\n $i = \"$i Registro\";\n }else{\n $i = \"$i Registros\";\n }\n echo\"<thead><th colspan='7' style='text-align:center;'>$i</th></thead>\";\n echo '\n </tbody>\n </table>\n </div>\n ';\n mysqli_close($conexion);\n}", "function getDados($codAtividade){\n\n }", "function get_listado($filtro=array())\n\t{\n\t\t// Se establacen preferencias de filtro en $where \n\t\t$where = array();\n\t\tif (isset($filtro['dni'])) {\n\t\t\t$where[] = \"dni = \".quote($filtro['dni']);\n\t\t}\n\t\t$sql = \"SELECT\n\t\t\tt_lp.id_presentacion,\n\t\t\tt_lp.fecha,\n\t\t\tt_lp.dni,\n\t\t\tD.id_dep,\n\t\t\tD.depositario,\n\t\t\tt_lp.url_pdf,\n\t\t\tTD.tipo_doc,\n\t\t\tTD.descripcion,\n\t\t\tt_lp.copydoc\n\t\tFROM\n\t\t\tleg_presentaciones as t_lp\n\t\tLEFT JOIN leg_depositarios D ON D.id_dep = t_lp.id_dep\n\t\tLEFT JOIN leg_tipo_doc TD ON TD.tipo_doc = t_lp.id_tipo_doc\n\t\tORDER BY 1\";\n\t\tif (count($where)>0) {\n\t\t\t// Concatena a la sql las preferencias de filtro\n\t\t\t$sql = sql_concatenar_where($sql, $where);\n\t\t}\n\t\treturn toba::db('ledig')->consultar($sql);\n\t}", "function listarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n $this->setParametro('historico','historico','varchar');\n \n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('nro_contrato','varchar');\n\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_estado_wf','integer');\n\t\t$this->captura('id_proceso_wf','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('tipo_cambio_conv','numeric');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('id_obligacion_pago','int4');\n\t\t$this->captura('tiempo_entrega','varchar');\n\t\t$this->captura('funcionario_contacto','varchar');\n\t\t$this->captura('telefono_contacto','varchar');\n\t\t$this->captura('correo_contacto','varchar');\n\t\t$this->captura('prellenar_oferta','varchar');\n\t\t$this->captura('forma_pago','varchar');\n\t\t$this->captura('requiere_contrato','varchar');\n\t\t$this->captura('total_adjudicado','numeric');\n\t\t$this->captura('total_cotizado','numeric');\n\t\t$this->captura('total_adjudicado_mb','numeric');\n\t\t$this->captura('tiene_form500','varchar');\n\t\t$this->captura('correo_oc','varchar');\n\n\t\t$this->captura('id_gestion','int4');\n\n\t\t$this->captura('cuce','varchar');\n\t\t$this->captura('fecha_conclusion','date');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('justificacion','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "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 get_listado_votos($id_acta)\n\t{\n $sql = \"SELECT t_l.id_nro_lista, \n t_l.nombre,\n t_v.cant_votos as votos\n FROM voto_lista_cdirectivo t_v\n INNER JOIN lista_cdirectivo t_l ON (t_l.id_nro_lista = t_v.id_lista)\n WHERE t_v.id_acta = $id_acta ORDER BY t_l.id_nro_lista\";\n \n return toba::db('gu_kena')->consultar($sql);\n\t}", "public function listarActivos(){\n $sql = \"SELECT c.idcompra, c.nrofactura, date(c.fecha) as fecha, p.razonsocial AS proveedor, concat(per.nombre, ' ', per.apellido) AS personal, c.monto, c.estado \n FROM compras c JOIN proveedores p ON c.idproveedor = p.idproveedor JOIN personales per ON c.idpersonal = per.idpersonal WHERE c.estado = '1'\n ORDER BY c.idcompra DESC\";\n return ejecutarConsulta($sql);\n }", "public function listar( $nroPedido = 0 , $idFacPagos = 0 ){\n\t\t#Lista por uno de las tres opcuones\n\t\t\tif( $nroPedido != 0 && $idFacPagos == 0 ) {\n\t\t\t\t$this->db->where('nro_pedido', $nroPedido);\n\t\t\t\t$this->resultDb = $this->db->get($this->controllerSPA);\n\t\t\t}elseif($nroPedido == 0 && $idFacPagos != 0){\n\t\t\t\t$this->db->where('id_factura_pagos', $idFacPagos);\t\t\t\t\n\t\t\t\t$this->resultDb = $this->db->get($this->controllerSPA);\n\t\t\t}else{\n\t\t\t\t$this->resultDb = $this->db->get($this->controllerSPA);\n\t\t\t}\n\n\t\t\tif($this->resultDb->num_rows() > 0){\n\t\t\t$this->responseHTTP[\"data\"] = $this->resultDb->result_array();\n\t\t\t$this->responseHTTP[\"infoTable\"] =\n\t\t\t\t\t\t\t\t $this->mymodel->getInfo($this->controllerSPA);\n\t\t\t$this->responseHTTP[\"message\"] = \"Se encontraron \" .\n\t\t\t\t\t\t\t\t $this->resultDb->num_rows() . \" registros\";\n\t\t\t$this->responseHTTP[\"appst\"] = 1100;\n\t\t}else{\n\t\t\t$this->responseHTTP[\"data\"] = $this->resultDb->result_array();\n\t\t\t$this->responseHTTP[\"message\"] = \"No existen registros almacenados\";\n\t\t\t$this->responseHTTP[\"appst\"] = 2100;\n\t\t}\n\t\t\t$this->__responseHttp($this->responseHTTP, 200);\n\t}", "public function listaCamaxAmbFisico($codAmbienteFisico, $descCama) {\n $rs = $this->dMantenimientoGeneral->spListaCamaxAmbFisico($codAmbienteFisico, $descCama);\n $resultadoArray = array();\n\n foreach ($rs as $fila) {\n //Para habilitar-deshabilitar cama\n if ($fila[\"bEstado\"] == 1) {\n $fila[\"chk_activo\"] = \"<input type='checkbox' checked disabled>\";\n $imagenHab = \"<img src='../../../../fastmedical_front/imagen/icono/agt_action_fail.png' alt='Deshabilitar' title='Deshabilitar'/>\";\n } else {\n $fila[\"chk_activo\"] = \"<input type='checkbox' disabled>\";\n $imagenHab = \"<img src='../../../../fastmedical_front/imagen/icono/agt_action_success.png' alt='Habilitar' title='Habilitar'/>\";\n }\n $estado = $fila[\"bEstado\"];\n\n $opciones = \"\";\n //if($_SESSION[\"permiso_formulario_servicio\"][202][\"AGREGAR_SERVICIO_X_AMB_FISICO\"]==1){\n $opciones .= \"<a href='#' onclick=\\\"habCamaDeAmbFisico($codAmbienteFisico,$fila[0],$fila[2],$estado);\\\">\" . $imagenHab . \"</a>&nbsp;&nbsp;&nbsp;&nbsp;\";\n //(codAmbienteFisico,codServicioBasico,nomServicioBasico,estado)\n //}\n //if($_SESSION[\"permiso_formulario_servicio\"][202][\"AGREGAR_SERVICIO_X_AMB_FISICO\"]==1){\n $datos = $codAmbienteFisico . \"|\" . $fila[\"vNombreAmbienteFisico\"] . \"|\" . $fila[\"iIdCodigoCama\"] . \"|\" . $fila[\"iNumeroCama\"] . \"|\" . $fila[\"vDescripcionCama\"];\n $datos = base64_encode($datos);\n $opciones .= \"<a href=\\\"javascript:mostrarMantCamaxAmbFisico2('actualizar','$datos');\\\"><img src=\\\"../../../../fastmedical_front/imagen/icono/editar.png \\\"></a>\";\n //}\n\n $fila[\"opciones\"] = $opciones;\n array_push($resultadoArray, $fila);\n }\n return $resultadoArray;\n }", "function listar2(){\n\t\t\n\t\t$sql = \"SELECT c.id, c.codigo, c.nombre from prd_pasos_producto a\n\t\tinner join prd_pasos_acciones_producto b on b.id_paso=a.id\n\t\tinner join app_productos c on c.id=a.id_producto\n\t\tgroup by a.id_producto;\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "public function seleccionar($tablas, $columnas, $condicion = \"\", $agrupamiento = \"\", $ordenamiento = \"\", $filaInicial = NULL, $numeroFilas = NULL) {\n $listaColumnas = array();\n $listaTablas = array();\n $limite = \"\";\n\n if (!is_array($tablas)){\n $tablas = array($tablas);\n\n }\n \n if (!is_array($columnas)){\n $columnas = array($columnas);\n\n }\n\n foreach ($columnas as $alias => $columna) {\n\n if (preg_match(\"/(^[a-zA-z]+[a-zA-Z0-9]*)/\", $alias)) {\n $alias = \" AS $alias\";\n } else {\n $alias = '';\n }\n\n $listaColumnas[] = $columna . $alias;\n }\n\n $columnas = implode(', ', $listaColumnas);\n\n foreach ($tablas as $alias => $tabla) {\n\n if (preg_match(\"/(^[a-zA-z]+[a-zA-Z0-9]*)/\", $alias)) {\n $alias = ' AS ' . $alias;\n } else {\n $alias = '';\n }\n\n $tabla = $this->prefijo . $tabla;\n $listaTablas[] = $tabla . $alias;\n }\n\n if (!empty($condicion)) {\n $condicion = ' WHERE ' . $condicion;\n }\n\n if (!empty($agrupamiento)) {\n $agrupamiento = ' GROUP BY ' . $agrupamiento;\n }\n\n if (!empty($ordenamiento)) {\n $ordenamiento = ' ORDER BY ' . $ordenamiento;\n }\n\n if (is_int($numeroFilas) && $numeroFilas > 0) {\n $limite = ' LIMIT ';\n\n if (is_int($filaInicial) && $filaInicial >= 0) {\n $limite .= \"$filaInicial, \";\n }\n\n $limite .= $numeroFilas;\n }\n\n $tablas = implode(', ', $listaTablas);\n $sentencia = 'SELECT ' . $columnas . ' FROM ' . $tablas . $condicion . $agrupamiento . $ordenamiento . $limite;\n\n $this->sentenciaSql = $sentencia;\n\n return $this->ejecutar($sentencia);\n }", "public function ListarArqueoCaja()\n{\n\tself::SetNames();\n\t\n\tif($_SESSION[\"acceso\"] == \"cajero\") {\n\n\n $sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja WHERE cajas.codigo = '\".$_SESSION[\"codigo\"].\"'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n\n\n\t} else {\n\n\t$sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n\n\t}\n}", "public function mostrar_listado($datos) {\r\n\t\t\t?>\r\n\t\t\t\t<!DOCTYPE html>\r\n\t\t\t\t<html>\r\n\t\t\t\t<head>\r\n\t\t\t\t\t<title>Área privada de Tienda online</title>\r\n\t\t\t\t\t<link href=\"/ejercicio_unidad9_hector_garcia/css/estilos.css\" rel=\"stylesheet\" type=\"text/css\">\r\n\t\t\t\t</head>\r\n\t\t\t\t<body>\r\n\t\t\t\t\t<div id=\"main\">\r\n\t\t\t<?php\r\n\t\t\t\t$this -> cabecera();\r\n\t\t\t?>\r\n\t\t\t<?php\r\n\t\t\t\tfor($i = 0;$i<count($datos);$i++){\r\n\t\t\t?>\t\r\n\t\t\t\t<a class=\"c_linea\" href=\"http://localhost:8080/ejercicio_unidad9_hector_garcia/?id=<?php echo $datos[$i]['id']; ?>\" title=\"<?php echo htmlentities($datos[$i]['nombre']); ?>\">\r\n\t\t\t\t\t<div class=\"c_col_ed1\">\r\n\t\t\t\t\t\t<?php echo htmlentities($datos[$i]['nombre']); ?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"c_col5\">\r\n\t\t\t\t\t\t<form method=\"post\" action=\"http://localhost:8080/ejercicio_unidad9_hector_garcia/\">\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"<?php echo $datos[$i]['id']; ?>\">\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"acc\" value=\"eliminar\">\r\n\t\t\t\t\t\t<button type=\"submit\">Eliminar</button>\r\n\t\t\t\t\t\t</form>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</a>\r\n\t\t\t<?php\r\n\t\t\r\n\t\t\t\t}//fin for\r\n\t\t\t?>\r\n\t\t\t\t\t<form method=\"post\" action=\"http://localhost:8080/ejercicio_unidad9_hector_garcia/?acc=insertar\" class=\"botonera\">\r\n\t\t\t\t\t\t<button type=\"submit\">Insertar nuevo producto</button>\r\n\t\t\t\t\t</form>\r\n\t\t\t\t</body>\r\n\t\t\t\t</html>\t\r\n\t\t\t<?php\r\n\t\t}", "function get_cuestionario($codigo, $categoria = '', $ponderacion = '', $situacion = '')\n {\n\n $sql = \"SELECT * \";\n $sql .= \" FROM aud_auditoria, aud_categoria \";\n $sql .= \" WHERE audit_categoria = cat_codigo\";\n if (strlen($codigo) > 0) {\n $sql .= \" AND audit_codigo = $codigo\";\n }\n if (strlen($categoria) > 0) {\n $sql .= \" AND audit_categoria IN($categoria)\";\n }\n if (strlen($ponderacion) > 0) {\n $sql .= \" AND audit_ponderacion = $ponderacion\";\n }\n if (strlen($situacion) > 0) {\n $sql .= \" AND audit_situacion IN($situacion)\";\n }\n $sql .= \" ORDER BY audit_categoria ASC, audit_codigo ASC\";\n\n $result = $this->exec_query($sql);\n //echo $sql;\n return $result;\n }", "public function getConsultapersonas_acta($id_asignacion)\n {\n $query = \"select id_asignar,consecutivo_asignar,nombre_proyecto,observacion,YEAR(fecha_asignacion) as anio,MONTH(fecha_asignacion) as MES,DAY(fecha_asignacion) as dia,concat(nombres_persona,' ',apellidos_persona) as nombre_entrega,(SELECT concat(nombres_persona,' ',apellidos_persona) from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as nombres_recibe,(SELECT nombre_cargo from persona\n INNER JOIN cargo on id_cargo = persona.fkID_cargo where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as cargo_recibe,(SELECT documento_persona from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as documento_recibe,nombre_cargo as cargo_entrega,documento_persona as documento_entrega FROM `asignar`\n INNER JOIN proyecto on id_proyecto = fkID_proyecto\n INNER JOIN persona on id_persona = fkID_persona_entrega\n INNER JOIN cargo on id_cargo = persona.fkID_cargo\n WHERE id_asignar='\" . $id_asignacion . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public static function lista($idTipo = null, $idCategoria = null, $status = 5, $idFaculdade = null) {\n $cursos = Curso::distinct()->select(\n \\DB::raw(\"CONCAT(cursos.id,' - ', cursos.titulo, ' - ', cursos_tipo.titulo) as autocomplete\"),\n\t\t\t'cursos.id',\n 'cursos.titulo as nome_curso',\n 'cursos.slug_curso',\n 'cursos_valor.valor',\n 'cursos.imagem',\n 'cursos_valor.valor_de',\n 'cursos.idioma',\n 'cursos_tipo.titulo as curso_tipo',\n\t\t\t//'faculdades.fantasia as nome_faculdade',\n\t\t\t'professor.nome as nome_professor',\n\t\t\t'professor.sobrenome as sobrenome_professor',\n\t\t\t'fk_cursos_tipo as tipo'\n\t\t)\n\t\t->leftJoin('cursos_valor', 'cursos_valor.fk_curso', '=', 'cursos.id')\n ->join('cursos_tipo', 'cursos_tipo.id', '=', 'cursos.fk_cursos_tipo')\n\t\t//->join('faculdades', 'faculdades.id', '=', 'cursos.fk_faculdade')\n ->join('professor', 'professor.id', '=', 'cursos.fk_professor');\n\n if ($status) {\n $cursos->where('cursos.status', '=', $status);\n }\n\n if ($idCategoria) {\n $cursos->join('cursos_categoria_curso', 'cursos_categoria_curso.fk_curso', '=', 'cursos.id');\n $cursos->where('cursos_categoria_curso.fk_curso_categoria', '=', $idCategoria);\n }\n\n if ($idTipo) {\n $cursos->where('cursos.fk_cursos_tipo', '=', $idTipo);\n }\n\n if ($idFaculdade) {\n $cursos->join('cursos_faculdades', 'cursos_faculdades.fk_curso', '=', 'cursos.id')\n ->where('cursos_faculdades.fk_faculdade', $idFaculdade);\n }\n\n $cursos->where('cursos_valor.data_validade', null);\n $cursos->orderBy('cursos.id', 'desc');\n\n\n return $cursos->get();\n }", "public function getAsignacionf($permisoconsulta)\n {\n if ($permisoconsulta[0][\"fkID_cargo\"]==1) {\n $url=\"\";\n } else {\n $url=\" AND asignar.fkID_proyecto= '\" . $permisoconsulta[0]['fkID_proyecto'] . \"'\";\n }\n $query = \"select DISTINCT asignar.*,nombre_proyecto,nombre_territorial,direccion_territorial,serial_equipo,concat(nombres_persona,' ',apellidos_persona) as nombre_entrega,(SELECT concat(nombres_persona,' ',apellidos_persona) from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 and direccion_territorial = direccion_territorial ) as nombres_recibe,nombre_cargo,nombre_area FROM `asignar`\n INNER join equipo on id_equipo = asignar.fkID_equipo\n INNER JOIN proyecto on id_proyecto = fkID_proyecto\n INNER JOIN persona on id_persona = fkID_persona_entrega\n INNER join area on id_area = persona.fkID_area\n INNER join cargo on id_cargo = persona.fkID_cargo\n INNER join territorial on id_territorial = persona.fkID_territorial\n INNER JOIN territorial_proyecto on territorial_proyecto.fkID_proyecto = id_proyecto\n WHERE asignar.estado= 1 and fkID_tipo_movimiento=1\". $url;\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public function consultar($filtro, $codigoModalidadAcademica = NULL) {\n $estudiantes = array();\n\n /* Modified Diego Rivera <[email protected]>\n * Se añade filtor 105(Admitido que no Ingreso) en S.codigosituacioncarreraestudiante NOT IN (100, 101, 102, 103, 108, 109, 112, 302, 400 ) \n * Since October 5,2017\n */\n $sql = \"\n SELECT DISTINCT\n P.idplanestudio,\n EG.idestudiantegeneral,\n E.codigoestudiante,\n CONCAT( EG.apellidosestudiantegeneral, ' ', EG.nombresestudiantegeneral ) AS Nombre,\n C.nombrecarrera,\n PR.semestreprematricula,\n PR.codigoestadoprematricula,\n C.codigocarrera,\n FG.FechaMaximaCumplimiento,\n MAX( PR.codigoperiodo ) AS codigoperiodo,\n FG.FechaGradoId,\n EG.EstadoActualizaDato,\n E.codigosituacioncarreraestudiante,\n FG.TipoGradoId \n FROM\n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN facultad F ON ( F.codigofacultad = C.codigofacultad )\n LEFT JOIN prematricula PR ON ( PR.codigoestudiante = E.codigoestudiante )\n LEFT JOIN detalleprematricula DP ON ( DP.idprematricula = PR.idprematricula )\n INNER JOIN planestudio P ON ( P.codigocarrera = C.codigocarrera )\n INNER JOIN planestudioestudiante PE ON ( PE.idplanestudio = P.idplanestudio AND PE.codigoestudiante = E.codigoestudiante AND PE.codigoestadoplanestudioestudiante != 200 )\n INNER JOIN situacioncarreraestudiante S ON ( S.codigosituacioncarreraestudiante = E.codigosituacioncarreraestudiante )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera ) \n WHERE\n S.codigosituacioncarreraestudiante NOT IN ( 100, 101, 102, 103, 108, 109, 112, 302, 400, 105 ) \n AND (\n PR.semestreprematricula BETWEEN ( IF ( C.codigocarrera = 1186, P.cantidadsemestresplanestudio - 9, P.cantidadsemestresplanestudio - 3 ) ) \n AND P.cantidadsemestresplanestudio \n OR E.semestre = P.cantidadsemestresplanestudio \n ) \";\n\n if (empty($codigoModalidadAcademica) || $codigoModalidadAcademica == 200 || $codigoModalidadAcademica == 800) {\n $sql .= \" AND ( DP.codigoestadodetalleprematricula IN (10,30,20) OR DP.codigoestadodetalleprematricula IS NULL )\";\n }\n $sql .= $filtro;\n $sql .= \" AND E.codigoestudiante NOT IN ( \n SELECT\n R.codigoestudiante\n FROM \n registrograduado R\n WHERE\n R.codigoestudiante = E.codigoestudiante AND R.codigoestado = 100\n UNION\n SELECT \n RG.EstudianteId\n FROM \n RegistroGrado RG\n WHERE\n RG.EstudianteId = E.codigoestudiante AND RG.CodigoEstado = 100\";\n \n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 1) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON ( AC.AcuerdoActaId = DC.AcuerdoActaId )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante AND FGR.TipoGradoId = 2 AND DC.CodigoEstado = 100\";\n }\n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 2) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON (\n AC.AcuerdoActaId = DC.AcuerdoActaId\n )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante\n AND FGR.TipoGradoId = 1\n AND DC.CodigoEstado = 100\";\n }\n $sql .= \")\n GROUP BY E.codigoestudiante\n ORDER BY EG.apellidosestudiantegeneral ASC\";\n \n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->ejecutarConsulta();\n while ($this->persistencia->getNext()) {\n \n $estudiante = new Estudiante($this->persistencia);\n $estudiante->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $estudiante->setCodigoEstudiante($this->persistencia->getParametro(\"codigoestudiante\"));\n $estudiante->setNombreEstudiante($this->persistencia->getParametro(\"Nombre\"));\n $estudiante->setEstadoActualizaDato($this->persistencia->getParametro(\"EstadoActualizaDato\"));\n\n $situacionCarreraEstudiante = new SituacionCarreraEstudiante(null);\n $situacionCarreraEstudiante->setCodigoSituacion($this->persistencia->getParametro(\"codigosituacioncarreraestudiante\"));\n\n $fechaGrado = new FechaGrado(null);\n $fechaGrado->setIdFechaGrado($this->persistencia->getParametro(\"FechaGradoId\"));\n $fechaGrado->setFechaMaxima($this->persistencia->getParametro(\"FechaMaximaCumplimiento\"));\n\n $tipoGrado = new TipoGrado(null);\n $tipoGrado->setIdTipoGrado($this->persistencia->getParametro(\"TipoGradoId\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $carrera->setNombreCarrera($this->persistencia->getParametro(\"nombrecarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n $fechaGrado->setTipoGrado($tipoGrado);\n\n $estudiante->setFechaGrado($fechaGrado);\n $estudiante->setSituacionCarreraEstudiante($situacionCarreraEstudiante);\n\n $preMatricula = new PreMatricula(null);\n $preMatricula->setSemestrePreMatricula($this->persistencia->getParametro(\"semestreprematricula\"));\n\n $periodo = new Periodo(null);\n $periodo->setCodigo($this->persistencia->getParametro(\"codigoperiodo\"));\n $preMatricula->setPeriodo($periodo);\n\n $estudiante->setPreMatricula($preMatricula);\n $estudiantes[count($estudiantes)] = $estudiante;\n }\n $this->persistencia->freeResult();\n\n return $estudiantes;\n }", "function listar_producto(){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\t\n\t\tif (isset($_SESSION['buscar']) && $_SESSION['buscar']!=\"\"){\t\n\t\t\t$this->buscar=$_SESSION['buscar'];\n\t\t\t$sql=\"SELECT * FROM producto, categoria WHERE id_cat=categoria_pro AND\n\t\t\t(nombre_cat LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\tprioridad_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR\n\t\t\tcodigo_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tnombre_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tmarca_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tlimite_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tclaves_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%') \n\t\t\tORDER BY disponible_pro, prioridad_pro, categoria_pro ASC\";\n\t\t}else{\n\t\t\t$sql=\"SELECT * FROM producto, categoria WHERE id_cat=categoria_pro ORDER BY disponible_pro, prioridad_pro, categoria_pro ASC\";\n\t\t}\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->suiche=false;\n\t\t\t$this->ruta=\"\";\n\t\t\t$resultado['nombre_cat']=\"\";\n\t\t\t$this->buscar_ruta_nodo($resultado['categoria_pro']);\n\t\t\tfor($i=count($this->ruta)-1;$i>=0;$i--){\n\t\t\t\t$resultado['nombre_cat'].=\" &raquo; \".$this->ruta[$i]['nombre_cat'];\n\t\t\t}\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}", "function listarContatos ($id) {\n require_once('../modulo/config.php');\n\n //Import do arquivo de função para conectar no BD \n require_once('conexaoMysql.php');\n\n if(!$conex = conexaoMysql())\n {\n echo(\"<script> alert('\".ERRO_CONEX_BD_MYSQL.\"'); </script>\");\n //die; //Finaliza a interpretação da página\n }\n\n $sql = \"select tblContatos.*, tblEstados.sigla from tblContatos, tblEstados where tblContatos.idEstado = tblEstados.idEstado and statusContato = 1\";\n \n if ($id > 0) {\n $sql = $sql . \" and tblContatos.idContato = \" . $id;\n }\n\n $sql = $sql . \" order by tblContatos.nome asc\";\n\n $select = mysqli_query($conex, $sql);\n \n while($rsContatos = mysqli_fetch_assoc($select)) {\n //varios itens para o json\n $dados[] = array (\n // => - o que alimenta o dado de um array\n 'idContato' => $rsContatos['idContato'],\n 'nome' => $rsContatos['nome'],\n 'celular' => $rsContatos['celular'],\n 'email' => $rsContatos['email'],\n 'idEstado' => $rsContatos['idEstado'],\n 'sigla' => $rsContatos['sigla'],\n 'dataNascimento' => $rsContatos['dataNascimento'],\n 'sexo' => $rsContatos['sexo'],\n 'obs' => $rsContatos['obs'],\n 'foto' => $rsContatos['foto'],\n 'statusContato' => $rsContatos['statusContato']\n\n ); \n } \n\n //faça um header para dados importantes\n // $headerDados = array (\n // 'status' => 'success',\n // 'data' => date('d-m-y'),\n // 'contatos' => $dados\n // );\n if (isset($dados))\n $listContatosJson = convertJson($dados);\n else \n false;\n //verificar se foi gerado um arquivo json\n if (isset($listContatosJson)) \n return $listContatosJson;\n else\n return false;\n }", "function listar_producto_imagen($condicion){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t$cat=$_SESSION['categoria_actual'];\t\n\t\tif (isset($_SESSION['buscar']) && $_SESSION['buscar']!=\"\"){\t\n\t\t\t$this->buscar=$_SESSION['buscar'];\n\t\t\t$sql=\"SELECT * FROM producto, imagen WHERE \n\t\t\tcategoria_pro='$cat' AND galeria_image=id_pro AND tabla_image='Producto' AND disponible_pro='1' AND nombre_image='$condicion' AND \n\t\t\t(categoria_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t prioridad_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR\n\t\t\tnombre_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tmarca_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tcodigo_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tlimite_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tclaves_pro LIKE '%' '\".$_SESSION['buscar'].\"' '%') \n\t\t\tGROUP BY id_pro ORDER BY categoria_pro, prioridad_pro ASC\";\n\t\t}else{\n\t\t\t$sql=\"SELECT * FROM producto, imagen WHERE \n\t\t\tcategoria_pro='$cat' AND galeria_image=id_pro AND tabla_image='Producto' AND disponible_pro='1' AND nombre_image='$condicion' \n\t\t\tGROUP BY id_pro ORDER BY categoria_pro, prioridad_pro ASC\";\n\t\t\t\n\t\t}\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\tsetlocale(LC_ALL, 'es_ES');\n\t\t\t//$resultado['nombre_pro']=ucwords(strtolower($resultado['nombre_pro']));\n\t\t\t$resultado['detal_pro']=$this->convertir_moneda($resultado['detal_pro']);\n\t\t\t$resultado['mayor_pro']=$this->convertir_moneda($resultado['mayor_pro']);\n\t\t\t\t$sql2=\"SELECT * FROM categoria WHERE id_cat='$cat'\";\n\t\t\t\t$consulta2=mysql_query($sql2) or die(mysql_error());\n\t\t\t\t$resultado2 = mysql_fetch_array($consulta2);\n\t\t\t\t$aux=$this->modificar_url($resultado2['claves_cat']);\n\t\t\t\t\n\t\t\t$resultado['url']=$aux.\"_\".$this->modificar_url($resultado['claves_pro']);\n\t\t\t$temp=$resultado['limite_pro'];\n\t\t\t$resultado['limite_pro']=\"\";\n\t\t\t//echo \"Numero: \".$temp;\n\t\t\t\n\t\t\tfor($i=1;$i<=$temp;$i++){\n\t\t\t\tif($i<=12)\n\t\t\t\t\t$resultado['limite_pro'][]=$i;\n\t\t\t}\n\t\t\t$this->descripcion=$resultado['descripcion_pro'];\n\t\t\t$resultado['descripcion_pro']=strip_tags($resultado['descripcion_pro']);\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}", "function listar_lab_conceptos($opcion){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\ta.id as id, b.descripcion as tipo, a.parametro as parametro, c.id as id_unidad, c.descripcion as unidad, a.is_numeric as is_numeric\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_lab_conceptos a\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t\tprd_lab_tipos b on a.id_tipo = b.id\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t\tprd_lab_unidades c on a.unidad = c.id\";\n\n\t\tif ($opcion == \"utilizado\")\n\t\t\t\t$sql = $sql . \" WHERE a.id NOT IN (SELECT DISTINCT id_lab_concepto FROM prd_lab_conceptos_productos) \";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\t\treturn $result;\n\t}", "function listar_simbolos_especiales_limit($id_tipo_palabra,$letra,$id_tipo_simbolo,$idioma,$inicial,$cantidad,$registrado) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND simbolos_especiales.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo_palabra==99) { $sql_tipo_palabra=''; } \n\t\telse { $sql_tipo_palabra='AND palabras.id_tipo_palabra='.$id_tipo_palabra.''; }\n\t\t\n\t\tif ($idioma==99) { $sql_idioma=''; } \n\t\telseif ($idioma==98) { $sql_idioma='AND simbolos_especiales.castellano=1'; }\n\t\telseif ($idioma==97) { $sql_idioma='AND simbolos_especiales.castellano=0 AND simbolos_especiales.id_idioma=0'; } \n\t\telse { $sql_idioma='AND simbolos_especiales.id_idioma='.$idioma.''; }\n\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo_simbolo='AND simbolos_especiales.id_tipo_simbolo=tipos_simbolos.id_tipo'; } \n\t\telse { $sql_tipo_simbolo='AND simbolos_especiales.id_tipo_simbolo='.$id_tipo_simbolo.' AND tipos_simbolos.id_tipo='.$id_tipo_simbolo.''; }\n\t\t\n\t\tif ($letra=='todas') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT simbolos_especiales.*, palabras.*, tipos_simbolos.*\n\t\tFROM simbolos_especiales, palabras, tipos_simbolos\n\t\tWHERE simbolos_especiales.id_palabra=palabras.id_palabra\n\t\t$sql_tipo_simbolo\n\t\t$sql_tipo_palabra\n\t\t$sql_idioma\n\t\t$mostrar_registradas\n\t\tAND palabras.palabra LIKE '$sql_letra%%'\n\t\tORDER BY palabras.palabra asc\n\t\tLIMIT $inicial,$cantidad\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function busquedaUsuarios($txtEmail,$txtNroId,$txtNombre1,$txtNombre2,$txtApellido1,$txtApellido2){\n\t\t\t$usuarios = array();\n\t\t\t$sql = \"SELECT U.id_usuarios, U.nro_encuesta_form, U.USUARIO, LOWER(U.USUARIO) AS usu_minuscula, P.cedula, P.primer_nombre, P.segundo_nombre, P.primer_apellido, P.segundo_apellido,\n\t\t\t\t\tC.FK_ESTADO, e.desc_estado, V.C1I1_DPTO, D.DEPTO, V.C1I2_MPIO, M.MPIO, CL.CLASE,\n\t\t\t\t\tV.C1I4_CO, V.C1I5_AO, V.C1I6_UC, V.C1IV10_DIR\n\t\t\t\t\tFROM cnp_admin_usuarios U\n\t\t\t\t\tLEFT JOIN cnp_preregistro P ON U.nro_encuesta_form = P.nro_encuesta_form \n\t\t\t\t\tLEFT JOIN cnpv_admin_control C ON U.nro_encuesta_form = C.nro_encuesta_form \n\t\t\t\t\tLEFT JOIN cnpv_param_estados E ON C.fk_estado = E.id_estado\n\t\t\t\t\tLEFT JOIN cnpv_vivienda V ON V.C0I1_ENCUESTA = U.nro_encuesta_form\n\t\t\t\t\tLEFT JOIN (SELECT to_number(VALOR_MINIMO) VALOR_MINIMO, DESCRIPCION DEPTO FROM cnp_respuesta_dominio WHERE ID_DOMINIO = 1) D ON D.valor_minimo = V.C1I1_DPTO\n\t\t\t\t\tLEFT JOIN (SELECT to_number(VALOR_MINIMO) VALOR_MINIMO, DESCRIPCION MPIO FROM cnp_respuesta_dominio WHERE ID_DOMINIO = 2) M ON M.valor_minimo = V.C1I2_MPIO\n\t\t\t\t\tLEFT JOIN (SELECT to_number(VALOR_MINIMO) VALOR_MINIMO, DESCRIPCION CLASE FROM cnp_respuesta_dominio WHERE ID_DOMINIO = 3) CL ON CL.valor_minimo = V.C1I3_CLASE\n\t\t\t\t\tWHERE 1=1 \";\n\t\t\t\n\t\t\tif ($txtEmail!='-'){\n\t\t\t\t$sql.= \"AND U.USUARIO = '$txtEmail' \";\n\t\t\t}\n\t\t\tif ($txtNroId!='-' && $txtNroId!='0'){\n\t\t\t\t$sql .= \"AND P.cedula = '$txtNroId' \";\n\t\t\t}\n\t\t\tif ($txtNombre1!='-'){\n\t\t\t\t$sql .= \"AND LOWER(P.primer_nombre) LIKE LOWER('%$txtNombre1%') \";\n\t\t\t}\n\t\t\tif ($txtNombre2!='-'){\n\t\t\t\t$sql .= \"AND LOWER(P.segundo_nombre) LIKE LOWER('%$txtNombre2%') \";\n\t\t\t}\n\t\t\tif ($txtApellido1!='-'){\n\t\t\t\t$sql .= \"AND LOWER(P.primer_apellido) LIKE LOWER('%$txtApellido1%') \";\n\t\t\t}\n\t\t\tif ($txtApellido2!='-'){\n\t\t\t\t$sql .= \"AND LOWER(P.segundo_apellido) LIKE LOWER('%$txtApellido2%') \";\n\t\t\t}\n\t\t\t\n\t\t\t$sql.=\" ORDER BY usu_minuscula ASC \";\n\t\t\t//echo $sql;\n\t\t\t$query = $this->db->query($sql);\n\t\t\tif ($query->num_rows() > 0){\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($query->result() as $row){\n\t\t\t\t\t$usuarios[$i][\"txtEmail\"] = $row->USUARIO;\n\t\t\t\t\t$usuarios[$i][\"txtNroId\"] = $row->CEDULA;\n\t\t\t\t\t$usuarios[$i][\"txtNombre1\"] = $row->PRIMER_NOMBRE;\n\t\t\t\t\t$usuarios[$i][\"txtNombre2\"] = $row->SEGUNDO_NOMBRE;\t\t\t\t\t\n\t\t\t\t\t$usuarios[$i][\"txtApellido1\"] = $row->PRIMER_APELLIDO;\n\t\t\t\t\t$usuarios[$i][\"txtApellido2\"] = $row->SEGUNDO_APELLIDO;\n\t\t\t\t\t$usuarios[$i][\"txtEstado\"] = $row->DESC_ESTADO;\n\t\t\t\t\t$usuarios[$i][\"txtcodDepto\"] = $row->C1I1_DPTO;\n\t\t\t\t\t$usuarios[$i][\"txtDepto\"] = $row->DEPTO;\n\t\t\t\t\t$usuarios[$i][\"txtcodMPIO\"] = $row->C1I2_MPIO;\n\t\t\t\t\t$usuarios[$i][\"txtMPIO\"] = $row->MPIO;\n\t\t\t\t\t$usuarios[$i][\"txtClase\"] = $row->CLASE;\n\t\t\t\t\t$usuarios[$i][\"txtcodCO\"] = $row->C1I4_CO;\n\t\t\t\t\t$usuarios[$i][\"txtcodAO\"] = $row->C1I5_AO;\n\t\t\t\t\t$usuarios[$i][\"txtcodUC\"] = $row->C1I6_UC;\n\t\t\t\t\t$usuarios[$i][\"txtDireccion\"] = $row->C1IV10_DIR;\n\t\t\t\t\t\n\t\t\t\t\t$usuarios[$i][\"opc\"] = '<a href=\"'.site_url(\"/operativo/mostrarDetalleUsuario/$row->NRO_ENCUESTA_FORM\").'\">Ver</a> | <a href=\"'.site_url(\"/operativo/formNovedad/$row->NRO_ENCUESTA_FORM\").'\">Novedad</a>';\n\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->db->close();\n\t\t\treturn $usuarios;\n\t\t}", "public function BuscaOrganizacionalTodos($tupla)\r\n {\r\n //$dbl = new Mysql($encryt->Decrypt_Text($_SESSION[BaseDato]), $encryt->Decrypt_Text($_SESSION[LoginBD]), $encryt->Decrypt_Text($_SESSION[PwdBD]) );\r\n $Nivls = \"\";\r\n { \r\n //$Consulta3=\"select id as id_organizacion,parent_id as organizacion_padre, title as identificacion from mos_organizacion where id in ($tupla[id_organizacion])\";\r\n $Consulta3=\"select * from mos_documentos_estrorg_arbolproc where IDDoc='\".$tupla[IDDoc].\"' and tipo='EO'\"; \r\n $Resp3 = $this->dbl->query($Consulta3,array()); \r\n foreach ($Resp3 as $Fila3) \r\n { \r\n $Nivls .= $this->BuscaOrganizacional(array('id_organizacion' => $Fila3[id_organizacion_proceso])).\"<br /><br />\";\r\n }\r\n if($Nivls!='')\r\n $Nivls=substr($Nivls,0,strlen($Nivls)-6);\r\n else\r\n $Nivls='-- Sin información --';\r\n }\r\n \r\n return $Nivls;\r\n\r\n }", "public function listar_ventas_abono_table($idGenAbono) {\n $dato = [];\n\n //--- Datos del Logeado ---//\n $userdata = $this->session->all_userdata();\n //--- datos ---//\n $ingresos = $this->app_model->get_ingreso_by_idGenAbono($idGenAbono);\n $estados = $this->app_model->get_estados();\n\n if ($ingresos) {\n foreach ($ingresos as $key => $value) {\n $texto = \"\";\n $class = \"\";\n if ($value['idEstado'] == 1) :\n $class = \"btn-success\";\n $texto = \"Cobrado\";\n elseif ($value['idEstado'] == 2):\n $class = \"btn-info\";\n $texto = \"A Cobrar\";\n elseif ($value['idEstado'] == 3):\n $class = \"btn-danger\";\n $texto = \"Vencido\";\n else:\n $class = \"btn-warning\";\n $texto = \"Sin Estado\";\n endif;\n\n $facturaIdIngreso = $this->app_model->get_factura_idGenIngreso($value['idGenIngreso']);\n if ($userdata['idUsuario'] != 28 && $userdata['idUsuario'] != 29 && $facturaIdIngreso == false) {\n $bloque1 = '<li><a href=\"' . base_url() . 'ventas/editar_venta/' . $value['idIngreso'] . '\"><i class=\"icon-cogs\"></i> Editar</a></li>' .\n '<li><a href=\"#modal-delete\" class=\"tip deleteIngreso\" data-id=\"' . $value['idIngreso'] . '\" data-toggle=\"modal\" ><i class=\"icon-close\"></i> Eliminar</a></li>' .\n '<li class=\"divider\"></li>';\n } else {\n $bloque1 = '';\n }\n\n $idGenIngreso = \"'\" . $value['idGenIngreso'] . \"'\";\n if ($userdata['idUsuario'] != 28 && $userdata['idUsuario'] != 29) {\n $bloque2 = '<li><a href=\"#\"><i class=\"icon-notebook\"></i> Crear NC/ND</a></li>' .\n '<li><a href=\"#\"><i class=\"icon-newspaper\"></i> Crear remito</a></li>' .\n '<li><a href=\"#\"><i class=\"icon-clipboard\"></i> Cta Cte</a></li>' .\n '<li class=\"divider\"></li>' .\n '<li><a href=\"#\" onclick=\"generarPdfDetalleVenta(' . $idGenIngreso . ')\"><i class=\"icon-binoculars\"></i> Ver detalle</a></li>' .\n '<li><a href=\"#\"><i class=\"icon-attachment\"></i> Enviar detalle</a></li>';\n }\n\n $opcion = ' <div class=\"btn-group\">' .\n '<button class=\"btn ' . $class . '\" style=\"padding: 3px;font-size: 0.8em;\">' . $texto . '</button>' .\n '<button class=\"btn btn-dark dropdown-toggle\" data-toggle=\"dropdown\" style=\"padding: 3px;font-size: 0.8em;\"><span class=\"caret caret-split\"></span></button>' .\n '<ul class=\"dropdown-menu icons-right\">' .\n $bloque1 .\n '<li><a href=\"#modal-agregar-cobro\" class=\"tip agregarCobro\" data-id=\"' . $value['idGenIngreso'] . '\" data-toggle=\"modal\" ><i class=\"icon-tag5\"></i> Agregar cobranza</a></li>' .\n $bloque2 .\n '</ul>' .\n '</div>';\n\n $dato[] = array(\n $opcion,\n $value['idTipoIngreso'],\n $value['fechaEmision'],\n $value['fechaVtoCobro'],\n $value['nombEmpresa'],\n $value['categoria'],\n \"$\" . number_format($value['total'] + $value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n \"$\" . number_format($value['aCobrar'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'] - $value['aCobrar'], 2, \",\", \".\"),\n $value['nombreVend'],\n \"DT_RowId\" => $value['idIngreso']\n );\n }\n }\n\n $aa = array(\n 'sEcho' => 1,\n 'iTotalRecords' => count($dato),\n 'iTotalDisplayRecords' => 10,\n 'aaData' => $dato\n );\n echo json_encode($aa);\n }", "function listar_simbolos_limit($id_tipo_palabra,$letra,$id_tipo_simbolo,$idioma,$inicial,$cantidad,$registrado) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND simbolos.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo_palabra==99) { $sql_tipo_palabra=''; } \n\t\telse { $sql_tipo_palabra='AND palabras.id_tipo_palabra='.$id_tipo_palabra.''; }\n\t\t\n\t\tif ($idioma==99) { $sql_idioma=''; } \n\t\telseif ($idioma==98) { $sql_idioma='AND simbolos.castellano=1'; }\n\t\telseif ($idioma==97) { $sql_idioma='AND simbolos.castellano=0 AND simbolos.id_idioma=0'; } \n\t\telse { $sql_idioma='AND simbolos.id_idioma='.$idioma.''; }\n\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo=tipos_simbolos.id_tipo'; } \n\t\telse { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo='.$id_tipo_simbolo.' AND tipos_simbolos.id_tipo='.$id_tipo_simbolo.''; }\n\t\t\n\t\tif ($letra=='todas') { $sql_letra=''; } else { $sql_letra=$letra; }\n\t\t\n\t\t$query = \"SELECT simbolos.*, palabras.*, tipos_simbolos.*\n\t\tFROM simbolos, palabras, tipos_simbolos\n\t\tWHERE simbolos.id_palabra=palabras.id_palabra\n\t\t$sql_tipo_simbolo\n\t\t$sql_tipo_palabra\n\t\t$sql_idioma\n\t\t$mostrar_registradas\n\t\tAND palabras.palabra LIKE '$sql_letra%%'\n\t\tORDER BY palabras.palabra asc\n\t\tLIMIT $inicial,$cantidad\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function preparatoriasBYInstitucionTiposAlojamientos_get(){\n $id=$this->get('id');\n $id2=$this->get('id2');\n if (count($this->get())>2) {\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"Demasiados datos enviados\",\n \"validations\" =>array(\n \"id\"=>\"Envia Id (get) para obtener un especifico articulo o vacio para obtener todos los articulos\"\n ),\n \"data\"=>null\n );\n }else{\n if ($id) {\n $data = $this->DAO->selectEntity('Vw_tipoAlojamiento',array('idInstitucion'=>$id),false);\n }\n else{\n $data = $this->DAO->selectEntity('Vw_tipoAlojamiento',null,false);\n }\n if ($data) {\n $response = array(\n \"status\" => \"success\",\n \"status_code\" => 201,\n \"message\" => \"Articulo Cargado correctamente\",\n \"validations\" =>null,\n \"data\"=>$data\n );\n }else{\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"No se recibio datos\",\n \"validations\" =>null,\n \"data\"=>null\n );\n }\n }\n $this->response($response,200);\n }", "public function examenes_aplicarFiltrosExamenes($fechaInicial, $fechaFinal, $usuarios, $idExamen, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idExamen != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_examenDetalle AS DE ON DE.idExamen = E.idExamen\n\t\t\t\t\t\t\t\t INNER JOIN tb_listadoExamenes AS LE ON LE.idListadoExamen = DE.idListadoExamen\n\t\t\t\t\t\t\t\t WHERE LE.idListadoExamen = '$idExamen' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND E.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( E.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND E.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \" SELECT \n\t\t\t\t\t\t\tE.idExamen, \n\t\t\t\t\t\t\tE.fecha,\n\t\t\t\t\t\t\tDATE_FORMAT(E.hora, '%H:%i') AS hora,\n\t\t\t\t\t\t\tE.observaciones,\n\t\t\t\t\t\t\tE.idMascota,\n\t\t\t\t\t\t\tE.idUsuario,\n\t\t\t\t\t\t\tE.idSucursal,\n\t\t\t\t\t\t\tM.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_examenes AS E\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON E.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = E.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = E.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (E.idExamen)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (E.idExamen) DESC; \";\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function listar(){\n $tirajson=array();\n $estatus=\"\";\n if($_SESSION['rol']==1){\n $estatus=\"IN('A','I')\";\n }elseif($_SESSION['rol']==2){\n $estatus=\"IN('A')\";\n }\n $this->mensaje->set(\"estatus\", $estatus);\n $tirajson= $this->mensaje->listar();\n echo json_encode($tirajson);\n }", "function organismes()\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t$db = cmsms()->GetDb();\n\t\t$designation = '';\n\t\t$tableau = array('F','Z','L','D');\n\t\t//on instancie la classe servicen\n\t\t$service = new Servicen();\n\t\t$page = \"xml_organisme\";\n\t\tforeach($tableau as $valeur)\n\t\t{\n\t\t\t$var = \"type=\".$valeur;\n\t\t\t//echo $var;\n\t\t\t$scope = $valeur;\n\t\t\t//echo \"la valeur est : \".$valeur;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$designation.= \"service coupé\";\n\t\t\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t\t\t$status = 'Echec';\n\t\t\t\t$action = 'retrieve_ops';\n\t\t\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t///on initialise un compteur général $i\n\t\t\t\t$i=0;\n\t\t\t\t//on initialise un deuxième compteur\n\t\t\t\t$compteur=0;\n\t\t\t//\tvar_dump($xml);\n\n\t\t\t\t\tforeach($xml as $cle =>$tab)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$idorga = (isset($tab->id)?\"$tab->id\":\"\");\n\t\t\t\t\t\t$code = (isset($tab->code)?\"$tab->code\":\"\");\n\t\t\t\t\t\t$libelle = (isset($tab->libelle)?\"$tab->libelle\":\"\");\n\t\t\t\t\t\t// 1- on vérifie si cette épreuve est déjà dans la base\n\t\t\t\t\t\t$query = \"SELECT idorga FROM \".cms_db_prefix().\"module_ping_organismes WHERE idorga = ?\";\n\t\t\t\t\t\t$dbresult = $db->Execute($query, array($idorga));\n\n\t\t\t\t\t\t\tif($dbresult && $dbresult->RecordCount() == 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_organismes (libelle, idorga, code, scope) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t$compteur++;\n\t\t\t\t\t\t\t\t$dbresultat = $db->Execute($query,array($libelle,$idorga,$code,$scope));\n\n\t\t\t\t\t\t\t\tif(!$dbresultat)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$designation.= $db->ErrorMsg();\t\t\t\n\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\n\n\n\t\t\t\t\t}// fin du foreach\n\n\t\t\t}\n\t\t\tunset($scope);\n\t\t\tunset($var);\n\t\t\tunset($lien);\n\t\t\tunset($xml);\n\t\t\tsleep(1);\n\t\t}//fin du premier foreach\n\t\t\n\n\t\t$designation.= $compteur.\" organisme(s) récupéré(s)\";\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$status = 'Ok';\n\t\t$action = 'retrieve_ops';\n\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\n\t\t\t\n\t\t\n\t}", "public function obtenerAgrupamientosCorporacionAsignados ($condiciones = array(), $count = false) {\n $field = $count ? \"count(uid_agrupamiento)\" : \"uid_agrupamiento\";\n $table = TABLE_AGRUPAMIENTO;\n\n if (is_array($condiciones) && isset($condiciones['modulo'])) {\n $table .= \" INNER JOIN \" . TABLE_AGRUPAMIENTO . \"_modulo USING (uid_agrupamiento)\";\n }\n\n // Si pertenece a corporacion devolvemos los asignados de la corporacion y los propios.\n if ($corp = $this->perteneceCorporacion()) {\n\n $sql = \"SELECT {$field} FROM {$table} WHERE uid_empresa = {$corp->getUID()} AND\n uid_agrupamiento IN ( SELECT uid_agrupamiento FROM \". TABLE_EMPRESA .\"_agrupamiento WHERE uid_empresa = {$this->getUID()})\";\n\n } elseif ($this->esCorporacion()) {\n\n // Si es corporación solo devolvemos los de la corporación.\n $sql = \"SELECT {$field} FROM {$table} WHERE uid_empresa = {$this->getUID()} AND\n uid_agrupamiento IN ( SELECT uid_agrupamiento FROM \". TABLE_EMPRESA .\"_agrupamiento WHERE uid_empresa = {$this->getUID()})\";\n\n }\n\n if (isset($sql)) {\n if ($condition = agrupamiento::conditionSQL($condiciones)) {\n $sql .= \" AND \" . $condition;\n }\n\n if ($count) return (int) $this->db->query($sql, 0, 0);\n\n $coleccion = $this->db->query($sql, \"*\", 0, 'agrupamiento');\n if ($coleccion) return new ArrayAgrupamientoList($coleccion);\n }\n\n if ($count) return 0;\n\n return new ArrayAgrupamientoList;\n }", "function asignacion_anp_objetivos($id_objetivo_estrategico){\r\n\t\t//OBJETIVO ESTRATEGICO\t\t\t\t\r\n\t\t$sql_aae = \" SELECT * FROM anp_objetivo_estrategico \r\n\t\t\t\tWHERE id_objetivo_estrategico='\".$id_objetivo_estrategico.\"' \";\r\n\t\t$query_aae = new Consulta($sql_aae);\r\n\t\t$in_aae = \"\";\r\n\t\twhile($row_aae = $query_aae->ConsultaVerRegistro()){\r\n\t\t\t$in_aae .=$in_aae == \"\" ? $row_aae['id_anp_objetivo_estrategico'] : \",\".$row_aae['id_anp_objetivo_estrategico'];\t\r\n\t\t}\t\r\n\t\t\t\t\t\r\n\t\t//asignaciopn anp objetivos\r\n\t\t$sql_aao = \"SELECT * FROM asignacion_anp_objetivos \r\n\t\t\t\t\tWHERE id_anp_objetivo_estrategico in(\".$in_aae.\") \r\n\t\t\t\t\tAND id_axo_poa='\".$_SESSION[inrena_4][2].\"' \";\r\n\t\t\t\t\t\t\r\n\t\t$query_aao = new Consulta($sql_aao);\r\n\t\t$in_aao=\"\";\r\n\t\twhile($row_aao = $query_aao->ConsultaVerRegistro()){\r\n\t\t\t$in_aao .=$in_aao == \"\" ? $row_aao['id_asignacion_anp_objetivos'] : \",\".$row_aao['id_asignacion_anp_objetivos'];\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $in_aao;\r\n\t\r\n\t}", "function listarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_sel';\r\n\t\t$this->transaccion='tgv_SERVIC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_servicio','int4');\r\n\t\t$this->captura('estado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_lugar_destino','int4');\r\n\t\t$this->captura('id_ep','int4');\r\n\t\t$this->captura('fecha_asig_fin','date');\r\n\t\t$this->captura('fecha_sol_ini','date');\r\n\t\t$this->captura('descripcion','varchar');\r\n\t\t$this->captura('id_lugar_origen','int4');\r\n\t\t$this->captura('cant_personas','int4');\r\n\t\t$this->captura('fecha_sol_fin','date');\r\n\t\t$this->captura('id_funcionario','int4');\r\n\t\t$this->captura('fecha_asig_ini','date');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_funcionario','text');\r\n\t\t$this->captura('desc_lugar_ini','varchar');\r\n\t\t$this->captura('desc_lugar_des','varchar');\r\n\t\t$this->captura('id_funcionario_autoriz','int4');\r\n\t\t$this->captura('observaciones','varchar');\r\n\t\t$this->captura('desc_funcionario_autoriz','text');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//echo '--->'.$this->getConsulta(); exit;\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function listarlapaz(){\n $persona=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapaz as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=1\";\n $bajas=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapazretirado as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=0\";\n $cajas=\"SELECT * FROM cajalapaz WHERE estado = 1\";\n $cajaretirados=\"SELECT * FROM cajalapazretirado WHERE estado = 1\";\n $result=[\n \"personal\"=> parent::consultaRetorno($persona),\n \"bajas\"=>parent::consultaRetorno($bajas),\n \"cajas\"=>parent::consultaRetorno($cajas),\n \"cajasretirados\"=>parent::consultaRetorno($cajaretirados)\n ];\n return $result;\n }", "public static function listaSabana($idsede, $idfacultad, $anio)\n {\n $sql =\"SELECT sed.nombre as sede, CONCAT(car.nombre,' - ',pe.nombre) as carreraplan, car.nombre as carrera, fac.nombre as facultad, CONCAT(per.apellido,', ',per.nombre) as persona,\n per.apellido, per.nombre,\n tp.descripcion as tipodocumento, \n per.numerodoc,\n m.nombre as materia,\n td.descripcion as tipodesignacion,\n cd.descripcion as categoria, \n cd.idcategoriadesignacion,\n edes.descripcion as estadodesignacion,\n mp.anodecursada,\n IFNULL(des.horas, 0 ) as horas,\n td.descripcion as tipo, \n if(des.adhonorem,'AD HONOREM','') as adhonorem, \n if(des.licencia,'EN LICENCIA','') as licencia, \n ded.descripcion as dedicacion,\n sed.abreviacion as sedeabreviada,\n car.idcarrera,\n YEAR(des.inicio) as ciclolectivo,\n DATE_FORMAT(des.inicio, '%d/%m/%Y') AS inicioformat, DATE_FORMAT(des.fin, '%d/%m/%Y') AS finformat,\n des.idresolucionprofesor,\n rp.resolucion,\n des.iddesignacion \n FROM designaciones des \n JOIN estados_designaciones edes ON des.idestadodesignacion = edes.idestadodesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona \n JOIN tipos_documentos tp ON per.idtipodoc = tp.idtipodoc\n JOIN dedicaciones ded ON des.iddedicacion = ded.iddedicacion\n JOIN catedras cat ON des.idcatedra = cat.idcatedra \n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan\n JOIN materias m ON mp.idmateria = m.idmateria\n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car ON pe.idcarrera = car.idcarrera \n JOIN facultades fac ON car.idfacultad = fac.idfacultad \n JOIN tipos_designaciones td ON des.idtipodesignacion = td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion= cd.idcategoriadesignacion \n LEFT JOIN resoluciones_profesores rp ON des.idresolucionprofesor = rp.idresolucionprofesor\n WHERE des.idestadodesignacion = 4 AND YEAR(des.inicio)= \".$anio.\" AND car.idfacultad = \".$idfacultad.\" AND sed.idsede= \".$idsede.\" \n ORDER BY car.nombre, per.apellido; \";\n \n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n\n return $q;\n }", "function consultaGrupos($idTutor)\n{\n $sql=\"SELECT DISTINCT gp.id_grupo as id ,\n gp.nombre_grupo as nombre ,\n gp.clave as clave,\n gp.id_escuela as \\\"idEscuela\\\",\n gp.id_empresa as \\\"idEmpresa\\\",\n gp.tipo_grupo as \\\"tipoGrupo\\\" \n FROM rel_curso_tutor r_c_t\n JOIN rel_curso_grupo r_c_g\n ON r_c_t.id_rel_curso_grupo = r_c_g.id_rel_curso_grupo\n JOIN grupo gp\n ON gp.id_grupo = r_c_g.id_grupo \n WHERE \tgp.status = 1\n AND r_c_t.id_tutor = \".$idTutor;\n \n $consultaGrupo= new Query(\"SG\");\n $consultaGrupo->sql=$sql;\n $resultado = $consultaGrupo->select(\"obj\");\n \n return $resultado;\n}", "function get_listado_estactual($filtro=array())\n\t{ \n $concat='';\n if (isset($filtro['anio']['valor'])) {\n \t$udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n\t\t} \n //que sea una designacion correspondiente al periodo seleccionado o anulada dentro del periodo \n $where=\" WHERE ((a.desde <= '\".$udia.\"' and (a.hasta >= '\".$pdia.\"' or a.hasta is null)) or (a.desde='\".$pdia.\"' and a.hasta is not null and a.hasta<a.desde))\";\n $where2=\" WHERE 1=1 \";//es para filtrar por estado. Lo hago al final de todo\n if (isset($filtro['uni_acad'])) {\n $concat=quote($filtro['uni_acad']['valor']);\n switch ($filtro['uni_acad']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.uni_acad = \".quote($filtro['uni_acad']['valor']);break;\n case 'es_distinto_de': $where.= \" AND a.uni_acad <> \".quote($filtro['uni_acad']['valor']);break;\n }\n }\n //si el usuario esta asociado a un perfil de datos le aplica igual a su UA\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and a.uni_acad = \".quote($resul[0]['sigla']);\n $concat=quote($resul[0]['sigla']);//para hacer el update de baja\n }\n if (isset($filtro['iddepto'])) {\n switch ($filtro['iddepto']['condicion']) {\n case 'es_igual_a': $where.= \" AND iddepto =\" .$filtro['iddepto']['valor'];break;\n case 'es_distinto_de': $where.= \" AND iddepto <>\" .$filtro['iddepto']['valor'];break;\n }\n }\n if (isset($filtro['por_permuta'])) {\n switch ($filtro['por_permuta']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.por_permuta =\" .$filtro['por_permuta']['valor'];break;\n case 'es_distinto_de': $where.= \" AND a.por_permuta <>\" .$filtro['por_permuta']['valor'];break;\n }\n }\n if (isset($filtro['carac']['valor'])) {\n switch ($filtro['carac']['valor']) {\n case 'R':$c=\"'Regular'\";break;\n case 'O':$c=\"'Otro'\";break;\n case 'I':$c=\"'Interino'\";break;\n case 'S':$c=\"'Suplente'\";break;\n default:\n break;\n }\n switch ($filtro['carac']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.carac=\".$c;break;\n case 'es_distinto_de': $where.= \" AND a.carac<>\".$c;break;\n }\t\n }\n if (isset($filtro['estado'])) {\n switch ($filtro['estado']['condicion']) {\n case 'es_igual_a': $where2.= \" and est like '\".$filtro['estado']['valor'].\"%'\";break;\n case 'es_distinto_de': $where2.= \" and est not like '\".$filtro['estado']['valor'].\"%'\";break;\n }\n }\n if (isset($filtro['legajo'])) {\n switch ($filtro['legajo']['condicion']) {\n case 'es_igual_a': $where.= \" and legajo = \".$filtro['legajo']['valor'];break;\n case 'es_mayor_que': $where.= \" and legajo > \".$filtro['legajo']['valor'];break;\n case 'es_mayor_igual_que': $where.= \" and legajo >= \".$filtro['legajo']['valor'];break;\n case 'es_menor_que': $where.= \" and legajo < \".$filtro['legajo']['valor'];break;\n case 'es_menor_igual_que': $where.= \" and legajo <= \".$filtro['legajo']['valor'];break;\n case 'es_distinto_de': $where.= \" and legajo <> \".$filtro['legajo']['valor'];break;\n case 'entre': $where.= \" and legajo >= \".$filtro['legajo']['valor']['desde'].\" and legajo <=\".$filtro['legajo']['valor']['hasta'];break;\n }\n } \n if (isset($filtro['docente_nombre'])) {\n switch ($filtro['docente_nombre']['condicion']) {\n case 'contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'no_contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) not like LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'comienza_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'termina_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_igual': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) == LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_distinto': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) <> LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n }\n } \n if (isset($filtro['programa'])) {\n $sql=\"select * from mocovi_programa where id_programa=\".$filtro['programa']['valor'];\n $resul=toba::db('designa')->consultar($sql);\n switch ($filtro['programa']['condicion']) {\n case 'es_igual_a': $where.= \" AND programa =\".quote($resul[0]['nombre']);break;\n case 'es_distinto_de': $where.= \" AND programa <>\".quote($resul[0]['nombre']);break;\n }\n } \n if (isset($filtro['tipo_desig'])) {\n switch ($filtro['tipo_desig']['condicion']) {\n case 'es_igual_a': $where.=\" AND a.tipo_desig=\".$filtro['tipo_desig']['valor'];break;\n case 'es_distinto_de': $where.=\" AND a.tipo_desig <>\".$filtro['tipo_desig']['valor'];break;\n }\n }\n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']['valor']) {\n case '0': $where.=\" AND not (a.hasta is not null and a.hasta<a.desde)\";break;\n case '1': $where.=\" AND a.hasta is not null and a.hasta<a.desde \";break;\n }\n } \n if (isset($filtro['cat_estat'])) {\n switch ($filtro['cat_estat']['condicion']) {\n case 'es_igual_a': $where2.= \" and cat_estat=\".quote($filtro['cat_estat']['valor']);break;\n case 'es_distinto_de': $where2.= \" and cat_estat <>\".quote($filtro['cat_estat']['valor']);break;\n }\n }\n if (isset($filtro['dedic'])) {\n switch ($filtro['dedic']['condicion']) {\n case 'es_igual_a': $where2.= \" and dedic=\".$filtro['dedic']['valor'];break;\n case 'es_distinto_de': $where2.= \" and dedic<>\".$filtro['dedic']['valor'];break;\n }\n } \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n if($concat!=''){ \n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and a.uni_acad=\".$concat\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n }\n \n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia,$udia,$filtro['anio']['valor']);\n\t\t//si el estado de la designacion es B entonces le pone estado B, si es <>B se fija si tiene licencia sin goce o cese\n// $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n// . \"select sub2.*,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n// . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n// . \"from (\"\n// .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n// .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n// .\" from (\"\n// .\" select a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,b.a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,check_presup,licencia,a.dias_des,a.dias_lic\".\n// \" from (\".$sql.\") a\"\n// .$where \n// .\") b \"\n// . \" )sub\"\n// . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n// . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n// . \")sub2\"//obtengo el id_novedad maximo\n// . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n// .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n// .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n// .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n// . \")sub3\"\n// .$where2\n// . \" order by docente_nombre,desde\"; \n $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,tkd,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n . \"select sub2.*,sub2.nro_540||'/'||t_i.anio as tkd,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n . \"from (\"\n .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n .\" from (\"\n .\" select a.id_designacion,a.por_permuta,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,t.iddepto,a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\".\n \" from (\".$sql.\") a\"\n . \" INNER JOIN designacion d ON (a.id_designacion=d.id_designacion)\"\n . \" LEFT OUTER JOIN departamento t ON (t.iddepto=d.id_departamento)\"\n .$where \n .\") b \"\n . \" )sub\"\n . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n . \")sub2\"//obtengo el id_novedad maximo\n . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n . \")sub3\"\n .$where2\n . \" order by docente_nombre,desde\"; \n return toba::db('designa')->consultar($sql);\n\t}", "public function selectCustomizadoDetalle($modo, $condicion = array(), $order = '') {\n \n if ($condicion == '')\n $condicion = array();\n\n $where = '';\n foreach ($condicion as $key => $value) {\n if (($value == 'IS NULL') || (substr($value, 0, 7) == 'BETWEEN')) {\n $where .= \" AND $key \" . $value;\n } else {\n $where .= \" AND $key = '\" . $value . \"' \";\n }\n }\n \n $sql = \"SELECT \n com.`id` comprobante_id,\n cli.`razon_social` cli_razon_social,\n cli.ruc cli_ruc,\n tip.`tipo_documento` tipo_documento,\n serie,\n numero,\n DATE_FORMAT(com.fecha_de_emision, '%d-%m-%Y') AS fecha_de_emision,\n DATE_FORMAT(com.fecha_de_vencimiento, '%d-%m-%Y') AS fecha_de_vencimiento,\n com.total_gravada,\n com.total_igv,\n com.total_a_pagar,\n com.enviado_sunat,\n com.total_detraccion,\n com.tipo_de_cambio,\n IF(estado_sunat = '1', 'Por validar','Validado') estado_sunat,\n com.`enviado_cliente`,\n com.`enviado_equipo`,\n ite.descripcion descripcion, \n tip.`tipo_documento` tipo_documento,\n emp.`empresa` empresa,\n mon.`abreviado`,\n mon.`moneda`,\n mon.`simbolo`\n FROM `comprobantes` com\n JOIN items ite ON com.`id` = ite.`comprobante_id`\n JOIN `clientes` cli ON com.`cliente_id` = cli.`id`\n JOIN `tipo_documentos` tip ON com.`tipo_documento_id` = tip.`id` \n JOIN `empresas` emp ON com.`empresa_id` = emp.`id`\n JOIN `monedas` mon ON com.`moneda_id` = mon.`id`\n WHERE com.eliminado=0 AND com.fecha_delete IS NULL \" . $where . \" \" . $order;\n //echo $sql;exit;\n $query = $this->db->query($sql);\n\n switch ($modo) {\n case '1':\n $resultado = '';\n if ($query->num_rows() > 0) {\n $row = $query->row_array();\n $resultado = $row[$campos];\n }\n return $resultado;\n\n case '2':\n $row = array();\n if ($query->num_rows() > 0) {\n $row = $query->row_array();\n }\n return $row;\n\n case '3':\n $rows = array();\n foreach ($query->result_array() as $row) {\n $rows[] = $row;\n }\n return $rows;\n }\n }", "function lista_perguntas_avaliacao($avaliacao_id){\n $SQLSelect = 'SELECT pergunta, pergunta.id as id, sentenca '\n . 'FROM pergunta '\n . 'INNER JOIN alternativa ON pergunta.id = alternativa.pergunta_id '\n . 'INNER JOIN correta on correta.pergunta_id = pergunta.id and correta.alternativa_id = alternativa.id '\n . 'WHERE atividade_id = ?';\n \n try{\n $conexao = conn_mysql();\n \n //prepara a execução da sentença\n $operacao = $conexao->prepare($SQLSelect);\t\n $operacao->execute(array($avaliacao_id));\n \n //captura TODOS os resultados obtidos\n $resultados = $operacao->fetchAll(PDO::FETCH_ASSOC);\n $conexao=null;\n \n return $resultados;\n }\n catch(PDOException $excep){\n echo \"Erro!: \" . $excep->getMessage() . \"\\n\";\n $conexao=null;\n die();\n }\n \n}", "function get_listado($anio_lectivo)\n\t{\n\t\t$sql_1 = \"(SELECT t_p.id_periodo,\n t_p.fecha_inicio,\n t_p.fecha_fin,\n\t\t\t t_p.anio_lectivo,\n t_c.numero,\n '----' as turno,\n 'Cuatrimestre' as tipo_periodo\n FROM periodo as t_p\n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo AND t_p.anio_lectivo=$anio_lectivo))\n \n \";\n \n $cuatrimestre=toba::db('gestion_aulas')->consultar($sql_1);\n \n $sql_2=\" \n (SELECT t_p.id_periodo,\n t_p.fecha_inicio,\n t_p.fecha_fin,\n t_p.anio_lectivo,\n t_ef.turno,\n t_ef.numero,\n 'Examen Final' as tipo_periodo\n FROM periodo t_p \n JOIN examen_final t_ef ON (t_p.id_periodo=t_ef.id_periodo AND t_p.anio_lectivo=$anio_lectivo))\";\n \n $examen_final=toba::db('gestion_aulas')->consultar($sql_2);\n \n $sql_3=\"(SELECT t_p.id_periodo,\n t_p.fecha_inicio,\n t_p.fecha_fin,\n t_p.anio_lectivo,\n 'Curso de Ingreso' as tipo_periodo,\n '----' as numero,\n t_ci.facultad as turno\n FROM periodo t_p \n JOIN curso_ingreso t_ci ON (t_p.id_periodo=t_ci.id_periodo AND t_p.anio_lectivo=$anio_lectivo)\n )\";\n \n $curso_ingreso=toba::db('gestion_aulas')->consultar($sql_3);\n \n $this->unificar_periodos(&$cuatrimestre, $examen_final);\n \n $this->unificar_periodos(&$cuatrimestre, $curso_ingreso);\n \n return $cuatrimestre;\n \n }" ]
[ "0.6698018", "0.6599022", "0.65928453", "0.63955367", "0.6388347", "0.6320224", "0.62810683", "0.6246455", "0.6156479", "0.61469203", "0.61369365", "0.61183906", "0.61096436", "0.6107095", "0.6095871", "0.60911703", "0.6089838", "0.6086996", "0.6083015", "0.6043202", "0.60387546", "0.6037915", "0.603333", "0.6026729", "0.60254747", "0.6018332", "0.6003017", "0.5992133", "0.59887767", "0.59816754", "0.59811795", "0.5969169", "0.59644276", "0.595237", "0.5938417", "0.5936973", "0.5909353", "0.5902098", "0.59001327", "0.5879474", "0.5875612", "0.5871388", "0.5862882", "0.58627677", "0.58605886", "0.5859193", "0.5858041", "0.58576065", "0.5853795", "0.58520716", "0.58497876", "0.58491224", "0.58458", "0.5843652", "0.5842922", "0.5837998", "0.583503", "0.5828293", "0.58260494", "0.5823662", "0.5821648", "0.58209056", "0.58142275", "0.5811418", "0.58114123", "0.58103335", "0.58083487", "0.58031917", "0.5800984", "0.5799541", "0.57941514", "0.5792434", "0.57909936", "0.57903403", "0.5780189", "0.5777069", "0.57732624", "0.5760401", "0.57555395", "0.5751945", "0.575073", "0.5746324", "0.57434833", "0.57420963", "0.5740767", "0.5736945", "0.57334876", "0.5724882", "0.57222164", "0.571629", "0.5713874", "0.57132655", "0.5713029", "0.57031953", "0.57001", "0.56990457", "0.56968063", "0.56923497", "0.56886697", "0.5684218", "0.56800175" ]
0.0
-1
public function listapac($estado = '', $organigrama_id = '',$fecha_ini='',$fecha_fin='')
public function listapac($estado = '', $where = '') { //$where = ''; if ($estado == 1) { $where .= " and estado is NULL "; } $sql = "select * from f_listado_pacs() where baja_logica=1 " . $where . " order by fecha_ini asc"; $this->_db = new Cargos(); return new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function citas_aplicarFiltrosCitas($fechaInicial, $fechaFinal, $usuarios, $tipoCita, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif(sizeof($usuarios) > 0){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(sizeof($usuarios) > 1){\n\t\t\t\t\t$andOr = \"OR\";\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$andOr = \"AND\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_agendaCitas_usuarios AS ACU ON ACU.idAgendaCita = C.idAgendaCita WHERE ( \";\t\n\t\t\t\t\n\t\t\t\tfor ($i=0; $i < sizeof($usuarios); $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif($i == 0){\n\t\t\t\t\t\t$opt = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$opt = $andOr;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$idUsuario = $usuarios[$i];\n\t\t\t\t\t$adicionQuery .= \" $opt ACU.idUsuario = '$idUsuario' \";\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" ) AND ACU.estado = 'A'\";\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( C.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($tipoCita != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND TC.idTipoCita = '$tipoCita' \";\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND C.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t C.idAgendaCita,\n\t\t\t\t\t\t C.fecha,\n\t\t\t\t\t\t DATE_FORMAT(C.horaInicio, '%H:%i') as horaInicio,\n\t\t\t\t\t\t C.fechaFin,\n\t\t\t\t\t\t DATE_FORMAT(C.horaFin, '%H:%i') as horaFin,\n\t\t\t\t\t\t C.duracionHoras,\n\t\t\t\t\t\t C.duracionMinutos,\n\t\t\t\t\t\t C.estado,\n\t\t\t\t\t\t C.observaciones,\n\t\t\t\t\t\t C.motivoCancelacion,\n\t\t\t\t\t\t C.idUsuarioCancela,\n\t\t\t\t\t\t C.idMascota,\n\t\t\t\t\t\t C.idSucursal,\n\t\t\t\t\t\t C.idTipoCita,\n\t\t\t\t\t\t C.idPropietario,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario,\n\t\t\t\t\t\t TC.nombre AS nombreTipoCita\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_agendaCitas AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = C.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuarioCancela\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_tiposCita AS TC ON TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (C.idAgendaCita)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (C.idAgendaCita) DESC; \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "function listaAsistenciasDia($fecha) {\n\t\t$asis = new mAsistencias();\n\t\treturn $asis->fetchAsistenciasDia($fecha);\n\t}", "function listar_anuncios($opcao){\n $arrayAnuncios=[];\n //Peciso disto por causa de pesquisas pelo nome/localizacao e pelas pesquisas das caracteristicas\n $saber=0;\n $nova=\"\";\n if($opcao==-1)$saber=2;\n if(!strcmp($opcao[0],\"*\")==true){\n\n for ($i=0; $i <strlen($opcao) ; $i++) {\n if($i!=0) $nova.=$opcao[$i];\n\n }\n $saber++;\n $opcao=$nova;\n }\n //\n global $mybd;\n if($opcao==-1 && $saber==2){\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where anu_estado=1;\");\n }else if(!strcmp($opcao,\"\") && $saber==0){\n //devolve todos os anuncios\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio;\");\n }else if(strcmp($opcao,\"\") && $saber==0){ //devolve todos os anuncios COM AS caracteristicas especificas\n $query=\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where anu_estado=1 $opcao;\";\n $STH = $mybd->DBH->prepare($query);\n }else if($saber==1){\n\n //pesquisa todos os anuncios com pesquisa de nome\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio WHERE (anu_titulo LIKE '%$opcao%' OR anu_morada LIKE '%$opcao%') and anu_estado=1;\");\n $STH->bindParam(1, $opcao);\n }\n $STH->execute();\n $STH->setFetchMode(PDO::FETCH_OBJ);\n $i=0;\n\t\t\twhile($row = $STH->fetch()){\n $arrayAnuncios[$i]=new Anuncio($row->anu_id,$row->anu_titulo,$row->anu_descricao,$row->uti_id,$row->anu_morada,$row->anu_telefone,$row->anu_email,$row->anu_codigopostal,$row->anu_data,$row->anu_disponibilidade,$row->anu_estado,$row->anu_preco,null,$row->anu_wcprivativo,$row->anu_mobilada,$row->anu_utensilios,$row->anu_internet,$row->anu_raparigas,$row->anu_rapazes,$row->anu_despesas,$row->anu_animais,$row->anu_latitude,$row->anu_longitude);\n $i++;\n }\n return $arrayAnuncios;\n }", "function listar_anuncios_anunciante($id_anunciante,$estado_anuncio){\n $arrayAnuncios=[];\n global $mybd;\n if($id_anunciante==-5){//devolve anuncios de proprietario\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio $estado_anuncio;\");\n }else if($estado_anuncio==-4){//devolve anuncios de proprietario\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where uti_id=? ;\");\n $STH->bindParam(1, $id_anunciante);\n }else if($estado_anuncio==-6){//devolve anuncios de proprietario\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where uti_id=? and anu_estado!=4;\");\n $STH->bindParam(1, $id_anunciante);\n }else if($id_anunciante==-2){//mostra todos anuncios pendentes de anunciantes\n $STH = $mybd->DBH->prepare(\"Select anu_id,anuncio.uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco,utilizador.uti_id from anuncio,utilizador where utilizador.uti_id=anuncio.uti_id and uti_tipo=2 ;\");\n }else if($id_anunciante==-1){//mostra anuncios anunciante por estado\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where anu_estado=?;\");\n $STH->bindParam(1, $estado_anuncio);\n } else if($estado_anuncio!=-4 ){//mostra anuncios anunciante por estado e por utilizador\n $STH = $mybd->DBH->prepare(\"Select anu_id,uti_id,anu_titulo,anu_descricao,anu_morada,anu_email,anu_estado,anu_telefone,anu_codigopostal,anu_disponibilidade,anu_wcprivativo,anu_mobilada,anu_utensilios,anu_internet,anu_rapazes,anu_raparigas,anu_despesas,anu_animais,anu_latitude,anu_longitude,anu_data,anu_preco from anuncio where uti_id=? and anu_estado=?;\");\n $STH->bindParam(1, $id_anunciante);\n $STH->bindParam(2, $estado_anuncio);\n }\n $STH->execute();\n $STH->setFetchMode(PDO::FETCH_OBJ);\n $i=0;\n\t\twhile($row = $STH->fetch()){\n\t\t\t\t$arrayAnuncios[$i]=new Anuncio($row->anu_id,$row->anu_titulo,$row->anu_descricao,$row->uti_id,$row->anu_morada,$row->anu_telefone,$row->anu_email,$row->anu_codigopostal,$row->anu_data,$row->anu_disponibilidade,$row->anu_estado,$row->anu_preco,null,$row->anu_wcprivativo,$row->anu_mobilada,$row->anu_utensilios,$row->anu_internet,$row->anu_raparigas,$row->anu_rapazes,$row->anu_despesas,$row->anu_animais,$row->anu_latitude,$row->anu_longitude);\n $i++;\n }\n return $arrayAnuncios;\n }", "public function citas_listarCitas($paginaActual,$records_per_page){\n \t\n\t\t\t$resultado = array();\n\t\t\n\t\t\t$query = \" SELECT \n\t\t\t\t\t\t C.idAgendaCita,\n\t\t\t\t\t\t C.fecha,\n\t\t\t\t\t\t DATE_FORMAT(C.horaInicio, '%H:%i') as horaInicio,\n\t\t\t\t\t\t C.fechaFin,\n\t\t\t\t\t\t DATE_FORMAT(C.horaFin, '%H:%i') as horaFin,\n\t\t\t\t\t\t C.duracionHoras,\n\t\t\t\t\t\t C.duracionMinutos,\n\t\t\t\t\t\t C.estado,\n\t\t\t\t\t\t C.observaciones,\n\t\t\t\t\t\t C.motivoCancelacion,\n\t\t\t\t\t\t C.idUsuarioCancela,\n\t\t\t\t\t\t C.idMascota,\n\t\t\t\t\t\t C.idSucursal,\n\t\t\t\t\t\t C.idTipoCita,\n\t\t\t\t\t\t C.idPropietario,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario,\n \t\t\t\t\t\tTC.nombre AS nombreTipoCita\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_agendaCitas AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = C.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuarioCancela\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_tiposCita AS TC ON TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\tORDER BY (C.idAgendaCita) DESC\n\t\t\t\t\t\t LIMIT \". (($paginaActual) * $records_per_page). \" , \". $records_per_page;\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function getAsistencias(){\n\t\t$filasPagina = 10;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraAsistencias\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM asistencia \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM asistencia LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function listar($inicio = 0, $cantidad = 0, $excepcion = NULL, $condicion = NULL, $idCurso = NULL) {\n global $sql, $configuracion;\n\n /* * * Validar la fila inicial de la consulta ** */\n if (!is_int($inicio) || $inicio < 0) {\n $inicio = 0;\n }\n\n /* * * Validar la cantidad de registros requeridos en la consulta ** */\n if (!is_int($cantidad) || $cantidad <= 0) {\n $cantidad = 0;\n }\n\n /* * * Validar que la condición sea una cadena de texto ** */\n if (!is_string($condicion)) {\n $condicion = '';\n }\n\n /* * * Validar que la excepción sea un arreglo y contenga elementos ** */\n if (isset($excepcion) && is_array($excepcion) && count($excepcion)) {\n $excepcion = implode(',', $excepcion);\n $condicion .= 'ac.id NOT IN (' . $excepcion . ') AND ';\n }\n\n /* * * Definir el orden de presentación de los datos ** */\n if ($this->listaAscendente) {\n $orden = 'ac.fecha_publicacion ASC';\n } else {\n $orden = 'ac.fecha_publicacion DESC';\n }\n\n $tablas = array(\n 'ac' => 'actividades_curso'\n );\n\n $columnas = array(\n 'id' => 'ac.id',\n 'idCurso' => 'ac.id_curso',\n 'idUsuario' => 'ac.id_usuario',\n 'titulo' => 'ac.titulo',\n 'descripcion' => 'ac.descripcion',\n 'fechaPublicacion' => 'UNIX_TIMESTAMP(ac.fecha_publicacion)',\n 'fechaLimite' => 'UNIX_TIMESTAMP(ac.fecha_limite)',\n 'diasRestantes' => 'DATEDIFF(ac.fecha_limite, NOW())'\n );\n\n $condicion .= 'ac.id_curso = \"'.$idCurso.'\"';\n\n if (is_null($this->registros)) {\n $sql->seleccionar($tablas, $columnas, $condicion);\n $this->registros = $sql->filasDevueltas;\n }\n\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion, '', $orden, $inicio, $cantidad);\n\n $lista = array();\n if ($sql->filasDevueltas) {\n\n while ($actividad = $sql->filaEnObjeto($consulta)) {\n $actividad->icono = $configuracion['SERVIDOR']['media'] . $configuracion['RUTAS']['imagenesEstilos'] . 'activity.png';\n $lista[] = $actividad;\n }\n }\n\n return $lista;\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 }", "function list_aprov_nomina($id='',$id_sucursal='',$tipo='',$status='',$fecha=''){\n\t\t$sQuery=\"SELECT * FROM control_salida_extra WHERE 1 = 1 \";\n\t\tif($id) {\t$sQuery.=\"AND id = '$id' \";\t}\n\t\tif($id_sucursal) {\t$sQuery.=\"AND id_sucursal = '$id_sucursal' \";\t}\n\t\tif($tipo)\t{\t$sQuery.=\"AND tipo = '$tipo' \";\t}\n\t\tif($status)\t{\t$sQuery.=\"AND status = '$status' \";\t}\n\t\tif($fecha)\t{\t$sQuery.=\"AND fecha <= '$fecha' \";\t}\n\t\t\n\t\t$sQuery.=\"ORDER BY id_por_sucursal DESC \";\n\t\t\n\t//\tdie($sQuery);\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\n\t\t\t\n\t}", "public function returnAnuncioAll($status = \"online\"){\n\n $objAnuncio = new StatusAnuncioDAO();\n #retorna o id dos registros que representam o estado online ou inativo, sendo o valor default sempre online.\n $this->arrayStatusId = $objAnuncio->retornaRegStatus($status);\n\n\n #faz a junção das tabelas relacionadas ao anuncio, verificando usuário e se vai retornar os anuncios ativos ou inativos.\n $sql = \"SELECT * FROM Anuncio\n INNER JOIN Forma_pagamento ON Anuncio.anuncio_id = Forma_pagamento.forma_pag_anuncio_ref\n INNER JOIN Link ON Anuncio.anuncio_id = Link.link_anuncio_ref\n INNER JOIN Endereco ON Anuncio.anuncio_endereco = Endereco.endereco_id\n INNER JOIN Horario_funcionamento ON Anuncio.anuncio_id = Horario_funcionamento.horario_func_anuncio_ref\n INNER JOIN Cont_views ON Anuncio.anuncio_id = Cont_views.cont_views_anuncio_ref\n INNER JOIN Plano_saude ON Anuncio.anuncio_id = Plano_saude.plano_saude_anuncio_ref\n INNER JOIN Facilidades ON Anuncio.anuncio_id = Facilidades.facilidades_anuncio_ref\n INNER JOIN Sub_categoria ON Anuncio.anuncio_categoria = Sub_categoria.sub_categoria_id\n INNER JOIN Categoria ON Sub_categoria.sub_categoria_cat_ref = Categoria.tipo_categoria_id\n WHERE Anuncio.anuncio_excluido = 0 AND (\";\n\n\n #verifica se os argumentos foram passados com sucesso. Somemte se os argumentos estiverem corretos que será executado a consulta.\n if($status === \"online\" || $status === \"inativo\"){\n\n for ($i = 0; $i < count($this->arrayStatusId); $i++) {\n\n $sql .= \" Anuncio.anuncio_status = \" . $this->arrayStatusId[$i]['status_anuncio_id'];//estamos trabalhando com arrays associativos.\n\n #se $i + 1 for iqual ao tamanho total do array, significa que a proxima iteração será a ultima.\n if (($i + 1) != count($this->arrayStatusId)) {\n $sql .= \" OR \";\n } else {\n #Na ultima iteração recebe o ';'\n $sql .= \") ORDER BY Anuncio.anuncio_titulo ASC, Anuncio.anuncio_id ASC;\";\n }\n\n }\n\n #caso ocorrer tudo certo retorna a visualização da tabela.\n if($row = $this->runSelect($sql)){\n\n\n return $row;\n\n } else {\n\n // echo \"A consulta não retonou dados para o inner join curriculo \" . $sql;\n }\n\n } else {\n\n // echo \"Favor verificar os agumentos passados\";\n\n }\n\n\n }", "public function listarActivos(){\n $sql = \"SELECT c.idcompra, c.nrofactura, date(c.fecha) as fecha, p.razonsocial AS proveedor, concat(per.nombre, ' ', per.apellido) AS personal, c.monto, c.estado \n FROM compras c JOIN proveedores p ON c.idproveedor = p.idproveedor JOIN personales per ON c.idpersonal = per.idpersonal WHERE c.estado = '1'\n ORDER BY c.idcompra DESC\";\n return ejecutarConsulta($sql);\n }", "function getDados($codAtividade){\n\n }", "public function citas_TotalAplicarFiltrosCitas($fechaInicial, $fechaFinal, $usuarios, $tipoCita, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = 0;\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\tif(sizeof($usuarios) > 0){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(sizeof($usuarios) > 1){\n\t\t\t\t\t$andOr = \"OR\";\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$andOr = \"AND\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_agendaCitas_usuarios AS ACU ON ACU.idAgendaCita = C.idAgendaCita WHERE ( \";\t\n\t\t\t\t\n\t\t\t\tfor ($i=0; $i < sizeof($usuarios); $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif($i == 0){\n\t\t\t\t\t\t$opt = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$opt = $andOr;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$idUsuario = $usuarios[$i];\n\t\t\t\t\t$adicionQuery .= \" $opt ACU.idUsuario = '$idUsuario' \";\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" ) AND ACU.estado = 'A'\";\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( C.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($tipoCita != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND TC.idTipoCita = '$tipoCita' \";\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND C.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t count(C.idAgendaCita) as totalRegistros\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_agendaCitas AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = C.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuarioCancela\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_tiposCita AS TC ON TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\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$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas['totalRegistros'];\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function examenes_aplicarFiltrosExamenes($fechaInicial, $fechaFinal, $usuarios, $idExamen, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idExamen != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_examenDetalle AS DE ON DE.idExamen = E.idExamen\n\t\t\t\t\t\t\t\t INNER JOIN tb_listadoExamenes AS LE ON LE.idListadoExamen = DE.idListadoExamen\n\t\t\t\t\t\t\t\t WHERE LE.idListadoExamen = '$idExamen' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND E.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( E.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND E.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \" SELECT \n\t\t\t\t\t\t\tE.idExamen, \n\t\t\t\t\t\t\tE.fecha,\n\t\t\t\t\t\t\tDATE_FORMAT(E.hora, '%H:%i') AS hora,\n\t\t\t\t\t\t\tE.observaciones,\n\t\t\t\t\t\t\tE.idMascota,\n\t\t\t\t\t\t\tE.idUsuario,\n\t\t\t\t\t\t\tE.idSucursal,\n\t\t\t\t\t\t\tM.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_examenes AS E\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON E.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = E.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = E.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (E.idExamen)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (E.idExamen) DESC; \";\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function lists($page=1)\n {\n\t$articulos= new Articulos();\n\t$this->listapersona=$articulos->paginacion($page);\n }", "public function listar_anunciosByUser($id_cliente){\n return $this->anunciosDAO->selectAllByUser($id_cliente);\n }", "public function ConsultarAsignaciones($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVA($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $inserto = 0;\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $ruta= \"<a href='/\".$fila['Ruta'].\"'>Descargar Archivo</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['Modulo'],$fila['TipoArchivo'], $ruta ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "function listarAgendadas($id) \n\t{\n\t\t$this->db->select('*');\n\t\t\n\t\t$this->db->from('Auditoria');\n\n\t\t$this->db->where('statusID', $id);\n\n\t\t$this->db->join('Projeto' , 'Projeto.projetoID = Auditoria.projetoID');\n\n\t\t$this->db->join('Departamento' , 'Departamento.departamentoID = Projeto.departamentoID');\n\n\t\t$this->db->join('Unidade' , 'Unidade.unidadeID = Departamento.unidadeID');\n\n\t\t$this->db->join('Usuario' , 'Usuario.usuarioID = Auditoria.auditorID');\n\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query->result();\n\t}", "public function listar_abonos_informe_table_filtro($desde, $hasta) {\n $dato = [];\n\n //--- Datos del Logeado ---//\n $userdata = $this->session->all_userdata();\n //--- datos ---//\n $abonos = $this->app_model->get_abonos_desde_hasta($desde, $hasta);\n $estados = $this->app_model->get_estados();\n\n if ($abonos) {\n foreach ($abonos as $key => $value) {\n $texto = \"\";\n $class = \"\";\n if ($value['idEstado'] == 1) :\n $class = \"btn-info\";\n $texto = \"Activado\";\n elseif ($value['idEstado'] == 2):\n $class = \"btn-success\";\n $texto = \"Pausado\";\n elseif ($value['idEstado'] == 3):\n $class = \"btn-danger\";\n $texto = \"Terminado\";\n else:\n $class = \"btn-warning\";\n $texto = \"Sin Estado\";\n endif;\n\n $opcion = '<div class=\"btn-group\">' .\n '<button class=\"btn ' . $class . '\" style=\"padding: 3px;font-size: 0.8em;\">' . $texto . '</button>' .\n '</div>';\n\n $dato[] = array(\n $opcion,\n $value['fechaEmision'],\n $value['fechaVtoCobro'],\n $value['nombEmpresa'],\n $value['descripModalidad'],\n $value['ventasCreadas'],\n \"$\" . number_format($value['total'] + $value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n $value['nombreVend'],\n \"DT_RowId\" => $value['idAbono']\n );\n }\n }\n\n $aa = array(\n 'sEcho' => 1,\n 'iTotalRecords' => count($dato),\n 'iTotalDisplayRecords' => 10,\n 'aaData' => $dato\n );\n\n echo json_encode($aa);\n }", "function getAportacionesSociales(){ $D\t= $this->getDatosAportaciones(); return $D[\"aportaciones\"]; \t}", "function idiomas_disponibles($id_palabra,$estado) {\n\t\n\t\tif ($estado==0) { $sql_estado='AND traducciones.estado = 0'; }\n\t\telseif ($estado==1) { $sql_estado='AND traducciones.estado = 1'; }\n\t\telseif ($estado==2) { $sql_estado='AND traducciones.estado = 2'; }\n\t\telse { $sql_estado=''; } \n\t\t$query = \"SELECT \n\t\ttraducciones.estado,traducciones.id_palabra,traducciones.id_idioma,\n\t\tidiomas.id_idioma,idiomas.idioma \n\t\tFROM traducciones, idiomas\n\t\tWHERE traducciones.id_palabra = '$id_palabra'\n\t\tAND traducciones.id_idioma = idiomas.id_idioma\n\t\t$sql_estado\n\t\tGROUP BY idiomas.id_idioma\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t}", "public function vacunas_aplicarFiltrosVacunas($fechaInicial, $fechaFinal, $fechaInicialProximo, $fechaFinalProximo, $idVacuna, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idVacuna != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idVacuna = '$idVacuna' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicialProximo != \"\" AND $fechaFinalProximo != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fechaProximoDesparasitante BETWEEN '$fechaInicialProximo' AND '$fechaFinalProximo')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \" SELECT \n\t\t\t\t\t\t V.idMascotaVacunas,\n\t\t\t\t\t\t V.fecha,\n\t\t\t\t\t\t DATE_FORMAT(V.hora, '%H:%i') as hora,\n\t\t\t\t\t\t V.fechaProximaVacuna,\n\t\t\t\t\t\t V.observaciones,\n\t\t\t\t\t\t V.idVacuna,\n\t\t\t\t\t\t VV.nombre as nombreVacuna,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_mascotas_vacunas AS V\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON V.idMascota = M.idMascota\n\t\t\t\t\t\t \tINNER JOIN\n\t\t\t\t\t\t tb_vacunas AS VV ON V.idVacuna = VV.idVacuna\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (V.idMascotaVacunas)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (V.idMascotaVacunas) DESC; \";\n\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function agenda($asesor, $fecha, $filtro)\n {\n $sql = \"SELECT \n l.NombreCompleto,\n e.NombreEmpresa,\n a.HoraInicio,\n a.HoraFinal,\n a.FechaAgenda\n FROM agenda AS a\n INNER JOIN detalleempresa AS de\n on de.idDetalleEmpresa = a.detalleempresa_idDetalleEmpresa\n INNER JOIN empresa AS e \n ON e.idEmpresa = de.Empresa_idEmpresa\n INNER JOIN lineabase AS l\n ON l.idLineabase = de.Linebase_idLineabase\n WHERE l.Usuarios_idUsuarios = '$asesor'\n AND a.FechaAgenda = '$fecha'\n AND l.Filtronegocio_idFiltronegocio = '$filtro'\";\n\n return ejecutarConsultaSimpleFila($sql);\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 getApartados(){\n\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraApartados\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM apartados \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM apartados LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function aportacionAction(Request $request)\n { \n $em = $this->getDoctrine()->getManager();\n\n $request = $this->getRequest();\n $session = $request->getSession();\n\n $usuario_id = $session->get(\"usuario_id\");\n $anio = $session->get(\"anio\");\n\n $dql = \"SELECT e FROM ChecnesRegistroBundle:Evento e\n INNER JOIN e.tipo_actividad a\n INNER JOIN a.tipo_tipo_actividad ta\n WHERE e.estado=1\n AND e.estado NOT IN(5)\n AND (ta.nombre_sistema='tesoreria' OR e.multa=1)\n ORDER BY e.fecha_inicio DESC\";\n $resp = $em->createQuery($dql);\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $resp, /* query NOT result */\n $request->query->getInt('page', 1)/*page number*/,\n 10/*limit per page*/\n );\n\n return $this->render('ChecnesRegistroBundle:RegistrarAportacion:index.html.twig', array(\n 'personas' => '',\n 'titulo' =>'Listado de Aportación / Cobro',\n 'pagination' => $pagination\n ));\n }", "public function buscarCitas($idPropietario, $fechaInicial, $fechaFinal){\n\t\t\n\t\t$idPropietario \t\t\t\t= parent::escaparQueryBDCliente($idPropietario);\n\t\t$fechaInicial \t\t\t\t\t= parent::escaparQueryBDCliente($fechaInicial);\n\t\t$fechaFinal \t\t\t\t\t= parent::escaparQueryBDCliente($fechaFinal);\n\t\t\n\t\t$resultado = array();\n\t\t\n\t\tif ($fechaInicial != \"\" AND $fechaFinal != \"\") {\n\t\t\t\n\t\t\t$query = \"SELECT C.idAgendaCita, C.fecha, DATE_FORMAT(C.horaInicio, '%H:%i') horaInicio, C.fechaFin, C.horaFin, C.duracionHoras, C.duracionMinutos, C.estado, \n\t\t\t\t\tC.observaciones, C.idMascota, C.idSucursal,C.idTipoCita, C.idPropietario,\n\t\t\t\t\tM.nombre as nombrePaciente, \n\t\t\t\t\tTC.nombre as nombreTipoCita,\n\t\t\t\t\tP.identificacion, P.nombre as nombrePropietario, P.apellido, P.telefono, P.celular, P.email\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM tb_agendaCitas as C\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tINNER JOIN tb_mascotas as M on M.idMascota = C.idMascota\n\t\t\t\t\tINNER JOIN tb_propietarios AS P on P.idPropietario = C.idPropietario\n\t\t\t\t\tLEFT JOIN tb_tiposCita AS TC on TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\n\t\t\t\t\tWHERE C.idPropietario = '$idPropietario' AND C.fecha BETWEEN '$fechaInicial' and '$fechaFinal' \";\n\t\t\t\n\t\t}\n\n\t\tif($fechaInicial != \"\" AND $fechaFinal == \"\"){\n\t\t\t$query = \"SELECT C.idAgendaCita, C.fecha, DATE_FORMAT(C.horaInicio, '%H:%i') horaInicio, C.fechaFin, C.horaFin, C.duracionHoras, C.duracionMinutos, C.estado, \n\t\t\t\t\tC.observaciones, C.idMascota, C.idSucursal,C.idTipoCita, C.idPropietario,\n\t\t\t\t\tM.nombre as nombrePaciente, \n\t\t\t\t\tTC.nombre as nombreTipoCita,\n\t\t\t\t\tP.identificacion, P.nombre as nombrePropietario, P.apellido, P.telefono, P.celular, P.email\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM tb_agendaCitas as C\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tINNER JOIN tb_mascotas as M on M.idMascota = C.idMascota\n\t\t\t\t\tINNER JOIN tb_propietarios AS P on P.idPropietario = C.idPropietario\n\t\t\t\t\tLEFT JOIN tb_tiposCita AS TC on TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\n\t\t\t\t\tWHERE C.idPropietario = '$idPropietario' AND C.fecha >= '$fechaInicial'\";\n\t\t}\n\t\t\n\t\tif($fechaInicial == \"\" AND $fechaFinal != \"\"){\n\t\t\t$query = \"SELECT C.idAgendaCita, C.fecha, DATE_FORMAT(C.horaInicio, '%H:%i') horaInicio, C.fechaFin, C.horaFin, C.duracionHoras, C.duracionMinutos, C.estado, \n\t\t\t\t\tC.observaciones, C.idMascota, C.idSucursal,C.idTipoCita, C.idPropietario,\n\t\t\t\t\tM.nombre as nombrePaciente, \n\t\t\t\t\tTC.nombre as nombreTipoCita,\n\t\t\t\t\tP.identificacion, P.nombre as nombrePropietario, P.apellido, P.telefono, P.celular, P.email\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM tb_agendaCitas as C\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tINNER JOIN tb_mascotas as M on M.idMascota = C.idMascota\n\t\t\t\t\tINNER JOIN tb_propietarios AS P on P.idPropietario = C.idPropietario\n\t\t\t\t\tLEFT JOIN tb_tiposCita AS TC on TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\n\t\t\t\t\tWHERE C.idPropietario = '$idPropietario' AND C.fecha <= '$fechaFinal'\";\n\t\t}\t\t\n\n\t\tif($fechaInicial == \"\" AND $fechaFinal == \"\"){\n\t\t\t$query = \"SELECT C.idAgendaCita, C.fecha, DATE_FORMAT(C.horaInicio, '%H:%i') horaInicio, C.fechaFin, C.horaFin, C.duracionHoras, C.duracionMinutos, C.estado, \n\t\t\t\t\tC.observaciones, C.idMascota, C.idSucursal,C.idTipoCita, C.idPropietario,\n\t\t\t\t\tM.nombre as nombrePaciente, \n\t\t\t\t\tTC.nombre as nombreTipoCita,\n\t\t\t\t\tP.identificacion, P.nombre as nombrePropietario, P.apellido, P.telefono, P.celular, P.email\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM tb_agendaCitas as C\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tINNER JOIN tb_mascotas as M on M.idMascota = C.idMascota\n\t\t\t\t\tINNER JOIN tb_propietarios AS P on P.idPropietario = C.idPropietario\n\t\t\t\t\tLEFT JOIN tb_tiposCita AS TC on TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\n\t\t\t\t\tWHERE C.idPropietario = '$idPropietario'\";\n\t\t}\t\n\n\n\t\t$conexion = parent::conexionCliente();\n\t\t\t\t\t\t\t\n\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\t\n\t\t\t\n\t\t\t\n\t\treturn $resultado;\n\n\n\t\t\n\t}", "function get_listado_estactual($filtro=array())\n\t{ \n $concat='';\n if (isset($filtro['anio']['valor'])) {\n \t$udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n\t\t} \n //que sea una designacion correspondiente al periodo seleccionado o anulada dentro del periodo \n $where=\" WHERE ((a.desde <= '\".$udia.\"' and (a.hasta >= '\".$pdia.\"' or a.hasta is null)) or (a.desde='\".$pdia.\"' and a.hasta is not null and a.hasta<a.desde))\";\n $where2=\" WHERE 1=1 \";//es para filtrar por estado. Lo hago al final de todo\n if (isset($filtro['uni_acad'])) {\n $concat=quote($filtro['uni_acad']['valor']);\n switch ($filtro['uni_acad']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.uni_acad = \".quote($filtro['uni_acad']['valor']);break;\n case 'es_distinto_de': $where.= \" AND a.uni_acad <> \".quote($filtro['uni_acad']['valor']);break;\n }\n }\n //si el usuario esta asociado a un perfil de datos le aplica igual a su UA\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and a.uni_acad = \".quote($resul[0]['sigla']);\n $concat=quote($resul[0]['sigla']);//para hacer el update de baja\n }\n if (isset($filtro['iddepto'])) {\n switch ($filtro['iddepto']['condicion']) {\n case 'es_igual_a': $where.= \" AND iddepto =\" .$filtro['iddepto']['valor'];break;\n case 'es_distinto_de': $where.= \" AND iddepto <>\" .$filtro['iddepto']['valor'];break;\n }\n }\n if (isset($filtro['por_permuta'])) {\n switch ($filtro['por_permuta']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.por_permuta =\" .$filtro['por_permuta']['valor'];break;\n case 'es_distinto_de': $where.= \" AND a.por_permuta <>\" .$filtro['por_permuta']['valor'];break;\n }\n }\n if (isset($filtro['carac']['valor'])) {\n switch ($filtro['carac']['valor']) {\n case 'R':$c=\"'Regular'\";break;\n case 'O':$c=\"'Otro'\";break;\n case 'I':$c=\"'Interino'\";break;\n case 'S':$c=\"'Suplente'\";break;\n default:\n break;\n }\n switch ($filtro['carac']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.carac=\".$c;break;\n case 'es_distinto_de': $where.= \" AND a.carac<>\".$c;break;\n }\t\n }\n if (isset($filtro['estado'])) {\n switch ($filtro['estado']['condicion']) {\n case 'es_igual_a': $where2.= \" and est like '\".$filtro['estado']['valor'].\"%'\";break;\n case 'es_distinto_de': $where2.= \" and est not like '\".$filtro['estado']['valor'].\"%'\";break;\n }\n }\n if (isset($filtro['legajo'])) {\n switch ($filtro['legajo']['condicion']) {\n case 'es_igual_a': $where.= \" and legajo = \".$filtro['legajo']['valor'];break;\n case 'es_mayor_que': $where.= \" and legajo > \".$filtro['legajo']['valor'];break;\n case 'es_mayor_igual_que': $where.= \" and legajo >= \".$filtro['legajo']['valor'];break;\n case 'es_menor_que': $where.= \" and legajo < \".$filtro['legajo']['valor'];break;\n case 'es_menor_igual_que': $where.= \" and legajo <= \".$filtro['legajo']['valor'];break;\n case 'es_distinto_de': $where.= \" and legajo <> \".$filtro['legajo']['valor'];break;\n case 'entre': $where.= \" and legajo >= \".$filtro['legajo']['valor']['desde'].\" and legajo <=\".$filtro['legajo']['valor']['hasta'];break;\n }\n } \n if (isset($filtro['docente_nombre'])) {\n switch ($filtro['docente_nombre']['condicion']) {\n case 'contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'no_contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) not like LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'comienza_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'termina_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_igual': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) == LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_distinto': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) <> LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n }\n } \n if (isset($filtro['programa'])) {\n $sql=\"select * from mocovi_programa where id_programa=\".$filtro['programa']['valor'];\n $resul=toba::db('designa')->consultar($sql);\n switch ($filtro['programa']['condicion']) {\n case 'es_igual_a': $where.= \" AND programa =\".quote($resul[0]['nombre']);break;\n case 'es_distinto_de': $where.= \" AND programa <>\".quote($resul[0]['nombre']);break;\n }\n } \n if (isset($filtro['tipo_desig'])) {\n switch ($filtro['tipo_desig']['condicion']) {\n case 'es_igual_a': $where.=\" AND a.tipo_desig=\".$filtro['tipo_desig']['valor'];break;\n case 'es_distinto_de': $where.=\" AND a.tipo_desig <>\".$filtro['tipo_desig']['valor'];break;\n }\n }\n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']['valor']) {\n case '0': $where.=\" AND not (a.hasta is not null and a.hasta<a.desde)\";break;\n case '1': $where.=\" AND a.hasta is not null and a.hasta<a.desde \";break;\n }\n } \n if (isset($filtro['cat_estat'])) {\n switch ($filtro['cat_estat']['condicion']) {\n case 'es_igual_a': $where2.= \" and cat_estat=\".quote($filtro['cat_estat']['valor']);break;\n case 'es_distinto_de': $where2.= \" and cat_estat <>\".quote($filtro['cat_estat']['valor']);break;\n }\n }\n if (isset($filtro['dedic'])) {\n switch ($filtro['dedic']['condicion']) {\n case 'es_igual_a': $where2.= \" and dedic=\".$filtro['dedic']['valor'];break;\n case 'es_distinto_de': $where2.= \" and dedic<>\".$filtro['dedic']['valor'];break;\n }\n } \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n if($concat!=''){ \n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and a.uni_acad=\".$concat\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n }\n \n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia,$udia,$filtro['anio']['valor']);\n\t\t//si el estado de la designacion es B entonces le pone estado B, si es <>B se fija si tiene licencia sin goce o cese\n// $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n// . \"select sub2.*,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n// . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n// . \"from (\"\n// .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n// .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n// .\" from (\"\n// .\" select a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,b.a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,check_presup,licencia,a.dias_des,a.dias_lic\".\n// \" from (\".$sql.\") a\"\n// .$where \n// .\") b \"\n// . \" )sub\"\n// . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n// . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n// . \")sub2\"//obtengo el id_novedad maximo\n// . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n// .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n// .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n// .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n// . \")sub3\"\n// .$where2\n// . \" order by docente_nombre,desde\"; \n $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,tkd,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n . \"select sub2.*,sub2.nro_540||'/'||t_i.anio as tkd,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n . \"from (\"\n .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n .\" from (\"\n .\" select a.id_designacion,a.por_permuta,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,t.iddepto,a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\".\n \" from (\".$sql.\") a\"\n . \" INNER JOIN designacion d ON (a.id_designacion=d.id_designacion)\"\n . \" LEFT OUTER JOIN departamento t ON (t.iddepto=d.id_departamento)\"\n .$where \n .\") b \"\n . \" )sub\"\n . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n . \")sub2\"//obtengo el id_novedad maximo\n . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n . \")sub3\"\n .$where2\n . \" order by docente_nombre,desde\"; \n return toba::db('designa')->consultar($sql);\n\t}", "public static function todosLosAnuncios()\n {\n try {\n $arrayanuncios = [];\n $fechaActual = new DateTime(date(\"d-m-y\", time()));\n $consulta = \"SELECT id_anuncio,autor,moroso,localidad,descripcion,fecha FROM anuncios ORDER BY fecha DESC\";\n $datos = [];\n $resultado = accesoDB::mostrarConsulta($consulta, $datos);\n\n if ($resultado == '1') {\n return 1;\n } else {\n foreach ($resultado as $valor) {\n $id_anuncio = $valor['id_anuncio'];\n $autor = $valor['autor'];\n $moroso = $valor['moroso'];\n $localidad = $valor['localidad'];\n $descripcion = $valor['descripcion'];\n $fecha = $valor['fecha'];\n $fechaAnuncio = new DateTime($fecha);\n $interval = $fechaAnuncio->diff($fechaActual);\n $dias = $interval->format('%d');\n $mes = $interval->format('%m');\n $año = $interval->format('%y');\n $anuncios = new Anuncios($id_anuncio, $autor, $moroso, $localidad, $descripcion, $fechaAnuncio->format('d-m-Y'));\n array_push($arrayanuncios, [$anuncios, $dias, $mes, $año]);\n }\n echo \"</div>\";\n return $arrayanuncios;\n $resultado = null;\n $conexion = null;\n }\n } catch (PDOException $ex) {\n echo $ex->getMessage();\n }\n }", "public function all_desde($desde, $hasta, $codserie = FALSE, $codagente = FALSE, $codcliente = FALSE, $estado = FALSE, $codpago = FALSE, $codalmacen = FALSE)\n {\n $faclist = array();\n $sql = \"SELECT * FROM \".$this->table_name.\" WHERE fecha >= \".$this->var2str($desde).\" AND fecha <= \".$this->var2str($hasta);\n if($codserie)\n {\n if ($codserie==\"AXIXFY\"){\n $sql .= \" AND codserie IN ('A','XI','XF','Y','G','H','J','K')\";\n } else if ($codserie==\"FFBFC\"){\n $sql .= \" AND codserie IN ('F','FC','FB')\";\n } else if ($codserie==\"ACDEXIXFY\"){\n $sql .= \" AND codserie IN ('A','XI','XF','Y','C','D','E')\";\n } else {\n $sql .= \" AND codserie = \".$this->var2str($codserie);\n } \n }\n if($codagente)\n {\n $sql .= \" AND codagente = \".$this->var2str($codagente);\n }\n if($codcliente)\n {\n $sql .= \" AND codcliente = \".$this->var2str($codcliente);\n }\n if($estado)\n {\n if($estado == 'pagada')\n {\n $sql .= \" AND pagada\";\n }\n else\n {\n $sql .= \" AND pagada = false\";\n }\n }\n $sql .= \" ORDER BY fecha ASC, codigo ASC;\";\n //var_dump($sql); exit;\n $data = $this->db->select($sql);\n if($data)\n {\n foreach($data as $f)\n {\n $faclist[] = new \\factura_cliente($f);\n }\n }\n\n return $faclist;\n }", "public function getConsultapersonas_acta($id_asignacion)\n {\n $query = \"select id_asignar,consecutivo_asignar,nombre_proyecto,observacion,YEAR(fecha_asignacion) as anio,MONTH(fecha_asignacion) as MES,DAY(fecha_asignacion) as dia,concat(nombres_persona,' ',apellidos_persona) as nombre_entrega,(SELECT concat(nombres_persona,' ',apellidos_persona) from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as nombres_recibe,(SELECT nombre_cargo from persona\n INNER JOIN cargo on id_cargo = persona.fkID_cargo where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as cargo_recibe,(SELECT documento_persona from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as documento_recibe,nombre_cargo as cargo_entrega,documento_persona as documento_entrega FROM `asignar`\n INNER JOIN proyecto on id_proyecto = fkID_proyecto\n INNER JOIN persona on id_persona = fkID_persona_entrega\n INNER JOIN cargo on id_cargo = persona.fkID_cargo\n WHERE id_asignar='\" . $id_asignacion . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "function InscricaoAvaliacao($codAtividade, $codAluno){\n\n }", "function agenda_liste_avertir($id_agenda, $annee_choisie, $mois_choisi) {\n\n\t$message = NULL;\n\n\t$contexte_aff = agenda_definir_contexte(0);\n\t$debut_saison = $contexte_aff['debut_saison'];\n\t$type_saison = $contexte_aff['type_saison'];\t\t\n\n\tif (intval($debut_saison) != 1) \n\t\t$annee_choisie = (intval($mois_choisi) < intval($debut_saison)) ? $annee_choisie : strval(intval($annee_choisie)+1);\n\n\t$count_evt = count(agenda_recenser_evenement(0));\n\t$count_evt_filtre = agenda_liste_afficher(0);\n\n\tif ($count_evt == 0)\n\t\t$message = _T('sarkaspip:msg_0_evt_agenda');\n\telse\n\t\tif ($count_evt_filtre == 0)\n\t\t\tif (intval($debut_saison) == 1)\n\t\t\t\t$message = _T('sarkaspip:msg_0_evt_annee').'&nbsp;'.$annee_choisie;\n\t\t\telse\n\t\t\t\tif ($type_saison == 'annee')\n\t\t\t\t\t$message = _T('sarkaspip:msg_0_evt_saison').'&nbsp;'.$annee_choisie;\n\t\t\t\telseif ($type_saison == 'periode')\n\t\t\t\t\t$message = _T('sarkaspip:msg_0_evt_saison').'&nbsp;'.strval(intval($annee_choisie)-1).'-'.$annee_choisie;\n\t\t\t\telse // $type_saison == 'periode_abregee'\n\t\t\t\t\t$message = _T('sarkaspip:msg_0_evt_saison').'&nbsp;'.substr(strval(intval($annee_choisie)-1),2,2).'-'.substr($annee_choisie,2,2);\n\n\treturn $message;\n}", "public static function listaSabana($idsede, $idfacultad, $anio)\n {\n $sql =\"SELECT sed.nombre as sede, CONCAT(car.nombre,' - ',pe.nombre) as carreraplan, car.nombre as carrera, fac.nombre as facultad, CONCAT(per.apellido,', ',per.nombre) as persona,\n per.apellido, per.nombre,\n tp.descripcion as tipodocumento, \n per.numerodoc,\n m.nombre as materia,\n td.descripcion as tipodesignacion,\n cd.descripcion as categoria, \n cd.idcategoriadesignacion,\n edes.descripcion as estadodesignacion,\n mp.anodecursada,\n IFNULL(des.horas, 0 ) as horas,\n td.descripcion as tipo, \n if(des.adhonorem,'AD HONOREM','') as adhonorem, \n if(des.licencia,'EN LICENCIA','') as licencia, \n ded.descripcion as dedicacion,\n sed.abreviacion as sedeabreviada,\n car.idcarrera,\n YEAR(des.inicio) as ciclolectivo,\n DATE_FORMAT(des.inicio, '%d/%m/%Y') AS inicioformat, DATE_FORMAT(des.fin, '%d/%m/%Y') AS finformat,\n des.idresolucionprofesor,\n rp.resolucion,\n des.iddesignacion \n FROM designaciones des \n JOIN estados_designaciones edes ON des.idestadodesignacion = edes.idestadodesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona \n JOIN tipos_documentos tp ON per.idtipodoc = tp.idtipodoc\n JOIN dedicaciones ded ON des.iddedicacion = ded.iddedicacion\n JOIN catedras cat ON des.idcatedra = cat.idcatedra \n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan\n JOIN materias m ON mp.idmateria = m.idmateria\n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car ON pe.idcarrera = car.idcarrera \n JOIN facultades fac ON car.idfacultad = fac.idfacultad \n JOIN tipos_designaciones td ON des.idtipodesignacion = td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion= cd.idcategoriadesignacion \n LEFT JOIN resoluciones_profesores rp ON des.idresolucionprofesor = rp.idresolucionprofesor\n WHERE des.idestadodesignacion = 4 AND YEAR(des.inicio)= \".$anio.\" AND car.idfacultad = \".$idfacultad.\" AND sed.idsede= \".$idsede.\" \n ORDER BY car.nombre, per.apellido; \";\n \n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n\n return $q;\n }", "function listarDetallePeriodoAgencia(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERDETAG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n $this->setParametro('id_agencia','id_agencia','int4');\n $this->setParametro('tipo','tipo','varchar');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta','int4');\n $this->captura('tipo','varchar');\n $this->captura('fecha','text');\n $this->captura('pnr','varchar');\n $this->captura('apellido','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto_boleto','numeric');\n $this->captura('comision','numeric');\n $this->captura('monto_credito_debito','numeric');\n $this->captura('ajuste','varchar');\n $this->captura('garantia','varchar');\n $this->captura('autorizacion_deposito','varchar');\n $this->captura('monto_credito_debito_mb','numeric');\n $this->captura('tipo_cambio','numeric');\n $this->captura('cierre_periodo','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function listarSocios() {\r\n $sql = \"select j.nombre,j.apellido,j.cedula,j.fechanac, j.porcentaje, m.nombre from juntadirectiva as j, municipio as m \"\r\n\t\t .\" where j.ciudadnac = m.id\";\t\t\r\n $respuesta = $this->object->ejecutar($sql);\r\n $this->construirListadoSocio($respuesta);\r\n }", "function pegaEstados()\n {\n $lista_estados = array(\n 'ac' => 'Acre',\n 'al' => 'Alagoas',\n 'ap' => 'Amapá',\n 'am' => 'Amazonas',\n 'ba' => 'Bahia',\n 'ce' => 'Ceará',\n 'df' => 'Distrito Federal',\n 'es' => 'Espirito Santo',\n 'go' => 'Goiás',\n 'ma' => 'Maranhão',\n 'ms' => 'Mato Grosso do Sul',\n 'mt' => 'Mato Grosso',\n 'mg' => 'Minas Gerais',\n 'pa' => 'Pará',\n 'pb' => 'Paraíba',\n 'pr' => 'Paraná',\n 'pe' => 'Pernanbuco',\n 'pi' => 'Piauí',\n 'rj' => 'Rio de Janeiro',\n 'rn' => 'Rio Grande do Norte',\n 'rs' => 'Rio Grande do Sul',\n 'ro' => 'Rondônia',\n 'rr' => 'Roraima',\n 'sc' => 'Santa Catarina',\n 'sp' => 'São Paulo',\n 'se' => 'Sergipe',\n 'to' => 'Tocantis'\n );\n\n\n return $lista_estados;\n }", "function getDatosAportaciones(){\n\t\t$socio\t= $this->mCodigo;\n\t\t$sql = \"SELECT\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`,\n\t\t\t\t`operaciones_mvtos`.`socio_afectado`,\n\t\t\t\tMAX(`operaciones_mvtos`.`fecha_operacion`) AS `fecha`,\n\t\t\t\tSUM(`operaciones_mvtos`.`afectacion_real` * `eacp_config_bases_de_integracion_miembros`.`afectacion`) AS `aportaciones`\n\t\t\tFROM\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\tINNER JOIN `operaciones_mvtos` `operaciones_mvtos`\n\t\t\t\t\tON `eacp_config_bases_de_integracion_miembros`.`miembro` =\n\t\t\t\t\t`operaciones_mvtos`.`tipo_operacion`\n\t\t\tWHERE\n\t\t\t\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` =2609)\n\t\t\t\tAND\n\t\t\t\t(`operaciones_mvtos`.`socio_afectado` =$socio)\n\t\t\tGROUP BY\n\t\t\t\t`operaciones_mvtos`.`socio_afectado`\n\t\t\tORDER BY\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`,\n\t\t\t\t`operaciones_mvtos`.`socio_afectado` \";\n\t\t$this->mDatosAports\t\t= obten_filas($sql);\t\t\n\t\treturn $this->mDatosAports;\n\t}", "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 listApuracao($idApuracao)\n\t{\n\t\t$sql = new Conexao;\n\n\t\treturn $sql->select(\"\n\t\t\tSELECT \n\t\t\ta.idCriarApuracao, a.idUsuario, a.tipoApuracao, a.descricao, a.status, a.dataCriacao, a.dataRegistro,\n\t\t\tb.idVitimasCriarApuracao, b.idVitimasApuracao,\n\t\t\tc.idPessoa,\n\t\t\td.qualFamilia,\n\t\t\te.idResponsavelVitimas,\n\t\t\tf.idPessoa idPessoaResponsavel,\n\t\t\tg.nome nomeVitima, g.sexo sexoVitima, g.cpf cpfVitima,\n\t\t\th.nome nomeResponsavel, h.cpf cpfResponsavel,\n\t\t\ti.celular celularVitima,\n\t\t\tj.celular celularResponsavel,\n\t\t\tk.cep cepVitima, k.rua ruaVitima, k.numero numeroVitima, k.bairro bairroVitima, \n\t\t\tk.cidade cidadeVitima, k.estado estadoVitima, k.complemento complementoVitima,\n\t\t\tl.cep cepResponsavel, l.rua ruaResponsavel, l.numero numeroResponsavel, l.bairro bairroResponsavel, \n\t\t\tl.cidade cidadeResponsavel, l.estado estadoResponsavel, l.complemento complementoResponsavel,\n\t\t\tm.setor,\n\t\t\tn.nome quemCriouApuracao\n\t\t\tFROM tb_criarapuracao a\n\t\t\tINNER JOIN tb_vitimascriarapuracao b ON a.idCriarApuracao = b.idCriarApuracao\n\t\t\tINNER JOIN tb_vitimasapuracao c ON b.idVitimasApuracao = c.idVitimasApuracao\n\t\t\tINNER JOIN tb_familiaapuracao d ON c.idVitimasApuracao = d.idVitimasApuracao\n\t\t\tINNER JOIN tb_responsavelVitimas e ON c.idVitimasApuracao = e.idVitimasApuracao\n\t\t\tINNER JOIN tb_responsavelapuracao f ON e.idResponsavelApuracao = f.idResponsavelApuracao\n\t\t\tINNER JOIN tb_pessoa g ON c.idPessoa = g.idPessoa\n\t\t\tINNER JOIN tb_pessoa h ON f.idPessoa = h.idPessoa\n\t\t\tINNER JOIN tb_contato i ON g.idContato = i.idContato\n\t\t\tINNER JOIN tb_contato j ON h.idContato = j.idContato\n\t\t\tINNER JOIN tb_endereco k ON g.idEndereco = k.idEndereco\n\t\t\tINNER JOIN tb_endereco l ON h.idEndereco = l.idEndereco\n\t\t\tINNER JOIN tb_usuario m ON a.idUsuario = m.idUsuario\n\t\t\tINNER JOIN tb_pessoa n ON m.idPessoa = n.idPessoa\n\t\t\tWHERE a.idCriarApuracao = :idCriarApuracao;\n\t\t\", [\n\t\t\t\":idCriarApuracao\" => $idApuracao\n\t\t]);\n\t}", "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}", "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 listarlapaz(){\n $persona=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapaz as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=1\";\n $bajas=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapazretirado as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=0\";\n $cajas=\"SELECT * FROM cajalapaz WHERE estado = 1\";\n $cajaretirados=\"SELECT * FROM cajalapazretirado WHERE estado = 1\";\n $result=[\n \"personal\"=> parent::consultaRetorno($persona),\n \"bajas\"=>parent::consultaRetorno($bajas),\n \"cajas\"=>parent::consultaRetorno($cajas),\n \"cajasretirados\"=>parent::consultaRetorno($cajaretirados)\n ];\n return $result;\n }", "public function get_mov_caja($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\t$sql=\"select*from movimientos_caja where fecha=? and sucursal=? order by id_mov_caja DESC limit 1;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function mostrar_tabla_anuncios(){\n\n\t\t$return = '';\n\t\t$mensaje = array('0' => 'Desactivado', '1' => 'Activo');\n\t\t$cols = array('id', 'clave_interna', 'provincia', 'municipio', 'tipo_venta', 'anuncio_promocionado',\n\t\t\t\t\t 'anuncio_e','paquete','activo','apto');\n\t\t$this->where('ussr',$this->user);\n\n\t\tif($salida = $this->get('anuncios', NULL, $cols)){\n\n\t\t\t$return .= '<table class=\"table table-bordered table-hover\">';\n\n\t\t\t$return .= '<tr>\n\t\t\t\t\t <th>Imagen</th>\n\t\t\t\t\t <th>Clave interna</th>\n\t\t\t\t\t <th>Paquete</th>\n\t\t\t\t\t <th>Provincia</th>\n\t\t\t\t\t <th>Operacion</th>\n\t\t\t\t\t <th>Nº imagenes</th>\n\t\t\t\t\t <th>Idiomas</th>\n\t\t\t\t\t <th>Contratado</th>\n\t\t\t\t\t <th>Anuncio apto</th>\n\t\t\t\t\t <th>Anuncio activo</th>\n\t\t\t\t\t <th>Opciones</th>\n\t\t\t\t\t </tr>';\n\t\t\t//por cada anuncio varias cosas habra que hacer\n\t\t\t$i=1;\t\t \n\t\t\tforeach ($salida as $key => $value) {\n\t\t\n\t\t\t\t$num = $i++;\n\t\t\t\t$id_arr = md5($value['id']);\n\t\t\t\t$imagen = $this->sacar_foto($id_arr, $this->user);\n\n\t\t\t\t$return .='<tr>\n\t\t\t\t\t \t<td>'.$imagen.'</td>\n\t\t\t\t\t <td>'.$value['clave_interna'].'</td>\n\t\t\t\t\t <td>'.$value['paquete'].'</td>\n\t\t\t\t\t <td>'.$value['provincia'].'<br />\n\t\t\t\t\t '.$this->show_municipio($value['municipio']).'</td>\n\t\t\t\t\t <td>'.$value['tipo_venta'].'</td>';\n\n\n\n\t\t\t\t//mostrara numero de imagenes en el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->num_imagenes_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\n\t\t\t\t//mostrando idiomas en los que esta el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->idiomas_del_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\t\t\t\t//estrella o promocionado\n\t\t\t\t$return .='<td>';\n\t\t\t\tif(!empty($value['anuncio_promocionado']) && ($value['anuncio_promocionado'] == 1)){\n\t\t\t\t\t$return .= 'Anuncio promocionado<br />';\t}\n\t\t\t\tif($value['anuncio_e'] == 1){\n\t\t\t\t\t$return .= 'Anuncio estrella';\t\t\t}\t\n\t\t\t\t\t\n\t\t\t $return .= '</td>';\n\t\t\t $return .= '<td>'.$value['apto'].'</td>';\n\t\t\t $return .= '<td id=\"act-'.$id_arr.'\">'.$mensaje[$value['activo']].'</td>';\n\t\t\t //dropdown de opciones\n\t\t\t $return .= '<td>'.$this->dropdown_tabla_anuncios($id_arr).'</td>';\n\t\t\n\t\t\t\t$return .= '</tr>';\n\n\t\t\t}//fin del foreach\n\n\t\t\t$return .= '</table>';\n\n\n\t\t}else{\n\t\t\t$return .= '<h5 id=\"sec1\">No hay anuncios 1 </h5>';\n\t\t}\n\n\t\treturn $return;\n\t}", "public function Afiliados(){\n\t\t\t$consult=oci_parse($conn,\"Ips$_sndCitas.fn_getAfiliados\");\n\t\t\toci_execute($consult);\n\t\t}", "public function index() {\n $anuncio = new anuncios();\n //$usuario = new usuario();\n \n // $pag = \"inicial\";\n // $result = \"\";\n // if (isset($_GET['pag']) && !empty($_GET['pag'])){\n // $pag=$_GET['pag'];\n // }\n // if (isset($_GET['result']) && !empty($_GET['result'])){\n // $result=$_GET['result'];\n // }\n \n $refat = 1;\n $qtdPag = 2;\n if (isset($_GET['refat']) && !empty($_GET['refat'])){\n $refat = $_GET['refat'];\n }\n \n if (isset($_GET['filtros'])){\n $filtros = $this->iniciarFiltros($_GET['filtros']);\n if (!empty($filtros['categoria'])){\n $anuncio->setIDCategoria($filtros['categoria']);\n }\n if (!empty($filtros['preco'])){\n $preco = explode(\"-\", $filtros['preco']);\n //print_r($preco);\n $anuncio->setValor($preco);\n }\n if (!empty($filtros['estado'])){\n $anuncio->setEstado($filtros['estado']);\n }\n } else {\n $filtros = $this->iniciarFiltros();\n }\n \n //$filtros = array(\n // 'categoria' => '',\n // 'preco' => '',\n // 'estado' => ''\n //);\n \n //if (isset($_GET['filtros'])){\n // $filtros = $_GET['filtros'];\n // if (!empty($filtros['categoria'])){\n // $anuncio->setIDCategoria($filtros['categoria']);\n // }\n // if (!empty($filtros['preco'])){\n // $preco = explode(\"-\", $filtros['preco']);\n // //print_r($preco);\n // $anuncio->setValor($preco);\n // }\n // if (!empty($filtros['estado'])){\n // $anuncio->setEstado($filtros['estado']);\n // }\n //}\n \n $result = $anuncio->selecionarALLAnuncios($refat, $qtdPag);\n if ($anuncio->numRows() == 1){\n $result = array();\n $result[] = $anuncio->result();\n }\n \n $resultQTD = $anuncio->getQTDAnuncios();\n $totAnuncios = $resultQTD['qtd'];\n \n //$categorias = $cat->selecionarAllCategorias();\n //if ($cat->numRows() == 1){\n // $categorias = array();\n // $categorias[] = $cat->result();\n //}\n \n //$usuario->selecionarALLUser();\n //$totUsuarios = $usuario->numRows();\n \n //$totalPag = ceil($totAnuncios / $qtdPag);\n \n $dados = $this->getTemplateDados();\n $dados[\"refat\"] = $refat;\n $dados[\"filtros\"] = $filtros;\n $dados[\"result\"] = $result;\n //$dados[\"categorias\"] = $categorias;\n $dados[\"totAnuncios\"] = $totAnuncios;\n //$dados[\"totUsuarios\"] = $totUsuarios;\n $dados[\"totalPag\"] = ceil($totAnuncios / $qtdPag);\n \n $this->loadTemplate(\"inicial\", $dados);\n }", "public function getComentarios($idAnuncio){ \n /*$query = \"SELECT fc.idUser, fc.idComentario, fc.idAnuncio, fc.comentario, fc.idPadre, fc.fecha, fu.nick, fu2.nick nickPadre\n FROM final_comentario fc INNER JOIN final_usuario fu USING(idUser) LEFT JOIN final_usuario fu2 ON(fc.idPadre = fu2.idUser) \n WHERE idAnuncio = '\".$idAnuncio.\"' ORDER BY fecha ASC\"; */\n \n $query = \"SELECT fc.idAnuncio, fc.idComentario, fc.idUser, fu.nick, fc.comentario, fc.idPadre, fc.fecha, aux2.nick nickPadre\n FROM final_comentario fc INNER JOIN final_usuario fu ON(fc.idUser=fu.idUser) LEFT JOIN\n (SELECT aux.idComentario, fu.nick\n FROM (SELECT fc2.idComentario, fc2.idUser FROM final_comentario fc1 INNER JOIN final_comentario fc2 ON (fc1.idPadre=fc2.idComentario)) aux\n INNER JOIN final_usuario fu ON(aux.idUser=fu.idUser)) aux2 ON (fc.idPadre=aux2.idComentario)\n WHERE fc.idAnuncio = '\".$idAnuncio.\"' ORDER BY fc.fecha ASC\";\n \n return $this->con->action($query); \n }", "public function consultaplanpagos($db, $numeroordenpago){\n $query_plan = \"SELECT codigoestado, numerorodenpagoplandepagosap FROM ordenpagoplandepago \".\n \" WHERE numerorodencoutaplandepagosap = '\".$numeroordenpago.\"' AND codigoestado = 100 \".\n \" AND cuentaxcobrarplandepagosap = 'C9013'\"; \n $row_plan = $db->GetRow($query_plan); \n return $row_plan;\n }", "public function dameMantenimientosAnteriores($inicio, $fin){\n\n $consulta = $this->getQueryBuilder();\n \n $consulta->select('d.id','d.direccion','c.id as cliente',\n 'd.telefono', 'd.sCliente',\n 'd.observaciones',\n 'dist.distrito',\n 'c.nombre', 'p.modelo', 'f.familia', 'p.fechaNuevoMantenimiento','p.periodicidad','t.tipoContrato', 'p.planificada')\n ->leftJoin('d.cliente', 'c')\n ->leftJoin('d.producto', 'p')\n ->leftJoin('p.familia', 'f')\n ->leftJoin('p.contrato', 't')\n ->leftJoin('d.distrito', 'dist')\n ->Where('p.fechaNuevoMantenimiento BETWEEN :inicio AND :fin') \n ->andWhere('p.planificada IS NULL')\n ->setParameter('inicio', $inicio) \n ->setParameter('fin', $fin);\n $consulta->orderby('d.distrito', 'ASC')\n ->addOrderBy('p.fechaNuevoMantenimiento', 'DESC')\n ->getQuery();\n \n\n $lista= $consulta->getQuery()->getResult();\n\n return $lista;\n }", "function lista_dosificacion_activa($tipo)\n {\n $sql=\"select * from dosificacion_factura df \n WHERE df.estado='Activo' and df.tipo_dosificacion='$tipo' Order by df.actividad \";\n $consulta = $this->db->query($sql);\n return($consulta);\n }", "function buscarEspaciosAprobados($notaAprobatoria){\r\n $aprobados=array();\r\n if(is_array($this->espaciosCursados))\r\n {\r\n foreach ($this->espaciosCursados as $value1)\r\n {\r\n if ((isset($value1['NOTA'])&&$value1['NOTA']>=$notaAprobatoria)||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==19||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==22||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==24)\r\n {\r\n $aprobados[]=array('CODIGO'=>$value1['CODIGO'],'NIVEL'=>(isset($value1['NIVEL'])?$value1['NIVEL']:''),'CREDITOS'=>(isset($value1['CREDITOS'])?$value1['CREDITOS']:''));\r\n }\r\n }\r\n\r\n }else\r\n {\r\n $aprobados='';\r\n }\r\n return $aprobados;\r\n }", "function contratos_por_estado($id_estado){\n $sql =\n \"SELECT\n c.Numero,\n c.Objeto,\n c.Lugar,\n c.Valor_Inicial,\n c.Acta_Inicio,\n c.Fecha_Acta_Inicio,\n c.Plazo,\n c.Fecha_Vencimiento,\n c.Fecha_Inicial,\n t.Nombre AS Contratista,\n e.Estado \n FROM\n contratos AS c\n INNER JOIN tbl_terceros AS t ON c.Fk_Id_Terceros = t.Pk_Id_Terceros\n INNER JOIN tbl_estados AS e ON c.Fk_Id_Estado = e.Pk_Id_Estado \n WHERE\n c.Fk_Id_Estado = $id_estado \n AND c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')} \n ORDER BY\n c.Numero ASC\";\n \n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }", "public function noticiasActivas(){\r\n\t$objDatos = new clsDatos();\r\n\t$sql=\"select * from noticias where activo='1' order by fecha DESC\";\r\n\t$res = $objDatos->filtroListado($sql);\r\n\treturn $res;\r\n}", "public function getAsignacionf($permisoconsulta)\n {\n if ($permisoconsulta[0][\"fkID_cargo\"]==1) {\n $url=\"\";\n } else {\n $url=\" AND asignar.fkID_proyecto= '\" . $permisoconsulta[0]['fkID_proyecto'] . \"'\";\n }\n $query = \"select DISTINCT asignar.*,nombre_proyecto,nombre_territorial,direccion_territorial,serial_equipo,concat(nombres_persona,' ',apellidos_persona) as nombre_entrega,(SELECT concat(nombres_persona,' ',apellidos_persona) from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 and direccion_territorial = direccion_territorial ) as nombres_recibe,nombre_cargo,nombre_area FROM `asignar`\n INNER join equipo on id_equipo = asignar.fkID_equipo\n INNER JOIN proyecto on id_proyecto = fkID_proyecto\n INNER JOIN persona on id_persona = fkID_persona_entrega\n INNER join area on id_area = persona.fkID_area\n INNER join cargo on id_cargo = persona.fkID_cargo\n INNER join territorial on id_territorial = persona.fkID_territorial\n INNER JOIN territorial_proyecto on territorial_proyecto.fkID_proyecto = id_proyecto\n WHERE asignar.estado= 1 and fkID_tipo_movimiento=1\". $url;\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public function vehiculos_agendados($idveh,$estado)\r\n {\r\n \r\n if ($idveh === FALSE)\r\n {\r\n $SqlInfo =\"select * from vehiculo, agenda where vehiculo.estado='\". $estado .\"' and vehiculo.patente=agenda.patente\";\r\n $query = $this->db->query($SqlInfo);\r\n\r\n return $query->result_array();\r\n }\r\n \r\n\r\n $SqlInfo =\"select * from vehiculo, agenda where vehiculo.estado='\". $estado .\"' and vehiculo.patente=agenda.patente and vehiculo.dueño=\". $idveh;\r\n $query = $this->db->query($SqlInfo);\r\n\r\n return $query->result_array();\r\n \r\n //$query = $this->db->get('vehiculo');\r\n\r\n //$query = $this->db->get_where('vehiculo,agenda', array('vehiculo.estado' => 'agendado', 'vehiculo.patente' => 'agenda.patente'));\r\n \r\n\r\n }", "function listarVacacion(){\n\t\t$this->procedimiento='asis.ft_vacacion_sel';\n\t\t$this->transaccion='ASIS_VAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t$this->captura('id_vacacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_funcionario','int4');\n\t\t$this->captura('fecha_inicio','date');\n\t\t$this->captura('fecha_fin','date');\n\t\t$this->captura('dias','numeric');\n\t\t$this->captura('descripcion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n $this->captura('desc_funcionario1','varchar');\n\t\t//wf\n $this->captura('id_proceso_wf','int4');\n $this->captura('id_estado_wf','int4');\n $this->captura('estado','varchar');\n $this->captura('nro_tramite','varchar');\n $this->captura('medio_dia','integer');\n $this->captura('dias_efectivo', 'numeric');\n// medio_dia\n //Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function get_entradas_contabilidad_sin_list($offset, $per_page,$estatus)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct(e.pr_facturas_id) as pr_facturas_id, prf.fecha, date(prf.fecha) as fecha, prf.fecha_pago, ( prf.monto_total - prf.descuento ) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatus, m1.tag as marca, prf.validacion_contable, cel.tag as estatus_traspaso\n\t\tfrom entradas as e \".\n\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id \n\t\tleft join cmarcas_productos as m1 on m1.id=prf.cmarca_id left join espacios_fisicos as ef on ef.id=prf.espacios_fisicos_id \n\t\tleft join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\"where prf.estatus_general_id=1 and ctipo_entrada=1 and prf.usuario_validador_id=0\n\t\tgroup by e.pr_facturas_id, prf.fecha, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id, m1.tag, prf.fecha_pago, prf.monto_total, prf.validacion_contable,prf.descuento, cel.tag \".\n\t\t\"order by prf.fecha desc limit $per_page offset $offset\";\n\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "public function returnAnunForDash($idUsuario, $status = \"online\"){#deverá ser passado o valor de status que desejado.\n\n $objAnuncio = new StatusAnuncioDAO();\n #retorna o id dos registros que representam o estado online ou inativo, sendo o valor default sempre online.\n $this->arrayStatusId = $objAnuncio->retornaRegStatus($status);\n\n\n #faz a junção das tabelas relacionadas ao anuncio, verificando usuário e se vai retornar os anuncios ativos ou inativos.\n $sql = \"SELECT * FROM Anuncio\n INNER JOIN Forma_pagamento ON Anuncio.anuncio_id = Forma_pagamento.forma_pag_anuncio_ref\n INNER JOIN Link ON Anuncio.anuncio_id = Link.link_anuncio_ref\n INNER JOIN Endereco ON Anuncio.anuncio_endereco = Endereco.endereco_id\n INNER JOIN Horario_funcionamento ON Anuncio.anuncio_id = Horario_funcionamento.horario_func_anuncio_ref\n INNER JOIN Cont_views ON Anuncio.anuncio_id = Cont_views.cont_views_anuncio_ref\n INNER JOIN Plano_saude ON Anuncio.anuncio_id = Plano_saude.plano_saude_anuncio_ref\n INNER JOIN Facilidades ON Anuncio.anuncio_id = Facilidades.facilidades_anuncio_ref\n WHERE Anuncio.anuncio_cliente_ref = {$idUsuario} AND Anuncio.anuncio_excluido = 0 AND (\";\n\n\n #verifica se os argumentos foram passados com sucesso. Somemte se os argumentos estiverem corretos que será executado a consulta.\n if(!empty($idUsuario) && ($status === \"online\" || $status === \"inativo\")){\n\n for ($i = 0; $i < count($this->arrayStatusId); $i++) {\n\n $sql .= \" Anuncio.anuncio_status = \" . $this->arrayStatusId[$i]['status_anuncio_id']; //estamos trabalhando com arrays associativos.\n\n #se $i + 1 for iqual ao tamanho total do array, significa que a proxima iteração será a ultima.\n if (($i + 1) != count($this->arrayStatusId)) {\n $sql .= \" OR \";\n } else {\n #Na ultima iteração recebe o ';'\n $sql .= \") ORDER BY Anuncio.anuncio_titulo ASC, Anuncio.anuncio_id ASC;\";\n }\n\n }\n\n\n\n #caso ocorrer tudo certo retorna a visualização da tabela.\n if($row = $this->runSelect($sql)){\n\n\n return $row;\n\n } else {\n\n // echo \"A consulta não retonou dados para o inner join curriculo \" . $sql;\n }\n\n } else {\n\n // echo \"Favor verificar os agumentos passados\";\n\n }\n\n }", "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 listar_anuncios_interessadosByUser(){\n if(!isset($_SESSION))session_start();\n\n $cliente = unserialize($_SESSION['cliente']);\n\n return $this->anunciosDAO->selectAllInteresadosByUser($cliente->getId());\n }", "public function merma_acabados($proceso) {\n\n $sql = \"SELECT * from acabados_merma where status = 'A' and nombre = '\" . $proceso . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }", "public function status_acitivties ($act_status, $act_id, $pagione = false, $pagitwo = false, $pagithree = false){\n $total_rows = MU_Model::count_all_data('activities', array('act_deleted' => 0));\n $act_status = ($act_status == 1) ? 0 : 1;\n $statuschaged = MU_Model::updateStatusById('activities', array(\"act_status\" => $act_status), array('act_id' => $act_id));\n $pagi = \"\";\n if($this->session->userdata('search')){ $function = \"search_activities\"; }else{ $function = \"list_record\"; } \n if($pagione != false) $pagi = $pagione;\n if($pagitwo != false) $pagi .= \"/\".$pagitwo;\n if($pagithree != false) $pagi .= \"/\".$pagithree;\n $redirect = \"activities/\".$function.\"/\".$pagi; \n $act_msg = ($act_status == 1) ? \"Published\" : \"Unpublished\";\n if($statuschaged){\n $this->session->set_userdata('msg_success', 'The activities have been '.$act_msg.' successfully.');\n redirect($redirect);\n }else{\n $this->session->set_userdata('msg_error', 'Cannot '.$act_msg.' record on table name activities.');\n redirect($redirect);\n }\n }", "function listarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_sel';\n\t\t$this->transaccion='WF_TABLAINS_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_' . $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'],'int4');\n\t\t\n\t\tif ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_tipo'] == 'maestro') {\n\t\t\t\t\n\t\t\t$this->captura('estado','varchar');\n\t\t\t$this->captura('id_estado_wf','int4');\n\t\t\t$this->captura('id_proceso_wf','int4');\n\t\t\t$this->captura('obs','text');\n\t\t\t$this->captura('nro_tramite','varchar');\n\t\t}\n\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t\n\t\t\t$this->captura($value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\n\t\t\t//campos adicionales\n\t\t\tif ($value['bd_campos_adicionales'] != '' && $value['bd_campos_adicionales'] != null) {\n\t\t\t\t$campos_adicionales = explode(',', $value['bd_campos_adicionales']);\n\t\t\t\t\n\t\t\t\tforeach ($campos_adicionales as $campo_adicional) {\n\t\t\t\t\t\n\t\t\t\t\t$valores = explode(' ', $campo_adicional);\n\t\t\t\t\t$this->captura($valores[1],$valores[2]);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$this->captura('estado_reg','varchar');\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getAnuncios($condiciones, $columnNameOrder, $order, $fromLimit, $toLimit, $misAnuncios, $misFavoritos){\n $query = \"SELECT fa.idAnuncio, fa.idCategoria, fa.precio, fa.fecha, fa.titulo, fa.localizacion, fa.estado, fa.idUser, fi.small\n FROM final_anuncio fa LEFT JOIN final_imagen fi ON (fi.idAnuncio = fa.idAnuncio AND\n fi.idImagen = (SELECT MIN(idImagen) FROM final_imagen WHERE idAnuncio = fa.idAnuncio))\";\n \n $aux = \"WHERE\";\n \n if ($condiciones[\"precioMin\"] !== \"\"){\n $query = $query.\" \".$aux.\" fa.precio>=\".$condiciones[\"precioMin\"];\n $aux = \"AND\";\n }\n\n if ($condiciones[\"precioMax\"] !== \"\"){\n $query = $query.\" \".$aux.\" fa.precio<=\".$condiciones[\"precioMax\"];\n $aux = \"AND\";\n }\n \n if ($condiciones[\"titulo\"] != \"\"){\n $query = $query.\" \".$aux.\" LOWER(fa.titulo) LIKE LOWER('%\".$condiciones[\"titulo\"].\"%') \n OR strcmp(soundex(fa.titulo), soundex('\".$condiciones[\"titulo\"].\"')) = 0\";\n $aux = \"AND\";\n }\n \n if ($condiciones[\"localizacion\"] != \"\"){\n $query = $query.\" \".$aux.\" LOWER(fa.localizacion) LIKE LOWER('%\".$condiciones[\"localizacion\"].\"%')\n OR strcmp(soundex(fa.localizacion), soundex('\".$condiciones[\"localizacion\"].\"')) = 0\";\n $aux = \"AND\";\n }\n \n if ($condiciones[\"categoria\"] != \"\"){\n $query = $query.\" \".$aux.\" fa.idCategoria=\".$condiciones[\"categoria\"];\n $aux = \"AND\";\n }\n \n //Obtiene solo de los anuncios del usuario\n if ($misAnuncios == 1 && $condiciones[\"idUser\"] != \"\"){\n $query = $query.\" \".$aux.\" fa.idUser=\".$condiciones[\"idUser\"];\n $aux = \"AND\";\n }\n \n //Obtiene solo de los favoritos del usuario\n if ($misFavoritos == 1 && $condiciones[\"idUser\"] != \"\"){\n $query = $query.\" \".$aux.\" fa.idAnuncio IN (SELECT idAnuncio FROM final_favorito WHERE idUser=\".$condiciones[\"idUser\"].\")\";\n $aux = \"AND\";\n }\n \n //Si no se estan pidiendo los favoritos o mis anuncios, no mostramos los cancelados o terminados\n if ($misFavoritos != 1 && $misAnuncios != 1){\n $query = $query.\" \".$aux.\" fa.estado=1\";\n $aux = \"AND\";\n }\n \n if ($columnNameOrder != \"\" && $order != \"\"){\n $query = $query.\" ORDER BY fa.\".$columnNameOrder.\" \".$order;\n }\n \n $query = $query.\" LIMIT \".$fromLimit.\",\".$toLimit;\n \n //ChromePhp::log($query);\n return $this->con->action($query);\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 desparasitantes_aplicarFiltrosDesparasitantes($fechaInicial, $fechaFinal, $fechaInicialProximo, $fechaFinalProximo, $idDesparasitante, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idDesparasitante != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND D.idDesparasitante = '$idDesparasitante' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( D.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicialProximo != \"\" AND $fechaFinalProximo != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( D.fechaProximoDesparasitante BETWEEN '$fechaInicialProximo' AND '$fechaFinalProximo')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND D.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t D.idDesparasitanteMascota,\n\t\t\t\t\t\t D.dosificacion,\n\t\t\t\t\t\t D.fecha,\n\t\t\t\t\t\t DATE_FORMAT(D.hora, '%H:%i') AS hora,\n\t\t\t\t\t\t D.fechaProximoDesparasitante,\n\t\t\t\t\t\t D.observacion,\n\t\t\t\t\t\t D.idMascota,\n\t\t\t\t\t\t D.idDesparasitante,\n\t\t\t\t\t\t DD.nombre AS nombreDesparasitante,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_desparasitantesMascotas AS D\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON D.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_desparasitantes AS DD ON DD.idDesparasitante = D.idDesparasitante\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (D.idDesparasitanteMascota)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (D.idDesparasitanteMascota) DESC; \";\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function listarUsuariosActivos()\r\n\t{\r\n\t\t$eventos=array();\r\n\t\ttry{\r\n\t\t\t//realizamos la consulta de todos los items\r\n\t\t\t$consulta = $this->db->prepare(\"select * from administrador WHERE admin_status LIKE 'Activo'\");\r\n\t\t\t$consulta->execute();\r\n\t\t\tfor($i=0; $row = $consulta->fetch(); $i++)\r\n\t\t\t{\r\n\t\t $fila['admin_cedula']=$row['ADMIN_CEDULA'];\r\n\t\t\t$fila['admin_login']=$row['ADMIN_LOGIN'];\r\n\t\t\t$fila['admin_nombre']=$row['ADMIN_NOMBRE'];\r\n\t\t\t$fila['admin_pregunta_secreta']=$row['ADMIN_FK_ID_PRE'];\r\n\t\t\t$fila['admin_respuesta_secreta']=$row['ADMIN_RESP_SECRETA'];\r\n\t\t\t$fila['admin_contrasena']=$row['ADMIN_CONTRASENA'];\r\n\t\t\t$eventos[]=$fila;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tcatch(PDOException $e)\r\n\t\t{\r\n\t\t\techo $e;\r\n\t\t}\r\n\t\treturn $eventos;\t\t\r\n\t}", "function listarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_CTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('doc_id','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t\n\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function listarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n $this->setParametro('historico','historico','varchar');\n \n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('nro_contrato','varchar');\n\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_estado_wf','integer');\n\t\t$this->captura('id_proceso_wf','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('tipo_cambio_conv','numeric');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('id_obligacion_pago','int4');\n\t\t$this->captura('tiempo_entrega','varchar');\n\t\t$this->captura('funcionario_contacto','varchar');\n\t\t$this->captura('telefono_contacto','varchar');\n\t\t$this->captura('correo_contacto','varchar');\n\t\t$this->captura('prellenar_oferta','varchar');\n\t\t$this->captura('forma_pago','varchar');\n\t\t$this->captura('requiere_contrato','varchar');\n\t\t$this->captura('total_adjudicado','numeric');\n\t\t$this->captura('total_cotizado','numeric');\n\t\t$this->captura('total_adjudicado_mb','numeric');\n\t\t$this->captura('tiene_form500','varchar');\n\t\t$this->captura('correo_oc','varchar');\n\n\t\t$this->captura('id_gestion','int4');\n\n\t\t$this->captura('cuce','varchar');\n\t\t$this->captura('fecha_conclusion','date');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('justificacion','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listar_abonos_informe_table() {\n $dato = [];\n\n //--- Datos del Logeado ---//\n $userdata = $this->session->all_userdata();\n //--- datos ---//\n $abonos = $this->app_model->get_abonos();\n $estados = $this->app_model->get_estados();\n\n if ($abonos) {\n foreach ($abonos as $key => $value) {\n $texto = \"\";\n $class = \"\";\n if ($value['idEstado'] == 1) :\n $class = \"btn-info\";\n $texto = \"Activado\";\n elseif ($value['idEstado'] == 2):\n $class = \"btn-success\";\n $texto = \"Pausado\";\n elseif ($value['idEstado'] == 3):\n $class = \"btn-danger\";\n $texto = \"Terminado\";\n else:\n $class = \"btn-warning\";\n $texto = \"Sin Estado\";\n endif;\n\n $opcion = '<div class=\"btn-group\">' .\n '<button class=\"btn ' . $class . '\" style=\"padding: 3px;font-size: 0.8em;\">' . $texto . '</button>' .\n '</div>';\n\n $dato[] = array(\n $opcion,\n $value['fechaEmision'],\n $value['fechaVtoCobro'],\n $value['nombEmpresa'],\n $value['descripModalidad'],\n $value['ventasCreadas'],\n \"$\" . number_format($value['total'] + $value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n $value['nombreVend'],\n \"DT_RowId\" => $value['idAbono']\n );\n }\n }\n \n $aa = array(\n 'sEcho' => 1,\n 'iTotalRecords' => count($dato),\n 'iTotalDisplayRecords' => 10,\n 'aaData' => $dato\n );\n\n echo json_encode($aa);\n }", "public function listar_asignacion_controlador(/*$privilegio,$codigo*/){\n\t\n\t$tabla=\"\";\n\n\t//Consulta para la busqueda de asignación de hardware \n\t//Para la búsqueda se utilizo una tabla dinamica de la plantilla de Gentellas Master\n\t$consulta=\"SELECT *,T1.hiserie FROM hardware_ingreso as T1, estado_info_hardware as T2, estado_asignacion_hardware as T3, tipo_hardware as T4, marca_hardware as T5, modelo_hardware as T6, color_hardware as T7, informe_ingreso_hardware as T8 WHERE T1.estadoinfoharcodigo=T2.estadoinfoharcodigo AND T2.estadoinfoharnombre='APROBADO' AND T1.estadoasigharcodigo=T3.estadoasigharcodigo AND T3.estadoasigharnombre='NO ASIGNADO' AND T1.tipohardwarecodigo=T4.tipohardwarecodigo AND T1.marcahardwarecodigo=T5.marcahardwarecodigo AND T1.modelohardwarecodigo=T6.modelohardwarecodigo AND T1.colorhardwarecodigo=T7.colorhardwarecodigo AND T1.icodigo=T8.icodigo\n\t\";\n\n\t$conexion = mainModel::conectar();\n\t$datos = $conexion->query($consulta);\n\t$datos= $datos->fetchAll();\n\n\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t$tabla.='\n\t\n\t<thead>\n\t<tr>\n\t<th>#</th>\n\t<th>COD. DE INVENTARIO</th>\n\t<th>SERIE DEL HARDWARE</th>\n\t<th>TIPO DE HARDWARE</th>\n\t<th>MARCA DE HARDWARE</th>\n\t<th>MODELO DE HARDWARE</th>\n\t<th>COLOR DE HARDWARE</th>\n\t<th>FECHA DE INGRESO</th>\n\t\n\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t$tabla.='\n\t<th>ACCIONES</th>\n\t\n\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\n\t\t\t\t\t\t//}\n\t$tabla.='</tr>\n\t</thead>\n\t<tbody>';\n\t\n\t$contador=0;\n\tforeach ($datos as $rows) {\n\t\t$contador=$contador+1;\n\t\t$a=$rows['hiserie'];\n\t\t$tabla.='\n\t\t<tr>\n\t\t<td>'.$contador.'</td>\n\t\t<td>'.$a.'</td>\n\t\t<td>'.$rows['serireexterno'].'</td>\n\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t<td>'.$rows['hifecha'].'</td>\n\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t$tabla.='\n\t\t<td>\n\t\t<form method=\"POST\" action=\"'.SERVERURL.'asignacioninfo/\">\n\t\t<input type=\"hidden\" value=\"'.($a).'\" name=\"codigo\">\n\t\t<button type=\"submit\" class=\"btn btn-primary\"><i class=\"fa fa-folder-open-o\"></i> Ingresar</button>\n\t\t</form> \n\t\t</td>\n\n\t\t\n\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "public function getDiasPantiA($id, $ano)\n { \n $result=$this->adapter->query(\"select b.id, b.idEmp ,0 as dias,c.idCcos, \n c.fecing, ( DATE_FORMAT( a.fechaF , '%Y-%m-%d' ) - DATE_FORMAT( d.fecha , '%Y-%m-%d' ) ) \n\t\t\t\t , c.CedEmp , c.nombre , c.idTemp , case when e.id > 0 then 1 else 0 end as pg, \n case when (day( d.fecha) >= day(a.fechaI)) and (day( d.fecha) <= day(a.fechaF)) then 1 else 0 end as diaI \n from n_nomina a\n inner join n_nomina_e b on b.idNom = a.id\n inner join a_empleados c on c.id = b.idEmp \n inner join n_tipemp_p d on d.idEmp = b.idEmp and d.idTemp = 1 # mientras 1 es para los convencionados \n left join n_pg_primas_ant e on e.idEmp = b.idEmp and year(e.fechaI) = year(a.fechaI) and month( e.fechaI ) and month( a.fechaI ) \n where c.activo=0 and c.estado = 0 \n and a.id = \".$id.\" and ( DATE_FORMAT( a.fechaF , '%Y-%m-%d' )\n - DATE_FORMAT( d.fecha , '%Y-%m-%d' ) )> \".$ano.\" \n and month( d.fecha ) = month(a.fechaF)\n order by c.fecing desc \",Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function selectIndEventos(string $fechaInicio,string $fechaFin){\n\n \n $this->intIdUser = $_SESSION['idUser'];\n $this->fechaInicio =$fechaInicio;\n $this->fechaFin =$fechaFin;\n\n $noAdmin=\"\";\n $dateRange=\"\";\n\n if($fechaInicio !=\"\" AND $fechaFin !=\"\")\n {\n $dateRange = \" AND l.fecha BETWEEN '$this->fechaInicio' AND '$this->fechaFin'\";\n }\n\n if($_SESSION['idUser']>2)\n {\n $noAdmin=\" AND l.personaid = $this->intIdUser\";\n }\n\n\n $sql=\"SELECT p.idcolaborador,\n CONCAT(p.nombre, ' ', p.apellido) as nombreCompleto,s.empresa,\n COUNT(case when l.tipoevento = 1 then 1 end) as pos,\n COUNT(case when l.tipoevento = 2 then 1 end) as neg,\n COUNT(case when l.tipoevento = 1 or l.tipoevento = 2 then 1 end) as total\n FROM libretalider l\n INNER JOIN colaborador p ON l.colaboradorid = p.idcolaborador\n INNER JOIN persona s ON l.personaid = s.idpersona\n WHERE l.status !=0 $dateRange $noAdmin \n GROUP BY l.colaboradorid\";\n\n $request = $this->select_all($sql);\n return $request;\n\n }", "private function iniciar_pagina_anuncio(){\n\t\t//==========necesarios para anuncios===============\n\t\trequire_once 'inc/clases/form_busqueda_builder.class.php';\t//para formularios ($Form)\n\t\trequire_once 'inc/clases/public/empresa.class.php';\t\t\t//pagina de empresa (y empresas)\n\t\trequire_once 'inc/clases/public/pagina_anuncio.class.php';\t\t//pagina anuncio(Modulo)\n\n\n\t\t$Anuncio = new Pagina_anuncio();\n\t\t//var_dump($Anuncio);\n\t\tif($Anuncio->correcto == false){\n\t\t\t$this->forzar_404();\n\t\t}else{\n\t\t\t//var_dump('esta ok');\n\t\t\t$this->anuncio = $Anuncio->salida;\n\t\t\t$empresa = $this->anuncio['ussr'];\n\t\t\t$this->Empresa = new Empresa();\n\t\t\t$this->Empresa->extraigo_para_anuncios($empresa);\n\n\t\t}\n\t}", "public function consultarEventosCalendarioUsuario($idUsuario, $fechaInicio, $fechaFin){\n\t\t\n\t\t\n\t\t$resultadoEventos = array();\n\t\t\n\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \n\t\t/*Citas--------------------------------------------------*/\n\t\t$query = \"SELECT C.idAgendaCita, C.fecha, C.horaInicio, C.fechaFin, C.horaFin, C.estado, C.observaciones, C.idMascota, C.idSucursal,\n\t\t\t\t\tC.idTipoCita, C.idPropietario,\n\t\t\t\t\tM.nombre as nombrePaciente, \n\t\t\t\t\tS.nombre as nombreSucursal, S.telefono1 as telefono1Sucursal, S.direccion,\n\t\t\t\t\tTC.nombre as nombreTipoCita,\n\t\t\t\t\tP.identificacion, P.nombre as nombrePropietario, P.apellido, P.telefono, P.celular, P.email\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM tb_agendaCitas as C\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tINNER JOIN tb_agendaCitas_usuarios AS U on U.idAgendaCita = C.idAgendaCita\n\t\t\t\t\tINNER JOIN tb_mascotas as M on M.idMascota = C.idMascota\n\t\t\t\t\tINNER JOIN tb_sucursales AS S on S.idSucursal = C.idSucursal\n\t\t\t\t\tINNER JOIN tb_propietarios AS P on P.idPropietario = C.idPropietario\n\t\t\t\t\tLEFT JOIN tb_tiposCita AS TC on TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\n\t\t\t\t\tWHERE (C.estado <> 'Cancelada') AND (C.fecha BETWEEN '$fechaInicio' and '$fechaFin') AND (U.idUsuario = '$idUsuario') AND (U.estado = 'A') \";\n\t\t\n $conexion = parent::conexionCliente();\t\t\n\t\n\t\tif($res = $conexion->query($query)){\n while ($filas = $res->fetch_assoc()) {\n \t\t\t\n \t\t$color = \"\";\t\n \t\tif($filas['estado'] == \"inasistida\"){\n \t\t\t$color = \"#e57373\";\n \t\t}\n\n\t\t\t\t\t\tif($filas['estado'] == \"Atendida\"){\n \t\t\t$color = \"#9e9e9e\";\n \t\t}\n \t\n $resultadoEventos[] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t \t\t\t => $filas['idAgendaCita'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'title'\t\t \t\t\t => $filas['nombrePropietario'].\" \".$filas['apellido'].\" (\".$filas['nombrePaciente'].\")\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t'start'\t\t\t\t\t => $filas['fecha'].\"T\".$filas['horaInicio'].\"-05:00\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t'end'\t\t \t\t\t => $filas['fechaFin'].\"T\".$filas['horaFin'].\"-05:00\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t\t\t\t => $color,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'TipoCita'\t\t\t\t => \" -\".$filas['nombreTipoCita'].\"- \",\n\t\t\t\t\t\t\t\t\t\t\t\t\t'className'\t\t\t\t => 'cita'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n \n \n \n }//fin while\n \n /* liberar el conjunto de resultados */\n $res->free(); \n }\n\t\t/*Fin Citas--------------------------------------------------*/\n\t\t\n\t\t\n\t\t\n\t\t/*Horarios Semana---------------------------------------------*/\n\t\t\n\t\t$queryHorarioSemana = \"SELECT idAgendaHorarioUsuario, horaInicio, horaFin, numeroDia \n\t\t\t\t\t\t\t\tFROM tb_agendaHorarioUsuario\n\t\t\t\t\t\t\t\tWHERE idUsuario = '$idUsuario' AND estado = 'A'\";\n\t\t\n\t\t\t\tif($res2 = $conexion->query($queryHorarioSemana)){\n\t while ($filas2 = $res2->fetch_assoc()) {\n\t \t\t \t\t\n\t\t\t\t\t\tif($dia == '6'){\n\t\t\t\t\t\t\t$dia = '0';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dia = $filas2['numeroDia']+1; \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t \t\t \t\n\t $resultadoEventos[] = array( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t\t\t\t => 'prueba',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'start'\t\t\t\t\t => $filas2['horaInicio'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'end'\t\t \t\t\t => $filas2['horaFin'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'rendering'\t\t\t\t => 'background',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'dow'\t\t\t\t\t => '['.$dia.']',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'className'\t\t\t\t => 'horarioDiaSemana'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t \n\t }//fin while\n\t \n\t /* liberar el conjunto de resultados */\n\t $res2->free(); \n \t\t}\n\t\t/*Fin Horarios Semana---------------------------------------------*/\n\t\t\n\t\t\n\t\t/*recesos Semana---------------------------------------------*/\n\t\t\n\t\t$queryRecesosSemana = \"SELECT \n\t\t\t\t\t\t\t\t ARU.idAgendaRecesosUsuario,\n\t\t\t\t\t\t\t\t ARU.numeroDia,\n\t\t\t\t\t\t\t\t AHR.idAgendaHorarioReceso,\n\t\t\t\t\t\t\t\t AHR.horaInicio,\n\t\t\t\t\t\t\t\t AHR.horaFin\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t tb_agendaRecesosUsuario AS ARU\n\t\t\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t\t\t tb_agendaHorarioReceso AS AHR ON AHR.idAgendaRecesosUsuario = ARU.idAgendaRecesosUsuario\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t ARU.idUsuario = '$idUsuario' AND AHR.estado = 'A'\";\n\t\t\n\t\t\t\tif($res3 = $conexion->query($queryRecesosSemana)){\n\t while ($filas3 = $res3->fetch_assoc()) {\n\t \t\n\t\t\t\t\t\tif($dia == '6'){\n\t\t\t\t\t\t\t$dia = '0';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dia = $filas3['numeroDia']+1; \n\t\t\t\t\t\t}\n\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t \t\t \t\n\t $resultadoEventos[] = array( \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'start'\t\t\t\t\t => $filas3['horaInicio'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'end'\t\t \t\t\t => $filas3['horaFin'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'rendering'\t\t\t\t => 'background',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t\t\t\t => 'orange',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'dow'\t\t\t\t\t => '['.$dia.']',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'className'\t\t\t\t => 'recesoDiaSemana'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t \n\t }//fin while\n\t \n\t /* liberar el conjunto de resultados */\n\t $res3->free(); \n \t\t}\n\t\t/*Fin recesos Semana---------------------------------------------*/\t\t\n\t\t\n\t\t\n\t\t/*Horario por fechas----------------------------------------------*/\n\t\t$queryHorarioFechas = \"SELECT \n\t\t\t\t\t\t\t\t idAgendaHorarioFechaUsuario, horaInicio, horaFin, fecha\n\t\t\t\t\t\t\t FROM tb_agendaHorarioFechaUsuario\n\t\t\t\t\t\t\t WHERE estado = 'A' AND idUsuario = '$idUsuario'\";\n\t\t\n\t\t\t\tif($res4 = $conexion->query($queryHorarioFechas)){\n\t while ($filas4 = $res4->fetch_assoc()) {\n\t \t\t\t\t\t \t\t\n\t\t\t\t\t\t \t\t \t\n\t $resultadoEventos[] = array( \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'start'\t\t\t\t\t => $filas4['fecha'].\"T\".$filas4['horaInicio'].\"-05:00\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'end'\t\t \t\t\t => $filas4['fecha'].\"T\".$filas4['horaFin'].\"-05:00\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'rendering'\t\t\t\t => 'background',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'className'\t\t\t\t => 'horarioFecha'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t \n\t }//fin while\n\t \n\t /* liberar el conjunto de resultados */\n\t $res4->free(); \n \t\t}\n\t\t\n\t\t\n\t\t\n\t\t/*Fin horario por fechas-------------------------------------------*/\n\t\t\n\t\t\n\t\t/*recesos por fechas-------------------------------------------*/\n\t\t\t$queryRecesoFechas = \"SELECT \n\t\t\t\t\t\t\t\t RFU.fecha, RF.horaInicio, RF.horaFin\n\t\t\t\t\t\t\t FROM tb_agendaHorarioRecesoFecha AS RF\n\t\t\t\t\t\t\t INNER JOIN tb_agendaRecesosFechaUsuario AS RFU ON RFU.idAgendaRecesosFechaUsuario = RF.idAgendaRecesosFechaUsuario\n\t\t\t\t\t\t\t WHERE RF.estado = 'A' AND RFU.idUsuario = '$idUsuario'\";\n\t\t\n\t\t\t\tif($res5 = $conexion->query($queryRecesoFechas)){\n\t while ($filas5 = $res5->fetch_assoc()) {\n\t \t\t\t\t\t \t\t\n\t\t\t\t\t\t \t\t \t\n\t $resultadoEventos[] = array( \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'start'\t\t\t\t\t => $filas5['fecha'].\"T\".$filas5['horaInicio'].\"-05:00\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'end'\t\t \t\t\t => $filas5['fecha'].\"T\".$filas5['horaFin'].\"-05:00\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'rendering'\t\t\t\t => 'background',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'className'\t\t\t\t => 'recesoFecha',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t\t\t\t => 'orange'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t \n\t }//fin while\n\t \n\t /* liberar el conjunto de resultados */\n\t $res5->free(); \n \t\t}\n\t\t/*Fin recesos por fechas-------------------------------------------*/\n\t\t\n\t\t\n\n\n return $resultadoEventos;\t\n\n\t\t\n\t\t\n\t}", "public function consultarDatosCita($idCita){\n\t\t\n\n\t\t$resultadoCita = array();\n\t\t\n\t\t$idCita \t= parent::escaparQueryBDCliente($idCita); \n\t\t\n\t\t$query = \"SELECT C.idAgendaCita, C.fecha, DATE_FORMAT(C.horaInicio, '%H:%i') horaInicio, C.fechaFin, C.horaFin, C.duracionHoras, C.duracionMinutos, C.estado, \n\t\t\t\t\tC.observaciones, C.idMascota, C.idSucursal,C.idTipoCita, C.idPropietario,\n\t\t\t\t\tM.nombre as nombrePaciente, \n\t\t\t\t\tS.nombre as nombreSucursal, S.telefono1 as telefono1Sucursal, S.direccion,\n\t\t\t\t\tTC.nombre as nombreTipoCita,\n\t\t\t\t\tP.identificacion, P.nombre as nombrePropietario, P.apellido, P.telefono, P.celular, P.email\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM tb_agendaCitas as C\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tINNER JOIN tb_agendaCitas_usuarios AS U on U.idAgendaCita = C.idAgendaCita\n\t\t\t\t\tINNER JOIN tb_mascotas as M on M.idMascota = C.idMascota\n\t\t\t\t\tINNER JOIN tb_sucursales AS S on S.idSucursal = C.idSucursal\n\t\t\t\t\tINNER JOIN tb_propietarios AS P on P.idPropietario = C.idPropietario\n\t\t\t\t\tLEFT JOIN tb_tiposCita AS TC on TC.idTipoCita = C.idTipoCita\n\t\t\t\t\t\n\t\t\t\t\tWHERE C.idAgendaCita = '$idCita' LIMIT 1\";\n\t\t\n $conexion = parent::conexionCliente();\t\t\n\t\n\t\tif($res = $conexion->query($query)){\n while ($filas = $res->fetch_assoc()) {\n \t\t$resultadoCita[] = $filas;\n \t}//fin while\n \t\n }//fin if\t\n \n \n return $resultadoCita;\t\n\t\t\n\t\t\n\t}", "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}", "public function listar_us_asignaciones($id_tarea){\n $contenedor=\"\";\n $asignaciones = array();\n $con = new Conexion();\n $con3 = $con->conectar();\n try{\n $con3->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $stmt2 = $con3->prepare(\"select * from asignaciones a inner join usuarios us on a.cedula = us.cedula WHERE id_tarea =:id_tarea\");\n $stmt2->bindParam(':id_tarea', $id_t);\n $id_t = $id_tarea;\n if($stmt2->execute()){\n while ($row2 = $stmt2->fetchObject()) {\n $contenedor=\"{$row2->cedula} <b>{$row2->nombre}</b> {$row2->cargo} {$row2->unidad} {$row2->sede}<br><br>\";\n array_push($asignaciones,$contenedor);\n }\n }\n }\n catch(PDOException $e)\n {\n echo \"Error: \" . $e->getMessage();\n }\n $con2 = null;\n return $asignaciones;\n }", "function obtenerSesion_agendar(){\n\t\t\n\t\t$query1 = ('select sesion.id, sesion.checkin, sesion.pagada, sesion.id_servicio, sesion.id_usuario, sesion.id_agenda, sesion.ejecutada, usuario.nombre,\n\t\t\t\t\tusuario.apellido, servicio.descripcion , cliente.nombre as nombre_cliente , cliente.apellido as apellido_cliente from sesion \n\t\t\t\t\tInner JOIN usuario\n\t\t\t\t\ton sesion.id_usuario = usuario.id\n\t\t\t\t\tInner Join servicio\n\t\t\t\t\ton sesion.id_servicio = servicio.id\n\t\t\t\t\tInner Join cliente\n\t\t\t\t\ton sesion.id_cliente = cliente.id\n\t\t\t\t\twhere sesion.id_agenda is NULL'); //QUERY PARA OBTENER TODO DE UNA VEZ.\n\t\t$query = $this->db->query($query1);\n\t\t\n\t\t\n\t //$query = $this->db->get('sesion');\n\t if($query-> num_rows() > 0) return $query->result_array();\n\t else return false ;\n\t \n\t \n\t}", "public function Listar(){\n\t\t\t$view_agendamento = new ViewAgendamentoPacienteFuncionarioClass();\n\n\t\t\t//Chama o método para selecionar os registros\n \n \n \n\t\t\treturn $view_agendamento::Select();\n\t\t}", "public function hospitalizaciones_aplicarFiltrosHospitalizaciones($fechaInicial, $fechaFinal, $usuarios, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND H.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( H.fechaIngreso BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND H.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \" SELECT \n\t\t\t\t\t\t H.idHospitalizacion,\n\t\t\t\t\t\t H.fechaIngreso,\n\t\t\t\t\t\t DATE_FORMAT(H.horaIngreso, '%H:%i') AS hora,\n\t\t\t\t\t\t H.motivoHospitalizacion,\n\t\t\t\t\t\t H.observacion,\n\t\t\t\t\t\t HA.idHospitalizacionAlta,\n\t\t\t\t\t\t HA.fecha as fechaAlta,\n\t\t\t\t\t\t DATE_FORMAT(HA.hora, '%H:%i') AS horaAlta,\n\t\t\t\t\t\t HA.observaciones AS observacionesAlta,\n\t\t\t\t\t\t HA.cuidadosATener,\n\t\t\t\t\t\t UA.nombre AS nombreUsuarioAlta,\n\t\t\t\t\t\t UA.apellido AS apellidoUsuarioAlta,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_hospitalizacion AS H\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_hospitalizacionAlta AS HA ON HA.idHospitalizacion = H.idHospitalizacion\n\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t tb_usuarios AS UA ON UA.idUsuario = HA.idUsuario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON H.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = H.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = H.idUsuario\n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (H.idHospitalizacion)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (H.idHospitalizacion) DESC; \";\n\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function consultas_aplicarFiltrosConsultas($fechaInicial, $fechaFinal, $usuarios, $idDxConsulta, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idDxConsulta != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_consultas_diagnosticos AS DC ON DC.idConsulta = C.idConsulta\n\t\t\t\t\t\t\t\t INNER JOIN tb_panelDiagnosticoConsulta AS PCD ON PCD.idPanelDiagnosticoConsulta = DC.idPanelDiagnosticoConsulta\n\t\t\t\t\t\t\t\t WHERE PCD.idPanelDiagnosticoConsulta = '$idDxConsulta' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND C.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( C.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND C.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t C.idConsulta,\n\t\t\t\t\t\t C.fecha,\n\t\t\t\t\t\t DATE_FORMAT(C.hora, '%H:%i') as hora,\n\t\t\t\t\t\t C.motivo,\n\t\t\t\t\t\t C.observaciones,\n\t\t\t\t\t\t C.planASeguir,\n\t\t\t\t\t\t C.edadActualMascota,\n\t\t\t\t\t\t \n\t\t\t\t\t\t EF.idExamenFisico,\n\t\t\t\t\t\t EF.peso,\n\t\t\t\t\t\t EF.medidaCm,\n\t\t\t\t\t\t EF.temperatura,\n\t\t\t\t\t\t EF.observaciones as observacionesExamenFisico,\n\t\t\t\t\t\t \n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_consultas AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t \tLEFT JOIN\n\t\t\t\t\t\t tb_examenFisico AS EF ON EF.idConsulta = C.idConsulta\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (C.idConsulta)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (C.idConsulta) DESC; \";\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function obtenerAutoridad($idcarrera, $idtipocargo, $idsede)\n {\n \tif($idtipocargo == 1 or $idtipocargo == 2) {\n\t \t$q = Doctrine_Query::create()\n\t\t \t\t->select(\"*\")\n\t\t \t\t->from(\"DesignacionesEmpleados de\")\n\t\t \t\t->innerjoin('de.Empleados e on de.idempleado=e.idempleado')\n\t\t \t\t->where(\"de.idtipocargo = \".$idtipocargo)\n\t\t \t\t->andWhere(\"de.inicio<CURRENT_TIMESTAMP()\")\n\t\t \t->andWhere(\"(de.fin>CURRENT_TIMESTAMP() or de.fin='0000-00-00')\")\n\t\t \t->andWhere(\"de.activo = 1\") \t\n\t\t \t->fetchOne(); \n\t\t// Director\t \t\t\n\t } elseif ($idtipocargo == 19) {\n\t \t$q = Doctrine_Query::create()\n\t \t\t->select(\"*\")\n\t \t\t->from(\"DesignacionesEmpleados de\")\n\t \t\t->innerjoin('de.Empleados e on de.idempleado=e.idempleado')\n\t \t\t->where(\"de.idtipocargo = \".$idtipocargo)\n\t \t\t->andWhere(\"de.inicio<CURRENT_TIMESTAMP()\")\n\t \t\t->andWhere(\"de.fin>CURRENT_TIMESTAMP() or de.fin='0000-00-00'\")\n\t \t\t->andWhere(\"de.activo = 1\")\n\t \t\t->andWhere('de.idempleado IN (\n\t\t \t\t\t\tSELECT es.idempleado\n\t\t \t\t\t\tFROM EmpleadosSede es\n\t\t \t\t\t\tWHERE es.idsede = '.$idsede.')')\n\t \t\t->andWhere('de.idarea IN (\n\t\t \t\t\t\tSELECT ac.idarea\n\t\t \t\t\t\tFROM AreasCarrera ac\n\t \t\t\t\t\tINNER JOIN ac.Areas ar ON ac.idarea=ar.idarea\n\t\t \t\t\t\tWHERE (ar.idtipoarea = 5 or ar.idtipoarea = 7) and ac.idcarrera = '.$idcarrera.')')\n\t \t\t->fetchOne();\t\n\t\t// Decano o Sec Academico\t \t\t\n \t} else {\n\t \t$q = Doctrine_Query::create()\n\t\t \t\t->select(\"*\")\n\t\t \t\t->from(\"DesignacionesEmpleados de\")\n\t\t \t\t->innerjoin('de.Empleados e on de.idempleado=e.idempleado')\n\t\t \t\t->where(\"de.idtipocargo = \".$idtipocargo)\n\t\t \t\t->andWhere(\"de.inicio<CURRENT_TIMESTAMP()\")\n\t\t \t->andWhere(\"de.fin>CURRENT_TIMESTAMP() or de.fin='0000-00-00'\")\n\t\t \t->andWhere(\"de.activo = 1\")\n\t \t\t->andWhere('de.idarea IN (\n\t\t \t\t\t\tSELECT ac.idarea \n\t\t \t\t\t\tFROM AreasCarrera ac\n\t\t \t\t\t\tWHERE ac.idcarrera = '.$idcarrera.')')\t \t\t \t\n\t\t \t->fetchOne(); \t\n \t}\n\t \n return $q;\n }", "function listarTareaProgramada($datos){\n conectar($conexion);\n /*Declaracion de variables para implementar determinado Top en la consulta*/\n $varIng1 = ((isset($datos['radicado'])?$datos['radicado']:'') != '');\n $varIng2 = ((isset($datos['nomDesti'])?$datos['nomDesti']:'') != '');\n $varIng3 = ((isset($datos['correoElectro'])?$datos['correoElectro']:'') != '');\n $varIng4 = ((isset($datos['fechaIni'])?$datos['fechaIni']:'') != '');\n $varIng5 = ((isset($datos['estado'])?$datos['estado']:'') != '');\n /*Funcion que determina un Top a la consulta cuando se consultan datos*/\n if($varIng1 != '' || $varIng2 != '' || $varIng3 != '' || $varIng4 != '' || $varIng5 != ''){\n $top=\"1000\";\n }\n else{\n $top=\"50\";\n }\n $sql = \"SELECT OID,DS_NOMDESTINATARIO,DS_CORREODESTINATARIO,DS_ASUNTODESTINATARIO,DS_MENSAJEDESTINATARIO,SN_COPIA,CD_USUENVIA,DS_HOSTENVIA,DT_FECHAENVIA,SN_ESTADO\n FROM ADM_CORREOFRONTEND\n WHERE 1=1 \";\n if((isset($varIng1)?$varIng1:'') != ''){\n $sql.= \" AND OID = '\" . $datos['radicado']. \"'\";\n }\n if((isset($varIng2)?$varIng2:'') != ''){\n $sql.= \" AND DS_NOMDESTINATARIO LIKE '%\".$datos['nomDesti'].\"%'\";\n }\n if((isset($varIng3)?$varIng3:'') != ''){\n $sql.= \" AND DS_CORREODESTINATARIO = '\".$datos['correoElectro'].\"'\";\n }\n if((isset($varIng4)?$varIng4:'') != ''){\n $sql.= \" AND CAST(DT_FECHAENVIA AS DATE) BETWEEN '\" . $datos['fechaIni']. \"' AND '\" . $datos['fechaFin']. \"'\";\n }\n if((isset($varIng5)?$varIng5:'') != ''){\n $sql.= \" AND SN_ESTADO = '\" . $datos['estado']. \"'\";\n }\n /*Ordenamos por el Consecutivo*/\n if((isset($datos['numCodigo'])?$datos['numCodigo']:'') == '' & (isset($datos['nomDocumento'])?$datos['nomDocumento']:'') == ''\n & (isset($datos['fechaIni'])?$datos['fechaIni']:'')){\n }\n $sql.=\" ORDER BY OID DESC\n LIMIT $top\";\n $sqlQuery=mysqli_query($conexion,$sql) or die (\"Error al momento de listar los envíos de correo \".mysqli_error($conexion));\n echo '\n <div class=\"table-responsive\">\n <table class=\"table table-striped table-bordered table-hover\" style=\"width:100%;\">\n <thead>\n <tr>\n <th scope=\"col\" style=\"width:4%;text-align:center;\"># Radicado</th>\n <th scope=\"col\" style=\"width:20%;text-align:center;\">Nombre destinatario</th>\n <th scope=\"col\" style=\"width:20%;text-align:center;\">Correo electronico</th>\n <th scope=\"col\" style=\"width:10%;text-align:center;\">Usuario envío</th>\n <th scope=\"col\" style=\"width:10%;text-align:center;\">Fecha envío</th>\n <th scope=\"col\" style=\"width:2%;text-align:center;\">Estado</th>\n <th scope=\"col\" style=\"width:2%;text-align:center;\">Editar/Visualizar</th>\n </tr>\n </thead>\n <tbody>\n ';\n $i = 0;\n while($row = mysqli_fetch_array($sqlQuery)){\n $oid = $row['OID'];\n switch ($row['SN_ESTADO']) {\n case '0':\n $url = \"frontEnd.php?oid=$oid\";\n // $img = \"assets/img/edit.png\";\n $img = \"assets/img/ver.png\";\n $title='Visualizar';\n $content = '<i class=\"fa fa-circle text-danger\"></i>';\n break;\n case '1':\n $url = \"frontEnd.php?oid=$oid\";\n $img = \"assets/img/ver.png\";\n $title = 'Visualizar';\n $content = '<i class=\"fa fa-circle text-info\"></i>';\n break;\n }\n echo '\n <tr>\n <th scope=\"row\" style=\"text-align:center;\">'.$row['OID'].'</th>\n <td scope=\"row\">'.$row['DS_NOMDESTINATARIO'].'</td>\n <td scope=\"row\">'.$row['DS_CORREODESTINATARIO'].'</td>\n <td scope=\"row\">'.$row['CD_USUENVIA'].'</td>\n <td scope=\"row\">'.$row['DT_FECHAENVIA'].'</td>\n <td scope=\"row\" style=\"text-align:center;\">'.$content.'</td>\n <td scope=\"row\" style=\"text-align:center;\"><a href=\"'.$url.'\" data-toggle=\"tooltip\" title=\"'.$title.'\"><img class=\"addPagare\" id=\"addPagare\" title=\"\" src=\"'.$img.'\" width=\"20\" height=\"20\"></a> </td>\n </tr>\n ';\n $i++;\n }\n if($i == 1){\n $i = \"$i Registro\";\n }else{\n $i = \"$i Registros\";\n }\n echo\"<thead><th colspan='7' style='text-align:center;'>$i</th></thead>\";\n echo '\n </tbody>\n </table>\n </div>\n ';\n mysqli_close($conexion);\n}", "public function consulta_asistencia()\n {\n $fecha_reporte = cambiaf_a_mysql($this->txt_fecha_desde->Text);\n $dir = $this->drop_direcciones->SelectedValue;\n $cod_organizacion = usuario_actual('cod_organizacion');\n\n // se obtienen las justificaciones del día seleccionado\n $sql=\"SELECT (p.cedula) as cedula_just, p.nombres, p.apellidos, j.codigo, jd.fecha_desde, jd.hora_desde,\n jd.fecha_hasta, jd.hora_hasta, jd.observaciones, jd.lun, jd.mar, jd.mie, jd.jue, jd.vie,\n tf.descripcion as descripcion_falta, tj.descripcion as descripcion_tipo_justificacion\n\t\t\t\t\t FROM asistencias.justificaciones as j, asistencias.justificaciones_dias as jd,\n\t\t\t\t\t\t asistencias.justificaciones_personas as jp, organizacion.personas as p, organizacion.personas_nivel_dir as n, asistencias.tipo_faltas tf, asistencias.tipo_justificaciones tj\n\t\t\t\t\t\tWHERE ((p.cedula = jp.cedula) and\n\t\t\t\t\t\t (p.cedula = n.cedula) and (jd.codigo_tipo_falta = tf.codigo) and (tj.id = jd.codigo_tipo_justificacion) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t (jd.fecha_desde <= '$fecha_reporte') and\n\t\t\t\t\t\t\t (jd.fecha_hasta >= '$fecha_reporte') and\n\t\t\t\t\t\t\t (j.estatus='1') and (j.codigo=jd.codigo_just) and (j.codigo=jp.codigo_just))\n\t\t\t\t\t\tORDER BY p.nombres, p.apellidos, jp.cedula \";\n $this->justificaciones=cargar_data($sql,$this); \n\n // se obtiene el horario vigente para la fecha seleccionada\n $this->horario_vigente = obtener_horario_vigente($cod_organizacion,$fecha_reporte,$this);\n \n // se realizan las consultas para mostrar los listados\n // Se consultan los asistentes\n $sql=\"SELECT (p.cedula) as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre,\n e.cedula, e.fecha, MIN(e.hora) as entrada, MAX(e.hora) as salida\n FROM asistencias.entrada_salida as e, organizacion.personas as p, organizacion.personas_nivel_dir as n\n WHERE ((p.cedula = e.cedula) and\n (p.cedula = n.cedula) and\n (n.cod_direccion LIKE '$dir%') and\n (p.fecha_ingreso <= '$fecha_reporte') and\n (e.fecha <= '$fecha_reporte') and\n (e.fecha >= '$fecha_reporte'))\n GROUP BY e.cedula\n ORDER BY entrada, p.nombres, p.apellidos \";\n $this->asistentes=cargar_data($sql,$this);\n $this->ind_asistentes = count($this->asistentes);\n\n // se consultan los inasistentes\n $sql2=\"SELECT p.cedula as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre\n\t\t\t\t\t\t\t\t\t FROM organizacion.personas as p, asistencias.personas_status_asistencias as s,\n\t\t\t\t\t\t\t\t\t organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t WHERE ((s.status_asistencia = '1') and\n\t\t\t\t\t\t\t\t\t \t\t (s.cedula = p.cedula) and\n\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t (p.cedula not in\n\t\t\t\t\t\t\t\t\t (SELECT e.cedula\n\t\t\t\t\t\t\t\t\t\t FROM asistencias.entrada_salida as e, organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t\t \t WHERE ((e.fecha = '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%'))\n\t\t\t\t\t\t\t\t\t\t\t GROUP BY e.cedula)))\n\t\t\t\t\t\t\t\t\t ORDER BY p.nombres, p.apellidos\";\n $this->inasistentes=cargar_data($sql2,$this);\n\n\n // Se consultan los asistentes para comparar inconsistencia de horas en el marcado\n // Si le falta hora\n $inconsistentes = array();\n foreach($this->asistentes as $arreglo){\n \n $sql2=\"SELECT COUNT(*) as n_horas FROM asistencias.entrada_salida as e\n\t\t\t WHERE e.fecha = '$fecha_reporte' AND e.cedula = '$arreglo[cedula_integrantes]' \";\n $resultado2=cargar_data($sql2,$this);\n if(!empty($resultado2)){\n if ($resultado2[0][n_horas]%2!=0) {//impar\n array_unshift($inconsistentes, array('cedula'=>$arreglo[cedula_integrantes], 'nombre'=>$arreglo[nombre],'salida'=>$arreglo[salida]));\n }//fin si\n }//fin si\n }//fin each\n\n\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n //$this->DataGrid_fj->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n if(!empty($inconsistentes)){\n $this->DataGrid_fh->DataSource=$inconsistentes;\n $this->DataGrid_fh->dataBind();\n }\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n $this->DataGrid->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n $this->DataGrid->DataSource=$this->asistentes;\n $this->DataGrid->dataBind();\n\n\n $this->DataGrid_ina->Caption=\"Inasistentes el d&iacute;a \".$this->txt_fecha_desde->Text;\n $this->DataGrid_ina->DataSource=$this->inasistentes;\n $this->DataGrid_ina->dataBind();\n\n /* Por un error que no supe identificar, el cual suma un numero adicional a la variable\n * de inasistentes no justificados, he tenido que sacarla del procedimiento donde normalmente\n * se contaba y tuve que realizarla por resta en esta sección.\n */\n $this->ind_inasistentes_no_just = count($this->inasistentes) - $this->ind_inasistentes_si_just;\n\n $this->Repeater->DataSource = $this->justificaciones;\n $this->Repeater->dataBind();\n\n $xale=rand(100,99999);\n // Se realiza la construcción del gráfico para indicadores\n\n $chart = new PieChart();\n $dataSet = new XYDataSet();\n if ($this->ind_asistentes>=1) {$dataSet->addPoint(new Point(\"Funcionarios Asistentes: (\".$this->ind_asistentes.\")\", $this->ind_asistentes));};\n if ($this->ind_inasistentes_no_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes NO JUSTIFICADOS: (\".$this->ind_inasistentes_no_just.\")\", $this->ind_inasistentes_no_just));};\n if ($this->ind_inasistentes_si_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes JUSTIFICADOS: (\".$this->ind_inasistentes_si_just.\")\", $this->ind_inasistentes_si_just));};\n $chart->setDataSet($dataSet);\n $chart->setTitle(\"Porcentajes de Asistencias / Inasistencias del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_01.png\");\n $chart->render(\"imagenes/temporales/\".$xale.\"_01.png\");\n $this->grafico1->ImageUrl = \"imagenes/temporales/\".$xale.\"_01.png\";\n\n\n $chart2 = new PieChart();\n $dataSet2 = new XYDataSet();\n $this->ind_asistentes_no_retrasados=$this->ind_asistentes-$this->ind_asistentes_tarde_no_just-$this->ind_asistentes_tarde_si_just;\n if ($this->ind_asistentes_no_retrasados>=1) {$dataSet2->addPoint(new Point(\"Puntuales: (\".$this->ind_asistentes_no_retrasados.\")\", $this->ind_asistentes_no_retrasados));};\n if ($this->ind_asistentes_tarde_no_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales NO JUSTIFICADOS: (\".$this->ind_asistentes_tarde_no_just.\")\", $this->ind_asistentes_tarde_no_just));};\n if ($this->ind_asistentes_tarde_si_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales JUSTIFICADOS: (\".$this->ind_asistentes_tarde_si_just.\")\", $this->ind_asistentes_tarde_si_just));};\n $chart2->setDataSet($dataSet2);\n $chart2->setTitle(\"Porcentajes de Retrasos del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_02.png\");\n $chart2->render(\"imagenes/temporales/\".$xale.\"_02.png\");\n $this->grafico2->ImageUrl = \"imagenes/temporales/\".$xale.\"_02.png\";\n\n // si la consulta de asistentes tiene resultados se habilita la impresion, sino, se deshabilita\n if (!empty($this->asistentes)) {$this->btn_imprimir->Enabled = true;} else {$this->btn_imprimir->Enabled = false;}\n\n }", "function listEstado($id){\n\t$sql = 'SELECT * FROM tb_estado';\n\tif($id>0){\n\t\t$sql.=' WHERE id='.$id;\n\t}\n\t$resultado = $GLOBALS['con']->query($sql);\n\treturn $resultado;\n}", "function obtenerCadenaCodigos($estudiantes){\n $cadena_codigos='';\n foreach ($estudiantes as $key => $row) {\n if(!$cadena_codigos){\n $cadena_codigos = $row['COD_ESTUDIANTE'];\n }else{\n $cadena_codigos .= \",\".$row['COD_ESTUDIANTE'];\n }\n }\n return $cadena_codigos;\n }", "public function cirugias_aplicarFiltrosCirugias($fechaInicial, $fechaFinal, $usuarios, $idCirugia, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idCirugia != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_diagnosticosCirugias AS DC ON DC.idCirugia = C.idCirugia\n\t\t\t\t\t\t\t\t INNER JOIN tb_panelesCirugiaDiagnosticos AS PCD ON PCD.idPanelCirugiaDiagnostico = DC.idPanelCirugiaDiagnostico\n\t\t\t\t\t\t\t\t WHERE PCD.idPanelCirugiaDiagnostico = '$idCirugia' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND C.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( C.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND C.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t C.idCirugia,\n\t\t\t\t\t\t C.fecha,\n\t\t\t\t\t\t DATE_FORMAT(C.hora, '%H:%i') as hora,\n\t\t\t\t\t\t C.tipoAnestesia,\n\t\t\t\t\t\t C.motivo,\n\t\t\t\t\t\t C.complicaciones,\n\t\t\t\t\t\t C.observaciones, \n\t\t\t\t\t\t C.planASeguir,\n\t\t\t\t\t\t C.edadActualMascota,\n\t\t\t\t\t\t C.idMascota,\n\t\t\t\t\t\t C.idSucursal,\n\t\t\t\t\t\t C.idUsuario,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono,\n\t\t\t\t\t\t SU.nombre AS nombreSucursal,\n\t\t\t\t\t\t U.nombre AS nombreUsuario,\n\t\t\t\t\t\t U.apellido AS apellidoUsuario\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_cirugias AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (C.idCirugia)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (C.idCirugia) DESC; \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function ListarCategoriasArbol($estado = \"1\")\n {\n $tree = array();\n //Categoria Padres\n $categoria_padres = $this->getDoctrine()->getRepository('IcanBundle:Categoria')\n ->ListarPadres($estado);\n //Resto de categoria\n $categoria_hijos = $this->getDoctrine()->getRepository('IcanBundle:Categoria')\n ->ListarHijos($estado);\n\n for ($i = 0; $i < count($categoria_padres); $i++) {\n\n $value = $categoria_padres[$i];\n $categoria_id = $value->getCategoriaId();\n\n $subcategoria = $this->getDoctrine()->getRepository('IcanBundle:Categoria')\n ->ListarCategoriasDelPadre($categoria_id, $estado);\n $class = (count($subcategoria) > 0) ? \"optionGroup\" : \"\";\n\n $element = array(\n 'categoria_id' => $categoria_id,\n 'categoria_padre_id' => \"\",\n 'descripcion' => $value->getNombre(),\n 'class' => $class\n );\n\n array_push($tree, $element);\n\n $tree = $this->getChilds($tree, $categoria_hijos, $categoria_id, 0, $categoria_id);\n\n }\n\n return $tree;\n }", "public function ListarCategoriasArbol($estado = \"1\")\n {\n $tree = array();\n //Categoria Padres\n $categoria_padres = $this->getDoctrine()->getRepository('IcanBundle:Categoria')\n ->ListarPadres($estado);\n //Resto de categoria\n $categoria_hijos = $this->getDoctrine()->getRepository('IcanBundle:Categoria')\n ->ListarHijos($estado);\n\n for ($i = 0; $i < count($categoria_padres); $i++) {\n\n $value = $categoria_padres[$i];\n $categoria_id = $value->getCategoriaId();\n\n $subcategoria = $this->getDoctrine()->getRepository('IcanBundle:Categoria')\n ->ListarCategoriasDelPadre($categoria_id, $estado);\n $class = (count($subcategoria) > 0) ? \"optionGroup\" : \"\";\n\n $element = array(\n 'categoria_id' => $categoria_id,\n 'categoria_padre_id' => \"\",\n 'descripcion' => $value->getNombre(),\n 'class' => $class\n );\n\n array_push($tree, $element);\n\n $tree = $this->getChilds($tree, $categoria_hijos, $categoria_id, 0, $categoria_id);\n\n }\n\n return $tree;\n }", "public function annulationAction($id,Request $request,$dateSortie,$nomEnfant,$prenomEnfant) {\n \n if ($request->getSession()->get('email') == null) {\n return $this->pageErreur(\"Vous devez être connecté pour accèder à ce lien\");\n } \n \n $saison = new Saison;\n $year = $saison->connaitreSaison(); \n $em = $this->getDoctrine()->getManager();\n $parents = $em->getRepository('SC\\UserBundle\\Entity\\User')->findOneByEmail($request->getSession()->get('email')); \n //on verifie que les infos sont correctes\n if($this->parametreValide2($id, $dateSortie) == false) {\n return $this->pageErreur(\"informations fournies non correctes\");\n }\n $sortie = $this->getSortie($id, $dateSortie);\n //on verifie que l'enfant est bien un des fils de l'utilisateur, et qu'il est bien inscirt a la sortie \n if($this->estEnfant($nomEnfant,$prenomEnfant,$parents) == false OR $this->estInscrit($id,$sortie,$request->getSession()->get('email'),$nomEnfant,$prenomEnfant,$year) == false) {\n return $this->pageErreur(\"Erreur si l'identité de l'enfant\");\n } \n //on recupere les enfants pour la vue principale\n $listEnfants = $em->getRepository('SC\\UserBundle\\Entity\\Enfant')->findBy(array('userParent' => $parents)); \n //on supprime de la table\n $inscription = $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')\n ->findOneBy(array('idActivite' =>$id,'dateSortie'=>$dateSortie,'emailParent'=> $request->getSession()->get('email'),'nomEnfant' => $nomEnfant, 'prenomEnfant' => $prenomEnfant, 'saison' => $year));\n if(is_null($inscription)) {\n return $this->pageErreur(\"vous n'etes pas inscrit à cette sortie\");\n }\n \n $em->remove($inscription);\n $em->flush();\n \n $request->getSession()->getFlashBag()->add('info', 'annulation enregistree'); \n return $this->render('SCUserBundle:Security:monCompte.html.twig',array('listEnfants'=>$listEnfants));\n }", "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda argomento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "public function showAseg(){\n $ordenado = \\DB::table('Asegurado')->orderBy('Ap_paterno', 'asc')->get();\n return $ordenado;\n }", "function listarPeriodoVenta(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERVEN_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta','int4');\n $this->captura('id_gestion','int4');\n $this->captura('mes','varchar');\n $this->captura('estado','varchar');\n $this->captura('nro_periodo_mes','int4');\n $this->captura('fecha_fin','date');\n $this->captura('fecha_ini','date');\n $this->captura('tipo_periodo','varchar');\n $this->captura('medio_pago','varchar');\n $this->captura('tipo_cc','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_usuario_ai','int4');\n $this->captura('id_usuario_reg','int4');\n $this->captura('usuario_ai','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('desc_periodo','text');\n $this->captura('fecha_pago','date');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function obter_noticias_pagina_inicial() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia',4,0);\n }", "public function CarregaAnual($aDados)\r\n {\r\n $aDados = (array) $aDados;\r\n \r\n $idplanificacion = $aDados['cplanificacion'];\r\n $pais = $aDados['idPais'];\r\n $sede = $aDados['idSede'];\r\n $indicador = $aDados['idIndicador'];\r\n \r\n $model = Container::getModel(\"TInforme\");\r\n \r\n //Busca Anual\r\n $result = $model->BuscaAnual($idplanificacion, $pais, $sede, $indicador);\r\n \r\n if( $result[0]->tipo == 'Ultimo')\r\n {\r\n $aPlanificado = $result[0]->ultimo_plan_anual;\r\n $aRealizado = $result[0]->ultimo_real_anual;\r\n }\r\n \r\n if( $result[0]->tipo == 'Acumulado')\r\n {\r\n $aPlanificado = $result[0]->acumulado_plan_anual;\r\n $aRealizado = $result[0]->acumulado_real_anual;\r\n }\r\n \r\n if( $result[0]->tipo == 'Promedio')\r\n {\r\n $aPlanificado = $result[0]->promedio_plan_anual;\r\n $aRealizado = $result[0]->promedio_real_anual;\r\n }\r\n \r\n if( $result[0]->tipo == 'Minimo')\r\n {\r\n $aPlanificado = $result[0]->minimo_plan_anual;\r\n $aRealizado = $result[0]->minimo_real_anual;\r\n }\r\n \r\n if( $result[0]->tipo == 'Maximo')\r\n {\r\n $aPlanificado = $result[0]->maximo_plan_anual;\r\n $aRealizado = $result[0]->maximo_real_anual;\r\n }\r\n \r\n //tudo junto pq deu merda separado\r\n echo json_encode(array(\"plan\" => $aPlanificado. ',' . $aRealizado));\r\n }", "public function ListarArqueoCaja()\n{\n\tself::SetNames();\n\t\n\tif($_SESSION[\"acceso\"] == \"cajero\") {\n\n\n $sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja WHERE cajas.codigo = '\".$_SESSION[\"codigo\"].\"'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n\n\n\t} else {\n\n\t$sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n\n\t}\n}", "public function listarActivos(){\n\t\t$sql = \"SELECT * FROM producto\n\t\t\t\tWHERE prod_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}" ]
[ "0.6901112", "0.67792714", "0.6762469", "0.66537935", "0.66196746", "0.6592385", "0.65196514", "0.64192045", "0.63940555", "0.63709646", "0.6342002", "0.6335485", "0.63296986", "0.63169634", "0.628279", "0.6238928", "0.6208654", "0.62078506", "0.6202557", "0.62000996", "0.61921173", "0.6172402", "0.61568195", "0.61367977", "0.6132525", "0.61295307", "0.6122549", "0.61184984", "0.6096832", "0.6086437", "0.6068955", "0.6060079", "0.6042546", "0.60371983", "0.6036151", "0.6029174", "0.6025679", "0.60215896", "0.5994114", "0.59934306", "0.599321", "0.5972245", "0.59656423", "0.59598845", "0.5958451", "0.59568113", "0.5952376", "0.59481084", "0.5946266", "0.59451115", "0.5945063", "0.5942565", "0.5934008", "0.59252185", "0.5915048", "0.59135336", "0.5913492", "0.5908779", "0.58931774", "0.58926034", "0.5887609", "0.5883049", "0.58785194", "0.58717203", "0.5869331", "0.58678657", "0.58602595", "0.5852385", "0.5852349", "0.5844847", "0.5841482", "0.5841131", "0.5837484", "0.5835958", "0.5834199", "0.5822499", "0.58224964", "0.5820032", "0.5818543", "0.58172125", "0.5816101", "0.58144855", "0.58016765", "0.57978785", "0.57978296", "0.57964367", "0.5794663", "0.5785701", "0.5783561", "0.5781267", "0.57772243", "0.57772243", "0.5761844", "0.57586855", "0.5757643", "0.57565403", "0.5756371", "0.5751372", "0.57470846", "0.5741549" ]
0.73345286
0
/ Get Filtros resolucion administrativa
public function getFiltroResolucion() { $resultado = array(); $sql = " SELECT STRING_AGG(v.tipo_resolucion,',') AS o_resultado FROM ( SELECT CAST(r.tipo_resolucion AS CHARACTER VARYING) FROM cargos c INNER JOIN resoluciones r ON c.resolucion_ministerial_id = r.id WHERE c.baja_logica = 1 GROUP BY r.id,r.tipo_resolucion ORDER BY r.id ) AS v "; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function consultarFacturadoresResolucion(){\n\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT FR.idFacturadoresResolucionDian, FR.idFacturador, FR.idResolucionDian, F.identificacion, F.nombre, F.apellido,\n\t\t\t\t\tR.numeroResolucion, R.porcentajeIva\n\t\t\t\t\t\n\t\t\t\t\tFrom tb_facturadoresResolucionDian AS FR\n\t\t\t\t\tINNER JOIN tb_resolucionDian AS R ON R.idResolucionDian = FR.idResolucionDian\n\t\t\t\t\tINNER JOIN tb_facturadores AS F ON F.idFacturador = FR.idFacturador\n\t\t\t\t\t\n\t\t\t\t\tWHERE F.estado = 'A' AND FR.estado = 'A' AND R.estado = 'A'\n\t\t\n\t\t \";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado;\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t}", "function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }", "function listarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_sel';\n\t\t$this->transaccion='VF_REFACOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_reenvio_factura','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('correo_copia','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado_envio_correo','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function consultarFacultades() {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_facultades\",\"\");\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "function listarFactura(){\r\n\t\t$this->procedimiento='tesor.ft_factura_sel';\r\n\t\t$this->transaccion='TSR_FAC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_factura','int4');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('nro_factura','int4');\r\n\t\t$this->captura('nombre_emisor','varchar');\t\t\r\n\t\t$this->captura('domicilio_emisor','varchar');\r\n\t\t$this->captura('nit_emisor','int4');\r\n\t\t$this->captura('nombre_cliente','varchar');\t\t\r\n\t\t$this->captura('domicilio_cliente','varchar');\r\n\t\t$this->captura('nit_cliente','int4');\r\n\t\t$this->captura('fecha_emision','date');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function obtenerGestores(){\n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerUsuarios();\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function listarAdmin()\n {\n $sql = \"SELECT US.nombre,CO.problema,CO.tipo_problema,CO.solucion, CO.modo_contacto, CO.tipo_estado \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado = 'Ejecutado'\";\n return ejecutarConsulta($sql);\n\n }", "function showPermisosWithSistema()\r\n\t{\r\n\t\t$valuesPermisos = $this->Permiso->find('all');\r\n\t\t\r\n\t\tforeach ($valuesPermisos as $value)\r\n\t\t{\r\n\t\t\t$resultadoPermisos[$value['Permiso']['id']]= \"Permiso: \".$value['Permiso']['tipo_permiso'].\". Sistema: \".$value['Sistema']['nombre_sistema'] ;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn $resultadoPermisos;\r\n\t}", "function ListarPermiso()\n\t{\n\t\t$sql = \"SELECT * FROM permiso\";\n\t\treturn EjecutarConsulta($sql);\n\t}", "function listarUoFuncionario(){\r\n\t\t$this->objParam->defecto('ordenacion','FUNCIO.desc_funcionario1');\r\n\t\t$this->objParam->defecto('dir_ordenacion','asc');\r\n\t\t\r\n\t\t//crea el objetoFunSeguridad que contiene todos los metodos del sistema de seguridad\r\n\t\tif ($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\r\n\t\t\t$this->objReporte=new Reporte($this->objParam, $this);\r\n\t\t\t$this->res=$this->objReporte->generarReporteListado('MODUoFuncionario','listarUoFuncionario');\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//obtiene el parametro nodo enviado por la vista\r\n\t\t\t$id_uo=$this->objParam->getParametro('id_uo');\r\n\t\t\t$this->objParam->addParametro('id_uo',$id_uo);\r\n\t\t\t//$this->objParam->addParametro('id_subsistema',$id_subsistema);\r\n\t\t\t$this->objFunSeguridad=$this->create('MODUoFuncionario');\r\n\t\t\t//ejecuta el metodo de lista funcionarios a travez de la intefaz objetoFunSeguridad\r\n\t\t\t$this->res=$this->objFunSeguridad->listarUoFuncionario($this->objParam);\r\n\t\t\t\r\n\t\t}\r\n\t\t//imprime respuesta en formato JSON para enviar lo a la interface (vista)\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t}", "public function Listar(){\n\t\t\t$view_agendamento = new ViewAgendamentoPacienteFuncionarioClass();\n\n\t\t\t//Chama o método para selecionar os registros\n \n \n \n\t\t\treturn $view_agendamento::Select();\n\t\t}", "public function index()\n {\n\n return $this->facilitie->all();\n\n }", "public function listarUsuarios()\r\n\t{\r\n\t\t$administradores=array();\r\n\t\ttry{\r\n\t\t\t//realizamos la consulta de todos los items\r\n\t\t\t$consulta = $this->db->prepare(\"select * from administrador\");\r\n\t\t\t$consulta->execute();\r\n\t\t\tfor($i=0; $row = $consulta->fetch(); $i++)\r\n\t\t\t{\r\n\t\t $fila['admin_cedula']=$row['ADMIN_CEDULA'];\r\n\t\t\t$fila['admin_login']=$row['ADMIN_LOGIN'];\r\n\t\t\t$fila['admin_nombre']=$row['ADMIN_NOMBRE'];\r\n\t\t\t$fila['admin_apellido']=$row['ADMIN_APELLIDO'];\r\n\t\t\t$fila['admin_status']=$row['ADMIN_STATUS'];\r\n\t\t\t$administradores[]=$fila;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tcatch(PDOException $e)\r\n\t\t{\r\n\t\t\techo $e;\r\n\t\t}\r\n\t\treturn $administradores;\t\t\r\n\t}", "function afficherAdmins(){\n\t\t$sql=\"SElECT * From administrateur\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\n\t}", "public function getUtilisateurs();", "public static function getAdministateurs()\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_UTIL_TYPE);\r\n \r\n // Ajout des variables\r\n $requete->bindParam(':type', self::$TYPE_ADMIN, \\PDO::PARAM_STR);\r\n \r\n // Exécute la requête\r\n $requete->execute();\r\n \r\n // Sauvegarde les lignes retournées.\r\n $adminBD = $requete->fetchAll();\r\n \r\n // Créé la liste des départements.\r\n for ($i = 0; $i < count($adminBD); $i ++) {\r\n $admins[$i] = new Utilisateur($adminBD[$i]->login, $adminBD[$i]->mdp, $adminBD[$i]->email, $adminBD[$i]->type, $adminBD[$i]->idAvatar, $adminBD[$i]->idLangue);\r\n }\r\n \r\n // Retourne la listes des départements.\r\n return isset($admins) ? $admins : null;\r\n }", "function listarRegistrosGruposAtivos() {\n\t\treturn $this->listarRegistrosGrupos(array(\"gu_status_registro = 'A' \"));\n\t}", "public function getUsuarios(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraUsuarios\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM usuarios \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM usuarios LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function ConsultarAsistenciaDiarias()\n {\n try {\n $datos = $_REQUEST;\n $filtros = array_filter($datos);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n if($filtros['permiso'] != 1) {\n $id = $dbm->BuscarIProfesorTitular($filtros['grupoid']);\n if(!$id) {\n return new View(\"No se han encontrado profesores en el grupo consultado\", Response::HTTP_PARTIAL_CONTENT);\n }\n\n $usuario = $dbm->getRepositorioById('Usuario', 'profesorid', $id[0][\"profesorid\"]);\n if(!$usuario) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n \n }\n if($usuario->getUsuarioid() != $filtros['usuarioid']) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n }\n } \n $respuesta = $this->asistenciasDiarias($filtros, $dbm);\n if($respuesta['error']) {\n return new View($respuesta['mensaje'], Response::HTTP_PARTIAL_CONTENT);\n }\n return new View($respuesta, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "public function listar()\n {\n $sql = \"SELECT CO.idconsulta, US.nombre, US.area, US.email, CO.problema, CO.tipo_problema,CO.estado, CO.tipo_estado,date(CO.fecha_hora) as fecha \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado IN ('Pendiente','En Proceso') AND CO.condicion=''\";\n return ejecutarConsulta($sql);\n\n }", "function getPlantaUsuarios()\r\n\t{\r\n\t\treturn $this->Usuario->find('all',array('conditions' => array('Usuario.planta' => 1)));\r\n\t}", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function index()\n {\n //\n return DetalleProporcionPaciente::all();\n }", "public static function getAdministratorsFromDB(){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n $query = \"SELECT *\r\n FROM \t AMMINISTRATORE;\";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n $i=0;\r\n $amministratori= array();\r\n foreach($resQuery[\"response\"] as $row ){\r\n $utente_registrato = Utente_registrato::getRecordInDB($row[0]);\r\n $amministratori[$i] = $utente_registrato;\r\n $i++;\r\n }\r\n return $amministratori;\r\n }", "public function index()\n {\n $tipousuarios = TipoUsuario::all();\n return $tipousuarios;\n }", "public function utilidadAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArmensaViajesBundle:Viaje')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function acessos()\n {\n $infraestruturas = Infraestrutura::all()->where('resposta', '=', 'Pendente');\n return view('admin.infraestruturas.acessos', ['infraestruturas' => $infraestruturas]);\n\n }", "public function index()\n {\n $usuarios = dev_Usuario::get();\n return $usuarios;\n }", "public function consultaEmpresas() {\n\t\t\treturn $this->entidad->getRepository('\\Entidades\\Expertos\\UsuariosEmpresa')->findBy(array('estado' => 1));\n\t\t}", "public function index()\n {\n if(auth('api')->user()->hasRole('superadmin')){\n $permisions = Permission::paginate(10);\n foreach($permisions as $key => $value){\n $permisions[$key]['role'] = $value->getRoleNames();\n $permisions[$key]['count'] = count($value->getRoleNames());\n }\n return $permisions;\n }\n }", "public function getPreguntas() {\n $arrayPreguntas = Pregunta::all();\n\n if(Auth::check() ) {\n $usuario = Auth::user();\n } else {\n $usuario = \"anonimo\";\n }\n\n // return view('imprimir.preguntas', compact(\"usuario\", \"arrayPreguntas\"));\n \n // PRUEBAS \n $arraymujeres = Mujer::all();\n\n return view('imprimir.mujeres', compact(\"usuario\", \"arraymujeres\"));\n }", "function listarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_sel';\r\n\t\t$this->transaccion='tgv_SERVIC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_servicio','int4');\r\n\t\t$this->captura('estado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_lugar_destino','int4');\r\n\t\t$this->captura('id_ep','int4');\r\n\t\t$this->captura('fecha_asig_fin','date');\r\n\t\t$this->captura('fecha_sol_ini','date');\r\n\t\t$this->captura('descripcion','varchar');\r\n\t\t$this->captura('id_lugar_origen','int4');\r\n\t\t$this->captura('cant_personas','int4');\r\n\t\t$this->captura('fecha_sol_fin','date');\r\n\t\t$this->captura('id_funcionario','int4');\r\n\t\t$this->captura('fecha_asig_ini','date');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_funcionario','text');\r\n\t\t$this->captura('desc_lugar_ini','varchar');\r\n\t\t$this->captura('desc_lugar_des','varchar');\r\n\t\t$this->captura('id_funcionario_autoriz','int4');\r\n\t\t$this->captura('observaciones','varchar');\r\n\t\t$this->captura('desc_funcionario_autoriz','text');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//echo '--->'.$this->getConsulta(); exit;\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function getCorporativos() {\n $this->consulta = \"SELECT usuario.idUsuario, usuario.idCorporativo, \n corporativo.razonSocial, usuario.login, \n usuario.fechaHoraUltIN, usuario.estado \n FROM usuario \n INNER JOIN corporativo ON usuario.idCorporativo = corporativo.idCorporativo \n WHERE usuario.tipoUsuario = 'Cliente Corporativo'\";\n if ($this->consultarBD() > 0) {\n $this->mensaje = 'Seccion Usuarios Corporativos <br> Registros Encontrados: <b>' . count($this->registros) . '</b>';\n return true;\n } else {\n return false;\n }\n }", "public function index()\n {\n return Acciones_proyecto::with([\"especificas\"=>function($q){\n $q->with([\"ordinario\"=>function($qq){\n $qq->with([\"movimientos\",\"partida\",\"ae\"])->orderBy(\"fecha\",\"DESC\");\n }]);\n }])->get();\n }", "public function listarPreg(){\n $consulta = $this->ejecutar(\"SELECT * FROM cappiutep.t_usuario_pregunta WHERE id_usuario = '$this->IdUser'\");\n while($data = $this->getArreglo($consulta))$datos[] = $data;\n return $datos;\n }", "public function rodapeListEmpresa(){\n \t$empresaInfos = Empresainfo::all();\n \treturn view('adm.configuracoes.rodape', compact('empresaInfos')); \t\n }", "function getUsuarios(){\n\t\n\t\treturn conectar()->query( \"SELECT * FROM usuarios\");\n\t}", "public function get_filtros(){\n\t\treturn Filtro::get();\n\t}", "public function consultaPermisos() {\n\t\t\treturn $this->entidad->getRepository('\\Entidades\\Expertos\\Permisos')->findBy(array('estado' => 1), array('nombre' => 'ASC'));\n\t\t}", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\n\t}", "public function index()\n {\n $locales = Local::orderBy('Nombre')->paginate(15);\n $permisos = DB::table('permisos')\n ->where('CodGrupo', '=', auth()->user()->CodGrupo)\n ->select('*')\n ->get();\n return view('local.lista_local', ['locales' => $locales, 'permisos' => $permisos]);\n }", "public function list_resources()\n {\n $acceso = (new loginController)->check_session('Proveedores');\n\n if($acceso == 'permitir') {\n $modulo = 'Lista de proveedores';\n return view('proveedores.proveedores_show', compact('modulo'));\n } else if($acceso == 'denegar') {\n return redirect('/');\n } else {\n return redirect('/login/');\n }\n \n }", "public function vistaFormularioUsuarioAction(){\n $em = $this->getDoctrine()->getManager();\n $empresas = $em->getRepository('TheClickCmsAdminBundle:Empresa')->findAll();\n\n\t return $this->render('TheClickCmsAdminBundle:Default:agregarUsuarios.html.twig' , array('empresa' => $empresas));\n\t}", "public function consultar_configuracion(){\n $listado = [];\n #Recorro la jornada....\n $resultados = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false))->get(\"configuracion_reservaciones\");\n foreach ($resultados as $clave => $valor) {\n $valores = $valor;\n $listado[]= $valores;\n }\n return $valores;\n }", "public function get_usuarios()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = \"SELECT * FROM usuarios\";\n\n\t\t\t$resultado = $this->db->prepare($sql);\n\n\t\t\tif(!$resultado->execute())\n\t\t\t{\n\t\t\t\techo \"<h1 class='text-danger bg-danger'>Falla en la consulta</h1>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile($reg = $resultado->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->usuarios[] = $reg;\n\t\t\t\t}\n\n\t\t\t\treturn $this->usuarios;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie(\"Error: {$e->getMessage()}\");\n\t\t}\n\t}", "private function getPermisosBotonera()\n\t{\n\t\t$auth = new Zend_Session_Namespace('veoliaZend_Auth');\t\n\t\t$rol = Zend_Registry::get('role');\n\t\t$permisos = array();\n\t\t$permisos[\"edit\"] = ($auth->_acl->isAllowed($rol,\"default:tipoagrupacion\",\"edit\"))? true : false;\n\t\t$permisos[\"add\"] = ($auth->_acl->isAllowed($rol,\"default:tipoagrupacion\",\"add\"))? true : false;\n\t\t$permisos[\"delete\"] = ($auth->_acl->isAllowed($rol,\"default:tipoagrupacion\",\"delete\"))? true : false;\n\t\t$permisos[\"menulateral\"] = ($auth->_acl->isAllowed($rol,\"default:tipoagrupacion\",\"menulateral\"))? true : false;\n\t\t$permisos[\"detail\"] = ($auth->_acl->isAllowed($rol,\"default:tipoagrupacion\",\"detail\"))? true : false;\n\t\treturn $permisos;\n\t}", "private function cargar_parametros_familias(){\n $sql = \"SELECT id,codigo,descripcion FROM mos_requisitos_familias ORDER BY orden\";\n $columnas_fam = $this->dbl->query($sql, array());\n return $columnas_fam;\n }", "public function listarc()\n {\n $sql = \"SELECT * FROM miembros \n \";\n\n return ejecutarConsulta($sql);\n }", "public function accionIndex(){\n \n if(!Sistema::app()->acceso()->hayUsuario()){\n Sistema::app()->paginaError(400,\"Solos los usuarios registrados pueden acceder\");\n exit;\n }\n\n //llega el pase de la pelicula\n $codPase = intval($_GET[\"id\"]);\n \n //obtener las entradas compradas para ese pase, esa pelicula y esa hora\n $entUsuarios = new Entradas_usuarios();\n $pasePelicula = new Pases_peliculas();\n $sala = new Salas();\n $asientos = new Asientos();\n $entAnonimos = new Entradas_anonimos();\n \n \n $pasePelicula->buscarPorId($codPase);//CONTROLAR QUE EXISTE.\n //CONTROLAR TAMBIEN SI HA CADUCADO.\n \n //obtengo la sala donde se proyecta ese pase\n $sala->buscarPorId($pasePelicula->cod_sala);\n \n \n $opFil[\"select\"] = \"cod_asiento, fila, columna\";\n $opFil[\"where\"] = \"t.cod_sala =\".$pasePelicula->cod_sala;\n $opFil[\"order by\"] = \"fila, columna\";\n \n $totalAsientos = $asientos->buscarTodos($opFil);\n \n //tengo todos las entradas para ese pase.\n $opFiltrado[\"where\"] = \"t.cod_pase_pelicula = \".$codPase;\n $entradasUsu = $entUsuarios->buscarTodos($opFiltrado);\n $entradasAnon = $entAnonimos->buscarTodos($opFiltrado);\n \n $filas = $sala->n_filas;\n $columnas = $sala->n_columnas;\n $capacidad = $sala->capacidad;\n \n \n $asientosOcupados = [];\n \n //Si no hay entradas compreadas para este pase, no se ejecuta ---\n \n if(!empty($entradasUsu)||!empty($entradasAnon)){\n $asientosOcupados = $this->asientosOcupados($entradasUsu, $entradasAnon);\n }\n \n //if(!empty($entradasAnonimos)){\n // $asientosOcupados2 = $this->asientosOcupados($entradasAnonimos);\n // var_dump($asientosOcupados2);\n //}\n \n if(isset($_POST[\"butacas\"])){\n \n //llega el imput que almacena en un string creado en js\n //con un string con todos los asientos seleccionados\n $asientosSel = explode(\",\", $_POST[\"butacas\"]);\n \n Sistema::app()->sesion()->set(\"butacas\",$asientosSel);\n Sistema::app()->sesion()->set(\"codPase\",$codPase);\n \n Sistema::app()->irAPagina(array(\"entradasUsuarios\",\"mostrarResumen\"));\n exit;\n }\n \n \n $this->dibujaVista(\"mostrarCine\",array(\"asientosOcupados\"=>$asientosOcupados,\n \"filas\"=>$filas,\n \"cols\"=>$columnas,\n \"codPase\"=>$codPase,\n \"codAsientos\"=>$totalAsientos\n ),\n \"CINES MELERO\");\n \n \n \n }", "function listarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_sel';\n\t\t$this->transaccion='DIR_EMP_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_empresa','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('tipo_sociedad','varchar');\n\t\t$this->captura('actividad','text');\n\t\t$this->captura('actividad_esp','varchar');\n\t\t$this->captura('nit','varchar');\n\t\t$this->captura('actividad_gral','varchar');\n\t\t$this->captura('domicilio','text');\n\t\t$this->captura('matricula','int8');\n\t\t$this->captura('renovado','int4');\n\t\t$this->captura('actividad_prim','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('departamento','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('municipio','varchar');\n\t\t$this->captura('estado_matricula','varchar');\n\t\t$this->captura('mail','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function get_servicios_web_ofrecidos()\n\t{\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\titem as servicio_web,\n\t\t\t\tnombre\n\t\t\tFROM apex_item\n\t\t\tWHERE\n\t\t\t\tproyecto = '{$this->get_id()}'\n\t\t\t\tAND solicitud_tipo = 'servicio_web'\n\t\t\tORDER BY item;\n\t\t\";\n\t\treturn $this->get_db(true)->consultar($sql);\n\t}", "public function getResidenciales() {\n $this->consulta = \"SELECT\n `usuario`.`idUsuario`,\n CONCAT(`empleado`.`primerNombre`, ' ', `empleado`.`segundoNombre`) AS nombres, \n CONCAT(`empleado`.`primerApellido`, ' ', `empleado`.`segundoApellido`) AS apellidos, \n `usuario`.`idResidencial`,\n `usuario`.`login`,\n `usuario`.`fechaHoraUltIN`,\n `usuario`.`estado`\n\n FROM\n `usuario`\n INNER JOIN `empleado` ON `usuario`.`idEmpleado` = `empleado`.`idEmpleado`\n WHERE\n `usuario`.`tipoUsuario` = 'Empleado'\";\n if ($this->consultarBD() > 0) {\n $this->mensaje = 'Seccion Usuarios Residenciales <br> Registros Encontrados: <b>' . count($this->registros) . '</b>';\n return true;\n } else {\n return false;\n }\n }", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function buscarCedulaAdmin($usuario)\r\n\t{\r\n\t\t$filas=array();\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$consulta = $this->db->prepare(\"SELECT * FROM administrador where admin_login='$usuario'\");\r\n\t\t\t$consulta->execute();\r\n\t\t\tfor($i=0; $row = $consulta->fetch(); $i++)\r\n\t\t\t{\r\n\t\t\t\t$fila['admin_cedula']=$row['ADMIN_CEDULA'];\r\n\t\t\t\t$filas[]=$fila;\r\n\t\t\t}\r\n\t\t}\t\t\t\t\r\n\t\tcatch(PDOException $e)\r\n\t\t{\r\n\t\t\techo $e;\r\n\t\t}\r\n\t\t\r\n\t\treturn $filas;\r\n\t}", "public function index(){\n $departamentos=CfgDepartamento::with(['director','contador'])->get(); \n //$user=new SegUsuario();\n //Obtiene la lista de usuarios que pueden ser asignados como administradores (Que no estan asignados a una region)\n //$usuarios = $user->selectQuery(HPMEConstants::USUARIO_REGION_QUERY, array());\n return view('departamentos',array('items'=>$departamentos));\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 }", "public function buscarUsuarios(){\n\t\t}", "function listaRuta()\r\n\t{\t\r\n\t\t$query = \"SELECT * FROM \" . self::TABLA . \";\";\r\n\t\treturn parent::listaRegistros( $query );\r\n\t}", "private function getListaUsuarioAutorizado()\r\n\t {\r\n\t \treturn [\r\n\t \t\t'adminteq',\r\n\t \t\t'pfranco',\r\n\t \t\t'kperez',\r\n\t \t];\r\n\t }", "function getRegistros() {\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->getDetalleRegistros($this->extra[\"monitor_id\"], $this->extra[\"pagina\"]);\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t$sql = \"SELECT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t pg_escape_string($current_usuario_id).\", \".\n\t\t\t pg_escape_string($this->objetivo_id).\", '\".\n\t\t\t pg_escape_string($this->timestamp->getInicioPeriodo()).\"','\".\n\t\t\t pg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t//print($sql);\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\t\t$monitor_ids = array();\n\t\twhile($row = $res->fetchRow()) {\n\t\t\t$monitor_ids[] = $row[\"nodo_id\"];\n\t\t}\n\n\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\tif (count($monitor_ids) == 0) {\n\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\treturn;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\n\t\t/* LISTA DE MONITORES */\n\t\t$orden = 1;\n\t\tforeach ($monitor_ids as $monitor_id) {\n\t\t\t$T->setVar('__contenido_id', 'reg_'.$monitor_id);\n\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleRegistros($monitor_id, 1, $orden));\n\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t$orden++;\n\t\t}\n\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "function retourneListeAdministrateurs(){\n\tglobal $connexion; // on définie la variables globale de connection dans la fonction\n\t\n\t$utilisateurs = array();\n\t$requete = $connexion->query(\"SELECT * FROM utilisateur WHERE type='1' OR type='2'\");\n\t$requete->setFetchMode(PDO::FETCH_OBJ);\n\twhile($enregistrement = $requete->fetch()){\n\t\t$utilisateurs[] = $enregistrement; // on ajoute à $utilisateurs[n+1] un objet utilisateur\n\t}\n\treturn $utilisateurs;\n}", "public function listar()\n {\n return $this->request('GET', 'unidadesmedida');\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 ComandoConsultarPParticulares()\n\t{\n\t\t$lineaComando = $this->ConstruirComando(SP_PParticulares);\n\t\t$lineaComando = $lineaComando . $this->_cierre;\n\t\t//echo \"Comando: \".$lineaComando;\n\t\t//var_dump($lineaComando);\n\t\treturn $lineaComando;\n\t}", "function listarRegistrosGruposInativos() {\n\n\t\treturn $this->listarRegistrosGrupos(array(\"gu_status_registro = 'I' \"));\n\t}", "public function vistaUsuariosController(){\n //Se envia la consulta al model para que regrese la informacion\n $respuesta = Datos::vistaUsuariosModel();\n //y esta es enviada a la vista para ser procesada y mostrada.\n return $respuesta;\n }", "function index_usuarios() {\n\t\t$conditions = array('Administrativo.perfil >' => '0'); \n\t\t$order = array('Administrativo.nombre' => 'ASC');\n\t\t$administrativos=$this->Administrativo->find('all', array ('conditions' => $conditions, 'order' => $order));\t\t\n\t\t$perfil=$this->Perfil->find('all');\n\t\tforeach ($perfil as $p){\n\t\t\t$perfiles[$p['Perfil']['id']]=$p['Perfil']['perfil'];\n\t\t}\n\t\t$perfiles[0]='SuperAdministrador';\n\t\t$this->set('perfiles', $perfiles);\n\t\t$this->set('administrativos', $administrativos);\n\t}", "public function index()\n {\n //\n $distritos = Distritos::get();\n return DistritoResource::collection($distritos);\n }", "public function usuarios()\n {\n $parametros = Input::only('term');\n\n $data = SisUsuario::with(\"SisUsuariosGrupos\", \"SisUsuariosContactos\")->where(function($query) use ($parametros) {\n $query->where('nombre','LIKE',\"%\".$parametros['term'].\"%\")\n ->orWhere('email','LIKE',\"%\".$parametros['term'].\"%\");\n });\n\n $data = $data->get();\n return $this->respuestaVerTodo($data);\n }", "public function index()\n\t{\n\t\t$sys_sis_llave = 'DASHBOARD';\n\t\t$datos = array();\n\t\t$datos['sys_sistemas'] = SysGrupoModulo::all();\n\t\t$datos['sys_activo'] = SysGrupoModulo::findByKey($sys_sis_llave);\n\t\t$uri = $datos['sys_activo']->uri;\n\t\t$datos['usuario'] = Sentry::getUser();\n\t\t$datos['sys_mod_activo'] = null;\n\n\t\tif($datos['usuario']->claveUnidad){\n\t\t\t$unidades = explode('|',$datos['usuario']->claveUnidad);\n\t\t\t$unidad_responsable = UnidadResponsable::whereIn('clave',$unidades)->get();\n\t\t\t$unidades_seleccionadas = array();\n\t\t\tforeach ($unidad_responsable as $unidad) {\n\t\t\t\t $unidades_seleccionadas[] = $unidad->clave . ' ' . $unidad->descripcion;\n\t\t\t}\n\t\t\t$datos['unidad_responsable'] = implode('<br>',$unidades_seleccionadas);\n\t\t}else{\n\t\t\t$datos['unidad_responsable'] = 'Asignado a todas las Unidades';\n\t\t}\n\n\t\t$conteo_proyectos = Proyecto::select('idClasificacionProyecto',DB::raw('count(proyectos.id) AS conteoProyecto'))\n\t\t\t\t\t\t\t\t\t->where('idEstatusProyecto','=',5)\n\t\t\t\t\t\t\t\t\t->groupBy('idClasificacionProyecto');\n\t\t//\n\t\tif($datos['usuario']->proyectosAsignados){\n\t\t\tif($datos['usuario']->proyectosAsignados->proyectos){\n\t\t\t\t$proyectos = explode('|',$datos['usuario']->proyectosAsignados->proyectos);\n\t\t\t\t$conteo_proyectos = $conteo_proyectos->whereIn('proyectos.id',$proyectos);\n\t\t\t}\n\t\t}\n\n\t\tif($datos['usuario']->claveUnidad){\n\t\t\t$unidades = explode('|',$datos['usuario']->claveUnidad);\n\t\t\t$conteo_proyectos = $conteo_proyectos->whereIn('unidadResponsable',$unidades);\n\t\t}\n\n\t\t$conteo_proyectos = $conteo_proyectos->get();\n\n\t\t$lista_estatus = EstatusProyecto::all();\n\n\t\t$mes = Util::obtenerMesActual();\n\t\t$anio = Util::obtenerAnioCaptura();\n\t\t$mes_trimestre = Util::obtenerMesTrimestre();\n\n\t\tif($mes){\n\t\t\t$datos['mes'] = Util::obtenerDescripcionMes($mes);\n\t\t\t$datos['anio'] = $anio;\n\n\t\t\tif($mes == 1){\n\t\t\t\t$datos['mes_info'] = Util::obtenerDescripcionMes(12);\n\t\t\t\t$datos['anio_info'] = $anio-1;\n\t\t\t}else{\n\t\t\t\t$datos['mes_info'] = Util::obtenerDescripcionMes($mes-1);\n\t\t\t\t$datos['anio_info'] = $anio;\n\t\t\t}\n\t\t}else{\n\t\t\t$datos['mes'] = 'No disponible';\n\t\t\t$datos['anio'] = $anio;\n\n\t\t\t$mes_info = date('n')-1;\n\t\t\t$anio_info = $anio;\n\t\t\tif($mes_info == 0){ \n\t\t\t\t$mes_info = 12;\n\t\t\t\t//$anio_info = $anio-1;\n\t\t\t}\n\t\t\t$datos['mes_info'] = Util::obtenerDescripcionMes($mes_info);\n\t\t\t$datos['anio_info'] = $anio_info;\n\t\t}\n\t\t$datos['mes_activo'] = $mes;\n\t\t$datos['mes_trimestre'] = $mes_trimestre;\n\t\t$datos['clasificaciones'] = array(1=>'Institucionales',2=>'Inversión');\n\t\t\n\t\t$total_proyectos = array(1=>0, 2=>0);\n\t\t\n\t\tforeach ($conteo_proyectos as $proyecto) {\n\t\t\t$total_proyectos[$proyecto->idClasificacionProyecto] += $proyecto->conteoProyecto;\n\t\t}\n\n\t\t$datos['total_proyectos'] = $total_proyectos;\n\n\t\t$permisos = array();\n\t\t$grupos = array(\n\t\t\t\t'RENDCUENTA.RENDINST.R','RENDCUENTA.RENDINV.R','RENDCUENTA.RENDPROG.R','RENDCUENTA.RENDFASSA.R','VISORGEN.VIPROYINST.R'\n\t\t\t);\n\t\tif(Sentry::hasAnyAccess($grupos)){\n\t\t\tforeach ($grupos as $grupo) {\n\t\t\t\tif(Sentry::hasAccess($grupo)){\n\t\t\t\t\t$grupo = explode('.',$grupo);\n\t\t\t\t\t$permisos[$grupo[1]] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$datos['permisos'] = $permisos;\n\n\t\treturn View::make($uri)->with($datos);\n\t}", "public function getDocentes(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraDocentes\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM empleados \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM empleados LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function indexAction()\n {\n $helpers = $this->get(\"app.helpers\");\n\n $em = $this->getDoctrine()->getManager();\n\n $salarios = $em->getRepository('JHWEBConfigBundle:CfgSmlmv')->findBy(\n array('activo' => true)\n );\n\n $response['data'] = array();\n\n if ($salarios) {\n $response = array(\n 'status' => 'success',\n 'code' => 200,\n 'message' => count($salarios).' Registros encontrados.', \n 'data'=> $salarios,\n );\n }\n\n return $helpers->json($response);\n }", "private function _consulta_facturas( $request ){\n #debuger($request->all());\n if( Session::get('id_rol') == 1 ){\n\n $data = $this->_tabla_model::with([\n 'clientes'\n ,'contactos'\n ,'usuarios' => function( $query ) use ($request){\n if (isset($request->usuario)) {\n $data = $query->where(['id' => $request->usuario ]);\n }else{\n $data = $query;\n }\n return $data->groupBy('id_facturacion')->get();\n }\n ,'estatus'\n ,'conceptos' =>function($query){\n return $query->with(['productos','planes']);\n },'empresas' => function($query){\n return $query->groupBy('id_facturacion');\n }]);\n if( isset( $request->mes ) && $request->mes != 13 ){\n $response = $data->whereMonth('created_at','=', $request->mes );\n }\n if( !isset( $request->mes ) ){\n $response = $data->whereMonth('created_at','=', date('m') );\n }\n\n if( !isset( $request->anio ) ){\n $response = $data->whereYear('created_at','=', date('Y') );\n }\n if( isset( $request->anio ) ){\n $response = $data->whereYear('created_at','=', $request->anio );\n }\n $response = $data->orderby('id','desc')->get();\n $datos = [];\n foreach ($response as $respuesta) {\n if ( count($respuesta->usuarios) > 0 ){\n $datos[] = $respuesta;\n }\n }\n return $datos;\n\n }\n if( Session::get('id_rol') == 3 ){\n \n $data = SysEmpresasModel::with([\n 'facturaciones' => function($query) use ( $request ){\n $data = $query->with([\n 'clientes'\n ,'contactos'\n ,'usuarios' => function($query) use ($request){\n if (isset($request->usuario)) {\n $data = $query->where(['id' => $request->usuario ]);\n }else{\n $data = $query;\n }\n return $data->groupBy('id_facturacion')->get();\n }\n ,'estatus'\n ,'conceptos' =>function($query){\n return $query->with(['productos','planes']);\n },'empresas' => function($query){\n return $query->where(['id' => Session::get('id_empresa')])->groupBy('id_facturacion');\n }]);\n if( isset( $request->mes ) && $request->mes != 13 ){\n $response = $data->whereMonth('sys_facturaciones.created_at','=', $request->mes );\n }\n if( !isset( $request->mes ) ){\n $response = $data->whereMonth('sys_facturaciones.created_at','=', date('m') );\n }\n if( !isset( $request->anio ) ){\n $response = $data->whereYear('sys_facturaciones.created_at','=', date('Y') );\n }\n if( isset( $request->anio ) ){\n $response = $data->whereYear('sys_facturaciones.created_at','=', $request->anio );\n }\n return $response->groupby('id')->orderby('id','desc')->get();\n }])\n ->where(['id' => Session::get('id_empresa')])\n ->get();\n $datos = [];\n foreach ($data[0]->facturaciones as $respuesta) {\n if ( count($respuesta->usuarios) > 0 ){\n $datos[] = $respuesta;\n }\n }\n \n return $datos;\n #return $data[0]->pedidos;\n\n }else if( Session::get('id_rol') != 3 && Session::get('id_rol') != 1){\n\n $data = SysUsersModel::with([\n 'facturaciones' => function($query) use ($request){\n $data = $query->with([\n 'clientes'\n ,'contactos'\n ,'usuarios' => function($query) use ($request){\n return $query->groupBy('id_facturacion');\n }\n ,'estatus'\n ,'conceptos' =>function($query){\n return $query->with(['productos','planes']);\n },'empresas' => function($query) {\n return $query->where(['id' => Session::get('id_empresa')])->groupBy('id_facturacion');\n }]);\n if( isset( $request->mes ) && $request->mes != 13 ){\n $response = $data->whereMonth('sys_facturaciones.created_at','=', $request->mes );\n }\n if( !isset( $request->mes ) ){\n $response = $data->whereMonth('sys_facturaciones.created_at','=', date('m') );\n }\n if( !isset( $request->anio ) ){\n $response = $data->whereYear('sys_facturaciones.created_at','=', date('Y') );\n }\n if( isset( $request->anio ) ){\n $response = $data->whereYear('sys_facturaciones.created_at','=', $request->anio );\n }\n return $response->groupby('id')->orderby('id','desc')->get();\n }])\n ->where(['id' => Session::get('id')])\n ->get();\n $datos = [];\n foreach ($data[0]->facturaciones as $respuesta) {\n if ( count($respuesta->empresas) > 0 ){\n $datos[] = $respuesta;\n }\n }\n return $datos;\n \n }\n \n \n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminBundle:FuncionarioEmpresa')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function listarUsua(){\n\t\t$sql=\"SELECT USUARI_ID, USUARI_NOMBRES, USUARI_USUARIO\n\t\t FROM usuario ORDER BY USUARI_NOMBRES\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function index()\n {\n $perfisId = Auth::user()->roles->pluck('id')->toArray();\n $perfilPermissions = DB::table('role_has_permissions')->whereIn('role_id', $perfisId)->pluck('permission_id')->toArray();\n $userPermissions = Auth::user()->permissions->pluck('id')->toArray();\n\n $permissioesUsuario = array_merge($perfilPermissions,$userPermissions);\n\n $categorias = RelatorioCategoria::where('status','A')->whereHas('relatorios', function ($query) use($permissioesUsuario) {\n $query->where('relatorios.status','A')->whereIn('relatorios.permission_id',$permissioesUsuario)->orderBy('nome');\n })->orderBy('nome')->get();\n return view(\"relatorio.index\",['categorias' => $categorias, 'permissioesUsuario' => $permissioesUsuario]);\n }", "function localidadConsultarxAutor($idAutor, $idEspecie) {\n\t\n\t$localidades = \"\";\n\t\n\t$query = \"SELECT localidades_id, referencias_id, especies_id, id, localidad, localidad_nombre \n\t\t\t\tFROM localidades_distribucion INNER JOIN localidades \n\t\t\t\tWHERE especies_id = $idEspecie AND referencias_id LIKE $idAutor \n\t\t\t\tORDER BY localidad\"; \n\t$res = ejecutarQuerySQL($query);\t\n\t$total = getNumFilas($res);\n\t\n\t$i = 0;\n\twhile ($i < $total) \t{\t\t \t\n\t\t\t$actual = getFila($res);\n\t\t\t\n\t\t\t$localidades = $actual['localidad_nombre'];\n\t\t\tif ($i < $total-1) $localidades = $localidades . \", \"; \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t$i++;\n\t\t} // end while\n\t\n\t\t\t\nreturn $localidades;\n}", "public function listadoConsultasSinPagar(){\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT C.idConsulta, C.fecha, DATE_FORMAT(C.hora, '%H:%i') as hora,\n\t\t\n\t\t\t\t\t\tP.nombre AS nombrePaciente,\n\t\t\t\t\t\t\n\t\t\t\t\t\tPP.idPropietario, PP.identificacion, PP.nombre AS nombre, PP.apellido,\n\t\t\t\t\t\t\n\t\t\t\t\t\tU.nombre AS nombreMedico, U.apellido AS apellidoMedico\n\t\t\n\t\t\t\t\t\tFROM tb_consultas AS C \n\t\t\t\t\t\t\n\t\t\t\t\t\tINNER JOIN tb_mascotas AS P ON P.idMascota = C.idMascota\n\t\t\t\t\t\tINNER JOIN tb_propietarios AS PP ON PP.idPropietario = P.idPropietario\n\t\t\t\t\t\tINNER JOIN tb_usuarios AS U ON U.idUsuario = C.idUsuario\n\t\t\t\t\t\t\n \t\t\t\tWHERE Not C.idConsulta IN (SELECT idTipoDetalle FROM tb_pago_factura_caja_detalle WHERE tipoDetalle = 'Consulta' AND estado = 'Activo' )\n \t\t\t\torder by C.fecha desc, C.hora \";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado;\t\t\n\t}", "function listar_usuarios() {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.*\n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function mostrar_usuaris(){\n $sql = \"SELECT usuaris.id AS id, usuaris.nom AS nom, usuaris.cognoms AS cognoms, usuaris.email AS email,\n usuaris.idrol AS idrol, rols.descrip AS descrip FROM usuaris INNER JOIN rols ON usuaris.idrol = rols.id\";\n \n $query=$this->db->prepare($sql);\n $query->execute();\n $res=$query->fetchAll();\n return $res;\n }", "public function ListarRepartidores()\n{\n\tself::SetNames();\n\t$sql = \" select * from usuarios WHERE nivel = 'REPARTIDOR'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "function getEstadisticaResumen() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t\t$horarios[($this->horario_id*-1)] = new Horario(($this->horario_id*-1));\n\t\t\t$horarios[($this->horario_id*-1)]->nombre = \"Horario Inhabil\";\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\t\t\t$T->setVar('lista_pasos', '');\n\n\t\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n//\t\t\t\t\tprint $sql;\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"rendimiento_resumen_global\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global\"]);\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($horario->horario_id == \"0\" and $xpath->query('//detalle[@paso_orden]/datos/dato')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre', $horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t/* DATOS DE LA TABLA */\n\t\t\t$linea = 1;\n\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t$tag_dato = $xpath->query('//detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/datos/dato')->item(0);\n\t\t\t\tif ($tag_dato == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t$linea++;\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado =$T->parse('out', 'tpl_tabla');\n\t}", "public function show()\n {\n\t $sql = DB::table('relatiemanager as r')\n\t ->select('r.*', 'r.id_rm as id')\n\t\t->get();\n\t\treturn $sql;\n\t\t \n }", "public function index()\n {\n return rutas::get();\n }", "public static function getUtilisateurs()\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_UTIL_TYPE);\r\n \r\n // Ajout des variables\r\n $requete->bindParam(':type', self::$TYPE_USER, \\PDO::PARAM_STR);\r\n \r\n // Exécute la requête\r\n $requete->execute();\r\n \r\n // Sauvegarde les lignes retournées.\r\n $utilBD = $requete->fetchAll();\r\n \r\n // Créé la liste des départements.\r\n for ($i = 0; $i < count($utilBD); $i ++) {\r\n $utils[$i] = new Utilisateur($utilBD[$i]->login, $utilBD[$i]->mdp, $utilBD[$i]->email, $utilBD[$i]->type, $utilBD[$i]->idAvatar, $utilBD[$i]->idLangue);\r\n }\r\n \r\n // Retourne la listes des départements.\r\n return isset($utils) ? $utils : null;\r\n }", "function ComandoConsultarPreguntasFrecuentes()\n\t{\n\t\t$lineaComando = $this->ConstruirComando(SP_PreguntasFrecuentes);\n\t\t$lineaComando = $lineaComando . $this->_cierre;\n\t\t//echo \"Comando: \".$lineaComando;\n\t\treturn $lineaComando;\n\t}", "public function index()\n {\n return Reparticao::all();\n }", "function constroe_campo_administrar(){\n\n// globals\nglobal $idioma;\nglobal $pagina_href;\n\n// valida usuario administrador\nif(retorne_usuario_administrador() == false){\n\n// retorno nulo\nreturn null;\n\t\n};\n\n// titulo\n$titulo = $idioma[18];\n\n// links de administrador\n$links[] = \"<a href='$pagina_href[3]'>$idioma[19]</a>\";\n$links[] = \"<a href='$pagina_href[4]'>$idioma[47]</a>\";\n$links[] = \"<a href='$pagina_href[6]'>$idioma[22]</a>\";\n$links[] = \"<a href='$pagina_href[7]'>$idioma[23]</a>\";\n$links[] = \"<a href='$pagina_href[9]'>$idioma[25]</a>\";\n$links[] = \"<a href='$pagina_href[10]'>$idioma[26]</a>\";\n$links[] = \"<a href='$pagina_href[11]'>$idioma[27]</a>\";\n$links[] = \"<a href='$pagina_href[12]'>$idioma[28]</a>\";\n$links[] = \"<a href='$pagina_href[14]'>$idioma[30]</a>\";\n\n// conteudo\n$conteudo = constroe_links_menu_vertical($links);\n\n// codigo html\n$codigo_html = constroe_menu_navegacao_vertical($titulo, $conteudo);\n\n// retorno\nreturn $codigo_html;\n\n}", "public function indexHistorialAdmin()\n { \n \n $username = $this->getRequest()->getSession()->read('id'); //obtiene el nombre de usuario actualmente logueado\n \n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,13);\n $rolAdecuado = false;\n if($rolActual == 1 || $rolActual == 2){\n $rolAdecuado = true;\n }\n if($resultado != 1 || !$rolAdecuado){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n\n }\n /*Cierra la seguridad*/\n \n $idActual = $this->Solicitudes->getIDUsuario($username); //obtiene el id de usuario actualmente logueado\n \n $todo = $this->Solicitudes->getIndexValues(); //carga el index con todas las solicitudes existentes \n \n \n $this->paginate = [\n 'contain' => ['Usuarios', 'Grupos']\n ];\n $estado = $this->get_estado_ronda();\n $this->set(compact('todo','estado'));\n $this->set('rolActual',$rolActual);\n }", "public static function getUsuarios()\n {\n $query = \"SELECT id,nombre,email,usuario,privilegio,fecha_registro FROM users\";\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->execute();\n\n $filas = $resultado->fetchAll();\n\n return $filas;\n }", "function rec_empresa_list(){\n\t\t}", "public function getBuscarRegistros()\n {\n return $this->repository->menu->getTodosMenus();\n }", "public function index()\n {\n $this->allowedAdminAction();\n\n return $this->showAll(Organizador::all());\n }", "public function indexAsistenciaDiaria()\n {\n try {\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $ciclo = $dbm->getRepositoriosById(\"Ciclo\", \"activo\", 1);\n $nivel = $dbm->getRepositoriosModelo(\"Nivel\", \n [\"d.nivelid, d.nombre\"], \n [[\"nivelid is not null and cn.asistenciapordia = 1 and d.activo = 1 \"]], false, true, [\n [\"entidad\" => \"CeConfiguracionnivel\", \"alias\" => \"cn\", \"left\" => false, \"on\" => \"cn.configuracionnivelid = d.configuracionnivelid\"]\n ]);\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1);\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\n\t\t\t$periodoeval = $dbm->getRepositoriosModelo(\"CePeriodoevaluacion\", [\"d.periodoevaluacionid, d.descripcion, IDENTITY(c.cicloid) as cicloid, GROUPCONCAT(DISTINCT IDENTITY(g.gradoid)) as gradoid\"],\n\t\t\t\t[], false, false, [\n\t\t\t\t[\"entidad\" => \"CeConjuntoperiodoevaluacion\", \"alias\" => \"c\", \"left\" => false, \"on\" => \"c.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n\t\t\t\t[\"entidad\" => \"CeGradoporconjuntoperiodoescolar\", \"alias\" => \"g\", \"left\" => false, \"on\" => \"g.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n ], 'd.periodoevaluacionid');\n $param = $dbm->getRepositorioById('Parametros', 'parametrosid', 156);\n\n\n $array = array(\"ciclo\" => $ciclo, \n \"nivel\" => $nivel, \n \"grado\" => $grado, \n \"semestre\" => $semestre,\n \"grupo\" => $grupo,\n \"periodos\" => $periodoeval,\n \"param\" => $param && $param->getValor() ? intval($param->getValor()) : null\n );\n return new View($array, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "function llamarRegistrosMySQLPlaneServicios() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_mysql(\"Salud\");\n\t\t\t$cons = \"SELECT * FROM Salud.EPS ORDER BY AutoId ASC\";\n\t\t\t$res = mysql_query($cons);\n\t\t\treturn $res; \n\t\t\n\t\t}", "function listarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_sel';\n\t\t$this->transaccion='SNX_HAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_herrajeaccesorio','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('herrajeaccesorio','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function index()\n {\n return UsuarioResource::collection(Usuario::all());\n }", "function listar_familias($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tapp_familia\n\t\t\t\t\t\tWHERE id in\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tselect\n\t\t\t\t\t\t\t\t\tdistinct familia\n\t\t\t\t\t\t\t\tfrom\n\t\t\t\t\t\t\t\t\tapp_productos\n\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\tstatus = 1 and\n\t\t\t\t\t\t\t\t\tfamilia is not null and\n\t\t\t\t\t\t\t\t\tfamilia <>0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }" ]
[ "0.6685429", "0.6644077", "0.66257435", "0.6587123", "0.65055615", "0.6404183", "0.6392657", "0.63387376", "0.6313482", "0.6233679", "0.614075", "0.613282", "0.613", "0.6087136", "0.60679007", "0.60503024", "0.60485876", "0.5980749", "0.59609485", "0.59381795", "0.5934838", "0.5924384", "0.59231645", "0.59160936", "0.59139436", "0.5912846", "0.58655226", "0.58653736", "0.58624417", "0.5859677", "0.5841385", "0.58384824", "0.5835366", "0.58343977", "0.5830856", "0.5827027", "0.5819608", "0.5811112", "0.580851", "0.57851225", "0.57848257", "0.5763104", "0.5758054", "0.5753871", "0.57443154", "0.57414", "0.573574", "0.5732938", "0.5729971", "0.5724371", "0.57178104", "0.57135457", "0.57099485", "0.570934", "0.57048", "0.5702214", "0.5701929", "0.5698057", "0.569645", "0.5694437", "0.56928664", "0.5687885", "0.5681663", "0.5679692", "0.56792575", "0.5676721", "0.5676117", "0.56725436", "0.5672267", "0.567206", "0.5665744", "0.5661701", "0.56593055", "0.5659137", "0.5655491", "0.56551754", "0.5653916", "0.5647244", "0.5646379", "0.5644703", "0.56420535", "0.56408894", "0.56387335", "0.5637826", "0.56320405", "0.56293815", "0.5629176", "0.5627724", "0.56271714", "0.5619509", "0.5619118", "0.5618912", "0.56186384", "0.5616323", "0.5615894", "0.56144357", "0.5614246", "0.56139123", "0.5608771", "0.56068087" ]
0.561657
93
/ Get Filtros Organigrama
public function getFiltroOrganigrama() { $resultado = array(); $sql = " SELECT STRING_AGG(v.unidad_administrativa,',') AS o_resultado FROM ( SELECT CAST(o.unidad_administrativa AS CHARACTER VARYING) FROM cargos c INNER JOIN organigramas o ON c.organigrama_id = o.id WHERE c.baja_logica = 1 GROUP BY o.unidad_administrativa ORDER BY o.unidad_administrativa ) AS v "; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrganismsList();", "function cc_get_agency($rif){\n\t\n\t$rif = (string) trim($rif);\n\t$id = (int) substr($rif, 0, 2);\n\t\n\t// MAP\n\t$agenzie_agenti_user = array();\n\t$agenzie_agenti_user[1] = array( \"fave_property_agency\" => 2788, \"fave_agents\" => 72 , \"post_author\" => 3 );\n\t$agenzie_agenti_user[2] = array( \"fave_property_agency\" => 2786, \"fave_agents\" => 150 , \"post_author\" => 4 );\n\t$agenzie_agenti_user[3] = array( \"fave_property_agency\" => 2790, \"fave_agents\" => 158 , \"post_author\" => 5 );\n\t$agenzie_agenti_user[4] = array( \"fave_property_agency\" => 2784, \"fave_agents\" => 20012 , \"post_author\" => 6 );\n\t$agenzie_agenti_user[5] = array( \"fave_property_agency\" => 2777, \"fave_agents\" => 20016 , \"post_author\" => 7 );\n\t$agenzie_agenti_user[6] = array( \"fave_property_agency\" => 2792, \"fave_agents\" => 156 , \"post_author\" => 2 );\n\t$agenzie_agenti_user[7] = array( \"fave_property_agency\" => 19988, \"fave_agents\" => 20018 , \"post_author\" => 8 );\n\t$agenzie_agenti_user[10] = array( \"fave_property_agency\" => 19992, \"fave_agents\" => 20014 , \"post_author\" => 9 );\n\t$agenzie_agenti_user[11] = array( \"fave_property_agency\" => 19990, \"fave_agents\" => 20020 , \"post_author\" => 10 );\n\t\n\treturn $agenzie_agenti_user[$id];\n\t\n}", "function obtenerFolleto($edicion){\n\t\t$concurso = new Concurso();\n\t\t$res = $concurso->recuperar($edicion);\n\t\treturn $res['folleto'];\n\t}", "function obtenerGastromapa($edicion){\n\t\t$concurso = new Concurso();\n\t\t$res = $concurso->recuperar($edicion);\n\t\treturn $res['gastromapa'];\n\t}", "public function getFamille(){\n\t\t$req = \"select * from famille\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "function ricercaOrdinamento($frasi)\n {\n $parole = array();\n\n foreach ($frasi as $frase)\n {\n $frase = preg_replace(\"/[^a-zA-Z\\ ]/\", \"\", $frase);\n\n $parole = array_merge($parole, explode(\" \", $frase));\n }\n\n $parole = array_count_values(array_map(\"strtolower\", $parole));\n arsort($parole);\n\n return rimozioneNonParole($parole);\n }", "public function getSacadoCidadeUF();", "public function getOrganism() {\n\t\treturn (string)$this->gpml[\"Organism\"];\n\t}", "function get_ubicacion()\n {\n $usuario = consultas::get_pf();\n $dep = consultas::get_dep_habilitada();\n if($usuario == 'acor_mesa')\n {\n if($dep['id_dep'] == 3)\n { //-- 3:Mesa de EyS --//\n $datos['motivo'] = 'and m1.id_motivo = 10'; //-- 10: Salida de Mesa de EyS --//\n $datos['ubicacion'] = 'DPTO. MESA DE EyS';\n $datos['ubi'] = 5;\n $datos['id_motivo'] = '10';\n }\n }elseif($usuario == 'acor_carga')\n {\n if($dep['id_dep'] == 1)\n { //-- 1:Gestion de deudas --//\n $datos['motivo'] = 'and m1.id_motivo = 11'; //-- 10: Salida de Gestion de deudas --//\n $datos['ubicacion'] = 'DIR. GESTION DE DEUDAS';\n $datos['ubi'] = 6;\n $datos['id_motivo'] = '11';\n }\n elseif($dep['id_dep'] == 2)\n { //-- 2:Procuracion y legales --//\n $datos['motivo'] = 'and m1.id_motivo = 12'; //-- 10: Salida de Procuracion y legales --//\n $datos['ubicacion'] = 'DIR. PROCURACION Y LEGALES';\n $datos['ubi'] = 7;\n $datos['id_motivo'] = '12';\n }\n }\n return $datos;\n }", "function cata_getfamilys_adm() {\n\tglobal $db;\n\t//global $familyId;\n\n\t$familys = array();\n\n\t$select = \"\n\t\tSELECT\tf.*, COUNT(id_article) AS nbart\n\t\tFROM\tdims_mod_cata_famille f\n\n\t\tLEFT JOIN\tdims_mod_cata_article_famille af\n\t\tON\t\t\taf.id_famille = f.id\n\n\t\tWHERE f.id_module = {$_SESSION['dims']['moduleid']}\n\n\t\tGROUP BY f.id\n\t\tORDER BY f.id_parent, f.position\";\n\t$result = $db->query($select);\n\twhile ($fields = $db->fetchrow($result)) {\n\t\t$familys['list'][$fields['id']] = $fields;\n\t\t$familys['tree'][$fields['id_parent']][] = $fields['id'];\n\t}\n\n\t//// look for groupid\n\t//if (!isset($familyId)) {\n\t// if (!isset($_SESSION['catalogue']['familyId'])) $_SESSION['catalogue']['familyId'] = $familys['tree'][1][0];\n\t// $familyId = $_SESSION['catalogue']['familyId'];\n\t//}\n\treturn($familys);\n}", "public function getOrganizacionesArray()\n {\n $organizaciones = $this->getOrganizaciones();\n $ArrayOrg = Array();\n if ($organizaciones) {\n foreach ($organizaciones as $org){\n $ArrayOrg[$org['id']] = $org['orgNombre'];\n }\n }\n return $ArrayOrg;\n }", "public function grupo_permiso()\n {\n $parametros = Input::only('term');\n\n $data = Permiso::where(function($query) use ($parametros) {\n $query->where('grupo','LIKE',\"%\".$parametros['term'].\"%\");\n });\n\n $variable = $data->distinct()->select(DB::raw(\"grupo as nombre\"))->get();\n $data = [];\n foreach ($variable as $key => $value) {\n $data[] = $value->nombre;\n }\n\n return $this->respuestaVerTodo($data);\n }", "function get_fakultas(){\n\t}", "function getTiposDocumento(){\r\n\t$tipos_documento[\"I\"]\t= \"Investigaci&oacute;n\";\r\n\t$tipos_documento[\"AV\"]\t= \"Archivo vertical\";\r\n\t$tipos_documento[\"AR\"]\t= \"Art&iacute;culo de revisa\";\r\n\t$tipos_documento[\"L\"]\t= \"Libro\";\r\n\t$tipos_documento[\"R\"]\t= \"Revista\";\r\n\t$tipos_documento[\"T\"]\t= \"Tesis\";\r\n\t$tipos_documento[\"D\"]\t= \"Documento\";\t\r\n\t\r\n\treturn $tipos_documento;\r\n}", "function lib4ridora_get_all_organizational_units() {\n $facet_fields = lib4ridora_parse_affiliation_fields();\n $facets = lib4ridora_facet_query($facet_fields);\n\n $org_units = array();\n\n // If there's results, construct an array where the keys are affiliations\n // as in Solr, and the values are formatted to be labels.\n foreach ($facets as $facet) {\n if (empty($facet)) {\n continue;\n }\n $keys = array_keys($facet);\n $org_units = array_merge($org_units, drupal_map_assoc($keys, 'lib4ridora_org_unit_ucwordss'));\n }\n\n // Sort the array alphanumerically (ignoring lower/upper case):\n $sortAryTmp = array_map( 'strtolower', $org_units );\n array_multisort( $sortAryTmp, SORT_ASC, SORT_STRING, $org_units );\n\n // Return 'all' alongside whatever else.\n return array(\"*\" => t(\"All\")) + $org_units;\n}", "function mostraPerfil($CPF)\n{\n $xml = new DOMDocument();\n $arquivoxml = \"../../db/pacientes.xml\";\n $xml->load($arquivoxml);\n $busca = array();\n $count = 0;\n foreach ($xml->getElementsByTagName('paciente') as $paciente) {\n if ($paciente->getAttribute('CPF') == $CPF) {\n $busca[$count]['nome'] = $paciente->getElementsByTagName('nome')[0]->nodeValue;\n $busca[$count]['email'] = $paciente->getElementsByTagName('email')[0]->nodeValue;\n $busca[$count]['telefone'] = $paciente->getElementsByTagName('telefone')[0]->nodeValue;\n $busca[$count]['CEP'] = $paciente->getElementsByTagName('CEP')[0]->nodeValue;\n $busca[$count]['endNum'] = $paciente->getElementsByTagName('endNum')[0]->nodeValue;\n $busca[$count]['idade'] = $paciente->getElementsByTagName('idade')[0]->nodeValue;\n $busca[$count]['genero'] = $paciente->getElementsByTagName('genero')[0]->nodeValue;\n $count++;\n // break;\n }\n }\n return $busca;\n}", "function GetInfogrupos(){\n\t\t\t$sql =\"SELECT G.grupo, G.salon, G.horario, C.descripcion AS carrera \n\t\t\t\tFROM grupos G INNER JOIN carreras C ON G.carrera = C.codigo;\";\n\t\t\t$this->bd->selectSQL($sql);\n\t\t\tif(!empty($this->bd->rowresult)){\n\t\t\t\treturn $this->bd->rowresult;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "function getAllFromProizvod(){\n\t\treturn $this->ime . \"&nbsp\" . $this->imeProizvođača . \"&nbsp\" \n\t\t. $this->prezimeProizvođača . \"&nbsp\" . $this->cijena;\n\t}", "public function obtenerOrganizador(){\n $sql = \"SELECT uid_agrupamiento FROM \". TABLE_AGRUPAMIENTO .\" WHERE organizador = 1 AND uid_empresa = \". $this->getUID();\n $uid = $this->db->query($sql, 0, 0);\n $uid = ( true === is_countable($uid) && count($uid)>1 ) ? reset($uid) : $uid;\n if( is_numeric($uid) ){\n return new agrupamiento($uid);\n }\n return false;\n }", "public function BuscaOrganizacionalTodosVerMas($tupla)\n {\n $Nivls = \"\";\n \n //print_r($tupla);\n $Resp3 = explode(',', $tupla[id_area]);//, $pieces)\n foreach ($Resp3 as $Fila3) \n { \n $Nivls .= $this->arbol->BuscaOrganizacional(array('id_organizacion' => $Fila3)).\"<br /><br />\";\n }\n if($Nivls!='')\n $Nivls=substr($Nivls,0,strlen($Nivls)-6);\n else\n $Nivls='-- Sin información --';\n \n \n if (strlen($Nivls)>200){\n $string = explode($Nivls, '<br /><br />');\n $valor_final = '';\n foreach ($string as $value) {\n $valor_final .= $value;\n if (strlen($valor_final)>200){\n return substr($valor_final, 0, 200) . '.. <br/>\n <a href=\"#\" tok=\"' .$tupla[id]. '-doc\" class=\"ver-mas\">\n <i class=\"glyphicon glyphicon-search\" href=\"#search\"></i> Ver Mas\n <input type=\"hidden\" id=\"ver-mas-' .$tupla[id]. '-doc\" value=\"'.$Nivls.'\"/>\n </a>';\n }\n $valor_final .= \"<br /><br />\";\n \n }\n \n return substr($Nivls, 0, 200) . '.. <br/>\n <a href=\"#\" tok=\"' .$tupla[id]. '-doc\" class=\"ver-mas\">\n <i class=\"glyphicon glyphicon-search\" href=\"#search\"></i> Ver Mas\n <input type=\"hidden\" id=\"ver-mas-' .$tupla[id]. '-doc\" value=\"'.$Nivls.'\"/>\n </a>';\n }\n //return $tupla[analisis_causal];\n \n return $Nivls;\n\n }", "function fct_titre_page ($mescriteres) {\n\t$titre_page = \"\";\n\tforeach ($mescriteres as $ref => $infoscritere) {\n\t\tif (($infoscritere['code'] >= 0) && ($infoscritere['libelle'] != \"\")) {\n\t\t\tif ($titre_page != \"\") $titre_page .= \", \";\n\t\t\t$titre_page .= $infoscritere['libelle'];\n\t\t}\n\t}\n\tif ($titre_page == \"\") $titre_page = \"Un expert vous aide Ó identifier un arbre\";\n\telse $titre_page = \"Fleurs correspondant Ó : \".$titre_page;\n\treturn $titre_page;\n}", "function searchOrganisme($nom_organisme){\n $query = \"\n SELECT DISTINCT ob.body_value as body, ob.body_summary as bodysum, ob.bundle, ov.field_ville_value as ville, ol.field_lien_url as lien, oa.field_annee_tid, oc.field_carte_lat as lat, oc.field_carte_lon as lon\n FROM obj_field_data_body as ob , obj_field_data_field_ville as ov, obj_field_data_field_lien as ol, obj_field_data_field_annee as oa, obj_field_data_field_carte as oc\n where ob.bundle='expérience' AND ob.entity_id = ov.entity_id AND ob.entity_id = ol.entity_id AND ob.entity_id = oa.entity_id AND oc.entity_id = ob.entity_id AND ov.field_ville_value LIKE 'Par%' ;\n \";\n\n //Prepare la requête\n $request = $this->conn->prepare($query);\n //Execute la requête\n $request->execute();\n return $request;\n }", "function ambil_soal() { \n $tampil = $this->db->query(\"SELECT * FROM IKD.IKD_D_SOAL_QUISIONER ORDER BY KD_SOAL ASC\")->result_array();\n\t\treturn $tampil;\n }", "function Denuncias_tomadas($org_cod_organizacion)\n {\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia INNER JOIN denuncias_organizacion ON denuncia.de_cod_denuncia=denuncias_organizacion.de_cod_denuncia INNER JOIN organizacion ON denuncias_organizacion.org_cod_organizacion=organizacion.org_cod_organizacion WHERE organizacion.org_cod_organizacion=? AND denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($org_cod_organizacion));\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n}", "public function getFkOrganogramaNiveis()\n {\n return $this->fkOrganogramaNiveis;\n }", "function cita_biblica($objeto)\n{\n return $objeto->libro->nombre . ' ' . $objeto->numero_capitulo . ': ' . $objeto->numero_versiculo;\n}", "public function getOrganismeRetraite() {\n return $this->organismeRetraite;\n }", "public function getFiltroGestiones()\n {\n $resultado = array();\n $sql = \"\n SELECT STRING_AGG(v.gestion,',') AS o_resultado FROM ( \nSELECT CAST(c.gestion AS CHARACTER VARYING)\nFROM cargos c\nWHERE c.baja_logica = 1\nGROUP BY c.gestion\nORDER BY c.gestion\n) AS v\n \";\n $this->_db = new Cargos();\n $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql));\n if (count($arr) > 0) {\n /**\n * Para agregar un valor nulo al inicio se añade una coma\n */\n $res = $arr[0]->o_resultado;\n $resultado = explode(\",\", $res);\n }\n return $resultado;\n }", "public function getGrupos(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraGrupos\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM grupos \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM grupos LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "function personas(){ \n $personas = array(\n \"Joan Garcia:12/05/1992:1:1\",\n \"Elena Tomas:24/08/1991:1:2\",\n \"Dionisio Atapuerca:07/11/1924:1:3\",\n \"Eulalia Carroza:16/08/1930:1:4\",\n \"Rafael Alcalde:05/10/1965:1:5\",\n \"Marta Plaza:14/12/1967:1:6\",\n \"Ernesto Atapuerca:19/4/1956:1:7\",\n \"Matilde Alcalde:22/9/1996:1:8\"\n );\n return $personas;\n }", "function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }", "public function getSacadoDocumento();", "public function obtenerViajesplus();", "function getConversacionGrupal($entrada) {\n $grupo = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $conversacion = [];\n $link = crearConexion();\n $query = \"SELECT publicacion.titulo, publicacion.contenido, publicacion.fecha_hora, publicacion.censurada, usuario.username, usuario.foto FROM publicacion, usuario WHERE publicacion.grupo='\" . $grupo . \"' AND publicacion.autor=usuario.username ORDER BY publicacion.fecha_hora ASC\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['titulo'] = $linea['titulo'];\n $fila['contenido'] = $linea['contenido'];\n $fila['fecha_hora'] = $linea['fecha_hora'];\n $fila['usuario'] = $linea['username'];\n $fila['foto'] = $linea['foto'];\n $fila['censurada'] = $linea['censurada'];\n\n $conversacion[] = $fila;\n }\n return $conversacion;\n}", "function listar_familias($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tapp_familia\n\t\t\t\t\t\tWHERE id in\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tselect\n\t\t\t\t\t\t\t\t\tdistinct familia\n\t\t\t\t\t\t\t\tfrom\n\t\t\t\t\t\t\t\t\tapp_productos\n\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\tstatus = 1 and\n\t\t\t\t\t\t\t\t\tfamilia is not null and\n\t\t\t\t\t\t\t\t\tfamilia <>0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public function obtenerViajesplusAbonados();", "function getProjetos($atuacao, $nome){\n $projetos = array();\n $nomeInst = attr($atuacao)['NOME-INSTITUICAO'];\n //Verificação de existência\n if(isset($atuacao['ATIVIDADES-DE-PARTICIPACAO-EM-PROJETO']['PARTICIPACAO-EM-PROJETO'])){\n // Recebendo as participacoes\n $participacoes = $atuacao['ATIVIDADES-DE-PARTICIPACAO-EM-PROJETO']['PARTICIPACAO-EM-PROJETO'];\n // Vendo se existe apenas uma\n if(array_keys($participacoes)[0] === '@attributes')\n $participacoes = array($participacoes);\n // Iterando sobre elas\n foreach ($participacoes as $participacao) {\n if(isset($participacao['PROJETO-DE-PESQUISA'])):\n $projsPesquisa = $participacao['PROJETO-DE-PESQUISA'];\n //Verificação de quantidade\n if(array_keys($projsPesquisa)[0] === \"@attributes\")\n $projsPesquisa = array($projsPesquisa);\n //Percorrer projetos de pesquisa\n foreach ($projsPesquisa as $projPesquisa) {\n $coordProj_ = new CoordProjeto();\n $coordProj_->responsavel = isOrientador($projPesquisa['EQUIPE-DO-PROJETO']['INTEGRANTES-DO-PROJETO'], $nome);\n $coordProj_->nomeInstituicao = $nomeInst;\n $coordProj_->anoInicio = attr($projPesquisa)['ANO-INICIO'];\n $coordProj_->anoFim = attr($projPesquisa)['ANO-FIM'];\n $coordProj_->nomeProj = attr($projPesquisa)['NOME-DO-PROJETO'];\n $coordProj_->situacao = attr($projPesquisa)['SITUACAO'];\n $coordProj_->natureza = attr($projPesquisa)['NATUREZA'];\n $coordProj_->descricao = attr($projPesquisa)['DESCRICAO-DO-PROJETO'];\n $coordProj_->equipe = getEquipe($projPesquisa['EQUIPE-DO-PROJETO']['INTEGRANTES-DO-PROJETO']);\n\n array_push($projetos, $coordProj_);\n }\n endif;\n }\n }\n // var_dump($projetos);\n return $projetos;\n }", "function getDatosGrupo($entrada) {\n $nombre = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $link = crearConexion();\n $query = \"SELECT grupo.nombre, grupo.descripcion, grupo.imagen, grupo_categoria.categoria FROM grupo, grupo_categoria WHERE grupo.nombre=grupo_categoria.grupo AND grupo.nombre='$nombre'\";\n $result = mysqli_query($link, $query);\n $linea = mysqli_fetch_array($result);\n $datos['nombre'] = $linea['nombre'];\n $datos['imagen'] = $linea['imagen'];\n $datos['descripcion'] = $linea['descripcion'];\n $datos['categoria'] = $linea['categoria'];\n cerrarConexion($link);\n return $datos;\n}", "function pegaEstados()\n {\n $lista_estados = array(\n 'ac' => 'Acre',\n 'al' => 'Alagoas',\n 'ap' => 'Amapá',\n 'am' => 'Amazonas',\n 'ba' => 'Bahia',\n 'ce' => 'Ceará',\n 'df' => 'Distrito Federal',\n 'es' => 'Espirito Santo',\n 'go' => 'Goiás',\n 'ma' => 'Maranhão',\n 'ms' => 'Mato Grosso do Sul',\n 'mt' => 'Mato Grosso',\n 'mg' => 'Minas Gerais',\n 'pa' => 'Pará',\n 'pb' => 'Paraíba',\n 'pr' => 'Paraná',\n 'pe' => 'Pernanbuco',\n 'pi' => 'Piauí',\n 'rj' => 'Rio de Janeiro',\n 'rn' => 'Rio Grande do Norte',\n 'rs' => 'Rio Grande do Sul',\n 'ro' => 'Rondônia',\n 'rr' => 'Roraima',\n 'sc' => 'Santa Catarina',\n 'sp' => 'São Paulo',\n 'se' => 'Sergipe',\n 'to' => 'Tocantis'\n );\n\n\n return $lista_estados;\n }", "public function get_filiales() {\n $this->db->select('*');\n $this->db->from('filial');\n $this->db->join('comuna', 'filial.comuna_id = comuna.comuna_id', 'left');\n $query = $this->db->get();\n //$query = $this->db->get('filial');\n return $query->result_array();\n }", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "public function getFaculteitEnOpleiding() {\n\t\tfunction findInData($products, $field, $value) {\n\t\t\tforeach($products as $key => $product) {\n\t\t\t if ( isset($product[$field])) {\n\t\t\t\tif ( $product[$field] === $value )\n\t\t\t\t\treturn $key;\n\t\t\t } else {\n\t\t\t\t return -1;\n\t\t\t }\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n\t\t$result = array();\n\t\tforeach($this->db->simple_query(\"SELECT opleidingen.id, opleidingen.naam, opleidingen.faculteit_id, faculteiten.naam as faculteit_naam FROM `opleidingen` right join faculteiten on `faculteit_id`=faculteiten.id\") as $row) {\n\t\t\t$where = findInData($result, \"naam\", $row[\"faculteit_naam\"]);\n\t\t\tif($where >= 0) {\n\t\t\t\t$result[$where][\"opleidingen\"][]=$row[\"naam\"];\n\t\t\t} else {\n\t\t\t\t$result[] = [\"naam\"=>$row[\"faculteit_naam\"], \"opleidingen\"=>($row[\"naam\"]==null?[]:[$row[\"naam\"]])];\n\t\t\t}\n\t\t}\n\t\treturn json_encode($result);\n\t}", "function getOGRole();", "function getOGRole();", "private function getOrgnameFromFilter($organism) {\n if ($organism == 'all') {\n return JText::_('COM_EASYSDI_DASHBOARD_FILTERS_ALL_ORGANISMS');\n } else {\n $db = JFactory::getDbo();\n $query = $db->getQuery(true)\n ->select('o.name')\n ->from($db->quoteName('#__sdi_organism', 'o'))\n ->where('o.id = ' . (int) $organism);\n\n $db->setQuery($query, 0, 1);\n return $db->loadResult();\n }\n }", "public function getOrganismeAssedic() {\n return $this->organismeAssedic;\n }", "function displayOrganismList($querytype){\n global $txdb_service;$file=$txdb_service.\"?s=1&querytype=$querytype\";$data=\"\";\n $xml = simplexml_load_file(\"$file\");\n if($xml){ $organisms=$xml->children()->organism;$i=0; \n while($i<count($organisms)){\n $name=$organisms[$i]->children()->name;$db=$organisms[$i]->children()->version;\n $version=$organisms[$i]->children()->version_id;\n if($i==0){$data=\"$version:$name:$db\";}\n else $data.=\",$version:$name:$db\";\n ++$i;\n }\n }\n return $data; \n}", "function getAlc(){\r\n return array(\"saki\", \"vodka\", \"rum\", \"whiskey\", \"tequila\", \"gin\");\r\n }", "public function getOrgaName();", "function extract_topologie($item=NULL){\r\n\t\t$set = array();\r\n\t\t$raw = file_get_contents($this->_get_topologie());\r\n\t\t//$this->json_errors($raw);\r\n\t\t//print $item.': ';\r\n\t\t$raw = json_decode($raw, TRUE);\r\n\t\t//print_r($raw);\r\n\t\tforeach($raw['items'] as $i=>$topo){\r\n\t\t\tif(strtolower($topo['titel-van-lichaam']) == strtolower($item)){\r\n\t\t\t\t//print $topo['titel-van-lichaam'].'='.$topo['naam'].' ';\r\n\t\t\t\t$set[] = $topo['naam']; \r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t//print_r($set);\r\n\t\treturn $set;\r\n\t}", "public function getLesFraisForfait(){\r\n\t\t$req = \"select af_fraisforfait.id as idfrais, libelle, montant from af_fraisforfait order by af_fraisforfait.id\";\r\n\t\t$rs = $this->db->query($req);\r\n\t\t$lesLignes = $rs->result_array();\r\n\t\treturn $lesLignes;\r\n\t}", "public function getMedicaments(){\n\t\t$req = \"select * from medicament order by MED_NOMCOMMERCIAL\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "function ucsc_displayOrganismWgenome(&$annot_list){\n global $ugenome_list_file; $lines=file($ugenome_list_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if($version!=\"version\")$annot_list[]=array('organism'=>array('name'=>$org,'version'=>$version));\n }\n}", "public function getFiltroResolucion()\n {\n $resultado = array();\n $sql = \"\n SELECT STRING_AGG(v.tipo_resolucion,',') AS o_resultado FROM ( \nSELECT CAST(r.tipo_resolucion AS CHARACTER VARYING)\nFROM cargos c\nINNER JOIN resoluciones r ON c.resolucion_ministerial_id = r.id\nWHERE c.baja_logica = 1\nGROUP BY r.id,r.tipo_resolucion\nORDER BY r.id\n) AS v\n \";\n $this->_db = new Cargos();\n $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql));\n if (count($arr) > 0) {\n /**\n * Para agregar un valor nulo al inicio se añade una coma\n */\n $res = $arr[0]->o_resultado;\n $resultado = explode(\",\", $res);\n }\n return $resultado;\n }", "public function getTiposDoc(){\n $params->Auth->Token = $this->TA->credentials->token;\n $params->Auth->Sign = $this->TA->credentials->sign;\n $params->Auth->Cuit = self::CUIT;\n $results = $this->client->FEParamGetTiposDoc($params);\n \n $e = $this->_checkErrors($results, 'FEParamGetTiposDoc');\n echo $e;\n $X=$results->FEParamGetTiposDocResult;\n $Texto=\" comprobantes\";\n //$fh=fopen(\"TiposDoc.txt\",\"w\");\n foreach ($X->ResultGet->DocTipo AS $Y) {\n //fwrite($fh,sprintf(\"%5s %-30s\\n\",$Y->Id, $Y->Desc));\n $Texto .= $Y->Id .' '.$Y->Desc;\n }\n //fclose($fh);\n return $Texto;\n }", "public function getFiligramme(): string\n {\n return (string) $this->filigramme;\n }", "function localidadConsultarxAutor($idAutor, $idEspecie) {\n\t\n\t$localidades = \"\";\n\t\n\t$query = \"SELECT localidades_id, referencias_id, especies_id, id, localidad, localidad_nombre \n\t\t\t\tFROM localidades_distribucion INNER JOIN localidades \n\t\t\t\tWHERE especies_id = $idEspecie AND referencias_id LIKE $idAutor \n\t\t\t\tORDER BY localidad\"; \n\t$res = ejecutarQuerySQL($query);\t\n\t$total = getNumFilas($res);\n\t\n\t$i = 0;\n\twhile ($i < $total) \t{\t\t \t\n\t\t\t$actual = getFila($res);\n\t\t\t\n\t\t\t$localidades = $actual['localidad_nombre'];\n\t\t\tif ($i < $total-1) $localidades = $localidades . \", \"; \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t$i++;\n\t\t} // end while\n\t\n\t\t\t\nreturn $localidades;\n}", "protected function subjonctifImparfait(){\n $terminaisons=[];\n $terminaisons[]= \"fuguèsse\";\n $terminaisons[]= \"fuguèsses\";\n $terminaisons[]= \"fuguèsse\";\n $terminaisons[]= \"fuguessian\";\n $terminaisons[]= \"fuguessias\";\n $terminaisons[]= \"fuguèsson\";\n return $terminaisons;\n }", "function listeGroupes ( ) {\n // Récupération de la liste des groupes.\n $param['cw'] = \"ORDER BY nomgroupe ASC\" ;\n $req = new clResultQuery ;\n $res = $req -> Execute ( \"Fichier\", \"getGroupes\", $param, \"ResultQuery\" ) ;\n // Formatage de cette liste pour l'insérer directement dans ModeliXe.\n for ( $i = 0 ; isset ( $res['idgroupe'][$i] ) ; $i++ ) { $tab[$res['nomgroupe'][$i]] = $res['nomgroupe'][$i] ; }\n // On renvoie la liste.\n return $tab ;\n }", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "public function BuscaOrganizacionalTodos($tupla)\r\n {\r\n //$dbl = new Mysql($encryt->Decrypt_Text($_SESSION[BaseDato]), $encryt->Decrypt_Text($_SESSION[LoginBD]), $encryt->Decrypt_Text($_SESSION[PwdBD]) );\r\n $Nivls = \"\";\r\n { \r\n //$Consulta3=\"select id as id_organizacion,parent_id as organizacion_padre, title as identificacion from mos_organizacion where id in ($tupla[id_organizacion])\";\r\n $Consulta3=\"select * from mos_documentos_estrorg_arbolproc where IDDoc='\".$tupla[IDDoc].\"' and tipo='EO'\"; \r\n $Resp3 = $this->dbl->query($Consulta3,array()); \r\n foreach ($Resp3 as $Fila3) \r\n { \r\n $Nivls .= $this->BuscaOrganizacional(array('id_organizacion' => $Fila3[id_organizacion_proceso])).\"<br /><br />\";\r\n }\r\n if($Nivls!='')\r\n $Nivls=substr($Nivls,0,strlen($Nivls)-6);\r\n else\r\n $Nivls='-- Sin información --';\r\n }\r\n \r\n return $Nivls;\r\n\r\n }", "public function traerDocentes(){\n $docentes = DB::select('SELECT docente_grupo.idDocente, CONCAT(docente.apPaterno,\" \", docente.apMaterno, \" \", docente.nombres) nombre_completo FROM docente_grupo INNER JOIN docente ON docente_grupo.idDocente = docente.idDocente WHERE docente.estatus = 1 AND docente.tipo <> 4 AND docente.tipo <> 5 ORDER BY nombre_completo ASC');\n \n\n return $docentes;\n }", "function system_get_all_gnames()\n{\n//\t$retv[id1]=100;\n//\t$retv[gname1]=\"tt\";\n\treturn($retv);\n}", "function getRelaciones() {\r\n //arreglo relacion de tablas\r\n //---------------------------->DEPARTAMENTO(OPERADOR)\r\n //---------------------------->TEMA(TIPO)\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['tabla']='documento_tipo';\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['campo']='dti_id';\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['remplazo']='dti_nombre';\r\n\t\t//---------------------------->TEMA(TIPO)\r\n\r\n\t\t//---------------------------->SUBTEMA(TEMA)\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['tabla']='documento_tema';\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['campo']='dot_id';\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['remplazo']='dot_nombre';\r\n //---------------------------->SUBTEMA(TEMA)\r\n\r\n //---------------------------->DOCUMENTO(OPERADOR)\r\n $relacion_tablas['documento_actor']['ope_id']['tabla']='operador';\r\n\t\t$relacion_tablas['documento_actor']['ope_id']['campo']='ope_id';\r\n\t\t$relacion_tablas['documento_actor']['ope_id']['remplazo']='ope_nombre';\r\n //---------------------------->DOCUMENTO(TIPO DE ACTOR)\r\n $relacion_tablas['documento_actor']['dta_id']['tabla']='documento_tipo_actor';\r\n\t\t$relacion_tablas['documento_actor']['dta_id']['campo']='dta_id';\r\n\t\t$relacion_tablas['documento_actor']['dta_id']['remplazo']='dta_nombre';\r\n //----------------------------<DOCUMENTO\r\n\r\n\t\t//---------------------------->DEPARTAMENTO(OPERADOR)\r\n\t\t$relacion_tablas['departamento']['ope_id']['tabla']='operador';\r\n\t\t$relacion_tablas['departamento']['ope_id']['campo']='ope_id';\r\n\t\t$relacion_tablas['departamento']['ope_id']['remplazo']='ope_nombre';\r\n\t\t//---------------------------->DEPARTAMENTO(OPERADOR)\r\n\r\n\t\t//---------------------------->DEPARTAMENTO(REGION)\r\n\t\t$relacion_tablas['departamento']['dpr_id']['tabla']='departamento_region';\r\n\t\t$relacion_tablas['departamento']['dpr_id']['campo']='dpr_id';\r\n\t\t$relacion_tablas['departamento']['dpr_id']['remplazo']='dpr_nombre';\r\n //---------------------------->DEPARTAMENTO(REGION)\r\n\r\n\t\t//---------------------------->MUNICIPIO(DEPARTAMENTO)\r\n\t\t$relacion_tablas['municipio']['dep_id']['tabla']='departamento';\r\n\t\t$relacion_tablas['municipio']['dep_id']['campo']='dep_id';\r\n\t\t$relacion_tablas['municipio']['dep_id']['remplazo']='dep_nombre';\r\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\r\n\r\n return $relacion_tablas;\r\n }", "public function getCedenteCidadeUF();", "public function getFilmAleatoire() {\n try {\n $mesFilms = DB::table('FILM')\n ->Select('FILM.IDFILM', 'NOMFILM', 'NOMIMAGE', 'RESUME','DUREE','DATESORTIE','NOMREAL', 'PRENOMREAL','LIBELLEGENRE', 'LIENBA')\n ->join('APPARTIENT', 'APPARTIENT.IDFILM', '=', 'FILM.IDFILM')\n ->join('GENRE', 'GENRE.IDGENRE', '=', 'APPARTIENT.IDGENRE')\n ->join('REALISE', 'REALISE.IDFILM', '=', 'FILM.IDFILM')\n ->join('REALISATEUR', 'REALISATEUR.IDREALISATEUR', '=', 'REALISE.IDREALISATEUR')\n ->inRandomOrder()\n ->first();\n\n return $mesFilms;\n } catch (QueryException $e) {\n throw new MonException($e->getMessage());\n }\n }", "function getDatosDeGrupoSolidario(){}", "public function getFkOrcamentoOrganogramaNiveis()\n {\n return $this->fkOrcamentoOrganogramaNiveis;\n }", "public function get_empresas_filial() {\n $this->db->select('*');\n $this->db->from('filial_empresa');\n\n $this->db->join('empresa', 'empresa.empresa_id = filial_empresa.empresa_id', 'left');\n $this->db->join('filial', 'filial.filial_id = filial_empresa.filial_id', 'left');\n $this->db->join('comuna', 'empresa.comuna_id = comuna.comuna_id', 'inner');\n $query = $this->db->get();\n //$query = $this->db->get('filial');\n return $query->result_array();\n }", "function localidadConsultarCitasxAutor($res, $idEspecie) {\n\n\t// creando el arreglo de autores para la especie \t\n\t$total = getNumFilas($res); $localidades=\"\";\n\t\n\t$arrayAL1[20] = array(\t\"autor\" => 0, \n\t\t\t\t\t\t\t\t\t\t\t\"idlocalidad\" => 0, \n\t\t\t\t\t\t\t\t\t\t\t\"localidad\" => \"\");\n\t$i=0; $pos = 0;\n\twhile ($i < $total) {\n\t\t$actual = getFila($res);\n\t\t$autores = $actual[\"referencias_id\"];\n\t\t$autores = explode(\",\", $autores);\n\t\t\n\t\tfor ($j = 1; $j < count($autores); $j++) {\n\t\t\tif (!(in_array($autores[$j], $arrayAL1) )) {\n\t\t\t\t\t$arrayAL1[$pos][\"autor\"] = $autores[$j]; \n\t\t\t\t\t$arrayAL1[$pos][\"idlocalidad\"] = $actual[\"localidades_id\"];\n\t\t\t\t\t$arrayAL1[$pos][\"localidad\"] = localidadConsultarNombre($actual[\"localidades_id\"]);\n\t\t\t\t\t$pos++;\n\t\t\t\t}\n\t\t}\n\t$i++;\n\t}\n\t\n\tforeach ($arrayAL1 as $key => $row) {\n\t\t$autor[$key] = $row[\"autor\"];\n\t\t$idlocalidad[$key] = $row[\"idlocalidad\"];\n\t\t$localidad[$key] = $row[\"localidad\"];\n\t}\n\n\tarray_multisort($autor, SORT_ASC, $localidad, SORT_ASC, $arrayAL1);\n\t// print_r($arrayAL1) . \"<br />\"; // muestra cada línea del arreglo $arrayAL1\t\t\t\t\n\n\t// armamos la lista de autores y localidades que reportan\n\t$localidades = \"\"; $total = count($arrayAL1);\n\t$idAutor = 0;\n\tfor ($k = 1; $k < $total; $k++) {\n\t\t\n\t\tif ($idAutor != $arrayAL1[$k][\"autor\"])\n\t\t{\t// nuevo autor\n\t\t\t if ($k>1) $localidades .= \"); \"; // separación entre autores\n\t\t\t $autorRef = \"\"; $agno = \"\";\n\t\t\t consultarCitaxId($arrayAL1[$k][\"autor\"], $autorRef, $agno);\n\t\t\t $localidades .= \"<b>\". $autorRef . \", \" . $agno . \" </b> (\";\n\t\t\t $localidades .= $arrayAL1[$k][\"localidad\"];\t\n\t\t} \n\t\telse { // localidades para el mismo autor\n\t\t\t $localidades .= \", \" . $arrayAL1[$k][\"localidad\"];\n\t\t}\n\t\t$idAutor = $arrayAL1[$k][\"autor\"] ;\n\t}\t // end for\n\tif ($total > 1 ) $localidades .= \").\";\n\telse $localidades = \"\";\n\t\nreturn $localidades;\n}", "function get_entradas_boni_gral_list($offset, $per_page, $ubicacion)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct(e.pr_facturas_id), e.id as id1, e.fecha, sum(costo_total) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatus from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.estatus_general_id=1 and ctipo_entrada=9 group by e.id, e.fecha, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id order by e.fecha desc limit $per_page offset $offset\";\n\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getFascicoloInternatos()\n {\n return $this->hasMany(FascicoloInternato::className(), ['internato_id' => 'id']);\n }", "function get_all_kardex_academico()\n {\n $kardex_academico = $this->db->query(\"\n SELECT\n *\n\n FROM\n `kardex_academico`\n\n WHERE\n 1 = 1\n\n ORDER BY `kardexacad_id` DESC\n \")->result_array();\n\n return $kardex_academico;\n }", "function getRelaciones() {\n //arreglo relacion de tablas\n //---------------------------->DEPARTAMENTO(OPERADOR)\n $relacion_tablas['departamento']['ope_id']['tabla'] = 'operador';\n $relacion_tablas['departamento']['ope_id']['campo'] = 'ope_id';\n $relacion_tablas['departamento']['ope_id']['remplazo'] = 'ope_nombre';\n //---------------------------->DEPARTAMENTO(OPERADOR)\n //---------------------------->DEPARTAMENTO(REGION)\n $relacion_tablas['departamento']['der_id']['tabla'] = 'departamento_region';\n $relacion_tablas['departamento']['der_id']['campo'] = 'der_id';\n $relacion_tablas['departamento']['der_id']['remplazo'] = 'der_nombre';\n //---------------------------->DEPARTAMENTO(REGION)\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\n $relacion_tablas['municipio']['dep_id']['tabla'] = 'departamento';\n $relacion_tablas['municipio']['dep_id']['campo'] = 'dep_id';\n $relacion_tablas['municipio']['dep_id']['remplazo'] = 'dep_nombre';\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\n //---------------------------->CIUDAD\n $relacion_tablas['ciudad']['Id_Pais']['tabla'] = 'pais';\n $relacion_tablas['ciudad']['Id_Pais']['campo'] = 'Id_Pais';\n $relacion_tablas['ciudad']['Id_Pais']['remplazo'] = 'Nombre_Pais';\n //---------------------------->CIUDAD\n //---------------------------->CUENTAS\n $relacion_tablas['cuentas_financiero']['cft_id']['tabla'] = 'cuentas_financiero_tipo';\n $relacion_tablas['cuentas_financiero']['cft_id']['campo'] = 'cft_id';\n $relacion_tablas['cuentas_financiero']['cft_id']['remplazo'] = 'cft_nombre';\n //---------------------------->CUENTAS\n //---------------------------->CUENTAS UT\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['tabla'] = 'cuentas_financiero_tipo';\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['campo'] = 'cft_id';\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['remplazo'] = 'cft_nombre';\n //---------------------------->CUENTAS UT\n //---------------------------->MOVIMIENTOS\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['tabla'] = 'extractos_movimiento_tipo';\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['campo'] = 'mov_tipo_id';\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['remplazo'] = 'mov_tipo_desc';\n //---------------------------->MOVIMIENTOS\n //---------------------------->CENTROS POBLADOS\n $relacion_tablas['centropoblado']['mun_id']['tabla'] = 'municipio';\n $relacion_tablas['centropoblado']['mun_id']['campo'] = 'mun_id';\n $relacion_tablas['centropoblado']['mun_id']['remplazo'] = 'mun_nombre';\n //---------------------------->CENTROS POBLADOS\n //---------------------------->TIPO HALLAZGO\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['tabla'] = 'areashallazgospendientes';\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['campo'] = 'idAreaHallazgo';\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['remplazo'] = 'descripcion';\n //---------------------------->TIPO HALLAZGO\n\n return $relacion_tablas;\n }", "function organismes()\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t$db = cmsms()->GetDb();\n\t\t$designation = '';\n\t\t$tableau = array('F','Z','L','D');\n\t\t//on instancie la classe servicen\n\t\t$service = new Servicen();\n\t\t$page = \"xml_organisme\";\n\t\tforeach($tableau as $valeur)\n\t\t{\n\t\t\t$var = \"type=\".$valeur;\n\t\t\t//echo $var;\n\t\t\t$scope = $valeur;\n\t\t\t//echo \"la valeur est : \".$valeur;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$designation.= \"service coupé\";\n\t\t\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t\t\t$status = 'Echec';\n\t\t\t\t$action = 'retrieve_ops';\n\t\t\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t///on initialise un compteur général $i\n\t\t\t\t$i=0;\n\t\t\t\t//on initialise un deuxième compteur\n\t\t\t\t$compteur=0;\n\t\t\t//\tvar_dump($xml);\n\n\t\t\t\t\tforeach($xml as $cle =>$tab)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$idorga = (isset($tab->id)?\"$tab->id\":\"\");\n\t\t\t\t\t\t$code = (isset($tab->code)?\"$tab->code\":\"\");\n\t\t\t\t\t\t$libelle = (isset($tab->libelle)?\"$tab->libelle\":\"\");\n\t\t\t\t\t\t// 1- on vérifie si cette épreuve est déjà dans la base\n\t\t\t\t\t\t$query = \"SELECT idorga FROM \".cms_db_prefix().\"module_ping_organismes WHERE idorga = ?\";\n\t\t\t\t\t\t$dbresult = $db->Execute($query, array($idorga));\n\n\t\t\t\t\t\t\tif($dbresult && $dbresult->RecordCount() == 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_organismes (libelle, idorga, code, scope) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t$compteur++;\n\t\t\t\t\t\t\t\t$dbresultat = $db->Execute($query,array($libelle,$idorga,$code,$scope));\n\n\t\t\t\t\t\t\t\tif(!$dbresultat)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$designation.= $db->ErrorMsg();\t\t\t\n\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\n\n\n\t\t\t\t\t}// fin du foreach\n\n\t\t\t}\n\t\t\tunset($scope);\n\t\t\tunset($var);\n\t\t\tunset($lien);\n\t\t\tunset($xml);\n\t\t\tsleep(1);\n\t\t}//fin du premier foreach\n\t\t\n\n\t\t$designation.= $compteur.\" organisme(s) récupéré(s)\";\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$status = 'Ok';\n\t\t$action = 'retrieve_ops';\n\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\n\t\t\t\n\t\t\n\t}", "private function GetGramaInfo() {\n //get all possible variation of word info\n $tmp_info = $this->morphy->getGramInfo($this->word->GetContent());\n //put it into word object\n if (is_array($tmp_info)) {\n $this->word->SetGramInfo($this->FilterGrammaInfo($tmp_info));\n return (true);\n } else {\n return (false);\n }\n }", "public function busqueda()\n {\n // $consulta=$this->dbAdapter->query(\"select id , folio FROM usuarios where nombre = '\" . $dataUser['nombre'].\"' and correo = '\".$dataUser['correo']. \"'\" ,Adapter::QUERY_MODE_EXECUTE);\n $query = \"SELECT\n id,\n tagGrupal \n FROM\n simulacrogrupo\n \n \";\n $consulta = $this->dbAdapter->query($query, Adapter::QUERY_MODE_EXECUTE);\n \n $res = $consulta->toArray();\n \n return $res;\n }", "function grafico_1_3( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_partido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t// . \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t//echo $query;\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t//var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, actor, partido, cantidad de menciones\n\t$i = -1;\n\t$partidos = [];\n\t\n\t$children_partidos = [];\n\t$i_actor = 0;\n\tforeach($main as $k=>$v){\n\t\t// obtengo el/los partidos\n\t\t$partidos_array = json_decode( $v['id_partido'], true);\n\t\tif( ! is_array($partidos_array) ) continue;\n\t\t\n\t\tforeach($partidos_array as $p){\n\t\t\t$partido_nombre = R::findOne('attr_partido','id LIKE ?',[$p])['nombre'];\n\t\t\t$tabla[ ++$i ] = [\n\t\t\t\t'ua' => $ua_nombre,\n\t\t\t\t'actor' => $v['nombre'] . ' ' . $v['apellido'],\n\t\t\t\t'partido' => $partido_nombre,\n\t\t\t\t'cantidad' => $v['cantidad']\n\t\t\t\t];\n\t\t\t\t// agrego el partido y el grafico\n\t\t\t\tif(! in_array($partido_nombre,$partidos)){\n\t\t\t\t\t$partidos[] = $partido_nombre;\n\t\t\t\t\t$x = new StdClass(); // objeto vacio\n\t\t\t\t\t$x->name = $partido_nombre;\n\t\t\t\t\t$x->rank = 0;\n\t\t\t\t\t$x->weight = count($partidos); //'Yellow'; cargar desde JS\n\t\t\t\t\t$x->id = 1;\n\t\t\t\t\t$x->children = [];\n\t\t\t\t\t$children_partidos[] = $x;\n\t\t\t\t}\n\t\t\t\t// obtengo el indice del partido y lo inserto\n\t\t\t\t$index = array_search($partido_nombre,$partidos);\n\t\t\t\t$t = new StdClass(); // objeto vacio\n\t\t\t\t$t->name = $v['nombre'] . ' ' . $v['apellido'] . \" (\" . $v['cantidad'] . \")\";\n\t\t\t\t$t->rank = $v['cantidad'];\n\t\t\t\t$t->weight = $i_actor; //'Yellow'; cargar desde JS\n\t\t\t\t$t->id = 1;\n\t\t\t\t$t->children = [];\n\t\t\t\t// lo agrego al padre correspondiente\n\t\t\t\t$children_partidos[ $index ]->children[] = $t;\n\t\t\t\t$children_partidos[ $index ]->rank += 1;\n\t\t\t}\n\t\t\t++$i_actor;\n\t}\n\t// grafico\n\t/*$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];*/\n\t\n\t// creo los objetos partidos\n\t\n\t/*foreach($partidos as $p){\n\t\t$x = new StdClass(); // objeto vacio\n\t\t$x->name = $p;\n\t\t$x->rank = 0;\n\t\t$x->weight = 0; //'Yellow'; cargar desde JS\n\t\t$x->id = 1;\n\t\t$x->children = [];\n\t}*/\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Partidos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = $children_partidos;\n\t\n\t\n\t/*foreach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}*/\n\t\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n}", "public function getFornecedor(){\n\n if (!empty($this->iCodigoFornecedor) && empty($this->oFornecedor)) {\n $this->oFornecedor = CgmFactory::getInstanceByCgm($this->iCodigoFornecedor);\n }\n return $this->oFornecedor;\n }", "public function get_eng_trabajanding(){\n $query = $this->db->query(\"\n SELECT \n DISTINCT otp.k_id_user, CONCAT(u.n_name_user, ' ', u.n_last_name_user) AS nombre\n FROM \n ot_padre otp\n INNER JOIN\n user u\n ON u.k_id_user = otp.k_id_user\n ;\");\n return $query->result();\n }", "public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL B ON B.VIAGEM = A.HANDLE AND B.EHINICIOVIAGEM = 'S'\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL C ON C.VIAGEM = A.HANDLE AND C.EHTERMINOVIAGEM = 'S'\n WHERE A.HANDLE = '$this->handle' \");\n $query->execute();\n $dataSet = $query->fetch(PDO::FETCH_ASSOC);\n\n $this->filialDestino = $dataSet['FILIALDESTINO'];\n $this->filialOrigem = $dataSet['FILIALORIGEM'];\n }", "public function getGrupos()\n {\n return $this->grupos;\n }", "public static function getAllOrganogramaUnidade(Request $request, Response $response)\n {\n try {\n\n $idOrgao = $request->getAttribute('idOrgao');\n $idOrgao = $idOrgao ? $idOrgao : 389;\n DBLayer::Connect();\n $query = DBLayer::table('');\n $query->from(DBLayer::raw('func_organograma()'));\n $query->where(\"idPai\", '=', $idOrgao);\n $result = $query->get();\n\n return $response->withStatus(StatusCode::SUCCESS)\n ->withJson($result);\n\n } catch (Exception $e) {\n return $response->withStatus(StatusCode::BAD_REQUEST)\n ->withJson((['message' => StatusMessage::MENSAGEM_ERRO_PADRAO,\n 'exception' => $e->getMessage(), 'line' => $e->getLine(), 'file' => $e->getFile()]));\n }\n }", "function getDatosF_gasto()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'f_gasto'));\n $oDatosCampo->setEtiqueta(_(\"f_gasto\"));\n return $oDatosCampo;\n }", "function obtenerJugadores(){\r\n\t\t// Devuelve la lista de los jugadores del equipo\r\n\t\t\r\n\t\t/* Porteros */\r\n\t\t$porteros = array( \r\n\t\t\tarray(\"n\" => \"Wuilker\", \t\"a\" => \"Fariñez\"), \r\n\t\t\tarray(\"n\" => \"Alain\", \t\t\"a\" => \"Baroja\"),\r\n\t\t\tarray(\"n\" => \"José\", \t\t\"a\" => \"Contreras\"),\r\n\t\t\tarray(\"n\" => \"Joel\", \t\t\"a\" => \"Graterol\"),\r\n\t\t\tarray(\"n\" => \"Luis\", \t\t\"a\" => \"Romero\"),\r\n\t\t\tarray(\"n\" => \"Rafael\", \t\t\"a\" => \"Romo\") \r\n\t\t);\r\n\t\t\r\n\t\t/* Mediocampistas */\r\n\t\t$mediocampistas = array( \r\n\t\t\tarray(\"n\" => \"Cristian\", \t\"a\" => \"Cásseres\"), \r\n\t\t\tarray(\"n\" => \"Yangel\", \t\t\"a\" => \"Herrera\"),\r\n\t\t\tarray(\"n\" => \"Darwin\", \t\t\"a\" => \"Machís\"),\r\n\t\t\tarray(\"n\" => \"José\", \t\t\"a\" => \"Martínez\"),\r\n\t\t\tarray(\"n\" => \"Junior\", \t\t\"a\" => \"Moreno\"),\r\n\t\t\tarray(\"n\" => \"Jhon\", \t\t\"a\" => \"Murillo\"),\r\n\t\t\tarray(\"n\" => \"Rómulo\", \t\t\"a\" => \"Otero\"),\r\n\t\t\tarray(\"n\" => \"Tomás\", \t\t\"a\" => \"Rincón\"),\r\n\t\t\tarray(\"n\" => \"Jefferson\", \t\"a\" => \"Savarino\"),\r\n\t\t\tarray(\"n\" => \"Yeferson\", \t\"a\" => \"Soteldo\"),\r\n\t\t\tarray(\"n\" => \"Edson\", \t\t\"a\" => \"Castillo\"),\r\n\t\t\tarray(\"n\" => \"Richard\", \t\"a\" => \"Celis\"),\r\n\t\t\tarray(\"n\" => \"Bernardo\", \t\"a\" => \"Manzano\"),\r\n\t\t\tarray(\"n\" => \"Freddy\", \t\t\"a\" => \"Vargas\")\r\n\t\t);\t\r\n\r\n\t\t/* Defensas */\r\n\t\t$defensas = array( \r\n\t\t\tarray(\"n\" => \"Wilker\", \t\t\"a\" => \"Ángel\"), \r\n\t\t\tarray(\"n\" => \"Jhon\", \t\t\"a\" => \"Chancellor\"),\r\n\t\t\tarray(\"n\" => \"Luis\", \t\t\"a\" => \"Del Pino\"),\r\n\t\t\tarray(\"n\" => \"Rolf\", \t\t\"a\" => \"Feltscher\"),\r\n\t\t\tarray(\"n\" => \"Francisco\", \t\"a\" => \"La Mantía\"),\r\n\t\t\tarray(\"n\" => \"Nahuel\", \t\t\"a\" => \"Ferraresi\"),\r\n\t\t\tarray(\"n\" => \"Alexander\", \t\"a\" => \"González\"),\r\n\t\t\tarray(\"n\" => \"Ronald\", \t\t\"a\" => \"Hernández\"),\r\n\t\t\tarray(\"n\" => \"Yordan\", \t\t\"a\" => \"Osorio\"),\r\n\t\t\tarray(\"n\" => \"Roberto \", \t\"a\" => \"Rosales\"),\r\n\t\t\tarray(\"n\" => \"Mikel\", \t\t\"a\" => \"Villanueva\"),\r\n\t\t\tarray(\"n\" => \"Yohan\", \t\t\"a\" => \"Cumana\"),\r\n\t\t\tarray(\"n\" => \"Adrián\", \t\t\"a\" => \"Martínez\")\r\n\t\t);\t\r\n\r\n\t\t/* Delanteros */\r\n\t\t$delanteros = array( \r\n\t\t\tarray(\"n\" => \"Fernando \", \t\"a\" => \"Aristiguieta\"), \r\n\t\t\tarray(\"n\" => \"Jhonder\", \t\"a\" => \"Cádez\"),\r\n\t\t\tarray(\"n\" => \"Sergio \", \t\"a\" => \"Córdova\"),\r\n\t\t\tarray(\"n\" => \"Jan\", \t\t\"a\" => \"Hurtado\"),\r\n\t\t\tarray(\"n\" => \"Josef\", \t\t\"a\" => \"Martínez\"),\r\n\t\t\tarray(\"n\" => \"Daniel\", \t\t\"a\" => \"Pérez\"),\r\n\t\t\tarray(\"n\" => \"Eric\", \t\t\"a\" => \"Ramírez\"),\r\n\t\t\tarray(\"n\" => \"Salomón\", \t\"a\" => \"Rondón\")\r\n\t\t);\t\r\n\t\t\t\r\n\t\t$jugadores = array( \r\n\t\t\t\t\t\t\"porteros\" \t\t=> $porteros, \r\n\t\t\t\t\t\t\"mediocampistas\" => $mediocampistas, \r\n\t\t\t\t\t\t\"defensas\" \t\t=> $defensas, \r\n\t\t\t\t\t\t\"delanteros\" \t=> $delanteros \r\n\t\t\t\t\t);\r\n\t\t\r\n\t\treturn $jugadores;\r\n\t}", "public function getIniciales() {\n $aIni = array();\n $aApe = $this->getApellidos();\n $sIni = \"\";\n foreach ($aApe as $Apellido) {\n $ini = substr($Apellido, 0, 1);\n if($ini != $sIni) {\n $aIni[] = $ini;\n }\n $sIni = $ini;\n }\n return $aIni;\n }", "function consultarCitasSinLocalidad($idEspecie) {\n\t\t \n\t$query = \"SELECT localidades_id, especies_id, referencias_id \n\t\t\t\t\t\tFROM localidades_distribucion \n\t\t\t\t\t\tWHERE especies_id = $idEspecie AND referencias_id <>'' AND localidades_id = 0\"; \t\t\t\t\t\t\t\n\t$res = ejecutarQuerySQL($query);\n\t$total = getNumFilas($res);\n\t\n\t$citas=\"\"; $i=1;\t\n\tif ($total > 0 ) {\n\t\t $citas=\"<b>Sin especificar localización: </b>\";\t\n\t\t while ($i <= $total) {\n\t\t \t$actual = getFila($res);\n\t\t\t$valores = $actual['referencias_id'];\n\t\t\tif (strpos($valores, \",\") ) {\n\t\t\t\t // caso del reporte de varios autores para la especie y la localidad\n\t\t\t\t$valores = explode(\",\", $valores);\n\t\t\t\t$total2 = count($valores); $j=1; // inicia en 1 para evitar el caracter de control del inicio\n\t\t\t\t$autorRef = \"\"; $agno=\"\";\n\t\t\t\twhile ($j < $total2) {\t\t\t\t\t\t \t\n\t\t\t\t\t consultarCita($valores[$j], $autorRef, $agno);\t\t\t\t\t \n\t\t\t\t\t $citas = $citas . $autorRef . \" (\" . $agno . \")\";\n\t\t\t\t\t if ($j < $total2-1) $citas = $citas . \"; \"; \n\t\t\t\t\t $j++;\n\t\t\t }\t\t\t \n\t\t}\n\t\telse\n\t\t{ // caso del reporte de un sólo autor para la especie y la localidad\t\t\t\t \n\t\t\t\t $valores = explode(\",\", $valores);\n\t\t\t\t consultarCita($valores[0], $autorRef, $agno);\n\t\t\t\t if ($autorRef <>\"\") $citas = $citas . $autorRef . \" (\" . $agno . \")\";\t\t\n\t\t}\t\t\n\t\t$i++;\n\t\t }\n\t\t$citas = $citas . \".\" ;\n\t}\n\t\nreturn $citas;\n}", "public function getLibelle();", "function getTopGoTerms($ref_gf_id, $n_max) {\n $top_gos = array(\"BP\"=>array(), \"MF\"=>array(), \"CC\"=>array());\n $query\t\t= \"SELECT gf_fd.`name`, fd.`desc`, fd.`info` FROM `gf_functional_data` gf_fd, `functional_data` fd WHERE gf_fd.`gf_id`='\" . $ref_gf_id . \"' AND gf_fd.`type`='go' AND gf_fd.`is_hidden`='0' AND fd.`name`=gf_fd.`name` ORDER BY gf_fd.`f_score` DESC\";\n $res\t\t= $this->query($query);\n foreach($res as $r) {\n $go_aspect = $r['fd']['info'];\n $go_name = $r['gf_fd']['name'];\n $go_desc = $r['fd']['desc'];\n if(count($top_gos[$go_aspect]) < $n_max){\n $top_gos[$go_aspect][] = array(\"name\"=>$go_name, \"desc\"=>$go_desc);\n }\n }\n $top_gos = array_filter($top_gos);\n return $top_gos;\n }", "public function getInstrucoes();", "function alr_clima_provincias()\n{\n\t$response=array();\n\t$feed_url = \"http://api.tiempo.com/index.php?api_lang=ar&pais=67&affiliate_id=jcp8s666brbh\";\n\t$curl = curl_init();\n\tcurl_setopt($curl, CURLOPT_URL,$feed_url);\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);\n\t$xmlProv = curl_exec($curl);\n\tif(curl_errno($curl)==0) \n\t{\n\t\t$xml = simplexml_load_string($xmlProv);\n\t\tif(isset($xml->location->data[0]->name)) \n\t\t{\n\t\t\t$x=0;\n\t\t\tforeach ($xml->location->data as $prov) \n\t\t\t{\n\t\t\t\t$pid=intval($prov->name->attributes()->id);\n\t\t\t\t$response[$pid]=(string) $prov->name;\n\t\t\t\t$x++;\t \t\n \t }\n\t\t}\n\t}\n\tcurl_close($curl);\t\t\t\n\treturn $response;\n}", "public function biografi()\n {\n \n $this->db->select('*');\n $this->db->from('biografi');\n \n $query = $this->db->get();\n return $query;\n }", "function numeroFjalet($Fjalia) {\n\t$fjalt = explode(\" \", $Fjalia);\n\tforeach ($fjalt as $key => $value) {\n\t\tif(ctype_alpha($value)) {\n\t\t\t$fjaltVetemShkronja[] = strtolower($value);\n\t\t}\n\t}\n\t\n\tfor($i = 0; $i < count($fjaltVetemShkronja) - 1; $i++) {\n\t\t$a = 0;\n\t\tfor($j = 0; $j < count($fjaltVetemShkronja); $j++) {\n\t\t\tif($fjaltVetemShkronja[$i] == $fjaltVetemShkronja[$j]) {\n\t\t\t\t$a ++;\n\t\t\t}\n\t\t}\n\t\t$perseritjaEFjaleve[$fjaltVetemShkronja[$i]] = $a;\n\t}\n\tasort($perseritjaEFjaleve);\n\treturn $perseritjaEFjaleve;\n}", "public function getUtilisateurs();", "function toString() {\n\t\treturn $this->FiscaalGroepID . \",\" . $this->FiscaalGroupType . \",\" . $this->GewijzigdDoor . \",\" . $this->GewijzigdOp;\n\t}", "function RecuperarInfoOrg($orgReportadas, $infoSolicitada)\n{\n\t$infoRecuperada = array();\n\t//peticion de la provincia de la organizacion\n\tif($infoSolicitada == \"provincia\")\n\t{\n\t\tforeach ($orgReportadas as $valor) \n\t\t{\n\t\t\t$sqlZonaOrg = \"select p.provincia from u_organizaciones u inner join u_provincia p on (u.cod_provincia = p.cod_provincia) where cod_u_organizaciones = \" . $valor;\n\t\t\t//echo $sqlZonaOrg . \"<br>\";\n\t\t\t$resSqlZonaOrg = query($sqlZonaOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlZonaOrg);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlZonaOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['provincia']);\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t}\n\t// peticion del canton de la organizacion\n\tif($infoSolicitada == \"canton\")\n\t{\n\t\tforeach ($orgReportadas as $valor) \n\t\t{\n\t\t\t$sqlZonaOrg = \"select c.canton from u_organizaciones u inner join u_provincia p on (u.cod_provincia = p.cod_provincia) inner join u_canton c on (u.cod_canton = c.cod_canton and p.cod_provincia = c.cod_provincia) where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlZonaOrg = query($sqlZonaOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlZonaOrg);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlZonaOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['canton']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t\n\t\t}\n\t}\n\t//peticion de la parroquia de la organizacion\n\tif($infoSolicitada == \"parroquia\")\n\t{\n\t\tforeach ($orgReportadas as $valor) \n\t\t{\n\t\t\t$sqlZonaOrg = \"select pa.parroquia from u_organizaciones u inner join u_provincia p on (u.cod_provincia = p.cod_provincia) inner join u_canton c on (u.cod_canton = c.cod_canton and p.cod_provincia = c.cod_provincia) inner join u_parroquia pa on (pa.cod_canton = c.cod_canton and pa.cod_parroquia = u.cod_parroquia) where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlZonaOrg = query($sqlZonaOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlZonaOrg);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlZonaOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['parroquia']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\t\t\t\n\t\t}\n\t}\n\t//peticion de los nombres de las organizaciones\n\tif($infoSolicitada == \"nombresOrg\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlNombreOrg = \"select organizacion from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlNombreOrg = query($sqlNombreOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlNombreOrg);\n\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlNombreOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['organizacion']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//se devuelve el ruc dependiendo de cual (provisional/definitivo) se solicite\n\tif($infoSolicitada == \"rucProvisionalOrg\" or $infoSolicitada == \"rucDefinitivoOrg\")\n\t{\n\t\t$opcion = 0;\n\t\tswitch ($infoSolicitada) \n\t\t{\n\t\t\tcase \"rucProvisionalOrg\":\n\t\t\t\t# code...\n\t\t\t\t$opcion = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"rucDefinitivoOrg\":\n\t\t\t\t$opcion = 2;\n\t\t\t\tbreak;\t\t\t\n\t\t\tdefault:\n\t\t\t\t$opcion = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlRucOrg = \"\";\n\t\t\tif($opcion == 1) $sqlRucOrg = \"select ruc_provisional from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\tif($opcion == 2) $sqlRucOrg = \"select ruc_definitivo from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\n\t\t\tif($opcion != 0)\n\t\t\t{\n\t\t\t\t$resSqlRucOrg = query($sqlRucOrg);\n\t\t\t\t$numRow = mysql_num_rows($resSqlRucOrg);\n\t\t\t\tif($numRow > 0)\n\t\t\t\t{\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlRucOrg))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($opcion == 1) array_push($infoRecuperada, $fila['ruc_provisional']);\n\t\t\t\t\t\tif($opcion == 2) array_push($infoRecuperada, $fila['ruc_definitivo']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t\n\t\t}\n\t}\n\t//peticion de fecha de registro de la organizacion\n\tif($infoSolicitada == \"fechaRegistro\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlFechaRegistro = \"select fecha_registro from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlFechaRegistro = query($sqlFechaRegistro);\n\t\t\t$numRow = mysql_num_rows($resSqlFechaRegistro);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlFechaRegistro))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['fecha_registro']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//peticion del circuito economico de la organizacion\n\tif($infoSolicitada == \"circuito\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlCircuitoEconomico = \"select circuito_economico from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlCircuitoEconomico = query($sqlCircuitoEconomico);\n\t\t\t$numRow = mysql_num_rows($resSqlCircuitoEconomico);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlCircuitoEconomico))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['circuito_economico']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//peticion de la actividad de la matriz productiva\n\tif($infoSolicitada == \"identificacionMatriz\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlActividadMatriz = \"select identificacion_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t//echo $sqlActividadMatriz . \"<br>\";\n\t\t\t$resSqlActividadMatriz = query($sqlActividadMatriz);\n\t\t\t$numRow = mysql_num_rows($resSqlActividadMatriz);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlActividadMatriz))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['identificacion_actividad_mp']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//peticion de la actividad de la matriz productiva\n\tif($infoSolicitada == \"categoriaMatriz\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlCategoriaMatriz = \"select categoria_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t//echo $sqlCategoriaMatriz . \"<br>\";\n\t\t\t$resSqlCategoriaMatriz = query($sqlCategoriaMatriz);\n\t\t\t$numRow = mysql_num_rows($resSqlCategoriaMatriz);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlCategoriaMatriz))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['categoria_actividad_mp']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\treturn $infoRecuperada;\n\t\n\n}", "function leerTodosGrupos() {\n $link = crearConexion();\n $grupos = [];\n\n $query = \"SELECT nombre, imagen, descripcion FROM grupo\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['nombre'] = $linea['nombre'];\n $fila['imagen'] = $linea['imagen'];\n $fila['descripcion'] = $linea['descripcion'];\n\n $grupos[] = $fila;\n }\n\n return $grupos;\n}", "function displayOrganismWgenome(&$annot_list){\n global $genome_list_file; $lines=file($genome_list_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if($version!=\"version\")$annot_list[]=array('organism'=>array('name'=>$org,'version'=>$version));\n }\n}", "public function getMataPelajaran();", "function get_title_lectura($lectura)\n{\n $cadena = $lectura->libro_nombre . ' ' . $lectura->capitulo . ': ' . $lectura->inicio\n . '-' . $lectura->final;\n\n return $cadena;\n}" ]
[ "0.6026584", "0.5952716", "0.59357095", "0.59337276", "0.5872608", "0.58144784", "0.57564837", "0.573382", "0.5731017", "0.57223165", "0.5711162", "0.56917065", "0.56406826", "0.5638387", "0.5636814", "0.5597572", "0.55887747", "0.55887544", "0.5586273", "0.55570966", "0.55416685", "0.5523824", "0.55226713", "0.5491338", "0.5490351", "0.5479613", "0.54546726", "0.5454094", "0.54528415", "0.54439104", "0.54351825", "0.5418823", "0.54089046", "0.539598", "0.5394436", "0.539373", "0.5388211", "0.53853863", "0.5380087", "0.53749704", "0.53677136", "0.53612965", "0.53477055", "0.53477055", "0.53472894", "0.5347061", "0.5345432", "0.5342324", "0.53320706", "0.53255534", "0.5324817", "0.532325", "0.5320737", "0.5318848", "0.5302848", "0.5297127", "0.5296859", "0.5289648", "0.52745277", "0.52623016", "0.5258364", "0.52544636", "0.52462757", "0.52350295", "0.5233223", "0.5230874", "0.52207345", "0.5217917", "0.5213618", "0.52100724", "0.5202139", "0.52008253", "0.5198083", "0.5195987", "0.51958257", "0.5187132", "0.5185968", "0.51842815", "0.5179389", "0.5178938", "0.5176578", "0.51740634", "0.5172311", "0.51721054", "0.5156607", "0.51519924", "0.5150041", "0.5149822", "0.51438034", "0.5140083", "0.5136614", "0.513373", "0.51296", "0.5129254", "0.5125573", "0.5120609", "0.5113151", "0.51122206", "0.5107077", "0.510532" ]
0.7230269
0
/ Get Filtros Gestiones
public function getFiltroGestiones() { $resultado = array(); $sql = " SELECT STRING_AGG(v.gestion,',') AS o_resultado FROM ( SELECT CAST(c.gestion AS CHARACTER VARYING) FROM cargos c WHERE c.baja_logica = 1 GROUP BY c.gestion ORDER BY c.gestion ) AS v "; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function obtenerGestores(){\n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerUsuarios();\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function index()\n {\n return Gestion::all();\n }", "public function interventionListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Intervention\");//type array\n\t}", "public function gestores(){\n\t\t$gestores = $this->query(\"SELECT id, Nombre, Clave, supervisor FROM gestors AS Gestor WHERE Activo=1\");\n\t\treturn $gestores;\n\t}", "public function get_filtros(){\n\t\treturn Filtro::get();\n\t}", "function listarFactura(){\r\n\t\t$this->procedimiento='tesor.ft_factura_sel';\r\n\t\t$this->transaccion='TSR_FAC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_factura','int4');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('nro_factura','int4');\r\n\t\t$this->captura('nombre_emisor','varchar');\t\t\r\n\t\t$this->captura('domicilio_emisor','varchar');\r\n\t\t$this->captura('nit_emisor','int4');\r\n\t\t$this->captura('nombre_cliente','varchar');\t\t\r\n\t\t$this->captura('domicilio_cliente','varchar');\r\n\t\t$this->captura('nit_cliente','int4');\r\n\t\t$this->captura('fecha_emision','date');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }", "public function getUtilisateurs();", "public function listarFaltas()\n {\n $id_tipo_falta = $this->request->getGet(\"id_tipo_falta\");\n $respuesta = $this->model->seleccionarFaltas($id_tipo_falta);\n return json_encode($respuesta);\n }", "public function possederListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Posseder\");//type array\n\t}", "function listarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_sel';\n\t\t$this->transaccion='VF_REFACOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_reenvio_factura','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('correo_copia','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado_envio_correo','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function obtenerGestor($idGestor){ \n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerGestor($idGestor);\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function getDetalle();", "public function index()\n {\n\n return $this->facilitie->all();\n\n }", "public function getEventos(){\t\n\t\t$sql=\"SELECT Evento.idEvento as idEvento,Nombre,Descripcion,FechaInicio,FechaFin,idLocal,idTipoEvento,Precio,Director,Interpretes,\n\t\tDuracion, HoraInicio, Coalesce( avg( Puntuacion ), 0 ) as media, Evento.idImagen, Imagen.NombreImg, Imagen.FechaImg\t\t\t\t\n\t\tFROM Evento LEFT JOIN Puntuacion on Puntuacion.idEvento=Evento.idEvento LEFT JOIN Imagen ON Evento.idImagen=Imagen.idImagen \n\t\tGROUP BY Evento.idEvento\";\t\t\n\t\t$db = new bdadministrador();\n\t\treturn $db->executeQuery($sql);\n\t}", "public function geefKlantFacturen() {\n $id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `facturen` WHERE `klant_id` = :klan_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $id);\n $stmnt->execute();\n $facturen = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Factuur');\n return $facturen;\n }", "public function Listar(){\n\t\t\t$view_agendamento = new ViewAgendamentoPacienteFuncionarioClass();\n\n\t\t\t//Chama o método para selecionar os registros\n \n \n \n\t\t\treturn $view_agendamento::Select();\n\t\t}", "public function getGestion()\n {\n return $this->gestion;\n }", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\n\t}", "public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Etat\");//type array\n\t}", "public function getFeatures() {\n return $this->sendRequest(self::HTTP_GET, \"/\".self::GANETI_RAPI_VERSION.\"/features\");\n }", "public function getFuncionarios()\n {\n return $this->hasMany(Funcionarios::className(), ['id' => 'funcionarios_id'])->viaTable('funcionarios_cargo', ['cargo_id' => 'id']);\n }", "public function get_ff()\n\t{\n\t\t$ff = array();\n\t\t\n\t\t// hent firmaer som leier ut garasjer\n\t\t$crew = access::has(\"mod\") ? \"\" : \" AND ff_is_crew = 0\";\n\t\t$result = \\Kofradia\\DB::get()->query(\"\n\t\t\tSELECT ff_id, ff_name, ff_params\n\t\t\tFROM ff\n\t\t\tWHERE ff_type = \".ff::TYPE_GARASJE.\" AND ff_inactive = 0$crew\");\n\t\t\n\t\twhile ($row = $result->fetch())\n\t\t{\n\t\t\t$params = new params($row['ff_params']);\n\t\t\tunset($row['ff_params']);\n\t\t\t\n\t\t\t$row['price'] = $params->get(\"garasje_price\", ff::GTA_GARAGE_PRICE_DEFAULT);\n\t\t\t$ff[$row['ff_id']] = $row;\n\t\t}\n\t\t\n\t\treturn $ff;\n\t}", "public function get_fatura() {\n $criteria = new Criteria;\n $criteria->add(new Filter('id_processo', '=', $this->id_processo));\n return (new Repository(Fatura::class))->load($criteria);\n }", "public function getLesFraisForfait(){\r\n\t\t$req = \"select af_fraisforfait.id as idfrais, libelle, montant from af_fraisforfait order by af_fraisforfait.id\";\r\n\t\t$rs = $this->db->query($req);\r\n\t\t$lesLignes = $rs->result_array();\r\n\t\treturn $lesLignes;\r\n\t}", "public function Listar(){\n\n $motorista = new Motorista();\n\n return $motorista::Select();\n\n }", "function consultarFacultades() {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_facultades\",\"\");\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "public function listarFilosofia(){\n \n //percorrer estantes pelas categorias para eliminar a categ desnecessaria\n foreach ($this->estante as $this->) {\n // code...\n \n if ($this->getCategoria() == \"FILOSOFIA\"){\n echo \"<h2> LIVROS DE FILOSOFIA </h2>\";\n echo \"\";\n //listar todos os livros:\n foreach ($this->livros as $livro){\n $livro->mostrarDados(); \n }\n } else {\n echo \"NENHUM LIVRO DE FILOSOFIA\";\n }\n \n } \n }", "function /* array(stdObject) */ getFacturas() {\n $consulta = \\Base\\FacturaQuery::create()\n ->select(array(\"id_factura\", \"id_cliente\", \"fecha\", \"cantidad_productos\"))\n ->find();\n $arregloObj = json_decode(json_encode($consulta->toArray()), FALSE);\n return $arregloObj;\n /*$sql = 'SELECT `id_factura`, `id_cliente`, `fecha`, `cantidad_productos` FROM `factura`';\n return $this->oMySQL->ejecutarConsultaSelect($sql);*/\n }", "public function getFunctions();", "function getVista()\n {\n try {\n $list = $this->mCategory->get_All();\n include_once('./vistes/categoria.php');\n }catch(Exception $e){\n $this->error->throwException('304', 'No s`ha pogut carregar les dades i la vista', $e);\n }\n }", "public function getFiltradas() {\n return $this->aFiltradas;\n }", "public function equipementachatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"EquipementAchat\");//type array\n\t}", "function listarUoFuncionario(){\r\n\t\t$this->objParam->defecto('ordenacion','FUNCIO.desc_funcionario1');\r\n\t\t$this->objParam->defecto('dir_ordenacion','asc');\r\n\t\t\r\n\t\t//crea el objetoFunSeguridad que contiene todos los metodos del sistema de seguridad\r\n\t\tif ($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\r\n\t\t\t$this->objReporte=new Reporte($this->objParam, $this);\r\n\t\t\t$this->res=$this->objReporte->generarReporteListado('MODUoFuncionario','listarUoFuncionario');\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//obtiene el parametro nodo enviado por la vista\r\n\t\t\t$id_uo=$this->objParam->getParametro('id_uo');\r\n\t\t\t$this->objParam->addParametro('id_uo',$id_uo);\r\n\t\t\t//$this->objParam->addParametro('id_subsistema',$id_subsistema);\r\n\t\t\t$this->objFunSeguridad=$this->create('MODUoFuncionario');\r\n\t\t\t//ejecuta el metodo de lista funcionarios a travez de la intefaz objetoFunSeguridad\r\n\t\t\t$this->res=$this->objFunSeguridad->listarUoFuncionario($this->objParam);\r\n\t\t\t\r\n\t\t}\r\n\t\t//imprime respuesta en formato JSON para enviar lo a la interface (vista)\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t}", "function listaPinchos(){\n\t\t$pincho = new Pincho();\n\t\treturn $pincho->listar();\n\t}", "public function getFeaturesList(){\n return $this->_get(1);\n }", "public function societeListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Societe\");//type array\n\t}", "public function getForos(){\n\t\tif($this->get_request_method() != \"GET\") $this->response('', 406);\n\n\t\t//get data sent\n\t\t$ses_id = $_GET['ses_id'];\n\t\t$user = $_GET['user'];\n\t\t$canal = $_GET['canal'];\n\t\t$regs = $_GET['regs'];\n\t\t$page = $_GET['page'];\n\t\t$inicio = ($page - 1) * $regs;\n\n\t\t// Session validation\n\t\tif ($this->checkSesId($ses_id, $user)){\n\t\t\t// Input validations\n\t\t\tif(trim($user) != ''){\t\t\n\t\t\t\t$foro = new foro();\n\t\t\t\t$filtro_subtemas = \" AND id_tema_parent<>0 AND canal='\".$canal.\"' AND activo=1 AND ocio=0 AND id_area=0 \";\n\t\t\t\t$result = $foro->getTemas($filtro_subtemas.\" ORDER BY id_tema DESC LIMIT \".$inicio.\",\".$regs);\n\t\t\t\t$this->response($this->json($result), 200);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Sesion incorrecta\");\n\t\t\t$this->response($this->json($error), 400);\t\t\n\t\t}\n\t}", "function recuperarFavoritos(){\n\t\t$codpincho = new CodigoPincho();\n\t\t$res = $codpincho->recuperarFavoritos();\n\t\treturn $res;\n\t}", "public function getAllFranchises(){\n $query = \"SELECT * FROM franchises ORDER BY name\";\n $result = $this->connection->query($query);\n $result = $result->fetchAll(PDO::FETCH_ASSOC);\n $franchises = [];\n foreach($result as $data){\n $franchises[] = new Franchise($data);\n }\n return $franchises;\n }", "public function achatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Achat\");//type array\n\t}", "public function get_functions()\n\t{\n\t\treturn $this->driver_query('function_list', FALSE);\n\t}", "public function index()\n {\n return $this->tipoServico->with('categorias','categorias.servicos')->orderBy('id','DESC')->get();\n }", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "public function getEventos(Guard $auth,$id, ServiciosOperadorRepository $gestion) {\n //\n\n $validacion = $gestion->getPermisoEvento($id);\n if (isset($validacion))\n {\n $permiso = $gestion->getPermiso($validacion->id_usuario_servicio);}\n else{\n return view('errors.404');}\n\n if (!isset($permiso) || $permiso->id_usuario != $auth->user()->id) {\n\n\n return view('errors.404');\n }\n\n $listEventos = $gestion->getEventosporId($id);\n foreach ($listEventos as $servicioBase) {\n\n $servicio = $gestion->getUsuario_serv($servicioBase->id_usuario_servicio);\n }\n \n\n return view('Registro.editEvento', compact('listEventos', 'servicio'));\n }", "public function get_datos_factura($n_venta_cf,$id_paciente_cf){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select producto from detalle_ventas where numero_venta=? and id_paciente=? order by id_detalle_ventas ASC;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$n_venta_cf);\n $sql->bindValue(2,$id_paciente_cf);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function obtenerElementosMenu();", "function listaFuncionalidades(){\n\t$lista = null;//array para almacenar las funcionalidades\n\t$num=0; //variable para indexar el array lista\n\t$USU_GRUPO = new USU_GRUPO_Model($_SESSION[\"login\"], '');\n\t$listaGrupos = $USU_GRUPO->listagrupoUsuario();\n\tif($listaGrupos == null){\n\t\treturn false;\n\t}\n\tforeach ($listaGrupos as $key => $IdGrupo) {\n\n\t\t$PERMISO = new PERMISO_Model($IdGrupo, '', '', '', '', '', '','');\n\t\t$resultado = $PERMISO->funcionalidadesGrupo();\n\t\t$num_rows = mysqli_num_rows($resultado);\n\t\tif($num_rows > 0){\n\t\t\twhile($row = mysqli_fetch_array($resultado)){\n\t\t\t\t$lista[$num] =$row[\"IdFuncionalidad\"];\n\t\t\t\t$num++;\n\t\t\t}\n\t\treturn $lista;\n\t\t}\n\t}\n\treturn null;\n\n}", "public function getDetailFasilitas()\n {\n return $this->hasMany(DetailFasilitas::className(), ['kode_fasilitas' => 'kode_fasilitas']);\n }", "public function getServiciosOperador(ServiciosOperadorRepository $gestion) {\n //\n\n $data['id_usuario_op'] = session('operador_id');\n\n //logica que comprueba si el usuario tiene servicios para ser modificados\n //caso contrario ingresa nuevos serviciosS\n $listServicios = $gestion->getServiciosOperador(session('operador_id'));\n\n $view = view('Registro.catalogoServicio', compact('data', 'listServicios'));\n return ($view);\n }", "public function getAllActifClasse() {\n $qb = $this->createQueryBuilder('e')\n ->where('e.etatClasse = ' . TypeEtat::ACTIF);\n // ->orderBy('e.typeClasse', 'ASC');\n return $qb->getQuery()->getResult();\n }", "function lista_dosificacion_activa($tipo)\n {\n $sql=\"select * from dosificacion_factura df \n WHERE df.estado='Activo' and df.tipo_dosificacion='$tipo' Order by df.actividad \";\n $consulta = $this->db->query($sql);\n return($consulta);\n }", "public function funciones()\n {\n return $this->belongsToMany('App\\Funcion', 'funcion_patrocinador','id_patrocinador','id_funcion');\n }", "public function getDemonstrativos();", "public function getEvents();", "public function getEvents();", "function get_all_gestion()\r\n {\r\n $gestion = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n `gestion`\r\n\r\n WHERE\r\n 1 = 1\r\n\r\n ORDER BY `cod_ges` DESC\r\n \")->result_array();\r\n\r\n return $gestion;\r\n }", "function loadPerfilOpciones(){\n\t\t$r = $this->dper->loadPerfilOpciones($this->id);\n\t\t$opc = null;\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\tif($row['per_id'] == $this->id) $indicador = 1; else $indicador = 0;\n\t\t\t$opc[count($opc)]=array('id'=>$row['opc_id'],\n\t\t\t\t\t \t'nombre'=>$row['opc_nombre'],\n\t\t\t\t\t\t'nivel'=>$row['opn_id'],\n \t\t\t\t\t\t'indicador'=>$indicador,\n \t\t\t\t\t\t'acceso'=>$row['pxo_nivel']);\n\t\t}\n\t\treturn $opc;\n\t}", "public function myfavorites_get()\n {\n $user = $this->getCurrentUser();\n $criteria = new \\Doctrine\\Common\\Collections\\Criteria();\n //AQUI TODAS LAS EXPRESIONES POR LAS QUE SE PUEDE BUSCAR CON TEXTO\n $expresion = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"favorite\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::EQ, 1);\n $criteria->where($expresion);\n $criteria->orderBy(array(\"visited_at\"=>\"DESC\"));\n $relacion = $user->getUserservices()->matching($criteria)->toArray();\n $result[\"desc\"] = \"Listado de los servicios marcados como favoritos por el usuario\";\n $result[\"data\"] = array();\n foreach ($relacion as $servicerel) {\n $service_obj = $servicerel->getService();\n $service_obj->loadRelatedData($user, null, site_url());\n $result[\"test\"] = $service_obj->loadRelatedUserData($user);\n $result[\"data\"][] = $service_obj;\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n\n }", "public function demandeListeTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Demande\");//type array\n\t}", "public function getAutoposList(){\n return $this->_get(2);\n }", "public function SelecionarServicosPorFilial($dados){\n\n\n $sql=\"select * from view_servico_filial where idFilial=\".$dados->idFilial;\n\n echo $sql;\n\n $conex = new Mysql_db();\n\n $PDO_conex = $conex->Conectar();\n\n $select = $PDO_conex->query($sql);\n\n $cont=0;\n\n while ($rs=$select->fetch(PDO::FETCH_ASSOC)) {\n $listFiliaisServicoServico[] = new servico_filial();\n\n $listFiliaisServicoServico[$cont]->idFilialServico= $rs['idFilialServico'];\n $listFiliaisServicoServico[$cont]->idFilial= $rs['idFilial'];\n $listFiliaisServicoServico[$cont]->nomeFilial= $rs['nomeFilial'];\n $listFiliaisServicoServico[$cont]->idServico= $rs['idServico'];\n $listFiliaisServicoServico[$cont]->nomeServico= $rs['nome'];\n $listFiliaisServicoServico[$cont]->descricao= $rs['descricao'];\n\n $cont+=1;\n\n }\n\n $conex->Desconectar();\n\n if (isset($listFiliaisServico)) {\n return $listFiliaisServico;\n }\n }", "public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL B ON B.VIAGEM = A.HANDLE AND B.EHINICIOVIAGEM = 'S'\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL C ON C.VIAGEM = A.HANDLE AND C.EHTERMINOVIAGEM = 'S'\n WHERE A.HANDLE = '$this->handle' \");\n $query->execute();\n $dataSet = $query->fetch(PDO::FETCH_ASSOC);\n\n $this->filialDestino = $dataSet['FILIALDESTINO'];\n $this->filialOrigem = $dataSet['FILIALORIGEM'];\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 }", "abstract protected function getFeatures();", "public function functions()\n\t{\n\t\treturn $this->getFunctions();\n\t}", "public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(//Cette requête classe les idFrais par id\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }", "public function getView()\n {\n\n if(!$this->base->isAdmin())\n $servicos = $this->db->where('inativo IS FALSE');\n\n $servicos = $this->db->order_by('data_servico', 'desc')->get('vw_listar_servicos_categoria')->result();\n \n return $servicos;\n }", "function getTypesMenu(){\n\t\t$sql=\"SELECT gd.TenGD, ctgd.MaCTGD, ctgd.TenCTGD FROM giaidoan gd, chitietgiaidoan ctgd WHERE gd.MaGD = ctgd.MaGD\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "public function getDisplayers(): array;", "function listarTipoVenta(){\n\t\t$this->procedimiento='vef.ft_tipo_venta_sel';\n\t\t$this->transaccion='VF_TIPVEN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tipo_venta','int4');\n\t\t$this->captura('codigo_relacion_contable','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('tipo_base','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_plantilla','int4');\n\t\t$this->captura('desc_plantilla','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function magias6() {\n $magias = Magia::where('nivel', 'like', '%6%')->get();\n return $magias;\n }", "public function lista(): array\n {\n return $this->eventos;\n }", "public function formationsAction()\n {\n $this->params['list_title'] = 'Gestion des formations'; \n $this->params['show_parent_column'] = false;\n return $this->createListByNodeType(GestionNotes_Model_Node::TYPE_FORMATION);\n }", "function getFoodpornById($fid)\n {\n $stmt = self::$_db->prepare(\"SELECT * FROM foodporn WHERE id_foodporn=:fid\");\n $stmt->bindParam(\":fid\", $fid);\n $stmt->execute();\n return $stmt->fetchAll();\n \n \n // Gets all History Foodporns\n function getFoodpornsByHostory()\n {\n $stmt = self::$_db->prepare(\"SELECT * FROM foodporn WHERE fs_user=:uid\");\n $uid = self::getUserID();\n $stmt->bindParam(\":uid\", $uid);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n } \n }", "public function secteurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Secteur\");//type array\n\t}", "function consultarDetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public static function list()\n {\n // retorna a query para a busca do grid\n $query = Feature::orderBy('name', 'ASC');\n // cria uma collection com pagination para montar o grid\n parent::handlePagination($query);\n // efetua o tratamento no collection\n parent::customCollection();\n\n\t\treturn [\n\t\t\t'data' => parent::$collection,\n\t\t\t'paginate' => parent::$paginate,\n\t\t];\n }", "function getDatosF_gasto()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'f_gasto'));\n $oDatosCampo->setEtiqueta(_(\"f_gasto\"));\n return $oDatosCampo;\n }", "public function consultarFacturadoresResolucion(){\n\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT FR.idFacturadoresResolucionDian, FR.idFacturador, FR.idResolucionDian, F.identificacion, F.nombre, F.apellido,\n\t\t\t\t\tR.numeroResolucion, R.porcentajeIva\n\t\t\t\t\t\n\t\t\t\t\tFrom tb_facturadoresResolucionDian AS FR\n\t\t\t\t\tINNER JOIN tb_resolucionDian AS R ON R.idResolucionDian = FR.idResolucionDian\n\t\t\t\t\tINNER JOIN tb_facturadores AS F ON F.idFacturador = FR.idFacturador\n\t\t\t\t\t\n\t\t\t\t\tWHERE F.estado = 'A' AND FR.estado = 'A' AND R.estado = 'A'\n\t\t\n\t\t \";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado;\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t}", "public function get_filiales() {\n $this->db->select('*');\n $this->db->from('filial');\n $this->db->join('comuna', 'filial.comuna_id = comuna.comuna_id', 'left');\n $query = $this->db->get();\n //$query = $this->db->get('filial');\n return $query->result_array();\n }", "public function actoresSerie(){\n return $actores=$this->mysqli->query(\"SELECT serie_name, name FROM cast\");\n }", "public function getElementos();", "function getUtilisateurs($actif = 1) {\n\t\t\tif($actif) {\n\t\t\t\treturn $this->find(array(\n\t\t\t\t\t'conditions' => 'actif = 1'\n\t\t\t\t));\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $this->find();\n\t\t\t}\n\t\t}", "public function getFamille(){\n\t\t$req = \"select * from famille\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "public function equipementListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Equipement\");//type array\n\t}", "public function visKlasse() : array\n {\n $arrKlasse = array();\n try {\n global $db;\n $sql = \"SELECT navn FROM klasse\";\n $resultat = $db->query($sql);\n while ($alleKlasser = $resultat->fetch(PDO::FETCH_ASSOC))\n {\n $arrKlasse[] = $alleKlasser;\n }\n }\n catch (Exception $e)\n {\n print $e->getMessage().PHP_EOL;\n }\n return $arrKlasse;\n }", "public function index_fournisseur()\n {\n \n $factureFournisseurs = Facture::where('type','fournisseur')->latest()->get();\n \n // dd($factureFournisseurs);\n \n return view ('facture.index_fournisseur',compact(['factureFournisseurs']));\n\n \n }", "public function show(Gestion $gestion)\n {\n //\n }", "public function facturas()\n {\n return $this->hasMany('App\\Factura');\n }", "public function getFacultets()\n {\n return $this->hasMany(SpravFacultet::className(), ['institut_id' => 'id']);\n }", "public function listar() {\n $conexion = new Conexion();\n $consulta = $conexion->prepare('SELECT * FROM facultad');\n $consulta->execute();\n $ces = null;\n\n $tabla_datos = $consulta->fetchAll(PDO::FETCH_ASSOC);\n\n $astraba = array();\n\n\n foreach ($tabla_datos as $con => $valor) {\n $ces = $tabla_datos[$con][\"nombre\"];\n\n array_push($astraba, $ces);\n }\n return $astraba;\n }", "private function getFiltroTiposRefeicao()\n {\n return (array) $this->filtros['tipo_refeicao'];\n }", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getTipoFalla()\r\n\t{\r\n\t\ttry {\r\n\t\t\t$this->sql = \"\r\n\t\t\tSELECT id,UPPER(nombre) AS nombre FROM tipo_fallas \r\n\t\t\t\";\r\n\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\r\n\t\t\t$this->stmt->execute();\r\n\t\t\t$this->result = $this->stmt->fetchAll(PDO::FETCH_OBJ);\r\n\t\t\treturn json_encode( $this->result );\r\n\t\t} catch (Exception $e) {\r\n\t\t\treturn json_encode( array('status'=>'error','message'=>$e->getMessage() ) );\r\n\t\t}\r\n\t}", "function getFactura($id) {\n $db = $this->getAdapter();\n $db->setFetchMode ( Zend_Db::FETCH_OBJ );\n $select = $db->select();\n $select->distinct(true);\n $select->from(array('f' => 'factura_encomienda'), array(\n \"id_factura\", \"fecha\", \"hora\", \"nit\", \"nombre\", \"monto\",\n \"numero_factura\",\"codigo_control\",\"fecha_limite\"\n ));\n $select->joinInner(array('df'=>'datos_factura'),\"df.id_datos_factura=f.dosificacion\",array(\"autorizacion\"));\n $select->joinInner(array('e'=>'encomienda'),\"e.factura=f.id_factura\",null);\n $select->joinInner(array('p'=>'persona'),\"p.id_persona=f.vendedor\",array(\"identificador\"));\n $select->where(\"e.id_encomienda=?\",$id);\n// echo $select->__toString();\n $log = Zend_Registry::get(\"log\");\n $log->info(\"recuperando movimientos de la encomieda :\" . $select->__toString());\n return $db->fetchRow($select);\n }", "public function tatalFacturas(){\n\t\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"Select count(idFactura) as cantidadFacturas from tb_facturas WHERE estado <> 'Iniciada'\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['cantidadFacturas'];\t\t\t\n\t\t\n\t}", "public function listar(){\n\t\t$sql = \"SELECT * FROM equipo_tipo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function getListeVisiteurs(){\n\t\t$req = \"select * from visiteur order by VIS_MATRICULE\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}" ]
[ "0.6357477", "0.6357208", "0.6235793", "0.6089351", "0.60213995", "0.56351733", "0.55685556", "0.556232", "0.55154854", "0.5500638", "0.5434658", "0.5382303", "0.5359452", "0.53449714", "0.5306931", "0.52833253", "0.5259125", "0.5226622", "0.5217131", "0.5199532", "0.51728874", "0.5170343", "0.5167647", "0.5167062", "0.5163925", "0.51577985", "0.515654", "0.5154518", "0.5151679", "0.51326543", "0.5132333", "0.51297563", "0.5125311", "0.5108528", "0.51007813", "0.5100558", "0.5093153", "0.5090123", "0.50830585", "0.50647587", "0.5041244", "0.50296044", "0.5028913", "0.5026998", "0.5024778", "0.50227", "0.5007637", "0.50061864", "0.5004726", "0.5003353", "0.4990266", "0.49675953", "0.49652952", "0.4939121", "0.49289998", "0.49289998", "0.49222234", "0.4920542", "0.4914533", "0.49144226", "0.49045208", "0.49027616", "0.49009177", "0.4899331", "0.4889367", "0.48730123", "0.4872548", "0.48689055", "0.48670438", "0.4862386", "0.48619723", "0.48577", "0.48536804", "0.48510185", "0.48505044", "0.48479202", "0.48477373", "0.48466107", "0.48456174", "0.48442376", "0.48412532", "0.48376295", "0.4837366", "0.4833687", "0.4832174", "0.48267356", "0.48263726", "0.48254648", "0.4824512", "0.48204058", "0.48144183", "0.48103935", "0.48065096", "0.48064572", "0.4804639", "0.48035327", "0.48017466", "0.47960842", "0.47909907", "0.4789383" ]
0.5267135
16
/ Get Filtros Gestiones
public function getFiltroTipoCargo() { $resultado = array(); $sql = " SELECT STRING_AGG(v.condicion,',') AS o_resultado FROM ( SELECT co.condicion FROM cargos c INNER JOIN finpartidas f ON c.fin_partida_id = f.id INNER JOIN condiciones co ON f.condicion_id = co.id WHERE c.baja_logica=1 GROUP BY co.condicion ORDER BY co.condicion asc ) AS v"; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return Gestion::all();\n }", "public function obtenerGestores(){\n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerUsuarios();\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function interventionListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Intervention\");//type array\n\t}", "public function gestores(){\n\t\t$gestores = $this->query(\"SELECT id, Nombre, Clave, supervisor FROM gestors AS Gestor WHERE Activo=1\");\n\t\treturn $gestores;\n\t}", "public function get_filtros(){\n\t\treturn Filtro::get();\n\t}", "function listarFactura(){\r\n\t\t$this->procedimiento='tesor.ft_factura_sel';\r\n\t\t$this->transaccion='TSR_FAC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_factura','int4');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('nro_factura','int4');\r\n\t\t$this->captura('nombre_emisor','varchar');\t\t\r\n\t\t$this->captura('domicilio_emisor','varchar');\r\n\t\t$this->captura('nit_emisor','int4');\r\n\t\t$this->captura('nombre_cliente','varchar');\t\t\r\n\t\t$this->captura('domicilio_cliente','varchar');\r\n\t\t$this->captura('nit_cliente','int4');\r\n\t\t$this->captura('fecha_emision','date');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }", "public function getUtilisateurs();", "public function listarFaltas()\n {\n $id_tipo_falta = $this->request->getGet(\"id_tipo_falta\");\n $respuesta = $this->model->seleccionarFaltas($id_tipo_falta);\n return json_encode($respuesta);\n }", "public function possederListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Posseder\");//type array\n\t}", "function listarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_sel';\n\t\t$this->transaccion='VF_REFACOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_reenvio_factura','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('correo_copia','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado_envio_correo','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function obtenerGestor($idGestor){ \n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerGestor($idGestor);\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function getDetalle();", "public function index()\n {\n\n return $this->facilitie->all();\n\n }", "public function getEventos(){\t\n\t\t$sql=\"SELECT Evento.idEvento as idEvento,Nombre,Descripcion,FechaInicio,FechaFin,idLocal,idTipoEvento,Precio,Director,Interpretes,\n\t\tDuracion, HoraInicio, Coalesce( avg( Puntuacion ), 0 ) as media, Evento.idImagen, Imagen.NombreImg, Imagen.FechaImg\t\t\t\t\n\t\tFROM Evento LEFT JOIN Puntuacion on Puntuacion.idEvento=Evento.idEvento LEFT JOIN Imagen ON Evento.idImagen=Imagen.idImagen \n\t\tGROUP BY Evento.idEvento\";\t\t\n\t\t$db = new bdadministrador();\n\t\treturn $db->executeQuery($sql);\n\t}", "public function geefKlantFacturen() {\n $id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `facturen` WHERE `klant_id` = :klan_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $id);\n $stmnt->execute();\n $facturen = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Factuur');\n return $facturen;\n }", "public function getFiltroGestiones()\n {\n $resultado = array();\n $sql = \"\n SELECT STRING_AGG(v.gestion,',') AS o_resultado FROM ( \nSELECT CAST(c.gestion AS CHARACTER VARYING)\nFROM cargos c\nWHERE c.baja_logica = 1\nGROUP BY c.gestion\nORDER BY c.gestion\n) AS v\n \";\n $this->_db = new Cargos();\n $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql));\n if (count($arr) > 0) {\n /**\n * Para agregar un valor nulo al inicio se añade una coma\n */\n $res = $arr[0]->o_resultado;\n $resultado = explode(\",\", $res);\n }\n return $resultado;\n }", "public function Listar(){\n\t\t\t$view_agendamento = new ViewAgendamentoPacienteFuncionarioClass();\n\n\t\t\t//Chama o método para selecionar os registros\n \n \n \n\t\t\treturn $view_agendamento::Select();\n\t\t}", "public function getGestion()\n {\n return $this->gestion;\n }", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\n\t}", "public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Etat\");//type array\n\t}", "public function getFeatures() {\n return $this->sendRequest(self::HTTP_GET, \"/\".self::GANETI_RAPI_VERSION.\"/features\");\n }", "public function getFuncionarios()\n {\n return $this->hasMany(Funcionarios::className(), ['id' => 'funcionarios_id'])->viaTable('funcionarios_cargo', ['cargo_id' => 'id']);\n }", "public function get_ff()\n\t{\n\t\t$ff = array();\n\t\t\n\t\t// hent firmaer som leier ut garasjer\n\t\t$crew = access::has(\"mod\") ? \"\" : \" AND ff_is_crew = 0\";\n\t\t$result = \\Kofradia\\DB::get()->query(\"\n\t\t\tSELECT ff_id, ff_name, ff_params\n\t\t\tFROM ff\n\t\t\tWHERE ff_type = \".ff::TYPE_GARASJE.\" AND ff_inactive = 0$crew\");\n\t\t\n\t\twhile ($row = $result->fetch())\n\t\t{\n\t\t\t$params = new params($row['ff_params']);\n\t\t\tunset($row['ff_params']);\n\t\t\t\n\t\t\t$row['price'] = $params->get(\"garasje_price\", ff::GTA_GARAGE_PRICE_DEFAULT);\n\t\t\t$ff[$row['ff_id']] = $row;\n\t\t}\n\t\t\n\t\treturn $ff;\n\t}", "public function get_fatura() {\n $criteria = new Criteria;\n $criteria->add(new Filter('id_processo', '=', $this->id_processo));\n return (new Repository(Fatura::class))->load($criteria);\n }", "public function getLesFraisForfait(){\r\n\t\t$req = \"select af_fraisforfait.id as idfrais, libelle, montant from af_fraisforfait order by af_fraisforfait.id\";\r\n\t\t$rs = $this->db->query($req);\r\n\t\t$lesLignes = $rs->result_array();\r\n\t\treturn $lesLignes;\r\n\t}", "function consultarFacultades() {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_facultades\",\"\");\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "public function Listar(){\n\n $motorista = new Motorista();\n\n return $motorista::Select();\n\n }", "public function listarFilosofia(){\n \n //percorrer estantes pelas categorias para eliminar a categ desnecessaria\n foreach ($this->estante as $this->) {\n // code...\n \n if ($this->getCategoria() == \"FILOSOFIA\"){\n echo \"<h2> LIVROS DE FILOSOFIA </h2>\";\n echo \"\";\n //listar todos os livros:\n foreach ($this->livros as $livro){\n $livro->mostrarDados(); \n }\n } else {\n echo \"NENHUM LIVRO DE FILOSOFIA\";\n }\n \n } \n }", "function /* array(stdObject) */ getFacturas() {\n $consulta = \\Base\\FacturaQuery::create()\n ->select(array(\"id_factura\", \"id_cliente\", \"fecha\", \"cantidad_productos\"))\n ->find();\n $arregloObj = json_decode(json_encode($consulta->toArray()), FALSE);\n return $arregloObj;\n /*$sql = 'SELECT `id_factura`, `id_cliente`, `fecha`, `cantidad_productos` FROM `factura`';\n return $this->oMySQL->ejecutarConsultaSelect($sql);*/\n }", "public function getFunctions();", "function getVista()\n {\n try {\n $list = $this->mCategory->get_All();\n include_once('./vistes/categoria.php');\n }catch(Exception $e){\n $this->error->throwException('304', 'No s`ha pogut carregar les dades i la vista', $e);\n }\n }", "public function getFiltradas() {\n return $this->aFiltradas;\n }", "public function equipementachatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"EquipementAchat\");//type array\n\t}", "function listarUoFuncionario(){\r\n\t\t$this->objParam->defecto('ordenacion','FUNCIO.desc_funcionario1');\r\n\t\t$this->objParam->defecto('dir_ordenacion','asc');\r\n\t\t\r\n\t\t//crea el objetoFunSeguridad que contiene todos los metodos del sistema de seguridad\r\n\t\tif ($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\r\n\t\t\t$this->objReporte=new Reporte($this->objParam, $this);\r\n\t\t\t$this->res=$this->objReporte->generarReporteListado('MODUoFuncionario','listarUoFuncionario');\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//obtiene el parametro nodo enviado por la vista\r\n\t\t\t$id_uo=$this->objParam->getParametro('id_uo');\r\n\t\t\t$this->objParam->addParametro('id_uo',$id_uo);\r\n\t\t\t//$this->objParam->addParametro('id_subsistema',$id_subsistema);\r\n\t\t\t$this->objFunSeguridad=$this->create('MODUoFuncionario');\r\n\t\t\t//ejecuta el metodo de lista funcionarios a travez de la intefaz objetoFunSeguridad\r\n\t\t\t$this->res=$this->objFunSeguridad->listarUoFuncionario($this->objParam);\r\n\t\t\t\r\n\t\t}\r\n\t\t//imprime respuesta en formato JSON para enviar lo a la interface (vista)\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t}", "public function getFeaturesList(){\n return $this->_get(1);\n }", "function listaPinchos(){\n\t\t$pincho = new Pincho();\n\t\treturn $pincho->listar();\n\t}", "public function societeListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Societe\");//type array\n\t}", "public function getForos(){\n\t\tif($this->get_request_method() != \"GET\") $this->response('', 406);\n\n\t\t//get data sent\n\t\t$ses_id = $_GET['ses_id'];\n\t\t$user = $_GET['user'];\n\t\t$canal = $_GET['canal'];\n\t\t$regs = $_GET['regs'];\n\t\t$page = $_GET['page'];\n\t\t$inicio = ($page - 1) * $regs;\n\n\t\t// Session validation\n\t\tif ($this->checkSesId($ses_id, $user)){\n\t\t\t// Input validations\n\t\t\tif(trim($user) != ''){\t\t\n\t\t\t\t$foro = new foro();\n\t\t\t\t$filtro_subtemas = \" AND id_tema_parent<>0 AND canal='\".$canal.\"' AND activo=1 AND ocio=0 AND id_area=0 \";\n\t\t\t\t$result = $foro->getTemas($filtro_subtemas.\" ORDER BY id_tema DESC LIMIT \".$inicio.\",\".$regs);\n\t\t\t\t$this->response($this->json($result), 200);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Sesion incorrecta\");\n\t\t\t$this->response($this->json($error), 400);\t\t\n\t\t}\n\t}", "function recuperarFavoritos(){\n\t\t$codpincho = new CodigoPincho();\n\t\t$res = $codpincho->recuperarFavoritos();\n\t\treturn $res;\n\t}", "public function getAllFranchises(){\n $query = \"SELECT * FROM franchises ORDER BY name\";\n $result = $this->connection->query($query);\n $result = $result->fetchAll(PDO::FETCH_ASSOC);\n $franchises = [];\n foreach($result as $data){\n $franchises[] = new Franchise($data);\n }\n return $franchises;\n }", "public function achatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Achat\");//type array\n\t}", "public function get_functions()\n\t{\n\t\treturn $this->driver_query('function_list', FALSE);\n\t}", "public function index()\n {\n return $this->tipoServico->with('categorias','categorias.servicos')->orderBy('id','DESC')->get();\n }", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "public function getEventos(Guard $auth,$id, ServiciosOperadorRepository $gestion) {\n //\n\n $validacion = $gestion->getPermisoEvento($id);\n if (isset($validacion))\n {\n $permiso = $gestion->getPermiso($validacion->id_usuario_servicio);}\n else{\n return view('errors.404');}\n\n if (!isset($permiso) || $permiso->id_usuario != $auth->user()->id) {\n\n\n return view('errors.404');\n }\n\n $listEventos = $gestion->getEventosporId($id);\n foreach ($listEventos as $servicioBase) {\n\n $servicio = $gestion->getUsuario_serv($servicioBase->id_usuario_servicio);\n }\n \n\n return view('Registro.editEvento', compact('listEventos', 'servicio'));\n }", "public function get_datos_factura($n_venta_cf,$id_paciente_cf){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select producto from detalle_ventas where numero_venta=? and id_paciente=? order by id_detalle_ventas ASC;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$n_venta_cf);\n $sql->bindValue(2,$id_paciente_cf);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function listaFuncionalidades(){\n\t$lista = null;//array para almacenar las funcionalidades\n\t$num=0; //variable para indexar el array lista\n\t$USU_GRUPO = new USU_GRUPO_Model($_SESSION[\"login\"], '');\n\t$listaGrupos = $USU_GRUPO->listagrupoUsuario();\n\tif($listaGrupos == null){\n\t\treturn false;\n\t}\n\tforeach ($listaGrupos as $key => $IdGrupo) {\n\n\t\t$PERMISO = new PERMISO_Model($IdGrupo, '', '', '', '', '', '','');\n\t\t$resultado = $PERMISO->funcionalidadesGrupo();\n\t\t$num_rows = mysqli_num_rows($resultado);\n\t\tif($num_rows > 0){\n\t\t\twhile($row = mysqli_fetch_array($resultado)){\n\t\t\t\t$lista[$num] =$row[\"IdFuncionalidad\"];\n\t\t\t\t$num++;\n\t\t\t}\n\t\treturn $lista;\n\t\t}\n\t}\n\treturn null;\n\n}", "public function obtenerElementosMenu();", "public function getDetailFasilitas()\n {\n return $this->hasMany(DetailFasilitas::className(), ['kode_fasilitas' => 'kode_fasilitas']);\n }", "public function getServiciosOperador(ServiciosOperadorRepository $gestion) {\n //\n\n $data['id_usuario_op'] = session('operador_id');\n\n //logica que comprueba si el usuario tiene servicios para ser modificados\n //caso contrario ingresa nuevos serviciosS\n $listServicios = $gestion->getServiciosOperador(session('operador_id'));\n\n $view = view('Registro.catalogoServicio', compact('data', 'listServicios'));\n return ($view);\n }", "public function getAllActifClasse() {\n $qb = $this->createQueryBuilder('e')\n ->where('e.etatClasse = ' . TypeEtat::ACTIF);\n // ->orderBy('e.typeClasse', 'ASC');\n return $qb->getQuery()->getResult();\n }", "function lista_dosificacion_activa($tipo)\n {\n $sql=\"select * from dosificacion_factura df \n WHERE df.estado='Activo' and df.tipo_dosificacion='$tipo' Order by df.actividad \";\n $consulta = $this->db->query($sql);\n return($consulta);\n }", "public function funciones()\n {\n return $this->belongsToMany('App\\Funcion', 'funcion_patrocinador','id_patrocinador','id_funcion');\n }", "public function getDemonstrativos();", "public function getEvents();", "public function getEvents();", "function get_all_gestion()\r\n {\r\n $gestion = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n `gestion`\r\n\r\n WHERE\r\n 1 = 1\r\n\r\n ORDER BY `cod_ges` DESC\r\n \")->result_array();\r\n\r\n return $gestion;\r\n }", "function loadPerfilOpciones(){\n\t\t$r = $this->dper->loadPerfilOpciones($this->id);\n\t\t$opc = null;\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\tif($row['per_id'] == $this->id) $indicador = 1; else $indicador = 0;\n\t\t\t$opc[count($opc)]=array('id'=>$row['opc_id'],\n\t\t\t\t\t \t'nombre'=>$row['opc_nombre'],\n\t\t\t\t\t\t'nivel'=>$row['opn_id'],\n \t\t\t\t\t\t'indicador'=>$indicador,\n \t\t\t\t\t\t'acceso'=>$row['pxo_nivel']);\n\t\t}\n\t\treturn $opc;\n\t}", "public function demandeListeTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Demande\");//type array\n\t}", "public function myfavorites_get()\n {\n $user = $this->getCurrentUser();\n $criteria = new \\Doctrine\\Common\\Collections\\Criteria();\n //AQUI TODAS LAS EXPRESIONES POR LAS QUE SE PUEDE BUSCAR CON TEXTO\n $expresion = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"favorite\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::EQ, 1);\n $criteria->where($expresion);\n $criteria->orderBy(array(\"visited_at\"=>\"DESC\"));\n $relacion = $user->getUserservices()->matching($criteria)->toArray();\n $result[\"desc\"] = \"Listado de los servicios marcados como favoritos por el usuario\";\n $result[\"data\"] = array();\n foreach ($relacion as $servicerel) {\n $service_obj = $servicerel->getService();\n $service_obj->loadRelatedData($user, null, site_url());\n $result[\"test\"] = $service_obj->loadRelatedUserData($user);\n $result[\"data\"][] = $service_obj;\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n\n }", "public function SelecionarServicosPorFilial($dados){\n\n\n $sql=\"select * from view_servico_filial where idFilial=\".$dados->idFilial;\n\n echo $sql;\n\n $conex = new Mysql_db();\n\n $PDO_conex = $conex->Conectar();\n\n $select = $PDO_conex->query($sql);\n\n $cont=0;\n\n while ($rs=$select->fetch(PDO::FETCH_ASSOC)) {\n $listFiliaisServicoServico[] = new servico_filial();\n\n $listFiliaisServicoServico[$cont]->idFilialServico= $rs['idFilialServico'];\n $listFiliaisServicoServico[$cont]->idFilial= $rs['idFilial'];\n $listFiliaisServicoServico[$cont]->nomeFilial= $rs['nomeFilial'];\n $listFiliaisServicoServico[$cont]->idServico= $rs['idServico'];\n $listFiliaisServicoServico[$cont]->nomeServico= $rs['nome'];\n $listFiliaisServicoServico[$cont]->descricao= $rs['descricao'];\n\n $cont+=1;\n\n }\n\n $conex->Desconectar();\n\n if (isset($listFiliaisServico)) {\n return $listFiliaisServico;\n }\n }", "public function getAutoposList(){\n return $this->_get(2);\n }", "public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL B ON B.VIAGEM = A.HANDLE AND B.EHINICIOVIAGEM = 'S'\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL C ON C.VIAGEM = A.HANDLE AND C.EHTERMINOVIAGEM = 'S'\n WHERE A.HANDLE = '$this->handle' \");\n $query->execute();\n $dataSet = $query->fetch(PDO::FETCH_ASSOC);\n\n $this->filialDestino = $dataSet['FILIALDESTINO'];\n $this->filialOrigem = $dataSet['FILIALORIGEM'];\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 }", "abstract protected function getFeatures();", "public function functions()\n\t{\n\t\treturn $this->getFunctions();\n\t}", "public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(//Cette requête classe les idFrais par id\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }", "public function getView()\n {\n\n if(!$this->base->isAdmin())\n $servicos = $this->db->where('inativo IS FALSE');\n\n $servicos = $this->db->order_by('data_servico', 'desc')->get('vw_listar_servicos_categoria')->result();\n \n return $servicos;\n }", "function getTypesMenu(){\n\t\t$sql=\"SELECT gd.TenGD, ctgd.MaCTGD, ctgd.TenCTGD FROM giaidoan gd, chitietgiaidoan ctgd WHERE gd.MaGD = ctgd.MaGD\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}", "public function getDisplayers(): array;", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "function listarTipoVenta(){\n\t\t$this->procedimiento='vef.ft_tipo_venta_sel';\n\t\t$this->transaccion='VF_TIPVEN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tipo_venta','int4');\n\t\t$this->captura('codigo_relacion_contable','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('tipo_base','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_plantilla','int4');\n\t\t$this->captura('desc_plantilla','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function magias6() {\n $magias = Magia::where('nivel', 'like', '%6%')->get();\n return $magias;\n }", "function getFoodpornById($fid)\n {\n $stmt = self::$_db->prepare(\"SELECT * FROM foodporn WHERE id_foodporn=:fid\");\n $stmt->bindParam(\":fid\", $fid);\n $stmt->execute();\n return $stmt->fetchAll();\n \n \n // Gets all History Foodporns\n function getFoodpornsByHostory()\n {\n $stmt = self::$_db->prepare(\"SELECT * FROM foodporn WHERE fs_user=:uid\");\n $uid = self::getUserID();\n $stmt->bindParam(\":uid\", $uid);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n } \n }", "public function formationsAction()\n {\n $this->params['list_title'] = 'Gestion des formations'; \n $this->params['show_parent_column'] = false;\n return $this->createListByNodeType(GestionNotes_Model_Node::TYPE_FORMATION);\n }", "public function lista(): array\n {\n return $this->eventos;\n }", "public function secteurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Secteur\");//type array\n\t}", "function consultarDetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function getDatosF_gasto()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'f_gasto'));\n $oDatosCampo->setEtiqueta(_(\"f_gasto\"));\n return $oDatosCampo;\n }", "public static function list()\n {\n // retorna a query para a busca do grid\n $query = Feature::orderBy('name', 'ASC');\n // cria uma collection com pagination para montar o grid\n parent::handlePagination($query);\n // efetua o tratamento no collection\n parent::customCollection();\n\n\t\treturn [\n\t\t\t'data' => parent::$collection,\n\t\t\t'paginate' => parent::$paginate,\n\t\t];\n }", "public function consultarFacturadoresResolucion(){\n\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT FR.idFacturadoresResolucionDian, FR.idFacturador, FR.idResolucionDian, F.identificacion, F.nombre, F.apellido,\n\t\t\t\t\tR.numeroResolucion, R.porcentajeIva\n\t\t\t\t\t\n\t\t\t\t\tFrom tb_facturadoresResolucionDian AS FR\n\t\t\t\t\tINNER JOIN tb_resolucionDian AS R ON R.idResolucionDian = FR.idResolucionDian\n\t\t\t\t\tINNER JOIN tb_facturadores AS F ON F.idFacturador = FR.idFacturador\n\t\t\t\t\t\n\t\t\t\t\tWHERE F.estado = 'A' AND FR.estado = 'A' AND R.estado = 'A'\n\t\t\n\t\t \";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado;\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t}", "public function get_filiales() {\n $this->db->select('*');\n $this->db->from('filial');\n $this->db->join('comuna', 'filial.comuna_id = comuna.comuna_id', 'left');\n $query = $this->db->get();\n //$query = $this->db->get('filial');\n return $query->result_array();\n }", "public function actoresSerie(){\n return $actores=$this->mysqli->query(\"SELECT serie_name, name FROM cast\");\n }", "public function getElementos();", "function getUtilisateurs($actif = 1) {\n\t\t\tif($actif) {\n\t\t\t\treturn $this->find(array(\n\t\t\t\t\t'conditions' => 'actif = 1'\n\t\t\t\t));\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $this->find();\n\t\t\t}\n\t\t}", "public function getFamille(){\n\t\t$req = \"select * from famille\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "public function index_fournisseur()\n {\n \n $factureFournisseurs = Facture::where('type','fournisseur')->latest()->get();\n \n // dd($factureFournisseurs);\n \n return view ('facture.index_fournisseur',compact(['factureFournisseurs']));\n\n \n }", "public function visKlasse() : array\n {\n $arrKlasse = array();\n try {\n global $db;\n $sql = \"SELECT navn FROM klasse\";\n $resultat = $db->query($sql);\n while ($alleKlasser = $resultat->fetch(PDO::FETCH_ASSOC))\n {\n $arrKlasse[] = $alleKlasser;\n }\n }\n catch (Exception $e)\n {\n print $e->getMessage().PHP_EOL;\n }\n return $arrKlasse;\n }", "public function equipementListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Equipement\");//type array\n\t}", "public function show(Gestion $gestion)\n {\n //\n }", "public function facturas()\n {\n return $this->hasMany('App\\Factura');\n }", "public function getFacultets()\n {\n return $this->hasMany(SpravFacultet::className(), ['institut_id' => 'id']);\n }", "public function listar() {\n $conexion = new Conexion();\n $consulta = $conexion->prepare('SELECT * FROM facultad');\n $consulta->execute();\n $ces = null;\n\n $tabla_datos = $consulta->fetchAll(PDO::FETCH_ASSOC);\n\n $astraba = array();\n\n\n foreach ($tabla_datos as $con => $valor) {\n $ces = $tabla_datos[$con][\"nombre\"];\n\n array_push($astraba, $ces);\n }\n return $astraba;\n }", "private function getFiltroTiposRefeicao()\n {\n return (array) $this->filtros['tipo_refeicao'];\n }", "public function getTipoFalla()\r\n\t{\r\n\t\ttry {\r\n\t\t\t$this->sql = \"\r\n\t\t\tSELECT id,UPPER(nombre) AS nombre FROM tipo_fallas \r\n\t\t\t\";\r\n\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\r\n\t\t\t$this->stmt->execute();\r\n\t\t\t$this->result = $this->stmt->fetchAll(PDO::FETCH_OBJ);\r\n\t\t\treturn json_encode( $this->result );\r\n\t\t} catch (Exception $e) {\r\n\t\t\treturn json_encode( array('status'=>'error','message'=>$e->getMessage() ) );\r\n\t\t}\r\n\t}", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function getFactura($id) {\n $db = $this->getAdapter();\n $db->setFetchMode ( Zend_Db::FETCH_OBJ );\n $select = $db->select();\n $select->distinct(true);\n $select->from(array('f' => 'factura_encomienda'), array(\n \"id_factura\", \"fecha\", \"hora\", \"nit\", \"nombre\", \"monto\",\n \"numero_factura\",\"codigo_control\",\"fecha_limite\"\n ));\n $select->joinInner(array('df'=>'datos_factura'),\"df.id_datos_factura=f.dosificacion\",array(\"autorizacion\"));\n $select->joinInner(array('e'=>'encomienda'),\"e.factura=f.id_factura\",null);\n $select->joinInner(array('p'=>'persona'),\"p.id_persona=f.vendedor\",array(\"identificador\"));\n $select->where(\"e.id_encomienda=?\",$id);\n// echo $select->__toString();\n $log = Zend_Registry::get(\"log\");\n $log->info(\"recuperando movimientos de la encomieda :\" . $select->__toString());\n return $db->fetchRow($select);\n }", "public function tatalFacturas(){\n\t\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"Select count(idFactura) as cantidadFacturas from tb_facturas WHERE estado <> 'Iniciada'\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['cantidadFacturas'];\t\t\t\n\t\t\n\t}", "public function listar(){\n\t\t$sql = \"SELECT * FROM equipo_tipo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function getFuncionario()\n {\n return $this->funcionario;\n }" ]
[ "0.63563466", "0.6356137", "0.62354094", "0.60881704", "0.6023164", "0.56371707", "0.5571168", "0.55628157", "0.5517878", "0.5500299", "0.5436062", "0.5381042", "0.53599423", "0.53464836", "0.5306314", "0.5284384", "0.5267171", "0.52604467", "0.5225281", "0.52166754", "0.5199714", "0.5173618", "0.5172132", "0.5169816", "0.5169141", "0.5165967", "0.51594716", "0.51581985", "0.51580083", "0.5152652", "0.5134615", "0.5133883", "0.5129988", "0.512476", "0.5110938", "0.51008487", "0.5099506", "0.50929207", "0.50915337", "0.5083155", "0.5067663", "0.50411505", "0.5031202", "0.50297856", "0.5027583", "0.5024847", "0.502463", "0.50078875", "0.50074565", "0.5007026", "0.50029826", "0.4990777", "0.4968833", "0.4966652", "0.49396908", "0.49277607", "0.49277607", "0.49220678", "0.49213663", "0.49151483", "0.49149323", "0.49043897", "0.49034065", "0.4903297", "0.48987985", "0.4890955", "0.4873833", "0.48735315", "0.48694265", "0.4866878", "0.48621634", "0.48611927", "0.4858744", "0.48540714", "0.48508975", "0.4850738", "0.4850132", "0.48474175", "0.48470038", "0.4846207", "0.48459136", "0.4842839", "0.48400605", "0.48381296", "0.48338592", "0.48322806", "0.48286065", "0.48270622", "0.48262474", "0.48256296", "0.48214447", "0.48157007", "0.48127598", "0.48083368", "0.4807093", "0.48064527", "0.48052448", "0.4803214", "0.47972843", "0.47922546", "0.47895882" ]
0.0
-1
Removing rows from main and child tables
function remove_rows($table_id, $data) { $cmsEditDel = new cmsEditDel($table_id, $data); $delete_id = $cmsEditDel->dbChange(); unset($cmsEditDel); if (empty($delete_id)) return; $child = getChildTables($table_id); reset($child); while (list($table_id, $field_name) = each($child)) { remove_rows($table_id, array($field_name => $delete_id)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach($this->getTables() as $t) {\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t}", "protected function deleteChildren() {}", "public function refreshRows(){\n if (count($this->rows) > 0){\n foreach ($this->rows as $row){\n $this->removeRow($row);\n }\n }\n }", "private function getCleanTables() {\n\t\tunset($this->_vm_product);\n\t\tunset($this->product_id);\n\t\tunset($this->product_sku);\n\t\tunset($this->product_in_stock);\n\t}", "public function delete_rows()\n {\n $tables = $this->file->sheets->first()->tables->filter(function($table) {\n $uniques = $table->columns->filter(function($column) { return $column->unique; })->map(function($column) {\n return 'C' . $column->id;\n })->toArray();\n\n $updates = array_merge(array_fill_keys($uniques, ''), ['deleted_by' => $this->user->id, 'deleted_at' => Carbon::now()->toDateTimeString()]);\n\n $query = DB::table($table->database . '.dbo.' . $table->name);\n\n !$this->isCreater() && $query->where('created_by', $this->user->id);\n\n return $query->whereIn('id', Input::get('rows'))->update($updates);\n });\n\n return ['tables' => $tables];\n }", "public function removeDeletedRecords() \n {\n // this algorythm should be a fair bit\n // faster than calling DataSet::removeRecord()\n $new_recs = array();\n foreach($this->records as $rec) {\n if (!$rec->isAZombie()) {\n $new_recs[] = $rec;\n }\n }\n $this->records = $new_recs;\n }", "function deleteChilds(){\n\t\t$this->db->query(\"SELECT ID FROM \" . EXPORT_TABLE . ' WHERE ParentID=' . intval($this->ID));\n\t\twhile($this->db->next_record()){\n\t\t\t$child = new we_export_export($this->db->f(\"ID\"));\n\t\t\t$child->delete();\n\t\t}\n\t}", "public function unlinkAll()\n {\n return $this->pivotTable()->delete($this->wherePivot($this->parentKey(), null))->run();\n }", "private function truncate()\n {\n // Désactivation des contraintes FK\n $this->co->executeQuery('SET foreign_key_checks = 0');\n // On tronque\n $this->co->executeQuery('TRUNCATE TABLE casting');\n $this->co->executeQuery('TRUNCATE TABLE department');\n $this->co->executeQuery('TRUNCATE TABLE genre');\n $this->co->executeQuery('TRUNCATE TABLE job');\n $this->co->executeQuery('TRUNCATE TABLE movie');\n $this->co->executeQuery('TRUNCATE TABLE movie_genre');\n $this->co->executeQuery('TRUNCATE TABLE person');\n $this->co->executeQuery('TRUNCATE TABLE review');\n $this->co->executeQuery('TRUNCATE TABLE team');\n $this->co->executeQuery('TRUNCATE TABLE user');\n }", "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE course';\n \n $connection_manager = new connection_manager();\n $conn = $connection_manager->connect();\n \n $stmt = $conn->prepare($sql);\n \n $stmt->execute();\n $count = $stmt->rowCount();\n }", "private function cleanCoreTables() {\n\n $core_tables = [\n 'glpi_datacenters',\n 'glpi_dcrooms',\n 'glpi_items_racks',\n 'glpi_pdus',\n 'glpi_racks',\n 'glpi_rackmodels',\n 'glpi_racktypes',\n 'glpi_passivedcequipments',\n 'glpi_passivedcequipmenttypes',\n 'glpi_passivedcequipmentmodels',\n ];\n\n foreach ($core_tables as $table) {\n $result = $this->db->query('TRUNCATE ' . DB::quoteName($table));\n\n if (!$result) {\n throw new RuntimeException(\n sprintf('Unable to truncate table \"%s\"', $table)\n );\n }\n }\n }", "public function dropAllData()\n {\n $database_name = $this->conn->getDatabase();\n\n $tables = $this->conn->query(\"SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = '$database_name';\")->fetchAll();\n\n $queries = \"SET FOREIGN_KEY_CHECKS=0;\\n\";\n\n foreach ($tables as $aTable){\n $queries .= reset($aTable);\n }\n\n $this->conn->executeQuery($queries);\n\n $editora_structure = file_get_contents(__DIR__ .'/../../../../data/editora.sql');\n\n $this->conn->executeQuery($editora_structure);\n }", "public function __destruct()\n {\n static $depth = 0;\n // destruct can be called several times\n if ($depth < self::$maximumDepthLevelAllowed\n && isset($this->rows)\n ) {\n $depth++;\n foreach ($this->getRows() as $row) {\n destroy($row);\n }\n unset($this->rows);\n Piwik_DataTable_Manager::getInstance()->setTableDeleted($this->getId());\n $depth--;\n }\n }", "private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}", "private function delete_tables()\n {\n global $wpdb;\n\n // this needs to occur at this level, and not in the\n foreach ($this->tables as $tablename) {\n $sql = 'DROP TABLE IF EXISTS ' . $tablename;\n $wpdb->query($sql);\n }\n }", "function cleanTables($test = false) {\n\n\t\t$this->cleanForeignKey('sotf_blobs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_blobs', 'object_id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_nodes', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_user_permissions', 'permission_id', 'sotf_permissions', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stations', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_contacts', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_contacts', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_series', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_series', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'contact_id', 'sotf_contacts', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'object_id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_programmes', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_programmes', 'station_id', 'sotf_stations', 'id');\n\n\t\t//// series field is not compulsory! \n\t\t//// $this->cleanForeignKey('sotf_programmes', 'series_id', 'sotf_series', 'id');\n\n\t\t$this->cleanForeignKey('sotf_rights', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_rights', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_extradata', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_extradata', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_other_files', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_other_files', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_media_files', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_media_files', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_links', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_links', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topic_tree_defs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topic_trees', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topics', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topics', 'topic_id', 'sotf_topic_tree_defs', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_topics', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_topics', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_genres', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_roles', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_role_names', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_role_names', 'role_id', 'sotf_roles', 'role_id');\n\n\t\t$this->cleanForeignKey('sotf_deletions', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_playlists', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_ratings', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_rating', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_rating', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_refs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_refs', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'prog_id', 'sotf_programmes', 'id');\n\t\t\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stats', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stats', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_comments', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_to_forward', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_unique_access', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_user_progs', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_portals', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_station_mappings', 'id_at_node', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_station_mappings', 'station', 'sotf_stations', 'id');\n\n\t\t// very important! for syncing!!\n\t\t$this->cleanForeignKey('sotf_object_status', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanNodeObjects();\n\n\t}", "public function deleteTablesAndEvents() {\r\n\t\t// drop additional tables for extension module\r\n\t\t$tableNames = ['zasilkovna_weight_rules', 'zasilkovna_shipping_rules', 'zasilkovna_orders'];\r\n\t\tforeach ($tableNames as $shortTableName) {\r\n\t\t\t$sql = 'DROP TABLE `' . DB_PREFIX . $shortTableName . '`;';\r\n\t\t\t$this->db->query($sql);\r\n\t\t}\r\n\t\t// remove events registered for \"zasilkovna\" plugin\r\n\t\t$this->load->model('setting/event');\r\n\t\t$this->model_setting_event->deleteEventByCode(self::EVENT_CODE);\r\n\t}", "function deleteAll ($tablename) {\n\t\t$this->deleteWhere($tablename, NULL);\n\t}", "function delete(){\n // Delete subclauses\n foreach($this->subClause as $clause){\n $clause->delete();\n }\n \n mysql_query(\"DELETE FROM resolution WHERE id='$this->clauseId'\") or die(mysql_error());\n }", "public function deleteTable(){\n\t \n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('DELETE FROM wp_nouveautes_test WHERE datep_nouveaute > \"2014-04-13\"');\n\n\t\t$wpdb->query('DELETE FROM wp_custom_categories_test WHERE term_id > 247');\n\t\t\t\t \n\t\t$wpdb->query('TRUNCATE TABLE wp_subcategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_extracategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_updated');\n\t\t \t\t \n\t}", "public function truncate_all_tables_associated_with_contract_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n ContractParticipant::truncate();\n Contract::truncate();\n Participant::truncate();\n Payment::truncate();\n Invoice::truncate();\n Legal::truncate();\n Individual::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(ContractParticipant::first());\n $this->assertNull(Contract::first());\n $this->assertNull(Participant::first());\n $this->assertNull(Payment::first());\n $this->assertNull(Invoice::first());\n $this->assertNull(Legal::first());\n $this->assertNull(Individual::first());\n $this->assertNull(Client::first());\n }", "public function truncate_all_tables_associated_with_contract_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n ContractParticipant::truncate();\n Contract::truncate();\n Participant::truncate();\n Payment::truncate();\n Invoice::truncate();\n Legal::truncate();\n Individual::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(ContractParticipant::first());\n $this->assertNull(Contract::first());\n $this->assertNull(Participant::first());\n $this->assertNull(Payment::first());\n $this->assertNull(Invoice::first());\n $this->assertNull(Legal::first());\n $this->assertNull(Individual::first());\n $this->assertNull(Client::first());\n }", "public function cleanUp()\n\t{\n\t\tif (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php')) {\n\t\t\tinclude(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php');\n\t\t\tif (!isset($elements) or !is_array($elements))\n\t\t\t\treturn;\n\n\t\t\t$db = \\Model\\Db\\Db::getConnection();\n\n\t\t\tforeach ($elements as $el => $elData) {\n\t\t\t\tif (!$elData['table'])\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif ($elData['order_by'] and $elData['order_by']['custom']) {\n\t\t\t\t\t$qryOrderBy = [];\n\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t$qryOrderBy[] = $field;\n\t\t\t\t\t$qryOrderBy[] = $elData['order_by']['field'];\n\n\t\t\t\t\t$righe = $db->selectAll($elData['table'], [], [\n\t\t\t\t\t\t'order_by' => $qryOrderBy,\n\t\t\t\t\t\t'stream' => true,\n\t\t\t\t\t]);\n\n\t\t\t\t\t$lastParent = null;\n\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\tforeach ($righe as $r) {\n\t\t\t\t\t\t$parentString = [];\n\t\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t\t$parentString[] = $r[$field];\n\t\t\t\t\t\t$parentString = implode(',', $parentString);\n\t\t\t\t\t\tif ($parentString and $parentString !== $lastParent) {\n\t\t\t\t\t\t\t$lastParent = $parentString;\n\t\t\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$currentOrder++;\n\n\t\t\t\t\t\tif ($r[$elData['order_by']['field']] != $currentOrder) {\n\t\t\t\t\t\t\t$db->update($elData['table'], $r[$elData['primary']], [\n\t\t\t\t\t\t\t\t$elData['order_by']['field'] => $currentOrder,\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}", "function CleanUp () {\n global $zOLDAPPLE;\n\n $criteria = array (\"groupInformation_tID\" => $this->tID,\n \"Body\" => DELETED_GROUP_ENTRY);\n $this->groupContent->SelectByMultiple ($criteria);\n\n // Break out if no deleted posts left. \n if ($this->groupContent->CountResult() == 0) return (TRUE);\n\n while ($this->groupContent->FetchArray ()) {\n $CHILDREN = new cGROUPCONTENT ();\n $childcriteria = array (\"parent_tID\" => $this->groupContent->tID,\n \"groupInformation_tID\" => $this->tID,\n \"Context\" => $zOLDAPPLE->Context);\n $CHILDREN->SelectByMultiple ($childcriteria);\n\n // If no children, delete.\n if ($CHILDREN->CountResult () == 0) {\n $this->groupContent->Delete ();\n $this->CleanUp ();\n } // if\n unset ($CHILDREN);\n } // while\n }", "public function truncateTables()\n {\n $tables = [\n 'properties',\n 'users',\n ];\n\n DB::unprepared('TRUNCATE TABLE ' . implode(',', $tables) . ' RESTART IDENTITY CASCADE');\n }", "public function deleteTestEntities() {\n $statement = sprintf(\"DELETE FROM %s WHERE %s < 0 AND %s < 0\", static::TABLE, static::FIELDS[0], static::FIELDS[1]);\n\n $this->db->exec($statement);\n }", "function deleteall() {\n\t\t$this->_query( \"DELETE FROM $0\" );\n\t}", "public function fulldelete() {\n if ($this->id && !$this->elements) {\n $this->elements = self::get_instances(array('setid' => $this->id));\n }\n\n foreach ($this->elements as $elm) {\n $elm->delete();\n }\n\n parent::delete();\n }", "protected function deleteAll()\n {\n Yii::$app->db->createCommand()\n ->delete($this->tableName, [$this->primaryKey => $this->owner->{$this->primaryKey}])\n ->execute();\n }", "public function cleanRecordVersions()\n\t{\n \t\t$this -> db -> query(\"DELETE FROM `\".$this -> table.\"` \n \t\t\t\t\t\t\t WHERE `model`='\".$this -> model.\"' \n \t\t\t\t\t\t\t AND `row_id`='\".$this -> row_id.\"'\");\n \t\treturn $this;\n \t}", "public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Individual::truncate();\n Legal::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Individual::first());\n $this->assertNull(Legal::first());\n $this->assertNull(Client::first());\n }", "public function deleteFromMatrix() {\n DB::statement('DELETE FROM lemma_matrix WHERE lemma1='.$this->id.' OR lemma2='.$this->id);\n }", "public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Legal::truncate();\n Individual::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Legal::first());\n $this->assertNull(Individual::first());\n $this->assertNull(Client::first());\n }", "public function cleanRoleAndPermissionTables() : void\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('roles')->truncate();\n DB::table('permissions')->truncate();\n DB::table('role_has_permissions')->truncate();\n DB::table('model_has_roles')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "private function browseTablesForRemove(&$table, $sub_model_instance, $keys, &$to_remove, &$to_update) {\n\t\tif (isset($to_remove[$table->getSQLNameFor($sub_model_instance)])) {\n\t\t\tfor ($i = 0; $i < count($keys); $i++) {\n\t\t\t\tif (in_array($keys[$i], $to_remove[$table->getSQLNameFor($sub_model_instance)][\"keys\"])) {\n\t\t\t\t\tarray_splice($keys, $i, 1);\n\t\t\t\t\t$i--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tif (count($keys) == 0) return; // nothing to do\n\t\t\t\n\t\t// check access rights\n\t\tif (!$table->mayRemove())\n\t\t\tthrow new Exception(\"Access denied: remove in table '\".$table->getName().\"'\");\n\t\tif (!$table->canRemoveAny()) {\n\t\t\t// we need to apply filters\n\t\t\t$q = SQLQuery::create();\n\t\t\t$q->bypassSecurity();\n\t\t\t$table_alias = $q->generateTableAlias();\n\t\t\t$q->select(array($table->getName()=>$table_alias));\n\t\t\tif ($sub_model_instance <> null)\n\t\t\t\t$q->selectSubModel($table->getParentTable(), $sub_model_instance);\n\t\t\tif ($table->getPrimaryKey() <> null)\n\t\t\t\t$q->whereIn($table_alias, $table->getPrimaryKey()->name, $keys);\n\t\t\telse {\n\t\t\t\t$pk = $table->getKey();\n\t\t\t\t$where = \"\";\n\t\t\t\tforeach ($keys as $key) {\n\t\t\t\t\tif (strlen($where) > 0) $where .= \" OR \";\n\t\t\t\t\t$where .= \"(\";\n\t\t\t\t\t$first = true;\n\t\t\t\t\tforeach ($pk as $pk_name) {\n\t\t\t\t\t\tif ($first) $first = false; else $where .= \" AND \";\n\t\t\t\t\t\t$where .= \"`\".$table_alias.\"`.`\".$pk_name.\"`='\".SQLQuery::escape($key[$pk_name]).\"'\";\n\t\t\t\t\t}\n\t\t\t\t\t$where .= \")\";\n\t\t\t\t}\n\t\t\t\t$q->where($where);\n\t\t\t}\n\t\t\t$table->prepareSelectToDetermineRemoveAccess($q, $table_alias, $locks);\n\t\t\t$rows = $q->execute();\n\t\t\tif (count($rows) <> count($keys)) throw new Exception(\"Invalid keys to remove in table '\".$table->getName().\"': \".count($keys).\" keys given, \".count($rows).\" rows found.\");\n\t\t\t$result = $table->filterRemoveAccess($rows);\n\t\t\tif (count($rows) <> count($result)) throw new Exception(\"Access denied: \".(count($rows)-count($result)).\" rows cannot be removed among the \".count($rows).\" rows to remove in table '\".$table->getName().\"'\");\n\t\t\t$rows = $result;\n\t\t}\n\t\n\t\t// we can remove those keys\n\t\tif (!isset($to_remove[$table->getSQLNameFor($sub_model_instance)])) {\n\t\t\t$key_name = $table->getPrimaryKey() <> null ? $table->getPrimaryKey()->name : $table->getKey();\n\t\t\t$to_remove[$table->getSQLNameFor($sub_model_instance)] = array(\"keys\"=>array(),\"key_name\"=>$key_name);\n\t\t}\n\t\tforeach ($keys as $key)\n\t\t\tarray_push($to_remove[$table->getSQLNameFor($sub_model_instance)][\"keys\"], $key);\n\t\n\t\t// search for foreign keys in this table, which may imply other remove\n\t\t$new_remove = array();\n\t\tforeach ($table->internalGetColumnsFor($sub_model_instance) as $col) {\n\t\t\tif (!($col instanceof datamodel\\ForeignKey)) continue;\n\t\t\tif (!$col->remove_primary_when_foreign_removed) continue;\n\t\t\t// we have one\n\t\t\t$sub_model = null;\n\t\t\tif ($table->getModel() instanceof SubDataModel) {\n\t\t\t\t$t = DataModel::get()->internalGetTable($col->foreign_table);\n\t\t\t\tif ($t->getModel() instanceof SubDataModel && $t->getModel()->getParentTable() == $table->getModel()->getParentTable())\n\t\t\t\t\t$sub_model = $sub_model_instance;\n\t\t\t}\n\t\t\t// search corresponding keys\n\t\t\t$q = SQLQuery::create()->bypassSecurity();\n\t\t\t$table_alias = $q->generateTableAlias();\n\t\t\t$q->select(array($table->getName()=>$table_alias));\n\t\t\tif ($sub_model_instance <> null) $q->selectSubModel($table->getModel()->getParentTable(), $sub_model_instance);\n\t\t\tif ($table->getPrimaryKey() <> null)\n\t\t\t\t$q->whereIn($table_alias, $table->getPrimaryKey()->name, $keys);\n\t\t\telse {\n\t\t\t\t$pk = $table->getKey();\n\t\t\t\t$where = \"\";\n\t\t\t\tforeach ($keys as $key) {\n\t\t\t\t\tif (strlen($where) > 0) $where .= \" OR \";\n\t\t\t\t\t$where .= \"(\";\n\t\t\t\t\t$first = true;\n\t\t\t\t\tforeach ($pk as $pk_name) {\n\t\t\t\t\t\tif ($first) $first = false; else $where .= \" AND \";\n\t\t\t\t\t\t$where .= \"`\".$table_alias.\"`.`\".$pk_name.\"`='\".SQLQuery::escape($key[$pk_name]).\"'\";\n\t\t\t\t\t}\n\t\t\t\t\t$where .= \")\";\n\t\t\t\t}\n\t\t\t\t$q->where($where);\n\t\t\t}\n\t\t\t$q->field($table_alias, $col->name);\n\t\t\t$rows = $q->executeSingleField();\n\t\t\t\t\n\t\t\tif (!isset($new_remove[$col->foreign_table]))\n\t\t\t\t$new_remove[$col->foreign_table] = array();\n\t\t\tif (!isset($new_remove[$col->foreign_table][$sub_model]))\n\t\t\t\t$new_remove[$col->foreign_table][$sub_model] = array();\n\t\t\tarray_push($new_remove[$col->foreign_table][$sub_model], $rows);\n\t\t}\n\t\n\t\t// search for foreign keys in other tables which are linked to the keys we want to remove\n\t\tif ($table->getModel() instanceof SubDataModel) {\n\t\t\t// we are in a sub model: everything must be inside this sub model\n\t\t\tforeach ($table->getModel()->internalGetTables() as $t) {\n\t\t\t\t$sm = $t->getModel() instanceof SubDataModel ? $sub_model_instance : null;\n\t\t\t\t$this->checkForeignKeysForRemove($table, $sub_model_instance, $keys, $t, $sm, $to_remove, $to_update);\n\t\t\t}\n\t\t} else {\n\t\t\t// we are on the root model, we may have link everywhere\n\t\t\tforeach (DataModel::get()->internalGetTables() as $t) {\n\t\t\t\tif ($t->getModel() instanceof SubDataModel) {\n\t\t\t\t\tforeach ($t->getModel()->getExistingInstances() as $smi) {\n\t\t\t\t\t\t$sm = $smi;\n\t\t\t\t\t\t$this->checkForeignKeysForRemove($table, $sub_model_instance, $keys, $t, $sm, $to_remove, $to_update);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->checkForeignKeysForRemove($table, $sub_model_instance, $keys, $t, null, $to_remove, $to_update);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function uninstall() {\n $rec = SQLSELECT('Select distinct LINKED_OBJECT,LINKED_PROPERTY from myconditions');\n $total = count($rec);\n if ($total) {\n for($i=0;$i<$total;$i++) {\n removeLinkedProperty($rec[$i]['LINKED_OBJECT'], $rec[$i]['LINKED_PROPERTY'], 'myrules');\n }\n }\n SQLExec('DROP TABLE IF EXISTS myrules');\n SQLExec('DROP TABLE IF EXISTS myconditions');\n SQLExec('DROP TABLE IF EXISTS myactions');\n\n parent::uninstall();\n }", "function fc_update_parent_links()\n{\n $db = new PHPWS_DB('images');\n $db->addWhere('url', 'parent');\n $db->addValue('url', NULL);\n PHPWS_Error::logIfError($db->update());\n\n // remove superfluous column\n PHPWS_Error::logIfError($db->dropTableColumn('parent_id'));\n}", "public function removeSeats(){\n /** @var BlockRow $row */\n foreach ($this->rows as $row){\n $row->removeSeats();\n }\n }", "public function testDeleteAllChildrenInFacility(){\n $childDAO = new childDAO();\n $children = $childDAO->findChildrenInFacility(5);\n $this->assertEquals(10,count($children));\n\n $childDAO->deleteAllChildrenInFacility(5);\n $children = $childDAO->findChildrenInFacility(5);\n $this->assertEquals(0,count($children));\n }", "public function deleteTables()\n {\n $db = Core::$db;\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_forms\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_form_placeholders\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_form_templates\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_templates\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_sets\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_placeholders\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_placeholder_opts\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_resources\");\n $db->execute();\n }", "protected function removeTables() {\n while(!empty($this->_tableDeleteQueue)) {\n $deleted = array();\n foreach($this->_tableDeleteQueue as $table => $fields) {\n $this->removeTable($table);\n // if the error code is 00000, the execution of the sql was successful\n // and the table was deleted\n // if it's not 00000, try to delete this table in the next round\n if($this->errorCode() === \"00000\") {\n $deleted[] = $table;\n }\n }\n foreach($deleted as $deletedTable) {\n unset($this->_tableDeleteQueue[$deletedTable]);\n }\n }\n $this->_tableDeleteQueue = array();\n }", "public function cleanRelatedTables(array $relatedClasses) {\n\t\t$ID = (int)$this->owner->ID;\n\t\t$ancestry = $this->owner->getClassAncestry();\n\t\t$stages = self::version_stages($this->owner);\n\t\t$dbTables = self::get_db_tables();\n\t\t$versioned = Object::has_extension($this->owner->ClassName, 'Versioned');\n\t\t$relatedClasses = array_filter($relatedClasses, create_function('$obj',\n\t\t\t'return DataObject::has_own_table($obj);'));\n\t\tforeach ($relatedClasses as $class) {\n\t\t\t// SilverStripe will clean tables for any directly related\n\t\t\t// classes (\"Stage\" + possible stages), so running delete\n\t\t\t// queries again for them would be unnecessary.\n\t\t\t$directlyRelated = in_array($class, $ancestry);\n\t\t\t$dirtyTables = $directlyRelated? array(): array($class => 'ID');\n\t\t\tif ($versioned) {\n\t\t\t\tif (!$directlyRelated) {\n\t\t\t\t\tforeach ($stages as $stage) {\n\t\t\t\t\t\tif ($stage != 'Stage')\n\t\t\t\t\t\t\t$dirtyTables[\"{$class}_{$stage}\"] = 'ID';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// $directlyRelated or not, SilverStripe never touches the\n\t\t\t\t// *_versions tables. We might.\n\t\t\t\tif (self::$clean_versions_table)\n\t\t\t\t\t$dirtyTables[\"{$class}_versions\"] = 'RecordID';\n\t\t\t}\n\t\t\tforeach ($dirtyTables as $dirtyTable => $fieldName) {\n\t\t\t\tif (in_array(strtolower($dirtyTable), $dbTables))\n\t\t\t\t\tDB::query(\"DELETE FROM \\\"{$dirtyTable}\\\" WHERE \\\"{$fieldName}\\\" = {$ID}\");\n\t\t\t}\n\t\t}\n\t}", "public function removeTable($name) {\n parent::removeTable($name);\n\n $class = ucfirst($name);\n $classWithNamespace = $this->_modelNamespace.$class;\n $filename = $this->_modelPath.$class.\".php\";\n \n // remove all relationships in other ActiveRecords\n if(file_exists($filename)) {\n if(property_exists($classWithNamespace, \"belongs_to\")) {\n $belongingClasses = $classWithNamespace::$belongs_to;\n if(\\is_array($belongingClasses)) {\n foreach($belongingClasses as $belongClass) {\n if(!isset($belongClass[\"class_name\"]) || $belongClass[\"class_name\"] == $classWithNamespace) continue;\n\n if(!isset($this->_deletedClasses[$belongClass[\"class_name\"]]) && class_exists($belongClass[\"class_name\"])) {\n $className = explode(\"\\\\\", $belongClass[\"class_name\"]);\n $className = end($className);\n $class = $this->addClass($className);\n foreach($class[\"has_many\"] as $index => $value) {\n if($value[\"class_name\"] == $classWithNamespace) {\n unset($this->_classes[$className][\"has_many\"][$index]);\n }\n }\n }\n }\n }\n }\n if(property_exists($classWithNamespace, \"has_many\")) {\n $hasManyClasses = $classWithNamespace::$has_many;\n if(\\is_array($hasManyClasses)) {\n foreach($hasManyClasses as $hasManyClass) {\n if(!isset($hasManyClass[\"class_name\"]) || $hasManyClass[\"class_name\"] == $classWithNamespace) continue;\n \n if(!isset($this->_deletedClasses[$hasManyClass[\"class_name\"]]) && class_exists($hasManyClass[\"class_name\"])) {\n $className = explode(\"\\\\\", $hasManyClass[\"class_name\"]);\n $className = end($className);\n $class = $this->addClass($className);\n foreach($class[\"belongs_to\"] as $index => $value) {\n if($value[\"class_name\"] == $classWithNamespace) {\n unset($this->_classes[$className][\"belongs_to\"][$index]);\n }\n }\n }\n }\n }\n }\n // you need to save the classes, who are already deleted, because php is caching the classes\n $this->_deletedClasses[$classWithNamespace] = $classWithNamespace;\n unlink($filename);\n }\n\n // fluent interface\n return $this;\n }", "function remove_all_cat($id,$tab) \r\n{\r\n\t\r\n\t$qlist=hb_mysql_query(\"SELECT * FROM \".$tab.\" WHERE id='$id'\");\r\n\tif (hb_mysql_num_rows($qlist)>0) {\r\n\t\t\r\n\t\t while($curitem=hb_mysql_fetch_array($qlist)) \r\n\t\t {\r\n\t\t\t \r\n\t\t\t remove_all_cat($curitem['id'],$tab);\r\n\t\t \r\n\t\t }\r\n\t\r\n\t}\r\n\t\r\n\thb_mysql_query(\"DELETE FROM \".$tab.\" WHERE id='$id'\");\r\n}", "function callbackRowDelete() {\n $this->deleted = true;\n foreach(array_keys($this->widgets) as $w) {\n $this->widgets[$w]->hide();\n $this->table->table->remove($this->widgets[$w]);\n $this->widgets[$w]->destroy();\n }\n $this->deleteMenuItem->hide();\n \n $this->table->deleteMenu->remove($this->deleteMenuItem);\n $this->deleteMenuItem->destroy();\n $this->table->frame->hide();\n $this->table->frame->show();\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "private function removeProjections()\n {\n //I mustn't make assumption about the underlying table structure\n $this->entityManager->getConnection()->query('TRUNCATE product')->execute();\n }", "public function wp_clean_sql()\n\t{\n\t\t$bdd = Bdd::getInstance();\n\n\t\t$sql = $bdd->dbh->prepare(\"SHOW TABLES LIKE '\".$this->_table_prefix.\"%'\");\n\t\t$sql->execute();\n\t\t$tables = $sql->fetchAll();\n\n\t\tforeach ($tables as $table)\t{\n\t\t\t$table_name = $table[0];\n\n\t\t\t// To rename the table\n\t\t\t$sql1 = $bdd->dbh->prepare(\"DROP TABLE `{$table_name}`\");\n\t\t\t$sql1->execute();\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function resetTable();", "public function removeAll()\n {\n foreach ($this->findAll() as $object) {\n $this->remove($object);\n }\n }", "function dodelete()\n\t{\n\t\tglobal $db;\n\n\t\t$sqls = array(\n\t\t\t\"DELETE FROM preorders WHERE pre_preorderID=$this->preorderID\",\n\t\t\t\"DELETE FROM preorder_customers WHERE prc_preorderID=$this->preorderID\"\n\t\t);\n\n\t\twhile (list($a,$sql) = each($sqls))\n\t\t{\n\t\t\tmysql_query($sql,$db);\n\t\t\t$this->error->mysql(__FILE__,__LINE__);\n\t\t}\n\t}", "abstract public function deleteAll();", "public function truncateTable() {\n Schema::disableForeignKeyConstraints();\n DB::table('questions')->truncate();\n DB::table('answers')->truncate();\n Schema::enableForeignKeyConstraints();\n }", "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "protected function truncateTables()\n {\n \\DB::table('cities')->truncate();\n \\DB::table('states')->truncate();\n }", "function base_clear(){\n $tables = array(\n 'oc_product',\n 'oc_product_image',\n 'oc_manufacturer',\n 'oc_manufacturer_description',\n 'oc_product_description',\n 'oc_product_to_category',\n 'oc_product_attribute',\n 'oc_attribute',\n 'oc_attribute_description',\n // 'oc_attribute_value',\n // 'oc_category',\n // 'oc_category_description',\n 'oc_product_to_store',\n // 'oc_category_to_store',\n 'oc_manufacturer_to_store',\n 'oc_product_to_layout',\n // 'oc_category_to_layout',\n );\n foreach ($tables as $table)\n {\n sDb::query(\"TRUNCATE TABLE $table\");\n echo \"Таблица $table очищена\\n\";\n }\n}", "function empty_facts_and_rules_table($con)\n{\n\t$result1 = mysqli_query($con,\"TRUNCATE tbl_facts\");\n\t$result2 = mysqli_query($con,\"TRUNCATE tbl_rules\");\n\tif(!($result1 && $result2))\n\t\t die(\"Tables not found\");\n}", "public function removeChildNodes() {}", "function truncateData(){\n\t\t$userid=$GLOBALS['username'];\n mysql_query(\"SET FOREIGN_KEY_CHECKS=0;\");\n\t\t$truncateSource = mysql_query(\"TRUNCATE TABLE \".$userid.\"nertag\") or die(mysql_error());\n\t\t$truncateTarget = mysql_query(\"TRUNCATE TABLE \".$userid.\"sentences\") or die(mysql_error());\n mysql_query(\"SET FOREIGN_KEY_CHECKS=1;\");\n}", "protected function _unmarkInternalTree(): void\n {\n $config = $this->getConfig();\n $this->_table->updateAll(\n function (QueryExpression $exp) use ($config) {\n $leftInverse = clone $exp;\n $leftInverse->setConjunction('*')->add('-1');\n $rightInverse = clone $leftInverse;\n\n return $exp\n ->eq($config['leftField'], $leftInverse->add($config['leftField']))\n ->eq($config['rightField'], $rightInverse->add($config['rightField']));\n },\n fn (QueryExpression $exp) => $exp->lt($config['leftField'], 0)\n );\n }", "public function clean(): void\n {\n $this->truncateJournalTable();\n $this->output(\"<success>Table {$this->internalTable} truncated</success>\");\n }", "public function deleteChildren(){\n $this->publicEnvironments()->delete();\n $this->privateEnvironments()->delete();\n $collections = Collection::where('project_id', $this->id)->get();\n\n foreach($collections as $collection){\n $collection->items()->delete();\n $collection->delete();\n }\n }", "private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }", "private function sub_delete($id='')\n\t{\n\t\t$sql = \"DELETE FROM analisis_parameter WHERE id_indikator IN(SELECT id FROM analisis_indikator WHERE id_master = ?)\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_respon WHERE id_periode IN(SELECT id FROM analisis_periode WHERE id_master = ?)\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_kategori_indikator WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_klasifikasi WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_respon_hasil WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_partisipasi WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_periode WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_indikator WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\t}", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "function delete_sub_row($selector, $i = 1, $post_id = \\false)\n{\n}", "function _move_cleanup($copy = false)\r\n\t{\r\n\t\t$relations = $this->_relations;\r\n\r\n\t\t$deletes = array();\r\n\t\t$updates = array();\r\n\t\t$parent_updates = array();\r\n\t\tforeach($relations AS $key => $val)\r\n\t\t{\r\n\t\t\t$clone_id = $val['clone_id'];\r\n\t\t\t$parent_id = $val['parent_id'];\r\n\t\t\t$clone = $this->get_node($clone_id);\r\n\t\t\tif ($copy)\r\n\t\t\t{ \r\n\t\t\t\tcontinue;\r\n\t\t\t} \n\t\t\t\n\t\t\tif($parent_id !== false)\n\t\t\t{\n\t\t\t\t$sql = sprintf('UPDATE %s SET parent_id=%s WHERE id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$parent_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key);\r\n\t\t\t\t$parent_updates[] = $sql;\n\t\t\t}\n\r\n\t\t\t$deletes[] = $key; \r\n\t\t\t// It's isn't a rootnode\r\n\t\t\tif ($clone['id'] != $clone['root_id'])\r\n\t\t\t{\r\n\t\t\t\t$sql = sprintf('UPDATE %s SET id=%s WHERE id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clone_id);\r\n\t\t\t\t$updates[] = $sql;\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$sql = sprintf('UPDATE %s SET id=%s, root_id=%s WHERE id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clone_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clone_id);\r\n\t\t\t\t$updates[] = $sql;\r\n\t\t\t\t$oroot_id = $clone['root_id'];\r\n\r\n\t\t\t\t$sql = sprintf('UPDATE %s SET root_id=%s WHERE root_id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oroot_id\n\t\t\t\t);\r\n\t\t\t\t$updates[] = $sql;\r\n\t\t\t} \r\n\t\t} \r\n\r\n\t\tforeach ($deletes as $delete)\r\n\t\t{\r\n\t\t\t$this->delete_node($delete);\r\n\t\t} \r\n\r\n\t\tfor($i = 0;$i < count($updates);$i++)\r\n\t\t{\r\n\t\t\t$this->db->sql_exec($updates[$i]);\r\n\t\t} \r\n\r\n\t\tfor($i = 0;$i < count($parent_updates);$i++)\r\n\t\t{\r\n\t\t\t$this->db->sql_exec($parent_updates[$i]);\r\n\t\t} \n\t\t\n\t\t$this->_relations = array();\r\n\r\n\t\treturn true;\r\n\t}", "public function afterDelete()\n {\n foreach (static::find()->where(['parent_id' => $this->id])->all() as $item) {\n $item->delete();\n }\n }", "private function undo_cleanup_actions() {\n global $db;\n $elements_locked = array();\n $undo_nodes = $db->fetch_table(\"SELECT * FROM `\".$this->table.\"_undo` ORDER BY ID_UNDO DESC\");\n for ($i = 0; $i < count($undo_nodes); $i++) {\n $node = $undo_nodes[$i];\n foreach ($elements_locked as $id => $lock) {\n if (($node[\"FK_PARENT\"] == $id) ||\n (!$this->element_read($id)) ||\n ($this->element_is_child($node[\"FK_PARENT\"], $id)) ||\n ($this->element_is_child($node[\"FK_PARENT_PREV\"], $id))) {\n $db->querynow(\"DELETE FROM `\".$this->table.\"_undo` WHERE ID_UNDO=\".$node[\"ID_UNDO\"]);\n }\n }\n if ($node[\"ACTION\"] == \"MOVE\") {\n // Element wurde verschoben\n $elements_locked[$node[\"FK_PARENT\"]] = true;\n $elements_locked[$node[\"FK_PARENT_PREV\"]] = true;\n }\n }\n }", "public function deleteAll(){\n try {\n $this->getTable()->delete();\n } catch (\\Exception $e) {\n $this->handleException($e);\n }\n return;\n }", "public function unsetAll() {\n\t\tparent::unsetAll();\n\t}", "function deleteAll() {\n\t\t$dbh=$this->getdbh();\n\t\t$sts = $dbh->exec('DELETE FROM '.$this->enquote($this->tablename));\n\t\treturn $sts;\n\t\n\t}", "public function dropAllTables()\n {\n $tables = [];\n\n $excludedTables = $this->connection->getConfig('dont_drop') ?? ['spatial_ref_sys'];\n\n foreach ($this->getAllTables() as $row) {\n $row = (array) $row;\n\n $table = reset($row);\n\n if (! in_array($table, $excludedTables)) {\n $tables[] = $table;\n }\n }\n\n if (empty($tables)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTables($tables)\n );\n }", "public function dropAllTables()\n {\n $tables = [];\n\n $excludedTables = $this->connection->getConfig('dont_drop') ?? ['spatial_ref_sys'];\n\n foreach ($this->getAllTables() as $row) {\n $row = (array) $row;\n\n $table = reset($row);\n\n if (! in_array($table, $excludedTables)) {\n $tables[] = $table;\n }\n }\n\n if (empty($tables)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTables($tables)\n );\n }", "protected function cleanupTable( $tableName )\n {\n $query = $this->db->createDeleteQuery();\n $query->deleteFrom( $this->db->quoteIdentifier( $this->options['prefix'] . $tableName ) );\n\n $id = $query->expr->eq( $this->db->quoteIdentifier( 'execution_id' ), $query->bindValue( (int)$this->id ) );\n\n if ( $tableName == 'execution' )\n {\n $parent = $query->expr->eq( $this->db->quoteIdentifier( 'execution_parent' ), $query->bindValue( (int)$this->id ) );\n $query->where( $query->expr->lOr( $id, $parent ) );\n }\n else\n {\n $query->where( $id );\n }\n\n $statement = $query->prepare();\n $statement->execute();\n }", "public function deleteTables () {\n $this->usersDB->deleteTables();\n $this->categoriesDB->deleteTables();\n $this->itemsDB->deleteTables();\n }", "public function removeAll(){\n\t\treturn $this->db->empty_table('products');\n\t}", "public function delete () {\n if(count($this->data[$this->id])) {\n foreach($this->data[$this->id] as $key=>$prop) {\n if($prop[\"link\"] == \"P127F\")\n $broader = $key;\n }\n }\n unset($this->data[$this->id][$broader]);\n \n // if there are still links, we must stop\n if(count($this->data[$this->id])) \n throw new Exception(\"Cannot remove because record has links! (remove them first)\");\n\n // remove table data linked to this record\n foreach($this->tables as $table) {\n $table->deleteMyData($this->id);\n }\n \n // remove link to class hierarchy and then the record itself\n IdaDb::deleteBy(\"_sys_classes_join\", array(\"subject\"=>$this->id));\n IdaDb::deleteBy(\"_sys_records\", array(\"id\"=>$this->id));\n \n }", "function delete_entries_start()\n\t{\n\t\tglobal $DB, $FF;\n\n\t\t$playa_fields = $this->_get_fields();\n\t\t$this->cache['mourning_parents'] = array();\n\n\t\tif (count($playa_fields))\n\t\t{\n\t\t\tforeach($_POST['delete'] as $child_id)\n\t\t\t{\n\t\t\t\tif ($parents = $this->_get_parents($child_id))\n\t\t\t\t{\n\t\t\t\t\t$this->cache['mourning_parents'][$child_id] = $parents;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function emptyIndexTable(){\n\t\t$this->ecmDBhandle->truncateTable($this->dfs_db-> table_name);\n\t}", "function doRealDelete()\n {\n /* Query data of this section */\n $this->dbQuerySingle();\n /* Check the presence of GET or POST parameter 'returntoparent'. */\n $this->processReturnToParent();\n /* The function above sets $this->rs to values that shall be\n displayed. By assigning $this->rs to Smarty variable 'section'\n we can fill the values of $this->rs into a template. */\n $this->_smarty->assign('section', $this->rs);\n\n /* Delete the record */\n $this->dbDeleteById();\n /* Delete the corresponding counter */\n $this->dbDeleteCounterById();\n\n /* Left column contains administrative menu */\n $this->_smarty->assign('leftcolumn', \"leftadmin.tpl\");\n }", "protected function getCleanableTableList() {}", "public function adjustingMmRelationWithTablesnameAndFieldnameFieldDoNotTouchOtherRelations() {}", "public function supprimer()\n {\n if(\\Request::ajax())\n {\n $numbers = substr( \\Input::get('boxes'),0,-1);\n $ids = explode(',',$numbers);\n $ids = array_unique($ids);\n foreach($ids as $id)\n {\n $child = Child::findOrFail($id);\n $child->bills()->delete();\n $child->attendances()->delete();\n $child->delete();\n if($child->trashed())\n {\n $c= Child::onlyTrashed()->findOrFail($id);\n $c->bills()->forceDelete();\n $c->attendances()->forceDelete();\n $c->forceDelete();\n\n }\n }\n }\n }", "protected function resetExistingTables()\n {\n $this->existingTables = null;\n }", "private function _deleteTables()\r\n {\r\n return true;\r\n }", "public function removeIsolated()\n {\n $isolated_types = $this->type->doesntHave('movies')->get();\n\n foreach ($isolated_types as $type) {\n $this->delete($type->id);\n }\n }", "function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }", "private function cleanup()\n\t{\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// delete 14 day old processed product records, always leaving at least 5\n\t\tee()->sync_db->query(\"DELETE FROM products WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY) AND id NOT IN (SELECT id FROM ( SELECT id FROM `products` WHERE processed = 1 ORDER BY id DESC LIMIT 5 ) keepers)\");\n\t\t\n\t\t// delete old inventory records\t\n\t\tee()->sync_db->query(\"DELETE FROM products_inventory WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 2 DAY)\");\n\n\t\t// delete old shipping records\n\t\tee()->sync_db->query(\"DELETE FROM orders_shipping WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\n\t\t// delete old processed records\n\t\tee()->sync_db->query(\"DELETE FROM orders_processed WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\t\t\n\t}", "protected function tearDown()\n\t{\n\t\t$this->object->DeleteList(array(array(\"objectId\", \">\", 0)));\n\t\t$this->child->DeleteList(array(array(\"childId\", \">\", 0)));\n\t\t$this->sibling->DeleteList(array(array(\"siblingId\", \">\", 0)));\n\t\t$this->parent_->DeleteList(array(array(\"parent_Id\", \">\", 0)));\n\t\tunset($this->object);\n\t\tunset($this->sibling);\n\t\tunset($this->sibling2);\n\t\tunset($this->child);\n\t\tunset($this->child2);\n\t\tunset($this->parent_);\n\t}", "function clear() {\n\n switch ($this->type) {\n case 'sqlite':\n case 'mysql':\n $query[0] = 'DROP TABLE `enrolled`;';\n\n $query[1] = 'DROP TABLE `paid`;';\n\n $query[2] = 'DROP TABLE `admin`;';\n\n $query[3] = 'DROP TABLE `log`';\n\n $query[4] = 'DROP TABLE `stage`';\n\n\t\t\t\t$query[5] = 'DROP TABLE `guest`';\n\n break;\n\n default:\n throw new Exception($this->type . \" is not a valid database type.\");\n break;\n\n }\n\n foreach ($query as $drop) {\n $this->query($drop);\n }\n\n /**\n * Integrity Checking goes here\n */\n\n }", "function lr_clear($pid) {\n list($ns, $x) = explode(':', $pid);\n list($rec, $sort) = explode('.', $x);\n $db = lr_connect( );\n $table = lr_make_table($db, $ns);\n\n if ($sort == '*') {\n $sql = \"DELETE FROM ?n WHERE (rec=?i);\";\n $db->query($sql, $table, $rec);\n } else {\n $sql = \"DELETE FROM ?n WHERE (rec=?i AND sort=?i);\";\n $db->query($sql, $table, $rec, $sort);\n }\n}", "function remove_row($keys) {\r\n $sql_where = '';\r\n if (count($keys) > 0) {\r\n $sql_wheres = array();\r\n foreach ($keys as $key=>$val) {\r\n if (is_array($val)) die('remove_row: multi value does not supported');\r\n $sql_wheres[] = \"`$key`='\".myaddslashes($val).\"'\";\r\n }\r\n $sql_where = ' where '.join(' and ',$sql_wheres);\r\n }\r\n assert($sql_where != ''); # safeguard against setting all rows\r\n $sql = 'delete from `'.$this->db_table.'`'.$sql_where.' limit 1'; # with limit safe guard\r\n #~ echo '<br>'.$sql;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n $arrKeys2['id_evaluation'][] = $strValue;\n }\n $tblHrdEvaluationMaster = new cHrdEvaluationMaster();\n $tblHrdEvaluationDetail = new cHrdEvaluationDetail();\n $tblHrdEvaluationMaster->deleteMultiple($arrKeys);\n $tblHrdEvaluationDetail->deleteMultiple($arrKeys2);\n $myDataGrid->message = $tblHrdEvaluationDetail->strMessage;\n}", "public function clear_tables()\n\t{\n\t\tglobal $wpdb;\n\t\t$wpdb->query( 'DELETE FROM '.self::$site_table.';' );\n\t}", "public function deleteLastRow()\n {\n array_pop($this->childNodes);\n }", "function suppr_client($bdd) {\n $reponse = $bdd->query('DELETE FROM users\n WHERE users.id \n NOT IN (\n SELECT orders.Users_id\n FROM orders\n )\n ');\n}", "public function deleteAllElements()\n\t\t{\n\t\t\t//Borramos todos los elementos para despues insertarlos\n\t\t\t$deleteAllElements = 'TRUNCATE TABLE `BreakingNews';\n\n\t\t\t$result = $this->connection->query($deleteAllElements);\n\t\t}", "public function beforeDelete()\n\t{\n\t\t foreach ($this->towns as $towns){\n\t\t \t$towns->delete();\n\t\t }\n\t}", "public function deletePersons()\n {\n $conn = $this->_em->getConnection();\n $conn->executeUpdate('DELETE FROM person_person;');\n $conn->executeUpdate('DELETE FROM person_league;');\n $conn->executeUpdate('DELETE FROM person_cert;');\n $conn->executeUpdate('DELETE FROM person;');\n \n $conn->executeUpdate('ALTER TABLE person_person AUTO_INCREMENT = 1;');\n $conn->executeUpdate('ALTER TABLE person_league AUTO_INCREMENT = 1;');\n $conn->executeUpdate('ALTER TABLE person_cert AUTO_INCREMENT = 1;');\n }" ]
[ "0.6095954", "0.59917754", "0.5934367", "0.5908167", "0.5868326", "0.5856703", "0.58388597", "0.5837527", "0.58169955", "0.58147717", "0.57563835", "0.572309", "0.56729496", "0.5660669", "0.5636311", "0.561395", "0.5613614", "0.56091005", "0.5607987", "0.55925155", "0.5534732", "0.5534732", "0.55173135", "0.5504632", "0.5488249", "0.54704314", "0.5462141", "0.5449381", "0.54351157", "0.5435034", "0.5433939", "0.54309577", "0.54257995", "0.5421867", "0.541369", "0.54023457", "0.539609", "0.5385138", "0.53849995", "0.5377616", "0.5371021", "0.5346081", "0.53386676", "0.5331947", "0.5330647", "0.53271514", "0.5324754", "0.5317875", "0.5315573", "0.5314825", "0.5314576", "0.53094375", "0.5308472", "0.53019696", "0.528779", "0.52863044", "0.5285459", "0.5284872", "0.528456", "0.5279647", "0.527887", "0.5278504", "0.5273717", "0.5273291", "0.52679396", "0.5262692", "0.52562964", "0.5255122", "0.52537775", "0.52475214", "0.52434206", "0.52408904", "0.52294683", "0.52294683", "0.52227616", "0.5221101", "0.52135473", "0.5202464", "0.52000237", "0.5197635", "0.5196486", "0.5193559", "0.51818347", "0.51746917", "0.5158899", "0.5158338", "0.51454604", "0.5133495", "0.5132145", "0.5131217", "0.51302785", "0.5123955", "0.51239055", "0.5119137", "0.5118323", "0.51168776", "0.5116586", "0.51153743", "0.5115162", "0.5110662" ]
0.6799626
0
Return a new Printable with the given string limit.
public function withStringLimit(int $strlim): Printable { return new Printable($this->value, $this->callable, $strlim, $this->arrlim); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function str_limit($string, $limit = 100, $end = '...')\n {\n return str::limit($string, $limit, $end);\n }", "abstract public function _limit($str, $limit, $offset = false);", "static function limit(string $s, int $limit = 100, string $end = '...'): string {\n if (mb_strlen($s) <= $limit) {\n return $s;\n }\n error_if(mb_strlen($end) >= $limit, \"useless Str::limit('', limit, end) combination\");\n\n return mb_strimwidth($s, 0, $limit, $end);\n }", "function limitar($sString, $iLimite) {\n\n if ( strlen($sString) > $iLimite ) {\n $sString = mb_substr($sString, 0, $iLimite - 3) . '...';\n } else {\n $sString = mb_substr($sString, 0, $iLimite);\n }\n\n return $sString;\n}", "protected function limit_length($string, $limit = 127)\n {\n // As the output is to be used in http_build_query which applies URL encoding, the string needs to be\n // cut as if it was URL-encoded, but returned non-encoded (it will be encoded by http_build_query later).\n $url_encoded_str = rawurlencode($string);\n\n if (strlen($url_encoded_str) > $limit) {\n $string = rawurldecode(substr($url_encoded_str, 0, $limit - 3) . '...');\n }\n return $string;\n }", "function strshrink($string, $default_size, $max)\n{\n\t$strlen = strlen($string);\n\t\n\tif (strlen($string) >= $max) {\n\t\t$size = $default_size;\n\t\t\n\t\tfor ($i=0; ($strlen - $max) >= $i; $i += 6) {\n\t\t\t$size -= 1;\n\t\t}\n\t\t\n\t\treturn '<div style=\"display:inline;font-size:' .$size. 'px\">' .$string. '</div>';\n\t}\n\t\n\treturn $string;\n}", "function str_limit($value, $limit = 100, $end = '...')\n {\n return Str::limit($value, $limit, $end);\n }", "function show_limit($val,$limit = 20){\n\t$str = substr($val, 0, $limit);\n\tif(strlen($val) > $limit) $str .= \"...\";\n\treturn $str;\n}", "public function limit($str) \n {\n $this->_data['limit'] = $str;\n $this->_data['query'] .= ' LIMIT '.$str;\n return $this;\n }", "function str_limit($value, $limit = 100, $end = '...')\n {\n return Str::limit($value, $limit, $end);\n }", "function limitText($string, $limit = 50, $break = \" \", $pad = \"\") {\n\tif(strlen($string) <= $limit)\n\t\treturn $string;\n\t$string = substr($string, 0, $limit);\n\tif(false !== ($breakpoint = strrpos($string, $break))){\n\t\t$string = substr($string, 0, $breakpoint);\n\t}\n\treturn $string . $pad;\n}", "private static function constructLimitStringStatic($limit)\n {\n $string = $limit['start'];\n if ($limit['limit'] !== false) {\n $string .= \", {$limit['limit']}\";\n }\n return $string;\n }", "function myTruncate($string, $limit=10, $pad=\"...\") {\n if(strlen($string) <= $limit) return $string;\n $string = substr($string, 0, $limit) . $pad;\n return $string;\n }", "public function withArrayLimit(int $arrlim): Printable\n {\n return new Printable($this->value, $this->callable, $this->strlim, $arrlim);\n }", "function str_shorten(string $string, int $limit, string $break = '.', string $pad = '…'): string\n {\n $strlen = strlen($string);\n // return with no change if string is shorter than $limit\n if ($strlen <= $limit) {\n return $string;\n }\n // is $break present between $limit and the end of the string?\n if (\n ($breakpoint = strpos($string, $break, $limit)) !== false &&\n $breakpoint < $strlen - 1\n ) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n return $string;\n }", "function str_limit($value, $limit = 100, $end = '...')\n\t\t{\n\t\t\t\treturn Illuminate\\Support\\Str::limit($value, $limit, $end);\n\t\t}", "function limitString($string, $limit = 100) {\n if(strlen($string) < $limit) {return $string;}\n\n $regex = \"/(.{1,$limit})\\b/\";\n preg_match($regex, $string, $matches);\n return $matches[1];\n}", "function print_content_char_limit($content,$char_limit , $end_string){\n echo substr($content, 0,$char_limit).$end_string;\n}", "public function limit($length)\n {\n $this->randomStringLength = $length;\n return $this;\n }", "public function limit($limit)\n {\n $this->_parts['limit'] = $limit;\n\n return $this;\n }", "function truncate_max($string, $limit, $break=\" \", $pad=\"...\") { // return with no change if string is shorter than $limit \n\tif(strlen($string) <= $limit) return $string; \n\t$string = substr($string, 0, $limit); \n\tif(false !== ($breakpoint = strrpos($string, $break))) \n\t{ $string = substr($string, 0, $breakpoint); } \n\treturn $string . $pad; \n}", "function truncate($string, $limit, $break=\" \", $pad=\"...\") {\n\n // Return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n \n return $string;\n}", "protected function getLimitString()\n {\n $str = '';\n if (!empty($this->limit)) {\n $str = self::TAB_SEPARATOR;\n if (!empty($this->skip)) {\n $this->limit = $this->skip . ', ' . $this->limit;\n }\n $str .= 'LIMIT ' . $this->limit . self::LINE_SEPARATOR;\n }\n return $str;\n }", "public function shorten($limit)\n {\n $this->provider->shorten($limit);\n \n return $this;\n }", "public function limit($limit)\n {\n return self::from(Iterables::limit($this, $limit));\n }", "public function limit($string, $limit = 100, $end = '...')\n {\n if (mb_strwidth($string, 'UTF-8') <= $limit) {\n return $string;\n }\n\n return rtrim(mb_strimwidth($string, 0, $limit, '', 'UTF-8')) . $end;\n }", "public function str_limit($value, $limit = 100, $end = '...')\n {\n return Str::limit($value, $limit, $end);\n }", "function truncate($string, $limit, $break=\" \", $pad=\"...\") {\n\t if(strlen($string) <= $limit) return $string; \n\t // is $break present between $limit and the end of the string? \n\t if(false !== ($breakpoint = strpos($string, $break, $limit))) \n\t { \n\t \tif($breakpoint < strlen($string) - 1) \n\t \t{ \n\t \t\t$string = substr($string, 0, $breakpoint) . $pad; \n\t \t} \n\t } return $string; \n\t }", "function truncate2($string, $limit, $break=\" \", $pad=\"...\") {\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n}", "public static function cut(string $s, int $limit = 100, string $end = '...'): string {\n if (mb_strlen($s) <= $limit) {\n return $s;\n }\n\n return mb_strimwidth($s, 0, $limit, $end);\n }", "function truncate($string, $limit, $break=\".\", $pad=\"...\") {\n \tif(strlen($string) <= $limit) return $string;\n \t// is $break present between $limit and the end of the string?\n \tif(false !== ($breakpoint = strpos($string, $break, $limit)))\n \t{ if($breakpoint < strlen($string) - 1)\n \t{ $string = substr($string, 0, $breakpoint) . $pad; } }\n \n \tif (strlen($string) < 400)\n \t{\n \treturn $string;\n \t}\n \n \n \n \t// return with no change if string is shorter than $limit\n \tif(strlen($string) <= $limit) return $string;\n \n \t$string = substr($string, 0, $limit);\n \tif(false !== ($breakpoint = strrpos($string, $break))) {\n \t$string = substr($string, 0, $breakpoint);\n \t}\n \n \treturn $string . $pad;\n }", "public static function of($string)\n {\n return new Stringable($string);\n }", "public static function zeroFill($string, $maxLength = 4) {\n $sPrintfString = '%0'. intval($maxLength) . 's';\n return sprintf($sPrintfString, $string);\n }", "function truncate($string, $limit, $break = \".\", $pad = \"...\")\n {\n if (strlen($string) <= $limit) {\n return $string;\n }\n\n // is $break present between $limit and the end of the string?\n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\n if ($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n }", "public function limit($limit)\r\n {\r\n $this->limit = $limit;\r\n return $this;\r\n }", "public static function build_limit( $limit ) {\n if ( empty( $limit ) ) {\n return '';\n }\n\n return ' LIMIT ' . absint( $limit ) . ' ';\n }", "public function limit($limit)\n {\n $this->limit = $limit;\n return $this;\n }", "public static function limitChars($string, $limit = 100, $append = '...')\n {\n if (self::length($string) <= $limit) {\n return $string;\n }\n return rtrim(self::strPart($string, 0, $limit)) . $append;\n }", "function truncate($string, $limit, $break=\".\", $pad=\"...\") {\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) { if($breakpoint < strlen($string) - 1) { $string = substr($string, 0, $breakpoint) . $pad; } } return $string;\n}", "function truncate($string, $limit, $break=\".\", $pad=\"...\")\n{\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n}", "function myTruncate2($string, $limit, $break=\" \", $pad=\"\")\n {\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n }", "function get_sub_text ($string, $limit, $break, $pad)\r\n{\r\n\t// return with no change if string is shorter than $limit\r\n\tif(strlen($string) <= $limit)\r\n\t\treturn $string;\r\n\r\n\t// is $break present between $limit and the end of the string?\r\n\t$breakpoint = strpos($string, $break, $limit);\r\n\tif($breakpoint !== false) \r\n\t{\r\n\t\tif($breakpoint < (strlen($string)-1)) \r\n\t\t{\r\n\t\t\t$string = substr($string, 0, $breakpoint) . $pad;\r\n\t\t}\r\n\t}\r\n\treturn $string;\r\n}", "public function limit($limit, $offset = 0)\n {\n $limit = intval($limit);\n $offset = intval($offset);\n $this->limit_str = \"{$offset}, {$limit}\";\n return $this;\n }", "function myTruncate2($string, $limit, $break=\" \", $pad=\"...\")\n{\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n}", "public function limit($limit) {\r\n\t\t$this->query .= \" LIMIT \" . $limit;\r\n\r\n\t\t# Return this instance of the class, so we can chain methods\r\n\t\treturn $this;\r\n\t}", "function stringTruncation($string, $limit, $break, $pad)\n{\n if(strlen($string) <= $limit) return $string;\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break)))\n { $string = substr($string, 0, $breakpoint);\n }\n return $string . $pad;\n}", "public function limit($limit) {\n\t\t\t$this->builder->limit($limit);\n\t\t\treturn $this;\n\t\t}", "public function myTruncate($string, $limit, $break=\" \", $pad=\"...\")\n {\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < $limit + 30) {\n $string = substr($string, 0, $breakpoint) . $pad;\n } else {\n $string = substr($string, 0, $limit+30) . $pad;\n }\n } else {\n $string = substr($string, 0, $limit+30) . $pad;\n }\n\n return $string;\n }", "public function setLimit(int $limit): self;", "public function limit($limit = 10) {\n $this->limit = $limit;\n return $this;\n }", "public function limit(int $limit): XyzSpace\n {\n $this->paramLimit = $limit;\n return $this;\n }", "private function shorten(string $string, int $max_size): string\n {\n return rtrim(mb_substr($string, 0, $max_size), ' .,;:-/\\\\') . '...';\n }", "function limit_text($text, $limit) {\n\tif (str_word_count($text, 0) > $limit) {\n\t\t$words = str_word_count($text, 2);\n\t\t$pos = array_keys($words);\n\t\t$text = substr($text, 0, $pos[$limit]) . '...';\n\t}\n\treturn $text;\n}", "public function limit($limit)\t{\n\t\t$this->limit = array(\"LIMIT $limit\");\n\t\treturn $this;\n\t}", "public static function cutText($string, $limit) {\r\r\n\t\tif (strlen($string) < $limit)\r\r\n\t\t\treturn $string;\r\r\n\t\t\r\r\n\t\t$reg =\"/^(.{1,\" . $limit . \"}[^\\s]*).*$/s\";\r\r\n\t\treturn preg_replace($reg, '\\\\1', $string);\r\r\n\t}", "public function limit($limit)\n {\n return $this->set_limit($limit);\n }", "function stringTruncation2($string, $limit, $pad)\n{\n if(strlen($string) <= $limit)\n { return $string;\n }\n else \n { $string = substr($string, 0, $limit - 3);\n return $string . $pad;\n }\n}", "public function limit($limit)\n {\n $this->limit = (int) $limit;\n return $this;\n }", "public function limit(?int $limit): self;", "public static function limit($value, $limit = 100, $end = '...'){\n if(mb_strwidth($value, 'UTF-8') <= $limit){\n return $value;\n }\n\n return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')) . $end;\n }", "public static function limit($limit);", "public function limit($limit) {\n $this->limit = (int) $limit;\n return $this;\n }", "public function limit($limit)\n {\n $this->limit = (int) $limit;\n\n return $this;\n }", "private function limit_str($review, $length, $more_link_text='') {\n if (strlen($review['content']) > $length) {\n if (!$more_link_text) {\n $more_link_text = __('more');\n }\n\n return mb_substr($review['content'], 0, $length) . '...'\n . \" <a href=\\\"{$review['place']['main_url']}#{$review['id']}\\\">{$more_link_text}</a>\";\n }\n\n return $review['content'];\n }", "static function limit_content($str, $length)\n {\n $str = strip_tags($str);\n $str = str_replace('[/', '[', $str);\n $str = strip_shortcodes($str);\n $str = explode(\" \", $str);\n return implode(\" \", array_slice($str, 0, $length));\n }", "function trim_output($str,$maxlength='250',$rep='...'){\n $ret=chunk_split($str,60);\n\n if(strlen($ret) > $maxlength){\n $ret=substr($ret,0,$maxlength).$rep; \n }\n return $ret; \n}", "function trim_output($str,$maxlength='250',$rep='...'){\n $ret=chunk_split($str,60);\n\n if(strlen($ret) > $maxlength){\n $ret=substr($ret,0,$maxlength).$rep; \n }\n return $ret; \n}", "function myTruncate($string, $limit, $break = \".\", $pad = \"...\") {\r\n// return with no change if string is shorter than $limit\r\n if (strlen($string) <= $limit)\r\n return $string; // is $break present between $limit and the end of the string?\r\n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\r\n if ($breakpoint < strlen($string) - 1) {\r\n $string = substr($string, 0, $breakpoint) . $pad;\r\n }\r\n }\r\n return $string;\r\n}", "public static function shortenedString ($string, $maxLength = 40)\n {\n $string = self::export($string);\n \n if (strlen($string) > $maxLength) {\n $string = substr($string, 0, $maxLength - 10) . '...' .\n substr($string, - 7);\n }\n \n return str_replace(\"\\n\", '\\n', $string);\n }", "public function createStringable($string = '')\n {\n $mock = $this->mock('Dhii\\Util\\String\\StringableInterface')\n ->__toString($this->returnValue($string))\n ->new();\n\n return $mock;\n }", "public static function myTruncate($string, $limit, $break = \" \", $pad = \"...\") {\n // return with no change if string is shorter than $limit\n if (strlen($string) <= $limit) {\n return $string;\n }\n // is $break present between $limit and the end of the string?\n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\n if ($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n return $string;\n }", "function myTruncate($string, $limit=80, $break=\".\", $pad=\"...\")\n{\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n \n return restoreTags($string);\n}", "public function setLimit($limit) {\n $this->limit = $limit;\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function limit(int $limit): self\n {\n $this->limit = $limit <= 100 ? $limit : 10;\n\n return $this;\n }", "public function limit( $value, $limit = 100, $end = '...' ) {\n\t\tif ( $this->length( $value ) <= $limit ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$value = ( MB_STRING ) ? mb_substr( $value, 0, $limit, $this->encoding ) : substr( $string, 0, $limit );\n\n\t\treturn $value.$end;\n\t}", "public static function limit($value, $limit = 100, $end = '...')\n {\n if (mb_strwidth($value, 'UTF-8') <= $limit) {\n return $value;\n }\n\n return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')) . $end;\n }", "public static function string( $length=20 )\n {\n $chars = array_merge( range( \"0\",\"9\" ), range( \"a\",\"z\" ), range( \"A\",\"Z\" ) );\n return self::_generate( $length, $chars );\n }", "public function limit( int $limit )\n {\n $this->limit = $limit;\n return $this;\n }", "function limitChars($text, $limit = 200, $more = ' ... ')\n{\n $text = mb_substr($text, 0, $limit);\n if (mb_substr($text, mb_strlen($text) - 1, 1) && mb_strlen($text) == $limit) {\n $textReturn = mb_substr($text, 0, mb_strlen($text) - mb_strlen(strrchr($text, ' ')));\n if (!empty($textReturn)) {\n return $textReturn . $more;\n }\n }\n return $text;\n}", "public function fixedLength($length, $pad_type = STR_PAD_RIGHT) {\n\t\t\tif ($this->info->type == 'string') {\n\t\t\t\t$strlen = strlen($this->value);\n\t\t\t\tif ($strlen > $length) {\n\t\t\t\t\t$value = substr($this->value, 0, $length);\n\t\t\t\t\t// TODO add logging\n\t\t\t\t\treturn static::factory($this->name, $value);\n\t\t\t\t}\n\t\t\t\telse if ($strlen < $length) {\n\t\t\t\t\t$value = str_pad($this->value, $length, ' ', $pad_type);\n\t\t\t\t\treturn static::factory($this->name, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function displayLength($displayLength)\n {\n $this->displayLength = $displayLength;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->_limit = $limit;\n return $this;\n }", "public function limit($limit);", "public function limit($limit);", "public static function limit($value, $limit = 100, $end = '...')\n\t{\n\t\tif (static::length($value) <= $limit) return $value;\n\n\t\tif (MB_STRING)\n\t\t{\n\t\t\treturn mb_substr($value, 0, $limit, static::encoding()).$end;\n\t\t}\n\n\t\treturn substr($value, 0, $limit).$end;\n\t}", "public function setLimit($limit)\n {\n //argument 1 must be a string\n Argument::i()->test(1, 'int');\n $this->query['limit'] = $limit;\n \n return $this;\n }", "public static function create(): StringBuffer\n {\n return new self();\n }", "public function shortTitle(int $maxLength = 50): string\n {\n return Str::limit($this->title, $maxLength);\n }", "public function limit(int $limit = 100): self\n {\n $this->limit = min(100, max(1, $limit));\n\n return $this;\n }", "public static function prepareString($value, int $maxlen = null)\n {\n $value = trim($value);\n\n if (!is_null($maxlen) && strlen($value) > $maxlen) {\n throw new Exception(\"$value is longer than the max allowed length of $maxlen\");\n }\n\n // Returns as an anonymous class that implements __toString in order to ensure\n // that numeric values that have been explicitly declared as strings are not\n // converted to integers when processed in the call() method.\n return new class($value) {\n protected string $value;\n public function __construct(string $value)\n {\n $this->value = $value;\n }\n public function __toString()\n {\n return $this->value;\n }\n };\n }", "public static function fill( $value=\"\", $limit=30, $char=\".\", $last=\":\" )\n {\n $value = Sanitize::toText( $value );\n $strlen = strlen( $value ) + strlen( $last );\n $count = ( $strlen > $limit ) ? ( $strlen - $limit ) : ( $limit - $strlen );\n return $value . str_repeat( $char, $count ) . $last;\n }", "function maxlength($text, $max, $shorten=true)\n{\nif(strlen($text) >= $max) {\nif($shorten) {\n$text = substr($text, 0, ($max-3)).\"...\";\n} else {\n$text = substr($text, 0, ($max));\n} }\nreturn $text;\n}", "public function short(string $full, $limit = 30) : string\n {\n preg_match(PATTERN_CHINESE, $full, $matches);\n\n if (!empty($matches)) {\n if (mb_strlen($full) >= $limit) {\n return mb_substr($full, 0, $limit-1) . \"...\";\n } else {\n return mb_substr($full, 0, $limit);\n }\n } else {\n if (strlen($full) >= $limit) {\n return substr($full, 0, $limit-1) . \"...\";\n } else {\n return substr($full, 0, $limit);\n }\n }\n }", "function my_string_limit_words($string, $word_limit)\r\n{\r\n $words = explode(' ', $string, ($word_limit + 1));\r\n if(count($words) > $word_limit)\r\n array_pop($words);\r\n return implode(' ', $words).'... ';\r\n}", "function str_limit_words($string, $limit = 10, $end = '...')\n {\n return str::limitWords($string, $limit, $end);\n }", "public function limit($max)\n {\n $this->limit = intval($max);\n return $this;\n }", "public function limit($limit = \"\"){\n\t\t\tif(is_numeric($limit)){\n\t\t\t\t$this->limit = \" LIMIT :limit\";\n\t\t\t\t$this->addParam(\"limit\", $limit);\n\t\t\t}else{\n\t\t\t\t$this->limit = false;\n\t\t\t\tunset($this->parameters[\"limit\"]);\n\t\t\t}\n\t\t\treturn $this;\n\t\t}" ]
[ "0.5799131", "0.579068", "0.5733761", "0.5699269", "0.5647924", "0.55872667", "0.5587126", "0.5572459", "0.5565704", "0.55547523", "0.55515724", "0.5452892", "0.5441698", "0.5441663", "0.54207546", "0.5406397", "0.5391213", "0.53860396", "0.53741574", "0.5363558", "0.5341977", "0.5322642", "0.531038", "0.5296334", "0.52687544", "0.5268245", "0.52682275", "0.5254087", "0.52231604", "0.5192045", "0.51865864", "0.51710695", "0.5157114", "0.51267576", "0.5120096", "0.5117421", "0.51118577", "0.51090074", "0.50980335", "0.5097702", "0.50941885", "0.50934595", "0.50846726", "0.50750166", "0.5074529", "0.5069514", "0.50623554", "0.5056127", "0.5052338", "0.5018401", "0.5012556", "0.501059", "0.50087094", "0.50069404", "0.5004796", "0.5001749", "0.5000545", "0.49991846", "0.4996805", "0.49966058", "0.4992446", "0.49873346", "0.49675432", "0.49555266", "0.49368772", "0.493465", "0.493465", "0.49325627", "0.49209383", "0.49119994", "0.4885516", "0.4883938", "0.48818153", "0.4872865", "0.4872865", "0.4872865", "0.48713824", "0.48665425", "0.4861921", "0.4858834", "0.48531774", "0.4847212", "0.4840318", "0.48366106", "0.4833302", "0.48259047", "0.48259047", "0.48257324", "0.48229596", "0.48213547", "0.4817775", "0.48164886", "0.4814407", "0.48131263", "0.480832", "0.48079845", "0.4796751", "0.47915062", "0.4788351", "0.4783608" ]
0.7650457
0
Return a new Printable with the given array limit.
public function withArrayLimit(int $arrlim): Printable { return new Printable($this->value, $this->callable, $this->strlim, $arrlim); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function limit($limit)\n {\n return self::from(Iterables::limit($this, $limit));\n }", "public static function limit($limit);", "public function withStringLimit(int $strlim): Printable\n {\n return new Printable($this->value, $this->callable, $strlim, $this->arrlim);\n }", "public function limit($limit);", "public function limit($limit);", "public function limit($limit)\t{\n\t\t$this->limit = array(\"LIMIT $limit\");\n\t\treturn $this;\n\t}", "public function take($limit)\n {\n $this->dataToArray();\n\n return new self(array_slice($this->data, 0, $limit));\n }", "public function setLimit(int $limit): self;", "public function limit($limit)\r\n {\r\n $this->limit = $limit;\r\n return $this;\r\n }", "public function limit($limit, $offset = 0)\n {\n $limit = intval($limit);\n $offset = intval($offset);\n $this->limit_str = \"{$offset}, {$limit}\";\n return $this;\n }", "public static function shortenArray(array $values, int $limit = 5, string $glue = ', '): string\n {\n $valuesToShow = array_slice($values, 0, $limit);\n $delta = count($values) - count($valuesToShow);\n if ($delta <= 2) {\n // if there is only a few more, just show them all\n $valuesToShow = $values;\n } else {\n $valuesToShow[] = 'and ' . $delta . ' more';\n }\n return join($glue, $valuesToShow);\n }", "public function limit($limit = 10) {\n $this->limit = $limit;\n return $this;\n }", "public function limit($limit=10, $offset=0) {\n $this->__limit__ = array($limit, $offset);\n return $this;\n }", "public function limit($limit)\n {\n }", "public function limit($limit)\n {\n $this->limit = $limit;\n return $this;\n }", "public function limit($limit) {\n\t\t\t$this->builder->limit($limit);\n\t\t\treturn $this;\n\t\t}", "public function limit($limit) {\n $this->limit = (int) $limit;\n return $this;\n }", "public function limit($limit)\n {\n $this->_parts['limit'] = $limit;\n\n return $this;\n }", "public final function formatToView(array $values,int $limit = 20) : array {\n $top =array_slice($values,0,$limit,true);\n $tableRow = [];\n foreach ($top as $key=>$value) {\n $tableRow[] = [$key, $value];\n }\n return $tableRow;\n }", "public function limit($limit)\n {\n return $this->set_limit($limit);\n }", "public function limit(?int $limit): self;", "public function setLimit($limit) {\n $this->limit = $limit;\n return $this;\n }", "public function limit($limit)\n {\n $this->limit = (int) $limit;\n return $this;\n }", "public function __construct(int $limit = 100)\n {\n $this->limit = $limit;\n }", "public function limit(int $length, ?int $offset = 0): self\n {\n $this->limit = \"$offset, $length\";\n return $this;\n }", "public function limit($limit, $offset = null);", "function InicializaArray($Limite){\n\t\tfor($i = 1; $i <= $Limite; $i++) \n\t\t{ \n\t\t ${'array'}[$i] = 0; \n\t\t} \n\treturn $array;\n}", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function limit($limit,$offset = null)\n {\n $this->_limitStr = \" LIMIT \".intval($limit);\n if (!is_null($offset)) {\n $this->_limitStr .= ', '.intval($offset);\n }\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->_limit = $limit;\n return $this;\n }", "public static function create(int $dataLimit)\n {\n return new self($dataLimit);\n }", "public function limit($limit)\n {\n $this->limit = (int) $limit;\n\n return $this;\n }", "function printArray($myArray, $n) { \n for ($i = 0; $i < $n; $i++) \n echo $myArray[$i].\" \"; \n echo \"\\n\";\n}", "public function setLimit($limit)\n {\n $this->recordsPerPage = max(1, intval($limit));\n\n return $this;\n }", "public function limit($limit, $val = null){\n\t\t$this->queried = false;\n\t\t\n\t\tif($val) $limit = array($limit, $val);\n\t\telseif(is_scalar($limit)) $limit = array(0, $limit);\n\t\t\n\t\t$this->Storage->store('limit', $limit);\n\t\t\n\t\treturn $this;\n\t}", "public function setLimit($var)\n {\n GPBUtil::checkDouble($var);\n $this->limit = $var;\n\n return $this;\n }", "public function limit($offset, $limit=null)\n {\n if (is_null($limit)) $this->limit = $offset;\n else $this->limit = $offset.', '.$limit;\n return $this;\n }", "public function setLimit($limit)\n\t{\n\t\t$this->limit = $limit;\n\t\treturn $this;\n\t}", "public function setLimit($value)\n {\n\n $this->limit = $value;\n\n return $this;\n\n }", "public function limit(int $limit, int $offset);", "public function setLimit($limit)\n {\n $this->limit = (int) $limit;\n return $this;\n }", "public function limit($limit = null, $offset = 0) {\n if($limit) {\n $this->limit = 'LIMIT '.floor($offset).', '.floor($limit);\n } else {\n $this->limit = '';\n }\n return $this;\n }", "public static function create($all = null, $limit = null)\r\n\t{\r\n\t\treturn new Opc_Paginator_Range($all, $limit);\r\n\t}", "public static function printArray($array, $border) {\r\n\r\n/* This function loops through a simple (1D)\r\n array and prints out all the values in a \r\n table. This is used for diagnostic\r\n purposes primarily, although there \r\n can be other applications. */\r\n \r\n // Check that the array exists\r\n if (!$array) {\r\n echo \"No array specified.<BR><BR>\";\r\n return;\r\n }\r\n \r\n else {\r\n // Start table\r\n echo \"<TABLE BORDER=$border>\";\r\n \r\n // Print the array in table cells\r\n foreach ($array as $value) {\r\n echo \"<TR><TD>$value</TD></TR>\"; \r\n } // end of while loop\r\n \r\n // End table and return\r\n echo \"</TABLE>\";\r\n return;\r\n } // end of else\r\n\r\n}", "public function set_limit($limit);", "private function limit_page()\n {\n $page = $this->define_page();\n $start = $page * $this->count - $this->count;\n $fullnumber = $this->total;\n $total = $fullnumber['count'] / $this->count;\n is_float($total) ? $max = $total + 2 : $max = $total + 1;\n $array = array('start'=>(int)$start,'max'=>(int)$max);\n return $array;\n }", "private static function constructLimitStringStatic($limit)\n {\n $string = $limit['start'];\n if ($limit['limit'] !== false) {\n $string .= \", {$limit['limit']}\";\n }\n return $string;\n }", "public function setLimit($limit)\n {\n $this->limit = (int) $limit;\n\n return $this;\n }", "public function setPrintPageRange(?array $pageRange = null) {}", "public function limit($offset, $max = null);", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n\n return $this;\n }", "public function limit($offset, $length)\n\t\t{\n\t\t\tif(!is_int($offset) || !is_int($length))\n\t\t\t{\n\t\t\t\tthrow new \\Exception('Invalid limit parameters.');\n\t\t\t}\n\t\t\t$this->limit = array($offset, $length);\n\t\t\treturn $this;\n\t\t}", "public final function resetLimit()\n {\n $this->limit = array();\n return $this;\n }", "public function limit($max)\n {\n $this->limit = intval($max);\n return $this;\n }", "public function limit($limit,$offset);", "public function limit( int $limit )\n {\n $this->limit = $limit;\n return $this;\n }", "public function limit($limit, $offset = 0) {\n\t\t$this->limit = $limit;\n\t\t$this->offset = $offset;\n\t\treturn $this;\n\t}", "public abstract function limit(int $limit): Stream;", "public function limit($size){\r\n $this->limit = $size;\r\n return $this;\r\n }", "public static function limitPad()\n {\n return new CropMode(CropMode::LIMIT_PAD);\n }", "public function limit($value)\n\t{\n\t\t$this->limit = $value;\n\t\treturn $this;\n\t}", "function limit($limit, $offset = 0)\n{\n\t$this->tryModify();\n\t$this->query['limit'] = array((int)$limit, (int)$offset);\n\treturn $this;\n}", "public function __construct($size = 0) // [\\SplFixedArray]\n\t{\n\t\t$this->start = ($size instanceof \\SplFixedArray) ? 0\n\t\t : $size / 2;\n\t\tparent::__construct($size);\n\t}", "public static function init(int $limit = 1000, bool $simple = false): self\n {\n return new self($limit, $simple);\n }", "public function limit($offset, $limit)\n {\n $this->limitString = $this->adapter->limit($this->limitString, $limit, $offset);\n return $this;\n }", "public function limit($value) {\r\n $this->limit = (int)$value;\r\n return $this;\r\n }", "public function limitBy($limit, $offset = NULL)\n\t{\n\t\t$this->dirty();\n\t\t$this->limit = $limit || $offset ? [$limit, $offset] : NULL;\n\t\treturn $this;\n\t}", "public function limit($limit, $offset = 0)\n\t{\n\t\t$this->limit = $limit;\n\t\t\n\t\t$this->offset = $offset;\n\t\t\n\t\treturn $this;\n\t}", "public function limit($value)\n {\n $this->limit = $value;\n\n return $this;\n }", "public function toPublicArray($limitFields = null)\n {\n if (!$limitFields) {\n $limitFields = static::$publicFields;\n } else {\n $limitFields = array_intersect(static::$publicFields, $limitFields);\n }\n $arr = $this->toArray();\n foreach ($arr as $k => $item) {\n if (is_numeric($k) || !in_array($k, $limitFields, true)) {\n unset($arr[$k]);\n }\n }\n return $arr;\n }", "public function limit( $limit, $offset = 0 )\n {\n $this->hasLimit = true;\n $this->limit = $limit;\n $this->offset = $offset;\n return $this;\n }", "public static function limit(int $limit, bool $simple = false): self\n {\n return new self($limit, $simple);\n }", "public function getPrintsOfUser($username, $limit = 20, $afterPrintPublicId = null): array;", "public function limit($limit) {\r\n $this->sqlLimit = $limit;\r\n return $this;\r\n }", "public function limit($limit, $offset = null)\n\t{\n\t\t$this->limit = (int) $limit;\n\t\tfunc_num_args() > 1 and $this->offset = (int) $offset;\n\n\t\treturn $this;\n\t}", "public function limit($limit, $offset = null)\n {\n $qs = clone $this;\n $qs->limitOffset = new LimitOffset($limit, $offset);\n return $qs;\n }", "public function limit($limit) {\r\n\t\t$this->query .= \" LIMIT \" . $limit;\r\n\r\n\t\t# Return this instance of the class, so we can chain methods\r\n\t\treturn $this;\r\n\t}", "private function setLimit()\n {\n if (isset($this->iDisplayStart) && $this->iDisplayLength != '-1') {\n $this->qb->setFirstResult($this->iDisplayStart)->setMaxResults($this->iDisplayLength);\n }\n\n return $this;\n }", "public function limit(){\r\n \t$tb = call_user_func_array(array($this->mask(), 'limit'), func_get_args());\r\n\t\treturn $this;\r\n }", "public function limit(int $limit)\n {\n $this->options['limit'] = $limit;\n\n return $this;\n }", "public function limit(int $limit, int $offset = 0): static\n {\n return $this->withPropertyItem('opts', new LimitOption($limit, $offset));\n }", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n $this->has_limit = true;\n\n return $this;\n }", "public function limit($start, $size = null) {\n\t\tif (is_null($size)) {\n\t\t\t$this->limit = [0, $start];\n\t\t} else {\n\t\t\t$this->limit = [$start, $size];\n\t\t}\n\t\treturn $this;\n\t}", "public function shorten($limit)\n {\n $this->provider->shorten($limit);\n \n return $this;\n }", "public function setLimit($limit)\n {\n if (is_integer($limit)) {\n $this->request->appendToParameter('options', 'num-' . $limit);\n }\n\n return $this;\n }", "public function getPrintPageRange(array $defaultValue = [/** value is missing */]) {}", "public function setLimit($limit)\n {\n if ($limit < 1 || !is_int($limit)) {\n throw new \\InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249);\n }\n $this->limit = $limit;\n\n return $this;\n }", "function show_limit($val,$limit = 20){\n\t$str = substr($val, 0, $limit);\n\tif(strlen($val) > $limit) $str .= \"...\";\n\treturn $str;\n}", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function limit($limit, $offset = 0) {\n $this->_limit = (int) $limit;\n\n if ($offset) {\n $this->offset($offset);\n }\n\n return $this;\n }", "public function limit($length)\n {\n $this->randomStringLength = $length;\n return $this;\n }", "public function limit($limit)\r\n {\r\n $this->query->limit($limit);\r\n \r\n return $this;\r\n }", "public function limit($limit, $offset=null)\n\t{\n\t\t\t\t\t$this->_query['limit']=(int)$limit;\n\t\t\t\t\tif($offset!==null)\n\t\t\t\t\t\t\t\t\t$this->offset($offset);\n\t\t\t\t\treturn $this;\n\t}", "public function limit($num)\n {\n $this->limit = $num;\n return $this;\n }" ]
[ "0.55312455", "0.52996206", "0.5266579", "0.5221374", "0.5221374", "0.517468", "0.5163341", "0.51078963", "0.50517434", "0.50471324", "0.50427085", "0.502774", "0.5012319", "0.50084686", "0.49883428", "0.49859542", "0.49719012", "0.4968724", "0.49675462", "0.4964598", "0.49632192", "0.4962877", "0.4904883", "0.48979837", "0.48560828", "0.4848857", "0.48355538", "0.48269472", "0.48269472", "0.48269472", "0.48252165", "0.48229447", "0.48219904", "0.48189574", "0.48027152", "0.4787079", "0.47611204", "0.47610408", "0.47605512", "0.4755146", "0.4755011", "0.4740426", "0.47285295", "0.47236323", "0.47099224", "0.47091287", "0.4699146", "0.4691344", "0.46904352", "0.46887514", "0.46882194", "0.46851766", "0.46737424", "0.46697155", "0.46635333", "0.4662833", "0.4655867", "0.46533787", "0.46314806", "0.46235576", "0.4618643", "0.46153495", "0.46095243", "0.46076408", "0.4605919", "0.45984095", "0.45924443", "0.4591528", "0.4588614", "0.45883825", "0.45816076", "0.45716104", "0.45703572", "0.45643035", "0.4558704", "0.45575696", "0.45430169", "0.4537739", "0.4535733", "0.45278603", "0.45229468", "0.45200613", "0.4520012", "0.45093203", "0.45014554", "0.44987094", "0.44971287", "0.44937348", "0.44815218", "0.44760787", "0.44749522", "0.44749522", "0.44749522", "0.44749522", "0.44749522", "0.44722033", "0.44665593", "0.44625327", "0.44553462", "0.44545677" ]
0.77780515
0
Return a string representation of the value.
public function __toString() { $type = gettype($this->value); switch ($type) { case 'boolean': return $this->boolean($this->value); break; case 'integer': return $this->int($this->value); break; case 'double': return $this->float($this->value); break; case 'string': return $this->string($this->value); break; case 'array': return $this->array($this->value); break; case 'object': return $this->object($this->value); break; case 'resource': return $this->resource($this->value); break; case 'NULL': return 'NULL'; break; default: return '(unknown type)'; break; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toString() : string\n {\n return strval($this->value);\n }", "public function toString() {\n\t\treturn serialize($this->_value);\n\t}", "final public function __toString()\n {\n return strval($this->value);\n }", "public function toString() : string\n {\n return $this->value;\n }", "public function __toString()\n\t{\n\t\treturn (string) $this->value;\n\t}", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function __toString()\n {\n return strval($this->__value);\n }", "public function toString(): string\n {\n return $this->getValue();\n }", "public function __toString()\n {\n return (string)$this->value;\n }", "public function __toString(): string\n {\n return (string) $this->value;\n }", "public function __toString() {\n\t\t\treturn Core\\Convert::toString($this->value);\n\t\t}", "function __toString()\n {\n return strval($this->value);\n }", "public function __toString()\n {\n return (string) $this->getValue();\n }", "public function __toString()\n {\n return (string) $this->getValue();\n }", "public function __toString()\n {\n return (string) $this->getValue();\n }", "public function __toString()\n {\n return $this->value;\n }", "public function __toString()\n {\n return $this->value;\n }", "public function __toString()\n {\n return $this->value;\n }", "public function __toString()\n {\n return $this->value;\n }", "public function __toString()\n {\n return $this->value;\n }", "public function __toString()\n {\n return $this->value;\n }", "public function __toString()\n {\n return $this->value;\n }", "public function __toString() {\n\t\t\treturn $this->value;\n\t\t}", "public function __toString(): string\n {\n return (string)$this->value;\n }", "public function __toString(): string\n {\n return (string) $this->getValue();\n }", "public function __toString(){\n\t\treturn $this->value;\n\t}", "final public function __toString(): string\n {\n return (string)$this->value;\n }", "public function __toString()\n\t{\n\t\treturn $this->value();\n\t}", "public function __toString() {\n return print_r($this->__value, true);\n }", "public function getValue(): string\n {\n return gmp_strval($this->value);\n }", "public function string()\n {\n return (string)$this->value;\n }", "public function __toString()\n {\n if (is_array($this->value)) {\n return (string)json_encode($this->value);\n }\n return (string)$this->value;\n }", "public function getValueAsString();", "public function toString() {\n \n return $this->toScalar();\n }", "public function toString(mixed $value): string;", "public function __toString()\n {\n return $this->str_value;\n }", "public function __toString() {\n\t\treturn sprintf(\"%s: %s\", $this->getName(), $this->getValue());\n\t}", "public function toString(): string\n {\n return $this->type->typeName() . '=' . $this->value->rfc2253String();\n }", "public function value() {\n\t\treturn $this->__toString();\n\t}", "public function getValue(): string\n {\n return $this->transform($this->value);\n }", "public function __toString()\n\t{\n\t\treturn sprintf(\"%02X\", $this->getValue());\n\t}", "public function value()\n\t{\n\t\treturn (string) $this->value;\n\t}", "public function toString() {\n return 'is similar to ' . $this->exporter->export($this->value);\n }", "public function toString()\n {\n return sprintf('is equal to %s', $this->exporter->export($this->value));\n }", "public function toString()\n {\n return $this->cast('string');\n }", "public function toString() {\n switch (xp::typeOf($this->value)) {\n case 'boolean': \n return $this->value ? 'T' : 'F';\n\n case 'util.Date':\n $this->attributes['xmlns:b']= 'urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/';\n $this->attributes['b:dt']= 'dateTime.rfc1123';\n return $this->value->toString($this->name == 'getlastmodified' ? 'D, j M Y H:m:s \\G\\M\\T' : 'Y-m-d\\TH:m:s\\Z');\n\n default:\n return (string)$this->value;\n }\n }", "public function __toString()\n {\n return strval($this->_data);\n }", "public function __toString() {\r\n return (string) $this->getMappingValue();\r\n }", "public function value(): string\n {\n return $this->get('value');\n }", "public function to_string() { return $this->__toString(); }", "public function getToString()\n {\n return $this->toString();\n }", "public function __toString()\n {\n $references = [];\n foreach ($this->getValue() as $item) {\n $references[] = $item->getMaskedValue();\n }\n\n return $this->arr($references)->implode(', ')->val();\n }", "function to_str(){\n //\n //A string version of a literal is basicaly the literal itself as a string \n //hence it should be encosed in double quotes incase it is needed to be \n //converted into json\n return \"'$this->value'\";\n }", "public function toString()\n {\n return sprintf('%s: %s', $this->getFieldName(), $this->getFieldValue());\n }", "public function __toString() {\n\t\ttry {\n\t\t\treturn array_flip($this->getConstants())[$this->value];\n\t\t\t// when the value is not in the constants\n\t\t} catch(Exception $e) {\n\t\t\treturn \"Invalid value \".$this->value;\n\t\t}\n\t}", "public function __toString()\n {\n $value = $this->getValue();\n if ($value === null) {\n return '';\n }\n $attribute = $this->getAttribute();\n if ($attribute->getFieldType() == FormChoiceType::class) {\n $options = array_flip($attribute->getFieldTypeChoiceOptions(true));\n if (is_array($value)) {\n //multiple option, multiple values\n foreach ($value as &$option) {\n $option = $options[$option];\n }\n } elseif (isset($options[$value])) {\n //multiple option, single value\n $value = [$options[$value]];\n } else {\n return (string)$value;\n }\n return implode(', ', $value);\n }\n return (string)$value;\n }", "public function getStringValue()\n {\n if ($this->defaultValue === $this->getValue()) {\n return '';\n }\n\n return $this->value->format(self::FORMAT);\n }", "public function toString() {\n if (! $this->_value) {\n return '';\n }\n\n $s = array ();\n\n foreach ( $this->_visibleUnits as $unit ) {\n if (! is_array ( $unit ) || ! is_string ( $unit [0] )) {\n continue;\n }\n\n if ($this->_value / $unit [0] > 1) {\n $t = floor ( $this->_value / $unit [0] );\n $s [] = $t . ' ' . $unit [1];\n $this->_value -= $unit [0] * $t;\n }\n }\n\n return implode ( ' ', $s );\n }", "public function toString()\n {\n $data = $this->getProperties();\n $out = get_class($this).' ('.CRLF;\n foreach ($data as $key => $value) {\n $type = gettype($value);\n $value = is_bool($value) ? (int) $value : $value;\n $value = is_string($value) ? '\"'.$value.'\"' : $value;\n $value = is_object($value) ? implode(CRLF.TAB, explode(CRLF, (string) $value)) : $value;\n $value = is_array($value) ? print_r($value, true) : $value;\n $out .= TAB.$key.' ('.$type.')';\n $out .= ': '.$value.CRLF;\n }\n\n return $out.');';\n }", "public function __toString() {\n $str = \"<{$this->name} \";\n foreach ($this->attributes as $key => $val) {\n $str .= \"$key=\\\"$val\\\" \";\n }\n $str = rtrim($str) . \">\" . $this->value . \"</{$this->name}>\";\n\n return $str;\n }", "public function __toString()\n {\n return sprintf(self::TEMPLATE, $this->value->type(), $this->role, $this->type);\n }", "public function __toString()\n {\n return json_encode($this->activeValue);\n }", "public function toString()\n\t{\n\t\treturn (string) $this;\n\t}", "public function toString()\n\t{\n\t\treturn (string) $this;\n\t}", "public function toString() {\n return \"userId : \" . $this->userId . \": item : \" . $this->item . \" : value : \" . $this->value;\n }", "function to_string() {\n\t\treturn $this->get($this->name_field);\n\n\t}", "public function getValue(): string\n {\n return $this->value;\n }", "public function getValue(): string\n {\n return $this->value;\n }", "public function getValue(): string\n {\n return $this->value;\n }", "public function getValue(): string\n {\n return $this->value;\n }", "public function getValue(): string\n {\n return $this->value;\n }", "public function getValue(): string\n {\n return $this->value;\n }" ]
[ "0.8820216", "0.8721727", "0.8686113", "0.8641774", "0.85874397", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.850196", "0.8434267", "0.83924234", "0.8387143", "0.83790976", "0.8356075", "0.8356075", "0.8356075", "0.8328198", "0.8328198", "0.8328198", "0.8328198", "0.8328198", "0.8328198", "0.8328198", "0.82882774", "0.8286522", "0.82362723", "0.81539303", "0.8114086", "0.8076945", "0.7957995", "0.78674257", "0.7854435", "0.7852125", "0.7829945", "0.78270197", "0.7740448", "0.77280533", "0.7723852", "0.7644604", "0.7578033", "0.7554946", "0.7537384", "0.7527006", "0.751337", "0.75073224", "0.7466391", "0.7464859", "0.74623215", "0.74429685", "0.7432539", "0.74125475", "0.7410184", "0.7401066", "0.73984647", "0.73945814", "0.73897386", "0.72998494", "0.7291644", "0.72762144", "0.72743297", "0.7266825", "0.72600526", "0.7250169", "0.72477335", "0.72477335", "0.72118455", "0.71947074", "0.71800756", "0.71800756", "0.71800756", "0.71800756", "0.71800756", "0.71800756" ]
0.7960075
56
Return a formatted string from the given boolean.
private function boolean(bool $value): string { return $value ? 'true' : 'false'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool2str($bool) {\n\tif($bool ===false)\n\t\treturn 'false';\n\telse\n\t\treturn 'true';\n}", "protected function bool2str($bool) {\n return ($bool) ? 'TRUE' : 'FALSE';\n }", "public function boolToStr($boolean)\n {\n return ($boolean === true) ? 'true' : 'false';\n }", "public static function bool2str(bool $boolean = true): string\n {\n if ($boolean === false) {\n return 'FALSE';\n } else {\n return 'TRUE';\n }\n }", "public static function strbool($bool){\r\n return ($bool) ? \"true\" : \"false\";\r\n }", "function bool_s($boolean) {\n\treturn ($boolean ? 'true' : 'false');\n}", "function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}", "function booltostr(bool $bool, int $mode = BOOL_TO_STR_OPTION_LOWERCASE): string\n {\n return BOOL_TO_STR_OPTIONS_MAP[$mode][$bool];\n }", "function stage_bool_to_string($bool)\n{\n if (! is_bool($bool)) {\n $bool = wc_string_to_bool($bool);\n }\n return true === $bool ? 'yes' : 'no';\n}", "private static function bool2str($v)\n {\n //convert boolean to text value.\n $v = $v === true ? 'true' : $v;\n $v = $v === false ? 'false' : $v;\n return $v;\n }", "private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }", "public static function booleanToString($obj)\n {\n return $obj ? 'true' : 'false';\n }", "public function getBooleanString($tf);", "function bool_to_string($value) {\n return $value ? 'true' : 'false';\n }", "private function boolToString ($value)\n\t{\n\t\tif (true === $value)\n\t\t{\n\t\t\treturn 'true';\n\t\t}\n\t\telseif (false === $value)\n\t\t{\n\t\t\treturn 'false';\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t}", "function message($boolValue) {\n\tif($boolValue) {\n\t\techo \"TRUE: \";\n\t} else {\n\t\techo \"FALSE: \";\n\t}\n\techo \"GOT value as \", (int)$boolValue, \"\\n\";\n}", "public static function boolToString($value)\n {\n $value = $value === true ? 'true' : $value;\n $value = $value === false ? 'false' : $value;\n return $value;\n }", "public function booleanString($var)\n {\n return is_bool($var)\n ? ($var ? 'True' : 'False')\n : $var;\n }", "abstract public function escapeBoolean($bool);", "public function getBooleanFormatForQueryString(): string\n {\n return $this->booleanFormatForQueryString;\n }", "private function formatBoolean($answer)\n {\n if (!$answer) {\n return 'No';\n }\n\n return 'Yes';\n }", "function b2s($b) {\n return ($b) ? 'TRUE' : 'FALSE';\n}", "function rt_nice_boolean($boolean_value = false, $yes = 'yes', $no = 'no')\n{\n return sprintf('<span class=\"ui-icon ui-icon-%s\">%s</span>', $boolean_value ? 'check' : 'close', $boolean_value ? $yes : $no);\n}", "public function formatBool($value)\n {\n if ($value) {\n return 1;\n } else {\n return 0;\n }\n }", "public function __toString()\n {\n $options = array();\n foreach ($this as $key => $value) {\n if ($value === true) {\n $options[] = $key;\n }\n }\n sort($options);\n\n return implode(\"\\n\", $options);\n }", "public function format($result)\n {\n if (is_object($result) === true && method_exists($result, '__toString') === true) {\n return (string) $result;\n } elseif (is_object($result) === true || is_array($result) === true) {\n return var_export($result, true);\n } elseif (is_bool($result) === true && true === $result) {\n return 'true';\n } elseif (is_bool($result) === true && false === $result) {\n return 'false';\n }\n\n return (string) $result;\n }", "public static function bool2text($valBool)\n\t{\n\t\t$salida = \"\";\n\n\t\tif($valBool) {\n\n\t\t\t$salida = \"Si\";\n\n\t\t} else {\n\n\t\t\t$salida = \"No\";\n\n\t\t}\n\n\t\treturn $salida;\n\t}", "public function format($value)\r\n {\r\n // $translate = Bvb_Grid_Translator::getInstance();\r\n\treturn ($value==\"1\") ? \" checked='checked' \": \" \";\r\n\r\n }", "function bool2str($data)\n {\n TRUE === $data && $data = 'true';\n FALSE === $data && $data = 'false';\n return $data;\n }", "private static function renderBoolean($value)\n {\n return Yii::$app->formatter->asBoolean($value == 1);\n }", "function format_flags($flags, $format = \"quark\") {\n\t$output = FALSE;\n\tforeach ($flags as $flag) {\n\t\tswitch ($flag->name) {\n\t\t\tcase \"Bees\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"Ω\";\n\t\t\t\t\t// If(flag~Bee > \"a\";\"Ω\";\"\")\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output = \"Bee\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Birds\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"ı\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output = \"BirdB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Butterflies\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"∫\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"ButterB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Cold Sensitive\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"†\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"ColdB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Culinary\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"Ç\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"CulinaryB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Edible Flowers\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"´\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"EdibleB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Ground Cover\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"˝\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output = \"GroundB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Hummingbirds\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"˙\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"HummB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Interesting Foliage\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"ç\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"FoliageB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Medicinal\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"Â\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"MedicinalB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Minnesota Native\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"˜\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"NativeB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Organic\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"Ø\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"OrganicB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Poisonous\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"¥\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"PoisonousB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Rock Garden\":\n\t\t\t\tif ($format == \"quark\" || $format == \"poster\") {\n\t\t\t\t\t$output .= \"‰\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= \"RockB\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Houseplant\":\n\t\t\t\tif($format == \"quark\" || $format == \"poster\"){\n\t\t\t\t\t$output .= \"ƒ\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$output .= \"HouseplantB\";\n\t\t\t\t}\n\t\t}\n\t}\n\tif ($format == \"quark\") {\n\t\tif ($output) {\n\t\t\t$output = sprintf(\"<f\\\"FSMPlantSaleIcons\\\">%s<f$>\", $output);\n\t\t}\n\t}\n\treturn $output;\n}", "abstract public function unescapeBoolean($bool);", "function _get_boolean_image($boolean) {\n $imgReturn = '<img style=\"position: relative; top: -2px; margin-left: 5px;\" height=\"10px\" src=\"' . url(path_to_theme() . '/images/cross.png', array('absolute' => true)) . '\"/>';\n if (!empty($boolean) && $boolean == 1) {\n $imgReturn = '<img style=\"position: relative; top: -2px; margin-left: 5px;\" height=\"10px\" src=\"' . url(path_to_theme() . '/images/tick.png', array('absolute' => true)) . '\"/>';\n }\n return $imgReturn;\n}", "public static function plainBoolean($value)\n {\n if ($value === true) {\n return 'Yes';\n } elseif ($value === false) {\n return 'No';\n }\n\n return '---';\n }", "public function testToStringWithBooleanValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(true);\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "function output_logical($x,$format=10){\n\t//-NO or -N or -0 that format only when value=false, nothing for true\n\t//-YES or -yes or -Y or -1 would only show that format when value=true\n\t$x=read_logical($x);\n\tif(is_null($x))return NULL;\n\tswitch(true){\n\t\tcase $format==10:\n\t\t\treturn ($x?1:0);\n\t\tcase $format=='yn':\n\t\t\treturn ($x?'y':'n');\n\t\tcase $format=='YN':\n\t\t\treturn ($x?'Y':'N');\n\t\tcase $format=='yesno':\n\t\t\treturn ($x?'yes':'no');\n\t\tcase $format=='YESNO':\n\t\t\treturn ($x?'YES':'NO');\n\t\tcase $format=='tf':\n\t\t\treturn ($x?'t':'f');\n\t\tcase $format=='TF':\n\t\t\treturn ($x?'T':'F');\n\t\tcase $format=='truefalse':\n\t\t\treturn ($x?'true':'false');\n\t\tcase $format=='TRUEFALSE':\n\t\t\treturn ($x?'TRUE':'FALSE');\n\t\tcase preg_match('/^-(0|n|f)/i',$format):\n\t\t\treturn ($x?'':ltrim($format,'-')); \n\t\tcase preg_match('/^-(1|y|t)/i',$format):\n\t\t\treturn ($x?ltrim($format,'-'):''); \n\t\tdefault:\n\t\t\treturn ($x?$format:'');\n\t}\n}", "public static function strval($value)\n\t{\n\t\treturn is_bool($value)\n\t\t\t? ($value ? 'true' : 'false')\n\t\t\t: strval($value);\n\t}", "protected function escapeBoolean($value)\n {\n return ($value) ? $this->booleanTrue : $this->booleanFalse;\n }", "protected function renderBoolean($value)\n {\n $result = 'No';\n if ($value) {\n $result = 'Yes';\n }\n\n return $result;\n }", "public function testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "private function prepareBoolParam($value)\n {\n if (is_bool( $value )) {\n return true === $value ? 'true' : 'false';\n }\n\n return $value;\n }", "public static function GetTrueBoolTemplate( $bool = false, $hint, $translate = true, $status = '' ) {\n if ( $bool ) {\n if ( $translate ) {\n $hint = T( $hint );\n }\n\n return sprintf( '<span class=\"status %s\" title=\"%s\">%s</span>', $status, $hint, $hint );\n }\n }", "public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n );\n\n if (array_key_exists($key, $map)) {\n return $map[$key];\n } elseif (is_numeric($this->str)) {\n return ((int) $this->str > 0);\n } else {\n return (bool) $this->regexReplace('[[:space:]]', '')->str;\n }\n }", "public function __toString()\n {\n return (string) $this->flags;\n }", "public function formatted() {\n\t\treturn parent::get('formatted') ? true : false;\n\t}", "function bool_str($value) {\r\n if ($value) {\r\n return 'yes'; \r\n } else {\r\n return 'no';\r\n }\r\n}", "public function __toString() {\n // Special case for a single, nested condition group:\n if (count($this->conditions) == 1) {\n return (string) reset($this->conditions);\n }\n $lines = [];\n foreach ($this->conditions as $condition) {\n $lines[] = str_replace(\"\\n\", \"\\n \", (string) $condition);\n }\n return $lines ? \"(\\n \" . implode(\"\\n {$this->conjunction}\\n \", $lines) . \"\\n)\" : '';\n }", "protected function _castBoolToString(&$item, $key)\n {\n if (is_bool($item)) {\n $item = ($item) ? 'true' : 'false';\n }\n }", "protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}", "public function testToStringWithStringValueOn()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('on');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "function str_bool($string) {\n if (strtolower($string) === 'true') {\n return true;\n } elseif (strtolower($string) === 'false') {\n return false;\n }\n\n return $string;\n}", "function get_bool_or_null($value)\r\n{\r\n $temp = null ;\r\n\r\n if(is_null($value)){\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#3465a4 '>\" . PHP_EOL ;\r\n \r\n $temp .= 'null' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\"; \r\n\r\n }else if(is_bool($value)){\r\n $temp .= '<code style=\"font_size: 10px\">boolean </code>';\r\n \r\n $temp .= \"<code style='font_size: 9px ; color:#75507b '>\" . PHP_EOL ;\r\n \r\n $temp .= $value == true ? 'true' : 'false' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\";\r\n \r\n }\r\n\r\n return $temp ;\r\n}", "public function testToStringWithStringValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('true');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "protected function booleanQueryParametersAsString(array $queryParameters)\n {\n return array_map(function ($queryParameters) {\n if (!is_bool($queryParameters)) {\n return $queryParameters;\n }\n return true === $queryParameters ? 'true' : 'false';\n }, $queryParameters);\n }", "public function bool_to_bit( $value ) {\n\t\treturn ( ! empty( $value ) && 'false' !== $value ) ? '1' : '';\n\t}", "public function __toString()\n\t{\n\t\t$string = '';\n\n\t\tforeach ($this->_conditions as $i => $condition)\n\t\t{\n\t\t\tif ($i > 0) {\n\t\t\t\t$string .= ' '.$condition['g'].' ';\n\t\t\t}\n\n\t\t\tif (is_string($condition['c'])) {\n\t\t\t\t$string .= $condition['c'];\n\t\t\t}\n\t\t\telseif (is_array($condition['c'])) {\n\t\t\t\t$string .= '('.implode(' '.$condition['g'].' ', $condition['c']).')';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$string .= '('.$condition['c'].')';\n\t\t\t}\n\t\t}\n\n\t\treturn $string;\n\t}", "private function format($key, $val)\n {\n if (is_bool($val)) {\n return sprintf(\"%s\", $key);\n } else {\n return sprintf(\"%s%s%s%s%s\", $key, $this->_split, $this->_quote, $val, $this->_quote);\n }\n }", "function toBoolean(){\n\t\tif(in_array($this->lower(),array('','false','off','no','n','f'))){\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$this->toString();\n\t}", "function __toString() {\n\t\tif($this->Enabled == false) $enabled = 'DISABLED';\n$dbind = 'data-bind=\"checked: '.$this->Value->propertyName.'() == \\''.$this->OnValue.'\\'\"';\n\t\treturn \"<input $dbind type='checkbox' name='$this->ElementName' id='$this->ElementId' $enabled/>\\r\\n$this->Validators\\r\\n\";\n\t}", "public function testToStringWithStringValueOff()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('off');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "static function cs(mixed $s, string $fmt_true, string $fmt_false = ''): string {\n // !!! ORDER IS DIFFERENT from HB1\n if ($s) {\n return sprintf($fmt_true, \\is_scalar($s) ? (string) $s : \\hb\\x2s($s));\n }\n\n return $fmt_false ? sprintf($fmt_false, \\is_scalar($s) ? (string) $s : \\hb\\x2s($s)) : '';\n }", "private function keyValue($boolean, $field, $relation, $value, $neg = false)\r\n\t{\r\n\t\t$value = $this->removeStopWords($value);\r\n\t\t\r\n\t\tif ( $value == \"\" )\r\n\t\t{\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($neg == true && strstr ( $value, \"-\" ))\r\n\t\t{\r\n\t\t\t$boolean = \"NOT\";\r\n\t\t\t$value = str_replace ( \"-\", \"\", $value );\r\n\t\t}\r\n\t\t\r\n\t\t$together = \"\";\r\n\t\t\r\n\t\tif ( $relation == \"exact\")\r\n\t\t{\r\n\t\t\t$value = str_replace ( \"\\\"\", \"\", $value );\r\n\t\t\t$together = \" srw.$field exact \\\" $value \\\"\";\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\t$together = $this->normalizeQuery ( \"srw.$field\", $value );\r\n\t\t}\r\n\t\t\r\n\t\treturn \" $boolean ( $together ) \";\r\n\t}", "public static function isGoingText($isGoing){\n $ret = '';\n if($isGoing === null){\n $ret = 'Set Attendance';\n }else if($isGoing === true){\n $ret = 'Going';\n }else if($isGoing === false){\n $ret = 'Not Going';\n }else{\n $ret = 'isGoingText fucked up';\n }\n return $ret;\n }", "private static function elementToString($element): string\n {\n if (is_bool($element)) {\n return $element ? 'TRUE' : 'FALSE';\n }\n\n return (string) $element;\n }", "function when_match( $bool, $str = '', $otherwise_str = '', $echo = true ) {\n\t$str = trim( $bool ? $str : $otherwise_str );\n\n\tif ( $str ) {\n\t\t$str = ' ' . $str;\n\n\t\tif ( $echo ) {\n\t\t\techo esc_attr($str);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\treturn $str;\n}", "public function toString() {\n $constraints = [];\n\n $constraints[] = $this->getCanBeNull() ? \"Can be null.\" : \"Can not be null.\";\n $constraints[] = $this->getMandatory() ? \"Is mandatory.\" : \"Is not mandatory.\";\n $constraints[] = $this->getValidator() ? \"Has a validator.\" : \"Does not have a validator.\";\n return join(\" \", $constraints);\n }", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "public function toString()\n {\n return sprintf('is equal to %s', $this->exporter->export($this->value));\n }", "public function __toString()\n {\n $not = ($this->_not === true) ? 'NOT ' : '';\n return $not . '(' . implode(\" $this->_glue \", $this->_components) . ')';\n }", "protected function _format_post_status( $post_status ) {\r\n\t\t$flag = ',<br>';\r\n\t\tswitch ( $post_status ) {\r\n\t\t\tcase 'draft' :\r\n\t\t\t\t$flag .= __('Draft');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'future' :\r\n\t\t\t\t$flag .= __('Scheduled');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'pending' :\r\n\t\t\t\t$flag .= _x('Pending', 'post state');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'trash' :\r\n\t\t\t\t$flag .= __('Trash');\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$flag = '';\r\n\t\t}\r\n\r\n\treturn $flag;\r\n\t}", "public function toSnapshot($bool);", "public static function answer(bool $result)\n {\n return $result ? '✅ Yup' : '❌ Nope';\n }", "function assocArgsToStr($assoc_args) {\n $return = '';\n\n foreach ($assoc_args as $key => $value) {\n if ($value === true) {\n $return .= \" --$key\";\n } else {\n $return .= \" --$key=\" . escapeshellarg($value);\n }\n }\n\n return $return;\n}", "private function formatScalarValue($value): string\n {\n if ($value === true) {\n return 'true';\n }\n if ($value === false) {\n return 'false';\n }\n if (is_float($value)) {\n return StringHelper::floatToString($value);\n }\n return (string)$value;\n }", "public function testToStringWithStringValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('false');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function toString(&$value = false)\n {\n try{\n $value = (string)$value;\n }\n catch(\\Exception $e){\n $value = '';\n }\n }", "public function format(): string;", "public function getFormattedStatus(): string;", "function printTrueFalse($isPro,$options, $label, $id, $description, $default = 'false', $url='', $showSave = false) {\r\n if (!isset($options[$id]) || empty($options[$id])) {\r\n $options[$id] = $default;\r\n }\r\n \r\n $offset = '';\r\n if (ai_startsWith($label, 'i-')) {\r\n $offset = 'class=\"'.substr($label,0, 5).'\" ';\r\n $label = substr($label, 5);\r\n }\r\n\r\n if (!isset($options['demo']) || $options['demo'] == 'false') {\r\n $isPro = false;\r\n }\r\n $pro_class = $isPro ? ' class=\"ai-pro\"':'';\r\n\r\n if ($isPro) {\r\n $label = '<span alt=\"Pro feature\" title=\"Pro feature\">'.$label.'</span>';\r\n }\r\n\r\n echo '\r\n <tr'.$pro_class.'>\r\n <th scope=\"row\" '.$offset.'>' . $label . renderExampleIcon($url) . renderExternalWorkaroundIcon($showSave). '</th>\r\n <td><span class=\"hide-print\">\r\n ';\r\n echo '<input type=\"radio\" id=\"' . $id . '1\" name=\"' . $id . '\" value=\"true\" ';\r\n if ($options[$id] == \"true\") {\r\n echo 'checked=\"checked\"';\r\n }\r\n echo ' /> ' . __('Yes', 'advanced-iframe') . '&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" id=\"' . $id . '2\" name=\"' . $id . '\" value=\"false\" ';\r\n if ($options[$id] == \"false\") {\r\n echo 'checked=\"checked\"';\r\n }\r\n echo '/> ' . __('No', 'advanced-iframe') . '<br>\r\n </span><p class=\"description\">' . $description . '</p></td>\r\n </tr>\r\n ';\r\n}", "function get_checked($value)\n{\n\treturn ($value == TRUE) ? 'checked': ''; \n}", "protected function get_attribute_string($attributes)\n {\n $result = [];\n foreach ($attributes as $attribute => $value) {\n if (is_bool($value)) {\n if ($value) {\n $result[] = \"$attribute\";\n }\n } elseif ($value) {\n $result[] = \"$attribute=\\\"$value\\\"\";\n }\n }\n return implode(' ', $result);\n }", "public function display_string($flag='both', $group_filter = NULL)\n\t{\n ob_start();\t\t\n\n $this->display($flag, $group_filter);\n\t\t$contents = ob_get_contents();\n\n ob_end_clean();\n\n\t\treturn $contents;\n\t}", "function rest_sanitize_boolean($value)\n {\n }", "function stage_string_to_bool($string)\n{\n return is_bool($string) ? $string : ( 'yes' === $string || 1 === $string || 'true' === $string || '1' === $string );\n}", "public function __tostring() {\n $str = '';\n foreach($this as $value) {\n if($value) {\n $str .= '1';\n }\n else {\n $str .= '0';\n }\n }\n \n return $str;\n }", "public function render(): string\n {\n if ($this->getValue() === true) {\n return $this->getName();\n }\n return '';\n }", "function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}", "public function toString(): string\n {\n $allowedValues = [];\n\n foreach ($this->allowedValues as $value) {\n $this->allowedValues[] = VarDumper::create($value)->asString();\n }\n\n $expectedAsString = implode(', ', $allowedValues);\n\n return \"is one of $expectedAsString\";\n }", "public function testToStringWithStringValueYes()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('yes');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "private function varIsBoolean($var): void {\r\n\t\t$var=($var===true) ? 'TRUE' : 'FALSE';\r\n\t\t$booleanTable = '<table class=\"dBug_table dBug_boolean\">' . \"\\n\" . '<tr>' . \"\\n\" . '<th class=\"dBug_clickable_table dBug_booleanHeader\">Boolean</th>' . \"\\n\" . '</tr>'.\"\\n\";\r\n\t\t$booleanTable .= '<tr>' . \"\\n\" . '<td>' . $var . '</td>' . \"\\n\" . '</tr>' . \"\\n\";\r\n\t\t$booleanTable .= '</table>'.\"\\n\";\r\n\t\techo $booleanTable;\r\n\t}", "public function toString()\n {\n $data = $this->getProperties();\n $out = get_class($this).' ('.CRLF;\n foreach ($data as $key => $value) {\n $type = gettype($value);\n $value = is_bool($value) ? (int) $value : $value;\n $value = is_string($value) ? '\"'.$value.'\"' : $value;\n $value = is_object($value) ? implode(CRLF.TAB, explode(CRLF, (string) $value)) : $value;\n $value = is_array($value) ? print_r($value, true) : $value;\n $out .= TAB.$key.' ('.$type.')';\n $out .= ': '.$value.CRLF;\n }\n\n return $out.');';\n }", "public function toText($showSignal = true)\n {\n $value = null;\n\n if (is_null($value) && $this->isVariable()) {\n $value = $this->variable;\n }\n\n if (is_null($value) && $this->isDice()) {\n $value = ($this->number ?: '1') . 'd' . $this->dice;\n }\n\n if (is_null($value) && $this->isNumber()) {\n $value = $this->formatNumber($this->number);\n }\n\n if (empty($value)) {\n return '';\n }\n\n if ($showSignal) {\n $value = $this->getSignal() . ' ' . $value;\n }\n\n return $value;\n }", "public function checked($checked = 0)\n {\n return (isset($checked) && $checked == 1) ? 'checked=\"checked\"' : '';\n }", "public function toString() {\n $s= $this->getClassName().\"@{\\n\";\n foreach ($this->conditions as $condition) {\n $s.= ' '.xp::stringOf($condition).\"\\n\";\n }\n return $s.'}';\n }", "public function testToStringWithStringValueN()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('n');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "function _field_toggle($fval) \n {\n // most of this is to avoid E_NOTICEs\n $has_check = (!empty($fval) && \n ($fval != '0000-00-00') &&\n (\n $fval == $this->opts || \n (is_array($this->opts) && isset($this->opts[1]) && $fval == $this->opts[1]) ||\n (empty($this->opts) && $fval == 1)\n )\n );\n\n return sprintf(\"<input type=\\\"checkbox\\\" name=\\\"%s\\\" id=\\\"%s\\\" %s class=\\\"%s\\\" %s %s />&nbsp;<span class=\\\"%s\\\">%s</span>\",\n $this->fname,\n $this->fname,\n ($this->opts)? 'value=\"' . $this->opts . '\"' : '',\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n ($has_check)? \"checked\" : \"\",\n $this->extra_attribs,\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n (isset($this->attribs['after_text']))? $this->attribs['after_text'] : '(Check for yes)' \n );\n }", "public static function format($table_data){\r\n return (!is_numeric($table_data) && !is_bool($table_data))? \"'$table_data'\": $table_data;\r\n }", "function WPBC_acf_make_true_false_field($args,$is_registered_option=false){\n\tif(empty($args['name'])) return;\n\t$defaults = array (\n\t\t'key' => 'field_'.$args['name'],\n\t\t'label' => 'True False',\n\t\t'name' => 'true_false_field',\n\t\t'type' => 'true_false',\n\t\t'instructions' => '',\n\t\t'required' => 0,\n\t\t'conditional_logic' => 0,\n\t\t'wrapper' => array (\n\t\t\t'width' => '',\n\t\t\t'class' => 'wpbc-true_false-ui',\n\t\t\t'id' => '',\n\t\t),\n\t\t'message' => '',\n\t\t'default_value' => 1,\n\t\t'ui' => 1,\n\t\t'ui_on_text' => '',\n\t\t'ui_off_text' => '',\n\t);\n\t$field = array_merge($defaults, $args); \n\t$field = WPBC_acf_make_fields__filter($field, $args); \n\treturn $field;\n}", "public function getBoolField()\n {\n $value = $this->get(self::BOOL_FIELD);\n return $value === null ? (boolean)$value : $value;\n }" ]
[ "0.76360065", "0.753772", "0.7517138", "0.749033", "0.74505115", "0.73258454", "0.72389305", "0.71839064", "0.71364594", "0.7055966", "0.6977256", "0.6956871", "0.69325626", "0.68662333", "0.6744326", "0.65629977", "0.65500355", "0.6546062", "0.6451136", "0.64468485", "0.6443354", "0.6430517", "0.6427484", "0.6289656", "0.6201923", "0.6128295", "0.60847986", "0.60288054", "0.5955641", "0.59040385", "0.5903799", "0.5898471", "0.5893191", "0.58799005", "0.5870994", "0.58522165", "0.58493644", "0.57922137", "0.56872606", "0.5677857", "0.565006", "0.56326634", "0.5613587", "0.56114334", "0.5611277", "0.55766344", "0.5550057", "0.55371076", "0.54711366", "0.5438215", "0.54133606", "0.540923", "0.5409074", "0.5356162", "0.5307899", "0.5283526", "0.52633405", "0.52523196", "0.524896", "0.52367175", "0.52355605", "0.5235437", "0.5232976", "0.5230307", "0.52258974", "0.52258676", "0.5200152", "0.5200152", "0.5191377", "0.51729435", "0.5172108", "0.5171199", "0.5146899", "0.51441395", "0.51438683", "0.5139799", "0.5139771", "0.51162213", "0.51092744", "0.51052666", "0.50971407", "0.50882167", "0.50866354", "0.5059166", "0.505791", "0.50422645", "0.50109446", "0.4996823", "0.49938536", "0.49785584", "0.49720842", "0.49718213", "0.496468", "0.49619246", "0.49531722", "0.49500936", "0.49463248", "0.49346885", "0.49305728", "0.49304572" ]
0.70637375
9
Return a formatted string from the given int.
private function int(int $value): string { return (string) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function int_to_str($i) {\n\treturn implode('.', int_to_digits($i));\n}", "public static function int2str(int $i): string\n {\n return base_convert(dechex($i), 16, 36);\n }", "public static function format(int $number): string {\n $f = new \\NumberFormatter(\"en-GB\", \\NumberFormatter::SPELLOUT);\n return $f->format($number);\n }", "public static function formatted(int $number): string {\n if($number > 100 && $number % 100 !== 0){ \n $prepend = 'and'; \n } else {\n $prepend = ''; \n }\n return str_replace(['-',' '],'',self::format($number)).$prepend;\n }", "public static function getString(int $value): string\n {\n switch($value) {\n case self::KARTU_BIMBINGAN:\n return 'Kartu Bimbingan';\n case self::LEMBAR_PERSETUJUAN:\n return 'Lembar Persetujuan';\n case self::TOEIC_OFFICIAL:\n return 'Toeic Official';\n case self::ANTI_PLAGIAT:\n return 'Anti Plagiat';\n case self::ABSTRACT_UCLC:\n return 'Abstract UCLC';\n case self::FOTO_METEOR:\n return 'Foto Meteor';\n case self::LEMBAR_TURNITIN:\n return 'Lembar Turnitin';\n default:\n return self::getKey($value);\n \n }\n }", "private function getNumberToText(int $number): string {\n\t\tswitch($number) {\n\t\t\tcase 0:\n\t\t\t\treturn Language::out()->get0Name();\n\t\t\tcase 1:\n\t\t\t\treturn Language::out()->get1Name();\n\t\t\tcase 2:\n\t\t\t\treturn Language::out()->get2Name();\n\t\t\tcase 3:\n\t\t\t\treturn Language::out()->get3Name();\n\t\t\tcase 4:\n\t\t\t\treturn Language::out()->get4Name();\n\t\t\tcase 5:\n\t\t\t\treturn Language::out()->get5Name();\n\t\t\tcase 6:\n\t\t\t\treturn Language::out()->get6Name();\n\t\t\tcase 7:\n\t\t\t\treturn Language::out()->get7Name();\n\t\t\tcase 8:\n\t\t\t\treturn Language::out()->get8Name();\n\t\t\tcase 9:\n\t\t\t\treturn Language::out()->get9Name();\n\t\t\tdefault:\n\t\t\t\treturn (string) $number;\n\t\t}\n\t}", "function stringChar($int) {\r\r\n $char = '-';\r\r\n $n = 1;\r\r\n while ($n < $int) {\r\r\n $char .= ' - ';\r\r\n $n++;\r\r\n }\r\r\n\r\r\n return $char;\r\r\n }", "public function formatInt($value)\n {\n $return = \"null\";\n\n if ($value) {\n $return = intval($value);\n }\n\n return $return;\n }", "public function format(TechDivision_Lang_Integer $integer);", "public function quoteInt(?int $value): string\n {\n if ($value===null) return 'null';\n\n return (string)$value;\n }", "function intFmt($str) {\n return number_format($str, 0);\n}", "static function writeInt1(int $int): string {\n return \\chr($int);\n }", "private function classToString(int $class) {\n switch ($class) {\n case 9:\n return 'Lise 1';\n case 10:\n return 'Lise 2';\n case 11:\n return 'Lise 3';\n case 12:\n return 'Lise 4';\n case 1:\n return 'Üniversite 1';\n case 2:\n return 'Üniversite 2';\n case 3:\n return 'Üniversite 3';\n case 4:\n return 'Üniversite 4';\n default:\n return 'Sınıf girilmedi!';\n }\n }", "protected function escapeInteger($value)\n {\n return (string) $value;\n }", "public function __invoke($num) {\n if ( ($num / 10) % 10 != 1 ) {\n switch( $num % 10 ) {\n case 1: return $num . 'st';\n case 2: return $num . 'nd';\n case 3: return $num . 'rd';\n }\n }\n return $num . 'th';\n }", "function encode_int($int)\r\n {\r\n return 'i' . $int . 'e';\r\n }", "public function as_string() {\n return sprintf('%d %s', $this->code, self::$messages[$this->code]);\n }", "public static function formatToInt($int, $size) {}", "static function writeInt2(int $int): string {\n return \\pack('v', $int);\n }", "function format_money(float $int = NULL, string $format = \"standard\"): string {\n\tif ($format == 'int') {\n\t\t$int = round($int, 0);\n\t}\n\t$fmt = NumberFormatter::create('en_US', \\NumberFormatter::CURRENCY);\n\treturn !empty($int)? $fmt->formatCurrency($int, 'USD'): '';\n}", "function DateIntToStr ($i) {\n\tGlobal $iTimeType;\n\tif ($iTimeType == 1) return date('Y-m-d H:i:s',$i);\n\t\n\t$n = $i % 100;\n\t$i = (int)($i / 100);\n\t$h = $i % 100;\n\t$i = (int)($i / 100);\n\t$d = $i % 50;\n\t$i = (int)($i / 50);\n\t$m = ($i % 20) -1;\n\t$i = (int)($i / 20);\n\t$y = ($i % 1000) + 2000;\n\treturn sprintf (\"%04d-%02d-%02d %02d:%02d\", $y,$m,$d,$h,$n);\n}", "public function convert($integer)\n {\n if ($integer == 0) {\n return 'zero';\n }\n\n $name = array();\n $numbers = explode(',', number_format($integer));\n $count = count($numbers);\n\n foreach ($numbers as $number) {\n $padded = sprintf('%03d', $number);\n\n $hundreds = $this->getHundreds($padded);\n $tens = $this->getTens(substr($padded, 1));\n\n $temp = $hundreds . $tens;\n\n if ($hundreds && $tens) {\n $temp = $hundreds . ' and ' . $tens;\n }\n\n if ($count > 1) {\n $temp .= ' ' . $this->units[$count];\n }\n\n $count--;\n\n if ($temp) {\n $name[] = $temp;\n }\n }\n\n return implode(', ', $name);\n }", "public static function toReadableFormat(int $value, int $var = null) : string\n {\n if (!array_key_exists($value, self::INSTRUCTION_READABLE)) {\n throw new \\Kambo\\Karsk\\Exception\\IllegalArgumentException(\n 'Instruction '.$value.' cannot be converted into readable format.'\n );\n }\n\n if ($var !== null) {\n return self::INSTRUCTION_READABLE[$value].'_'.$var. ' ('.$value.' '.$var.')';\n }\n\n return self::INSTRUCTION_READABLE[$value]. ' ('.$value.')';\n }", "function show_ordinal($num) \n\t{\n\t\t$the_num = (string) $num;\n\t\t$last_digit = substr($the_num, -1, 1);\n\t\tswitch($last_digit) \n\t\t{\n\t\t\tcase \"1\":\n\t\t\t\t$the_num.=\"st\";\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\t$the_num.=\"nd\";\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\t$the_num.=\"rd\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$the_num.=\"th\";\n\t\t}\n\t\treturn $the_num;\n\t}", "function showIntValue($title='', $myInt='', $myArr='', $str=''){\n\t$myInt = (int)$myInt;\n\n\t$str = '<div class=\"row hoverHighlight\">\n\t\t<div class=\"col-sm-3 text-right text-muted\"><p class=\"text-right\"><strong>' . ucwords($title) . ':</strong></p></div>\n\t\t<div class=\"col-sm-9\"><p>' . ucwords($myArr[$myInt]) . '</p></div>\n\t</div>';\n\n\treturn $str;\n}", "static function writeInt3(int $int): string {\n return \\substr(\\pack('V', $int), 0, 3);\n }", "function benc_int($i) {\n\treturn \"i\" . $i . \"e\";\n}", "public static function typeToString(Int $type){\n return ucfirst(array_search($type, self::userTypes()));\n }", "public function format(): string;", "function syracuse($int) {\n if (!is_numeric($int) || $int <= 0) {\n return \"Error, $int n'est pas un entier positif\";\n }\n if ($int % 2) {\n $int *= 3;\n $int++;\n } else {\n $int /= 2;\n }\n return ($int == 1) ? 1 : $int.' '.syracuse($int);\n}", "public static function asString(int $type) : string\n {\n if (!in_array($type, self::ALL)) {\n throw new InvalidArgumentException('Unknown type given.');\n }\n\n return self::TYPES[$type];\n }", "public static function typeToString(int $type): string {\n return self::$_names[$type];\n }", "public function format(string $value): string;", "public function formatNumber($number);", "static function writeInt4(int $int): string {\n return \\pack('V', $int);\n }", "function stpb_number_to_text($n){\r switch($n){\r case 1:\r $class ='one';\r break;\r case 2:\r $class ='two';\r break;\r case 3:\r $class ='three';\r break;\r case 4:\r $class ='four';\r break;\r case 5:\r $class ='five';\r break;\r case 6:\r $class ='six';\r break;\r case 7:\r $class ='seven';\r break;\r case 8:\r $class ='eight';\r break;\r case 9:\r $class ='nine';\r break;\r case 10:\r $class ='ten';\r break;\r case 10:\r $class ='eleven';\r break;\r\r default :\r $class ='twelve';\r\r }\r return $class;\r}", "function numberToText($num) {\n if(!is_numeric($num)){\n $num = intval($num);\n if(!is_numeric($num)) return 'NaN';\n }\n $numbers = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty');\n return $numbers[$num];\n}", "public function twoDigitsFormat($num)\n {\n return ($num <10) ? '0'. $num : $num;\n }", "function th($number) {\n\treturn number_format(intval($number));\n}", "private static function renderInteger($value)\n {\n return Yii::$app->formatter->asInteger($value);\n }", "public function __invoke(int $number)\n {\n $lastDigit = $this->calculateLastDigit($number);\n\n return $number.$this->ordinal($lastDigit);\n }", "private function _errorNumberString($intval)\n\t{\n\t\t$errorlevels = array(\n\t\t\tE_ALL => 'E_ALL',\n\t\t\tE_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR',\n\t\t\tE_STRICT => 'E_STRICT',\n\t\t\tE_USER_NOTICE => 'E_USER_NOTICE',\n\t\t\tE_USER_WARNING => 'E_USER_WARNING',\n\t\t\tE_USER_ERROR => 'E_USER_ERROR',\n\t\t\tE_COMPILE_WARNING => 'E_COMPILE_WARNING',\n\t\t\tE_COMPILE_ERROR => 'E_COMPILE_ERROR',\n\t\t\tE_CORE_WARNING => 'E_CORE_WARNING',\n\t\t\tE_CORE_ERROR => 'E_CORE_ERROR',\n\t\t\tE_NOTICE => 'E_NOTICE',\n\t\t\tE_PARSE => 'E_PARSE',\n\t\t\tE_WARNING => 'E_WARNING',\n\t\t\tE_ERROR => 'E_ERROR'\n\t\t);\n\n\t\tif (defined('E_DEPRECATED'))\n\t\t{\n\t\t\t$errorlevels[E_DEPRECATED] = 'E_DEPRECATED';\n\t\t\t$errorlevels[E_USER_DEPRECATED] = 'E_USER_DEPRECATED';\n\t\t}\n\n\t\treturn $errorlevels[$intval];\n\t}", "function currencyFormat($inputID)\n\t{\n\t\t\n\t\tsetlocale(LC_MONETARY,\"en_US\");\n\t\treturn money_format('%i', $inputID) .\"\\n\";\n\t}", "function format($val) {\r\n //setlocale(LC_MONETARY, 'en_US');\r\n return number_format(money_format('%i', $val), 2);\r\n }", "public function __toString() {\n if ($this -> horas <= 9) {\n $retorno = \"0\".$this -> horas.\":\";\n }else {\n $retorno = $this -> horas.\":\";\n }\n\n if ($this -> minutos <= 9) {\n $retorno .= \"0\".$this -> minutos.\":\";\n }else {\n $retorno .= $this -> minutos.\":\";\n }\n\n if ($this -> segundos <= 9) {\n $retorno .= \"0\".$this -> segundos;\n }else {\n $retorno .= $this -> segundos;\n }\n return $retorno;\n }", "public static function shortenInt($int){\n\t\tif ( $int >= 1000) $int = floor($int/1000).'k';\n\t\treturn $int;\n\t}", "public function groupIdToGroupName(int $id): string\n {\n return (string)$id;\n }", "protected function convertIntToShortUrl($id) {\n $id = intval($id);\n if ($id < 1) \n\t\t{\n throw new Exception(\n \"The ID is not a valid integer\");\n }\n\n $length = strlen(self::$chars);\n // make sure length of available characters is at\n // least a reasonable minimum - there should be at\n // least 10 characters\n if ($length < 10) \n\t\t{\n throw new Exception(\"Length of chars is too small\");\n }\n\n $code = \"\";\n while ($id > $length - 1) \n\t\t{\n // determine the value of the next higher character\n // in the short url should be and prepend\n $code = self::$chars[fmod($id, $length)].$code;\n // reset $id to remaining value to be converted\n $id = floor($id / $length);\n }\n\n // remaining value of $id is less than the length of\n // self::$chars\n $code = self::$chars[$id] . $code;\n\n return $code;\n }", "public function numberToString($var) : string\n {\n static $precision;\n if (!$precision) {\n $precision = pow(10, (int)ini_get('precision'));\n }\n $v = '' . $var;\n if (!is_numeric($v)) {\n throw new \\InvalidArgumentException('Arg var is not integer/float nor number-like when stringified.');\n }\n\n // If within system precision, just string it.\n return ($v > -$precision && $v < $precision) ? $v : number_format((float) $v, 0, '.', '');\n }", "public function getTextForNumber($number)\n {\n if ($this->isDivisibleByFive($number) && $this->isDivisibleByThree($number)) {\n return 'FizzBuzz';\n }\n\n if ($this->isDivisibleByThree($number)) {\n return 'Fizz';\n }\n\n if ($this->isDivisibleByFive($number)) {\n return 'Buzz';\n }\n \n return (string) $number;\n }", "public static function truncateNumber(int $number): string\n {\n $number = intval(self::escape($number));\n\n switch ($number) {\n case $number >= 0 && $number < 1000:\n return (string) $number;\n break;\n\n case $number >= 1000 && $number < 100000:\n $number = round(($number / 1000), 1);\n return \"{$number}K\";\n break;\n\n case $number >= 100000:\n $number = round(($number / 100000), 1);\n return \"{$number}M\";\n break;\n\n default:\n return $number;\n break;\n }\n }", "function str_ordinal($value, $superscript = false)\n {\n $number = abs($value);\n\n $indicators = ['th','st','nd','rd','th','th','th','th','th','th'];\n\n $suffix = $superscript ? '<sup>' . $indicators[$number % 10] . '</sup>' : $indicators[$number % 10];\n if ($number % 100 >= 11 && $number % 100 <= 13) {\n $suffix = $superscript ? '<sup>th</sup>' : 'th';\n }\n\n return number_format($number) . $suffix;\n }", "function formatNumbers($inputID)\n\t{\n\t\t$number_format = number_format($inputID);\n\t\t\n\t\techo $number_format;\n\t}", "function ordinal($number) {\r\n\r\n // when fed a number, adds the English ordinal suffix. Works for any\r\n // number, even negatives\r\n\r\n if ($number % 100 > 10 && $number %100 < 14):\r\n $suffix = \"th\";\r\n else:\r\n switch($number % 10) {\r\n\r\n case 0:\r\n $suffix = \"th\";\r\n break;\r\n\r\n case 1:\r\n $suffix = \"st\";\r\n break;\r\n\r\n case 2:\r\n $suffix = \"nd\";\r\n break;\r\n\r\n case 3:\r\n $suffix = \"rd\";\r\n break;\r\n\r\n default:\r\n $suffix = \"th\";\r\n break;\r\n }\r\n\r\n endif;\r\n\r\n return \"${number}$suffix\";\r\n\r\n}", "public function toString(): string\n {\n if ($this->fractionalPart !== '') {\n return ($this->negative ? '-' : '') . $this->integralPart . '.' . $this->fractionalPart;\n }\n\n return ($this->negative ? '-' : '') . $this->integralPart;\n }", "public function format()\n {\n $registrationNumber = str_pad($this->registrationNumber, 4, '0', STR_PAD_LEFT);\n $accountNumber = str_pad($this->accountNumber, 10, '0', STR_PAD_LEFT);\n return $registrationNumber . $accountNumber;\n }", "public function format(Money $money): string;", "public static function formatNumber($num){\r\n\t\treturn number_format($num, 0, '', '.');\r\n\t}", "public static function int_to_hex(int $int, string $prefix = 'U+'): string\n {\n $hex = \\dechex($int);\n\n $hex = (\\strlen($hex) < 4 ? \\substr('0000' . $hex, -4) : $hex);\n\n return $prefix . $hex . '';\n }", "private function formatDay($num)\n {\n if ($num == 0) {\n return \"Mon\";\n } else if ($num == 1) {\n return \"Tue\";\n } else if ($num == 2) {\n return \"Wed\";\n } else if ($num == 3) {\n return \"Thu\";\n } else if ($num == 4) {\n return \"Fri\";\n } else if ($num == 5) {\n return \"Sat\";\n } else if ($num == 6) {\n return \"Sun\";\n }\n return $num;\n }", "public function getString()\n {\n return $this->format('%s%s%s');\n }", "function number_suffix($i) {\n\t\tif ($i%10 == 1 && $i%100 != 11) {\n\t\t\treturn \"st\";\n\t\t} else if ($i%10 == 2 && $i%100 != 12) {\n\t\t\treturn \"nd\";\n\t\t} else if ($i%10 == 3 && $i%100 != 13) {\n\t\t\treturn \"rd\";\n\t\t} else {\n\t\t\treturn \"th\";\n\t\t}\n\t}", "public function asText(){\n $id_length = 2;\n $time_length = 8;\n $times = [];\n foreach($this->times as $id => $time){\n $id_length = max($id_length,strlen($id));\n $time_length = max($time_length,strlen($times[$id] = number_format($time,$this->decimals)));\n }\n $text =\n str_pad('ID',$id_length) . ' | ' . str_pad('time [s]',$time_length,' ',STR_PAD_LEFT) . \"\\n\" .\n str_repeat('-',$id_length) . '-+-' . str_repeat('-',$time_length);\n foreach($this->times as $id => $time)\n $text .= \"\\n\" . str_pad($id,$id_length) . ' | ' . str_pad($times[$id],$time_length,' ',STR_PAD_LEFT);\n return $text;\n }", "public function format()\n {\n return sprintf('%d-%02d-%02d', $this->getYear(), $this->getMonth(), $this->getDay());\n }", "public static function nice_number($number){\n\t\treturn number_format($number,0,'',',');\n\t}", "public function encode($int)\n {\n if (0 === $int) {\n return $this->alphabet[0];\n }\n\n $str = '';\n while (0 < $int) {\n $remainder = $int % $this->base;\n $str = $str . $this->alphabet[$remainder];\n $int = ($int - $remainder) / $this->base;\n }\n\n return strrev($str);\n }", "private static function baseX($int) {\n $key = '';\n while (bccomp($int, 0) > 0) {\n $mod = bcmod($int, self::$range);\n $key .= chr(self::$chars62[$mod]);\n $int = bcdiv($int, self::$range, 0);\n }\n return strrev($key);\n }", "function numeral($number) {\r\n $test = abs($number) % 10;\r\n $ext = ((abs($number) % 100 < 21 and abs($number) % 100 > 4) ? 'th' : (($test < 4) ? ($test < 3) ? ($test < 2) ? ($test < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th'));\r\n return $number . $ext;\r\n}", "function toString() {\n if (abs($this->num) >= abs($this->denom)) {\n if ($this->denom == 1) {\n return $this->num;\n }\n\n if ($this->isNegative()) {\n $whole = ceil ($this->num / $this->denom);\n } else {\n $whole = floor ($this->num / $this->denom);\n }\n $num = abs($this->num % $this->denom);\n } else {\n $num = $this->num;\n }\n return ((empty($whole)?(empty($num)?\"0\":\"\"):$whole)\n . (empty($num)? \"\" : \" \" . $num .\"/\". $this->denom));\n }", "private static function toFormattedBytes(int $bytes) : string\n {\n $precision = 2;\n $base = log($bytes, 1024);\n $suffixes = array('', 'K', 'M', 'G', 'T');\n\n return round(1024 ** ($base - floor($base)), $precision) . $suffixes[floor($base)];\n }", "function wolf_share_format_number( $n = 0 ) {\n\n\t$s = array( 'K', 'M', 'G', 'T' );\n\t$out = '';\n\twhile ( $n >= 1000 && count( $s ) > 0) {\n\t\t$n = $n / 1000.0;\n\t\t$out = array_shift( $s );\n\t}\n\treturn round( $n, max( 0, 3 - strlen( (int)$n ) ) ) .\" $out\";\n}", "function format_bulan($i,$format=\"signed\")\r\n{\r\n\tif($format==\"signed\"):\r\n\t\t$bulan = ($i<10) ? '0'.$i : $i;\r\n\telse:\r\n\t\t$array_bulan = array('', 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember');\r\n\t\tif($format==\"long\"):\r\n\t\t\t$bulan = $array_bulan[$i];\r\n\t\telseif($format==\"long_from0\"):\r\n\t\t\t$i = ($i<10) ? substr($i,1,1) : $i;\r\n\t\t\t$bulan = $array_bulan[$i];\r\n\t\telseif($format==\"short\"):\r\n\t\t\t$bulan = substr($array_bulan[$i],0,3);\r\n\t\telseif($format==\"short_from0\"):\r\n\t\t\t$i = ($i<10) ? substr($i,1,1) : $i;\r\n\t\t\t$bulan = substr($array_bulan[$i],0,3);\r\n\t\tendif;\r\n\tendif;\r\n\treturn $bulan;\r\n}", "function format($value);", "public function __toString() {\n\t\t\treturn sprintf('%s', $this->intOrdenesTrabajoId);\n\t\t}", "function range_to_str($a, $b) {\n\tglobal $FORMAT, $USE_SUFFIX, $SUFFIX;\n\n\tif ($a > $b) {\n\t\t$_ = $a;\n\t\t$a = $b;\n\t\t$b = $_;\n\t} elseif ($a == $b) {\n\t\treturn int_to_str($a);\n\t}\n\n\tif ($FORMAT != 'range') {\n\t\tlist($c, $cidr) = range_to_cidr($a, $b);\n\n\t\tif ($c !== null) {\n\t\t\t$z = int_to_digits($c);\n\t\t}\n\t\tif ($USE_SUFFIX && $cidr == 24) {\n\t\t\t$s = (($FORMAT == 'cidr') ? '/24' : $SUFFIX);\n\t\t\treturn $z[0].'.'.$z[1].'.'.$z[2].$s;\n\t\t} elseif ($USE_SUFFIX && $cidr == 16) {\n\t\t\t$s = (($FORMAT == 'cidr') ? '/16' : $SUFFIX);\n\t\t\treturn $z[0].'.'.$z[1].$s;\n\t\t} elseif ($USE_SUFFIX && $cidr == 8) {\n\t\t\t$s = (($FORMAT == 'cidr') ? '/8' : $SUFFIX);\n\t\t\treturn $z[0].$s;\n\t\t} elseif ($cidr < 32 && $cidr > 0) {\n\t\t\t$addr = int_to_str($c);\n\t\t\tif ($FORMAT == 'cidr') {\n\t\t\t\t$addr = preg_replace('/(\\\\.0)+$/', '', $addr);\n\t\t\t}\n\t\t\treturn $addr.'/'.$cidr;\n\t\t}\n\t}\n\treturn int_to_str($a).'-'.int_to_str($b);\n}", "private function styles(int $value) : string\n {\n $styles = '';\n\n if ($value > 0) {\n $styles .= ' width: ' . $value . '%;';\n }\n\n if ($this->height !== null && $this->height > 0) {\n $styles .= ' height:' . $this->height . 'px;';\n }\n\n return $styles;\n }", "function digits_to_str($a, $b, $c, $d) {\n\treturn sprintf('%d.%d.%d.%d', $a&0xff, $b&0xff, $c&0xff, $d&0xff);\n}", "public function numToAlpha(int $num): string\n {\n // fixed set of 26 uppercase letters to be used for the conversion\n $letters = [\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'\n ];\n\n /**\n * decrement the number by one to account for zero based arrays,\n * get the integer value of the number divided by 26.\n * if the number is still greater than zero call the function again.\n * else return the character in the corresponding position\n */\n\n // ensuere that $num is never less than zero\n $num = $num > 0 ? $num -= 1 : 0;\n\n $i = (int) floor($num / 26);\n\n return $i > 0 ? $this->numToAlpha($i) . $letters[$num % 26] : $letters[$num % 26];\n }", "private static function integerCallback($value)\n {\n\t\treturn str_pad(substr($value, -9), 9, 0, STR_PAD_LEFT);\n\t}", "public function threeDigitsToWord($int, $gender = 0)\n {\n\n $div100 = $int / 100;\n $mod100 = $int % 100;\n\n return $this->digitToWord(floor($div100), 2) .\n ($mod100 > 9 && $mod100 < 20\n // 10, 11, .. 19\n ? $mod100 == 10\n ? $this->suffix[1]\n : ($mod100 == 13\n ? $this->digits[$mod100 % 10]\n : mb_substr($this->digits[$mod100 % 10], 0, -1)) . $this->suffix[3]\n //any other number\n : $this->digitToWord(floor($mod100 / 10), 1, $gender) . $this->digitToWord($int % 10, 0, $gender));\n }", "function nb2chiffres($nb){\n\treturn sprintf(\"%02d\", $nb);\n}", "public function getInvoiceNumber(): string\n {\n return sprintf('R-%1$02d%2$03d', $this->getInvoiceYear(), $this->id);\n }", "function getIngrediente($id){\n\tif($id == 1) return \"Pepperoni\";\n\tif($id == 2) return \"Aceitunas\";\n\tif($id == 3) return \"Carne\";\n}", "public static function integer_to_two_character_hex( int $integer ) : string {\n\t\treturn substr( '00' . dechex( $integer ), -2 );\n\t}", "public function encodeInteger(int $data): string\n {\n /* Create binary string zeropadded to eight bits. */\n $binary = gmp_strval(gmp_init($data, 10), 2);\n if ($modulus = strlen($binary) % 5) {\n $padding = 5 - $modulus;\n $binary = str_pad($binary, strlen($binary) + $padding, \"0\", STR_PAD_LEFT);\n }\n\n /* Split to five bit chunks and make sure last chunk has five bits. */\n $binary = str_split($binary, 5);\n $last = array_pop($binary);\n if (null !== $last) {\n $binary[] = str_pad($last, 5, \"0\", STR_PAD_RIGHT);\n }\n\n /* Convert each five bits to a Base32 character. */\n $encoded = implode(\"\", array_map(function ($fivebits) {\n $index = bindec($fivebits);\n return $this->characters()[$index];\n }, $binary));\n\n /* Pad to eight characters when requested. */\n if (!empty($this->padding())) {\n if ($modulus = strlen($encoded) % 8) {\n $padding = 8 - $modulus;\n $encoded .= str_repeat($this->padding(), $padding);\n }\n }\n\n return $encoded;\n }", "public function pageNumStr($pageNum = 0) {\n\t\t$pageNumStr = '';\n\t\t$pageNum = (int) $pageNum;\n\t\tif($pageNum < 1) $pageNum = $this->pageNum();\n\t\tif($pageNum > 1) $pageNumStr = $this->wire('config')->pageNumUrlPrefix . $pageNum;\n\t\treturn $pageNumStr;\n\t}", "public static function formatToInt8($int) {}", "public function formatLink(int $page): string\n\t{\n\t\treturn \\str_replace(\n\t\t\t'%%page%%',\n\t\t\t(string)$page,\n\t\t\t$page === 1 ? $this->firstPageLinkFormat : $this->pageLinkFormat\n\t\t);\n\t}", "protected function formatUrl(string $id, string $url): string {\n return sprintf($url, $id);\n }", "public function __toString()\n {\n if ($this->hh <= 9) {\n $retorno = \"0\" . $this->hh . \":\";\n } else {\n $retorno = $this->hh . \":\";\n }\n\n if ($this->mm <= 9) {\n $retorno .= \"0\" . $this->mm . \":\";\n } else {\n $retorno .= $this->mm . \":\";\n }\n\n if ($this->ss <= 9) {\n $retorno .= \"0\" . $this->ss;\n } else {\n $retorno .= $this->ss;\n }\n return $retorno;\n }", "function get_format( $id ) {\r\n switch( $id ) {\r\n case 0:\r\n $name = \"moodle_auto_format\";\r\n break;\r\n case 1:\r\n $name = \"html\";\r\n break;\r\n case 2:\r\n $name = \"plain_text\";\r\n break;\r\n case 3:\r\n $name = \"wiki_like\";\r\n break;\r\n case 4:\r\n $name = \"markdown\";\r\n break;\r\n default:\r\n $name = \"unknown\";\r\n }\r\n return $name;\r\n }", "function NumeroInscripcion($primerdigito,$id)\n {\n $numero = $primerdigito.str_pad($id, 4, '0', STR_PAD_LEFT);\n $letra = '';\n $suma = 0;\n for ($i = 0; $i < 5; $i++) {\n $suma += substr($numero, $i, 1) * ($i + 1);\n }\n $letra = chr($suma % 11 + 65);\n $codigo = $numero.$letra;\n\n return $codigo;\n }", "function rockIdString($id) \n { //{{{\n if (is_object($id) && $id instanceof MongoId) {\n return \"rid_object:\" . $id->__toString();\n }\n if (is_object($id)) {\n return \"rid_\" . get_class($id) . \":\" . $id->__toString();\n }\n if (is_scalar($id)) {\n return \"rid_\" . gettype($id) . \":\" . $id;\n }\n return \"rid_mixed:\" . base64_encode(var_export($id, true));\n }", "public function userIdToUserName(int $id): string\n {\n return (string)$id;\n }", "protected function numberFormatter($n) {\r\n $n = (0+str_replace(\",\",\"\",$n));\r\n\r\n // is this a number?\r\n if(!is_numeric($n)) return false;\r\n\r\n // now filter it;\r\n if($n>1000000000000) return round(($n/1000000000000),1).' trillion';\r\n else if($n>1000000000) return round(($n/1000000000),1).' milliarder';\r\n else if($n>1000000) return round(($n/1000000),1).' millioner';\r\n else if($n>1000) return round(($n/1000),1).' tusind';\r\n\r\n return number_format($n);\r\n }", "private function getSizeFormattedExact(int $size): string\n {\n if ($size > 1024 * 1024) {\n return sprintf('%0.2f MiB', ($size / 1024 / 1024));\n }\n if ($size > 1024) {\n return sprintf('%0.2f KiB', ($size / 1024));\n }\n\n return $size . ' B';\n }", "private function getAmountPartHundreds(int $amount): string\n {\n // return empty if <100 or amount below 1000 empty\n if ($amount < 100) return '';\n\n $thousands = floor($amount / 1000);\n $amountBelowThousand = $amount - ($thousands * 1000);\n if ($amountBelowThousand < 100) return '';\n\n // get hundreds\n $hundreds = floor($amountBelowThousand / 100);\n\n // return result\n return $this->namesHundreds[$hundreds - 1] . $this->defaultWordsSeparator;\n }", "static function fromIntToHex( $int, $toBig = true ){\n if ($int >= 90000) $toBig = false;\n\n if ($toBig){\n $codeLenght = self::toBigEndian(self::pad(dechex($int),4, true));\n return substr(self::pad($codeLenght), 0 , 8);\n\n }else{\n $codeLenght = self::toLittleEndian(self::pad(dechex($int),8, true));\n return self::pad($codeLenght);\n }\n }", "function ordinal_suffix($n) {\n $n_last = $n % 100;\n if (($n_last > 10 && $n_last < 14) || $n == 0){\n return \"{$n}th\";\n }\n switch(substr($n, -1)) {\n case '1': return \"{$n}st\";\n case '2': return \"{$n}nd\";\n case '3': return \"{$n}rd\";\n default: return \"{$n}th\";\n }\n}", "function convertNum($num) {\n $num = (int) $num; // make sure it's an integer\n\n if ($num < 0)\n return 'negative' . convertTri(-$num, 0);\n\n if ($num == 0)\n return 'Zero';\n return convertTri($num, 0);\n}" ]
[ "0.71575207", "0.7118322", "0.6943423", "0.69011384", "0.6761853", "0.650833", "0.64829963", "0.6481777", "0.6473558", "0.6335727", "0.61677736", "0.6141808", "0.61243224", "0.611594", "0.61088216", "0.6056044", "0.60090363", "0.59998924", "0.59091663", "0.5902771", "0.58928186", "0.5878324", "0.58700794", "0.58355975", "0.58278644", "0.58246", "0.58192766", "0.57983077", "0.57411194", "0.5736625", "0.5725108", "0.5696537", "0.5693216", "0.5664171", "0.56582713", "0.5657168", "0.5642523", "0.56204647", "0.56188565", "0.55988675", "0.55886257", "0.55579084", "0.555228", "0.55505055", "0.554816", "0.5545362", "0.55284387", "0.5528365", "0.55219966", "0.54687434", "0.54686904", "0.54482394", "0.54464996", "0.54356605", "0.5401619", "0.5401185", "0.5388697", "0.5365664", "0.53613055", "0.5360994", "0.5354825", "0.5348509", "0.53480494", "0.5347155", "0.53461105", "0.53243756", "0.5321073", "0.5307565", "0.53068596", "0.5304723", "0.5304382", "0.5297148", "0.5288478", "0.52831674", "0.5273244", "0.52617115", "0.5257233", "0.5236167", "0.52302635", "0.5229762", "0.52272475", "0.5223161", "0.5220163", "0.52119654", "0.5210409", "0.52042294", "0.52022123", "0.51959187", "0.5181592", "0.5173669", "0.517215", "0.5162504", "0.5150562", "0.51501775", "0.51440763", "0.5143355", "0.5141807", "0.51376814", "0.5125445", "0.51195645" ]
0.6642792
5
Return a formatted string from the given float.
private function float(float $value): string { return (string) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function stringifyFloat($float)\n {\n return rtrim(rtrim(sprintf('%F', $float), '0'), '.');\n }", "private function floatToString(float $float): string\n {\n $string = (string)$float;\n\n if (preg_match('~\\.(\\d+)E([+-])?(\\d+)~', $string, $matches) === 1) {\n $decimals = $matches[2] === '-' ? strlen($matches[1]) + (int)$matches[3] : 0;\n $string = number_format($float, $decimals, '.', '');\n }\n\n return $string;\n }", "function float_to_string($float, $precision=10) {\n // Typecast to insure value is a float\n $float = (float) $float;\n $string = number_format($float, $precision, '.', '');\n $string = rtrim($string, '0');\n $string = rtrim($string, '.');\n return $string;\n}", "function floatToString($float, $precision = 10)\n\t\t{\n\t\t\t$float = (float) $float; // Confirm variable is float\n\t\t\t$string = number_format($float, $precision, '.', ''); // Format number\n\t\t\t$string = rtrim(rtrim($string, '0'), '.'); // Remove any trailing zeros or decimal\n\n\t\t\treturn $string;\n\t\t}", "function float_to_string(float $number): string\n {\n return number_format($number, 2, \",\", \".\");\n }", "static function writeFloat(float $float): string {\n return \\pack('g', $float);\n }", "protected function _numberFormat($float)\n {\n return number_format($float, 2, '', '');\n }", "public static function formatToFixed($float) {}", "function floatToStr($num) {\r\n\r\n $str = sprintf('%f', $num);\r\n $str = preg_replace('/0*$/', '', $str);\r\n if (substr($str, -1) == '.') {\r\n $str = substr($str, 0, -1);\r\n }\r\n\r\n return $str;\r\n\r\n }", "public function quoteFloat(?float $value): string\n {\n if ($value===null) return 'null';\n\n return (string)$value;\n }", "public function formatFloat($value)\n {\n $return = \"null\";\n\n if ($value) {\n $return = floatval($value);\n }\n\n return $return;\n }", "public static function formatMoney(float $value): string\n\t{\n\t\treturn number_format($value, 2, ',', '.');\n\t}", "public static function formatNumber(float $str): string\n {\n return number_format($str, 2, '.', ',');\n }", "protected function _formatFloat($fIn)\n {\n return sprintf(\"%.2f\", $fIn);\n }", "static function writeDouble(float $float): string {\n return \\pack('e', $float);\n }", "private function format(float $number) : float\n {\n return number_format($number, self::DIGITS);\n }", "public function format(float $number, ?int $decimals = 0, ?string $dec_point = \".\", ?string $thousands_sep = \",\"): string\n {\n return number_format($number, $decimals, $dec_point, $thousands_sep);\n }", "public function toString($factory = null)\n {\n if (is_integer($this->value)) {\n return (string)$this->value;\n }\n\n /**\n * PDF doesn't support exponental format.\n * Fixed point format must be used instead\n */\n $prec = 0; $v = $this->value;\n while (abs( floor($v) - $v ) > 1e-10) {\n $prec++; $v *= 10;\n }\n return sprintf(\"%.{$prec}F\", $this->value);\n }", "public static function format($f) {\n\n\t\t$arguments = func_get_args();\n\t\t$formatRegExp = '/%[sdj%]/';\n\n\t\tif (!is_string($f)) {\n\t\t\t$objects = array();\n\t\t\tfor ($i = 0; $i < count($arguments); $i++) {\n\t\t\t\t$objects[] = self::inspect($arguments[$i]);\n\t\t\t}\n\t\t\treturn implode(' ', $arguments);\n\t\t}\n\t\t\n\t\t$i = 1;\n\t\t$args = $arguments;\n\t\t$len = count($args);\n\t\t\n\t\t$str = preg_replace_callback($formatRegExp, function($x) use (&$i, $len, $args) {\n\n\t\t\t$x = $x[0];\n\t\t\n\t\t\tif ($x == '%%') {\n\t\t\t\treturn '%';\n\t\t\t}\n\t\t\tif ($i >= $len) {\n\t\t\t\treturn $x;\n\t\t\t}\n\t\t\tswitch ($x) {\n\t\t\t\tcase '%s':\n\t\t\t\t\treturn (string)$args[$i++];\n\t\t\t\tcase '%d':\n\t\t\t\t\treturn (float)$args[$i++];\n\t\t\t\tcase '%j':\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjson_encode($args[$i++]);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\treturn '[Circular]';\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn $x;\n\t\t\t}\t\t\n\t\t}, $f);\n\t\t\n\t\tif ($i < $len) {\n\t\t\tfor ($x = $args[$i]; $i < $len; $x = $args[++$i]) {\n\t\t\t\tif ($x === null || !(is_object($x) || is_array($x))) {\n\t\t\t\t\t$str += ' ' . $x;\n\t\t\t\t} else {\n\t\t\t\t\t$str += ' ' + self::inspect($x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $str;\n\t}", "public static function format(float $number, int $decimals, bool $stripTailingZeros): string\n {\n $formated = number_format($number, $decimals);\n\n if ($stripTailingZeros && false !== strpos($formated, '.')) {\n $formated = rtrim($formated, '0');\n\n if (substr($formated, -1) === '.') {\n return (string)number_format($number);\n }\n }\n\n return $formated;\n }", "function tPrice( $fPrice ){\n return sprintf( '%01.2f', $fPrice );\n }", "public function format(): string;", "public function format()\n {\n return sprintf('%s %s %s', $this->x(), $this->y(), $this->z());\n }", "protected function _getFloatColumn(Column\\Float $column)\n {\n return sprintf(\n '%s REAL',\n $column->getName()\n );\n }", "function format_number(float $num, int $precision = 1, ?string $locale = null, array $options = []): string\n {\n // If locale is not passed, get from the default locale that is set from our config file\n // or set by HTTP content negotiation.\n $locale ??= Locale::getDefault();\n\n // Type can be any of the NumberFormatter options, but provide a default.\n $type = (int) ($options['type'] ?? NumberFormatter::DECIMAL);\n\n $formatter = new NumberFormatter($locale, $type);\n\n // Try to format it per the locale\n if ($type === NumberFormatter::CURRENCY) {\n $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, $options['fraction']);\n $output = $formatter->formatCurrency($num, $options['currency']);\n } else {\n // In order to specify a precision, we'll have to modify\n // the pattern used by NumberFormatter.\n $pattern = '#,##0.' . str_repeat('#', $precision);\n\n $formatter->setPattern($pattern);\n $output = $formatter->format($num);\n }\n\n // This might lead a trailing period if $precision == 0\n $output = trim($output, '. ');\n\n if (intl_is_failure($formatter->getErrorCode())) {\n throw new BadFunctionCallException($formatter->getErrorMessage());\n }\n\n // Add on any before/after text.\n if (isset($options['before']) && is_string($options['before'])) {\n $output = $options['before'] . $output;\n }\n\n if (isset($options['after']) && is_string($options['after'])) {\n $output .= $options['after'];\n }\n\n return $output;\n }", "function format_scientifique_number($num, $float_sep = \",\", $thouthand_sep = \" \")\r\n\t{\r\n\t\t$float = null;\r\n\t\tif((int)$num != (float)$num ) $float = 2;\r\n\t\treturn number_format($num,$float,$floatsep,$thouthandsep);\r\n\t}", "public function format(string $value): string;", "public static function fvf(float $float, string $cSeparator = \"\"): string {\n $fvf = number_format($float, 2, \".\", \"\");\n if ($fvf === \"-0.00\") {\n return \"0.00\";\n }\n return number_format($float, 2, \".\", $cSeparator);\n }", "public static function humanFloat($amount)\n {\n if (!isset($amount)) {\n return null;\n }\n\n $amount_abs = abs($amount);\n if ($amount_abs >= 1000000000000000) {\n return ($amount_abs >= 100000000000000000\n ? round($amount / 1000000000000000)\n : ($amount_abs >= 10000000000000000\n ? round($amount / 1000000000000000, 1)\n : round($amount / 1000000000000000, 2)\n )\n ) . 'P';\n } elseif ($amount_abs >= 1000000000000) {\n return ($amount_abs >= 100000000000000\n ? round($amount / 1000000000000)\n : ($amount_abs >= 10000000000000\n ? round($amount / 1000000000000, 1)\n : round($amount / 1000000000000, 2)\n )\n ) . 'T';\n } elseif ($amount_abs >= 1000000000) {\n return ($amount_abs >= 100000000000\n ? round($amount / 1000000000)\n : ($amount_abs >= 10000000000\n ? round($amount / 1000000000, 1)\n : round($amount / 1000000000, 2)\n )\n ) . 'G';\n } elseif ($amount_abs >= 1000000) {\n return ($amount_abs >= 100000000\n ? round($amount / 1000000)\n : ($amount_abs >= 10000000\n ? round($amount / 1000000, 1)\n : round($amount / 1000000, 2)\n )\n ) . 'M';\n } elseif ($amount_abs >= 1000) {\n return ($amount_abs >= 100000\n ? round($amount / 1000)\n : ($amount_abs >= 10000\n ? round($amount / 1000, 1)\n : round($amount / 1000, 2)\n )\n ) . 'K';\n } elseif ($amount_abs >= 1) {\n return $amount_abs >= 100\n ? round($amount)\n : ($amount_abs >= 10\n ? round($amount, 1)\n : round($amount, 2)\n );\n } elseif ($amount_abs >= 0.001) {\n return strlen(round($amount_abs, 3)) < 5\n ? round($amount, 3)\n : str_replace('0.', '.', round($amount, 3));\n } elseif ($amount_abs > 0) {\n return $amount > 0\n ? '+0'\n : '-0';\n } else {\n return 0;\n }\n }", "private static function getPercentageAsString(float $percentage): string\n {\n $percentageString = sprintf('%s%%', $percentage === 100.0\n ? '100 '\n : number_format($percentage, 1, '.', ''));\n\n return str_pad($percentageString, 5);\n }", "public function format()\n {\n $separator = $this->object->config('separator');\n $decimals = $this->object->config('decimals');\n $point = $this->object->config('point');\n\n return number_format($this->object->getValue(), $decimals, $point, str_replace('&#160;', ' ', $separator));\n }", "public function getFormattedPrice(): string\n {\n\n return number_format($this->price, 0, '', ' ');\n\n }", "private function numberFormat($value): string\n\t{\n\t\treturn number_format(\n\t\t\t(float) $value,\n\t\t\tRSFormProHelper::getConfig('payment.nodecimals'),\n\t\t\tRSFormProHelper::getConfig('payment.decimal'),\n\t\t\tRSFormProHelper::getConfig('payment.thousands')\n\t\t);\n\t}", "public function toString(): string\n {\n if ($this->fractionalPart !== '') {\n return ($this->negative ? '-' : '') . $this->integralPart . '.' . $this->fractionalPart;\n }\n\n return ($this->negative ? '-' : '') . $this->integralPart;\n }", "public static function getFormat(): string;", "public static function formatValue($value, $currency) :string\n {\n $value = floatval($value);\n\n $thousand = $currency->thousand_separator;\n $decimal = $currency->decimal_separator;\n $precision = $currency->precision;\n\n return number_format($value, $precision, $decimal, $thousand);\n }", "public static function formatNumber($num){\r\n\t\treturn number_format($num, 0, '', '.');\r\n\t}", "public static function asFloat($value)\n {\n $v = round($value, 2);\n\n return (strpos($v, '.') and self::$formats[self::P_DECIMAL_CHAR] != '.')\n ? str_replace('.', self::$formats[self::P_DECIMAL_CHAR], $v)\n : $v;\n }", "public function cast($value): string\n {\n return (string) number_format((float) $value / 100, 2);\n }", "function format($value);", "public function FMoney($v) { return number_format($v,2,',','.'); }", "public function toString() {\n $list= '';\n foreach ($this->list as $preference => $q) {\n $list.= (1.0 - $q < 0.001) ? ', '.$preference : sprintf(', %s;q=%.1f', $preference, $q);\n }\n return $this->getClassName().'<'.substr($list, 2).'>';\n }", "abstract function format();", "function formatHoursMinutes($float){\n\t\t$hours = floor($float);\n\t\t$minutes = ($float - $hours) * 60; //to get the number of minutes\n\t\treturn sprintf(\"%+02d:%02d\", $hours, $minutes); //sprintf - gives the ability to control the formatting through a series of codes - writes a formatted string to a variable\n\t\t//$hours goes into %+02d (1st argument) - makes sure it has 2 digits. It is going to put a - or a + in front of the $hours value \n\t\t//$minutes goes into %02d (2nd argument) - makes sure it has 2 digits. \n\t}", "public static function toFormattedString($value_, $format) {\n// For now we do not treat strings although section 4 of a format code affects strings\n\t\tif( $value_ === NULL ){\n\t\t\treturn \"\";\n\t\t} else if( is_int($value_) || is_float($value_) ){\n\t\t\t$value = (float) $value_;\n\t\t} else if( is_bool($value_) ){\n\t\t\tif( (boolean) $value_ )\n\t\t\t\treturn \"TRUE\";\n\t\t\telse\n\t\t\t\treturn \"FALSE\";\n\t\t} else if( is_string($value_) ){\n//\t\t\tif( is_numeric($value_) )\n//\t\t\t\t$value = (float) $value_;\n//\t\t\telse\n\t\t\t\treturn (string) $value_;\n\t\t} else {\n\t\t\tthrow new \\InvalidArgumentException(\"invalid type: \".gettype($value_));\n\t\t}\n\t\t\n\t\t// it is int, double or string containing something that looks like a number\n\n\t\t// For 'General' format code, we just pass the value although this is not entirely the way Excel does it,\n\t\t// it seems to round numbers to a total of 10 digits.\n\t\tif (($format === self::FORMAT_GENERAL) || ($format === self::FORMAT_TEXT)) {\n\t\t\treturn (string) $value;\n\t\t}\n\n\t\t// Convert any other escaped characters to quoted strings, e.g. (\\T to \"T\")\n\t\t$format = preg_replace('/(\\\\\\\\(.))(?=(?:[^\"]|\"[^\"]*\")*$)/u', '\"${2}\"', $format);\n\n\t\t// Get the sections, there can be up to four sections, separated with a semi-colon (but only if not a quoted literal)\n\t\t$sections_ = preg_split('/(;)(?=(?:[^\"]|\"[^\"]*\")*$)/u', $format);\n\t\t$sections = /*. (string[int]) .*/ array();\n\t\tforeach($sections_ as $section)\n\t\t\t$sections[] = (string) $section;\n\n\t\t// Extract the relevant section depending on whether number is positive, negative, or zero?\n\t\t// Text not supported yet.\n\t\t// Here is how the sections apply to various values in Excel:\n\t\t// 1 section: [POSITIVE/NEGATIVE/ZERO/TEXT]\n\t\t// 2 sections: [POSITIVE/ZERO/TEXT] [NEGATIVE]\n\t\t// 3 sections: [POSITIVE/TEXT] [NEGATIVE] [ZERO]\n\t\t// 4 sections: [POSITIVE] [NEGATIVE] [ZERO] [TEXT]\n\t\tswitch (count($sections)) {\n\t\t\tcase 1:\n\t\t\t\t$format = $sections[0];\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$format = ($value >= 0) ? $sections[0] : $sections[1];\n\t\t\t\t$value = abs($value); // Use the absolute value\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$format = ($value > 0) ?\n\t\t\t\t\t\t$sections[0] : ( ($value < 0) ?\n\t\t\t\t\t\t\t\t$sections[1] : $sections[2]);\n\t\t\t\t$value = abs($value); // Use the absolute value\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$format = ($value > 0) ?\n\t\t\t\t\t\t$sections[0] : ( ($value < 0) ?\n\t\t\t\t\t\t\t\t$sections[1] : $sections[2]);\n\t\t\t\t$value = abs($value); // Use the absolute value\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// something is wrong, just use first section\n\t\t\t\t$format = $sections[0];\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// In Excel formats, \"_\" is used to add spacing,\n\t\t// The following character indicates the size of the spacing, which we can't do in HTML, so we just use a standard space\n\t\t$format = preg_replace('/_./', ' ', $format);\n\n\t\t// Strip color information\n\t\t$color_regex = '/^\\\\[[a-zA-Z]+\\\\]/';\n\t\t$format = preg_replace($color_regex, '', $format);\n\n\t\t// Let's begin inspecting the format and converting the value to a formatted string\n\t\t// Check for date/time characters (not inside quotes)\n\t\tif (1 == preg_match('/(\\\\[\\\\$[A-Z]*-[0-9A-F]*\\\\])*[hmsdy](?=(?:[^\"]|\"[^\"]*\")*$)/miu', $format, $matches)) {\n\t\t\t// datetime format\n\t\t\t$res = self::formatAsDate($value, $format);\n\t\t} elseif (1 == preg_match('/%$/', $format)) {\n\t\t\t// % number format\n\t\t\t$res = self::formatAsPercentage($value, $format);\n\t\t} else {\n\t\t\tif ($format === self::FORMAT_CURRENCY_EUR_SIMPLE) {\n\t\t\t\t$res = 'EUR ' . sprintf('%1.2f', $value);\n\t\t\t} else {\n\t\t\t\t// Some non-number strings are quoted, so we'll get rid of the quotes, likewise any positional * symbols\n\t\t\t\t$format = (string) str_replace(array('\"', '*'), '', $format);\n\n\t\t\t\t// Find out if we need thousands separator\n\t\t\t\t// This is indicated by a comma enclosed by a digit placeholder:\n\t\t\t\t// #,# or 0,0\n\t\t\t\t$useThousands = 1 == preg_match('/(#,#|0,0)/', $format);\n\t\t\t\tif ($useThousands) {\n\t\t\t\t\t$format = preg_replace('/0,0/', '00', $format);\n\t\t\t\t\t$format = preg_replace('/#,#/', '##', $format);\n\t\t\t\t}\n\n\t\t\t\t// Scale thousands, millions,...\n\t\t\t\t// This is indicated by a number of commas after a digit placeholder:\n\t\t\t\t// #, or 0.0,,\n\t\t\t\t$scale = 1.0; // same as no scale\n\t\t\t\t$matches = array();\n\t\t\t\tif (1 == preg_match('/(#|0)(,+)/', $format, $matches)) {\n\t\t\t\t\t$scale = pow(1000, strlen((string)$matches[2]));\n\n\t\t\t\t\t// strip the commas\n\t\t\t\t\t$format = preg_replace('/0,+/', '0', $format);\n\t\t\t\t\t$format = preg_replace('/#,+/', '#', $format);\n\t\t\t\t}\n\n\t\t\t\tif (1 == preg_match('/#?.*\\\\?\\\\/\\\\?/', $format)) {\n\t\t\t\t\tif ($value != (int) $value) {\n\t\t\t\t\t\t$res = self::formatAsFraction($value, $format);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$res = (string) $value;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Handle the number itself\n\t\t\t\t\t// scale number\n\t\t\t\t\t$value = $value / $scale;\n\n\t\t\t\t\t// Strip #\n\t\t\t\t\t$format = preg_replace('/\\\\#/', '0', $format);\n\n\t\t\t\t\t$n = \"/\\\\[[^\\\\]]+\\\\]/\";\n\t\t\t\t\t$m = preg_replace($n, '', $format);\n\t\t\t\t\t$number_regex = \"/(0+)(\\\\.?)(0*)/\";\n\t\t\t\t\tif (1 == preg_match($number_regex, $m, $matches)) {\n\t\t\t\t\t\t$left = (string) $matches[1];\n\t\t\t\t\t\t$dec = (string) $matches[2];\n\t\t\t\t\t\t$right = (string) $matches[3];\n\n\t\t\t\t\t\t// minimun width of formatted number (including dot)\n\t\t\t\t\t\t$minWidth = strlen($left) + strlen($dec) + strlen($right);\n\t\t\t\t\t\tif ($useThousands) {\n\t\t\t\t\t\t\t$res = number_format($value, strlen($right), '.', ',');\n\t\t\t\t\t\t\t$res = preg_replace($number_regex, $res, $format);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (1 == preg_match('/[0#]E[+-]0/i', $format)) {\n\t\t\t\t\t\t\t\t// Scientific format\n\t\t\t\t\t\t\t\t$res = sprintf('%5.2E', $value);\n\t\t\t\t\t\t\t} elseif (1 == preg_match('/0([^\\\\d\\\\.]+)0/', $format)) {\n\t\t\t\t\t\t\t\t$res = self::complexNumberFormatMask($value, $format);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$sprintf_pattern = \"%0$minWidth.\" . strlen($right) . \"f\";\n\t\t\t\t\t\t\t\t$res = sprintf($sprintf_pattern, $value);\n\t\t\t\t\t\t\t\t$res = preg_replace($number_regex, $res, $format);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$res = (string) $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (1 == preg_match('/\\\\[\\\\$([^\\\\]]*)\\\\]/u', $format, $matches)) {\n\t\t\t\t\t// Currency or Accounting\n//\t\t\t\t\t$currencyFormat = $matches[0];\n\t\t\t\t\t$currencyCode = (string) $matches[1];\n\t\t\t\t\t$currencyCode = explode('-', $currencyCode)[0];\n\t\t\t\t\tif ($currencyCode === '') {\n//\t\t\t\t\t\t$currencyCode = SharedString::getCurrencyCode();\n\t\t\t\t\t\t// Default currency on the remote client unknown.\n\t\t\t\t\t\t$currencyCode = '?';\n\t\t\t\t\t}\n//\t\t\t\t\t$res = preg_replace('/\\\\[\\\\$([^\\\\]]*)\\\\]/u', $currencyCode, $value);\n\t\t\t\t\t$res = \"$currencyCode$value\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n//\t\t// Escape any escaped slashes to a single slash\n//\t\t$format = preg_replace(\"/\\\\\\\\/u\", '\\\\', $format);\n\n\t\treturn $res;\n\t}", "public static function format(float $milliSeconds): string\n {\n $times = [\n 'hour' => 60 * 60 * 1000,\n 'min' => 60 * 1000,\n 'sec' => 1000,\n ];\n\n $time = \\round($milliSeconds * 1000);\n $minValue = 1.0;\n\n foreach ($times as $unit => $value) {\n if ($time >= $value) {\n $time = \\floor($time / $value * 100.0) / 100.0;\n\n return $time . ' ' . $unit . ($time === $minValue ? '' : 's');\n }\n }\n\n return $time . ' ms';\n }", "public function format(): string\n {\n foreach ($this->times as $unit => $value) {\n if ($this->time >= $value) {\n $time = floor($this->time / $value * 100) / 100;\n return \"{$time} {$unit}\";\n }\n }\n\n return round($this->time * 1000) . \" ms\";\n }", "public function __toString()\n {\n return sprintf('%01.4f, %01.4f, %01.4f, %01.4f', $this->cyan, $this->magenta, $this->yellow, $this->key);\n }", "protected function _getFormattedTotal($fTotal)\n {\n\n $sDecimals = $this->_translateString('PAYP_PAYPALPLUS_PUI_CURRENCY_DECIMALS');\n $sDecimalSeparator = $this->_translateString('PAYP_PAYPALPLUS_PUI_CURRENCY_DECIMAL_SEPARATOR');\n $sThousandsSeparator = $this->_translateString('PAYP_PAYPALPLUS_PUI_CURRENCY_THOUSANDS_SEPARATOR');\n\n $sTotal = number_format($fTotal, $sDecimals, $sDecimalSeparator, $sThousandsSeparator);;\n\n return str_replace('.', $sDecimalSeparator, $sTotal);\n }", "function format($number) {\r\n\t$number = bcdiv($number, 100000000, 8);\r\n\t$point = strpos($number,\".\");\r\n\tif($point != -1) {\r\n\t\t$after = substr($number,$point+1);\r\n\t\t$after = strlen($after);\r\n\t\t$after = 8-$after;\r\n\t\tfor($i=0;$i<$after;$i++) {\r\n\t\t\t$number .= \"0\";\r\n\t\t}\r\n\t} else {\r\n\t\t$number .= \".00000000\";\r\n\t}\r\n\treturn($number);\r\n}", "public function format()\n {\n $separator = $this->object->config('separator');\n $decimals = $this->object->config('decimals');\n $point = $this->object->config('point');\n\n $decimal_value = $this->getDecimalValue($this->object->getValue());\n\n if (setting_value('visiosoft.field_type.decimal::showDecimalMaxPrice') < intval($this->object->getValue()) and $decimal_value == 0) {\n if (!setting_value('visiosoft.field_type.decimal::showDecimal')) {\n $decimals = 0;\n }\n }\n\n return number_format($this->object->getValue(), $decimals, $point, str_replace('&#160;', ' ', $separator));\n }", "public function format(string $format): string\n {\n switch ($format) {\n case 'rectangular':\n return (string) $this;\n case 'polar':\n return $this->getModulus() . ', ' . $this->getDegree();\n case 'polarHuman':\n $degree = $this->getDegree();\n return $this->getModulus() . \"(cos $degree ° + i sin $degree °)\";\n default:\n return (string) $this;\n }\n }", "private static function renderFloat($value)\n {\n return Yii::$app->formatter->asDecimal($value);\n }", "private static function formatParameterValue($value) {\n\t\t$dotPos = strrpos($value, '.');\n\t\t$commaPos = strrpos($value, ',');\n\n\t\t$sep = false;\n\t\tif ($dotPos && $dotPos > $commaPos) { $sep = $dotPos; }\n\t\tif ($commaPos && $commaPos > $dotPos) { $sep = $commaPos; }\n\n\t\tif (!$sep) {\n\t\t\treturn floatval(preg_replace(\"/[^0-9]/\", \"\", $value));\n\t\t}\n\n\t\treturn floatval(\n\t\t\tpreg_replace(\"/[^0-9]/\", \"\", substr($value, 0, $sep)) . '.' .\n\t\t\tpreg_replace(\"/[^0-9]/\", \"\", substr($value, $sep+1, strlen($value)))\n\t\t);\n\t}", "private function numberFormat($value) : float\n {\n return round($value, 2);\n }", "function floatNum($value)\n{\n return floatval(str_replace(',', '.', $value));\n}", "function formatAmountSimply($v,$t=1){\n return number_format($v,2,'.',',');\n}", "function number_format( $price, $decimals = 2 ) {\n return number_format_i18n( floatval($price), $decimals );\n }", "function ureal_to_string($number) {\n return is_number($number)\n ? sprintf('%s/%s',\n abs($number->numerator),\n $number->denominator)\n : 'NaN';\n}", "public function render()\n {\n $value = number_format($this->value, $this->decimals, $this->decimal_separator, $this->thousands_separator);\n\n return Str::of($value)\n ->prepend($this->before.' ')\n ->append(' '.$this->after)\n ->trim()\n ->toString();\n }", "public function writeFloat($num){ }", "public function __toString() : string\n {\n return round($this->calculate(), 3) . ' %';\n }", "function FormataValor4($valor) {\r\n if ($valor != \"\" && !is_null($valor)) {\r\n return number_format($valor, 4, ',', '.');\r\n } else {\r\n return \"\";\r\n }\r\n}", "public static function formatMoneyToReal(float $value, bool $prefix = false) : string\n {\n $prefix = $prefix ? 'R$ ' : '';\n\n return $prefix . number_format($value, 2, ',', '.');\n }", "function filterNumber($num)\n{\n return number_format(floatval($num), 2, '.', ',');\n}", "public static function format($num, $config = array())\n {\n if (!preg_match('/^([+-]?(\\d+(\\.\\d*)?)|(\\.\\d+))$/', $num)) {\n throw new \\Exception('Number is expecting 1 parameters to be a number.');\n }\n\n $config = array_replace_recursive(static::$config, $config);\n\n $broken_number = explode('.', $num . '');\n if (count($broken_number) != 2) {\n $broken_number[1] = str_pad('', $config['precision'], '0', STR_PAD_RIGHT);\n } else {\n $broken_number[1] = str_pad($broken_number[1], $config['precision'], '0', STR_PAD_RIGHT);\n }\n\n if ($config['round']) {\n if ($config['precision'] < strlen($broken_number[1])) {\n $pre = substr($broken_number[1], $config['precision'], 1);\n $broken_number[1] = substr($broken_number[1], 0, $config['precision']);\n if ($pre >= 5) {\n $broken_number[1] += 1;\n }\n $broken_number[1] = str_pad($broken_number[1], $config['precision'], '0', STR_PAD_LEFT);\n }\n }\n\n return implode('.', $broken_number);\n }", "public function getFString()\n {\n return $this->f_string;\n }", "function checkFloat($value){\r\n $temp = '<code style=\"font_size: 10px\">double</code>';\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#f57900 '>\" . PHP_EOL;\r\n\r\n $temp .= \"{$value}\" . PHP_EOL;\r\n\r\n $temp .= \"</code>\";\r\n\r\n return $temp ;\r\n}", "public function valor($valor) {\n\n @$formatado = number_format(($valor / 100), 2, ',', '.');\n return $formatado;\n }", "public function formatAsString()\n {\n return $this->formatTimeAsString(\n $this->value,\n $this->nanoSeconds\n );\n }", "public function toString() {\n if (! $this->_value) {\n return '';\n }\n\n $s = array ();\n\n foreach ( $this->_visibleUnits as $unit ) {\n if (! is_array ( $unit ) || ! is_string ( $unit [0] )) {\n continue;\n }\n\n if ($this->_value / $unit [0] > 1) {\n $t = floor ( $this->_value / $unit [0] );\n $s [] = $t . ' ' . $unit [1];\n $this->_value -= $unit [0] * $t;\n }\n }\n\n return implode ( ' ', $s );\n }", "public function pricer($price)\n {\n $string_price = number_format($price,2,',','.');\n return $string_price;\n }", "private function formatFNumber($input) {\n $leader = \"f/\"; // input in format f/16; trim \"f/\" leader\n if (strpos($input, $leader) === 0) {\n $input = substr($input, strpos($input, $leader) + strlen($leader));\n }\n\n if (!is_numeric($input)) {\n assert(\"is_numeric('$input') && \\$input = '$input'\");\n return \"\";\n }\n \n if ((int)$input <= 0) {\n assert(\"(int)'$input' > 0 && \\$input = '$input'\");\n return \"\";\n }\n \n return \"ƒ/\".$input;\n }", "public function format(Money $money): string;", "public function __toString()\n {\n $locale = setlocale(LC_ALL, 0);\n if ($locale && 'C' !== $locale) {\n return trim(money_format('%(#1n', (float) $this->bedrag));\n }\n\n // or fallback\n return '€ '.number_format((float) $this->bedrag, 2, ',', '.');\n }", "function format_number($value=0)\n{\n\tif ((is_numeric( $value ) AND floor( $value ) != $value)) {\n\t\treturn number_format($value, 2, '.', ',');\n\t} else {\n\t\treturn number_format($value);\n\t}\n}", "public function numberToString($var) : string\n {\n static $precision;\n if (!$precision) {\n $precision = pow(10, (int)ini_get('precision'));\n }\n $v = '' . $var;\n if (!is_numeric($v)) {\n throw new \\InvalidArgumentException('Arg var is not integer/float nor number-like when stringified.');\n }\n\n // If within system precision, just string it.\n return ($v > -$precision && $v < $precision) ? $v : number_format((float) $v, 0, '.', '');\n }", "public function formattedRut()\n {\n $rut = str_replace(['.', '-'], ['', ''], $this->rut);\n $rutNoDV = substr($rut, 0, strlen($rut) - 1);\n $dv = substr($rut, strlen($rut) - 1);\n $formattedRut = number_format($rutNoDV, 0, ',', '.').'-'.$dv;\n return $formattedRut;\n }", "function format_number(int|float|string $input, int|bool|null $decimals = 0, string $decimal_separator = null, string $thousand_separator = null): string|null\n{\n if (is_string($input)) {\n if (!is_numeric($input)) {\n trigger_error(sprintf('%s(): Invalid non-numeric input', __function__));\n return null;\n }\n\n $input += 0;\n }\n\n $export = var_export($input, true);\n\n // Auto-detect decimals.\n if (is_true($decimals)) {\n $decimals = strlen(stracut($export, '.'));\n }\n\n // Prevent corruptions.\n if ($decimals > PRECISION) {\n $decimals = PRECISION;\n }\n\n $ret = number_format($input, (int) $decimals, $decimal_separator, $thousand_separator);\n\n // Append \".0\" for eg: 1.0 & upper NAN/INF.\n if (!$decimals && !is_int($input) && strlen($export) == 1) {\n $ret .= '.0';\n } elseif ($ret == 'inf' || $ret == 'nan') {\n $ret = strtoupper($ret);\n }\n\n return $ret;\n}", "public function getOutputFormat()\n {\n $formated = $this->formatTxt(0);\n $number = $this->formatTxt(0, array('display' => Zend_Currency::NO_SYMBOL));\n return str_replace($number, '%s', $formated);\n }", "function toString() {\n if (abs($this->num) >= abs($this->denom)) {\n if ($this->denom == 1) {\n return $this->num;\n }\n\n if ($this->isNegative()) {\n $whole = ceil ($this->num / $this->denom);\n } else {\n $whole = floor ($this->num / $this->denom);\n }\n $num = abs($this->num % $this->denom);\n } else {\n $num = $this->num;\n }\n return ((empty($whole)?(empty($num)?\"0\":\"\"):$whole)\n . (empty($num)? \"\" : \" \" . $num .\"/\". $this->denom));\n }", "public static function floatStringConvertScientific(string $s): string\n {\n // optional sign, single digit 1-9,\n // decimal point and digits (allowed to be omitted),\n // E (e permitted), optional sign, one or more digits\n if (preg_match('/^([+-])?([1-9])([.]([0-9]+))?[eE]([+-]?[0-9]+)$/', $s, $matches) === 1) {\n $exponent = (int) $matches[5];\n $sign = ($matches[1] === '-') ? '-' : '';\n if ($exponent >= 0) {\n $exponentPlus1 = $exponent + 1;\n $out = $matches[2] . $matches[4];\n $len = strlen($out);\n if ($len < $exponentPlus1) {\n $out .= str_repeat('0', $exponentPlus1 - $len);\n }\n $out = substr($out, 0, $exponentPlus1) . ((strlen($out) === $exponentPlus1) ? '' : ('.' . substr($out, $exponentPlus1)));\n $s = \"$sign$out\";\n } else {\n $s = $sign . '0.' . str_repeat('0', -$exponent - 1) . $matches[2] . $matches[4];\n }\n }\n\n return $s;\n }", "public function getFormat(): string\n {\n if ($this->format === null) {\n $this->format = self::$default_format;\n }\n return $this->format;\n }", "public static function dbFormatMoney(string $value): float\n\t{\n\t\t// Remove the dots thousands separator\n\t\t$valueWithoutDots = str_replace('.', '', $value);\n\n\t\t// Change the comma thousands separator to commas\n\t\t$valueWithDotDecimal = str_replace(',', '.', $valueWithoutDots);\n\n\t\t// Return as float\n\t\treturn number_format($valueWithDotDecimal, 2, '.', '');\n\t}", "private function formatNumber($number)\n {\n return number_format($number, 0, ',', '.');\n }", "public function formatLocale(float $number, ?int $decimals = 0, ?string $locale = null): string\n {\n if ($locale === null) {\n $locale = $this->localizationService->getConfiguration()->getCurrentLocale();\n }\n setlocale(LC_NUMERIC, $locale);\n $conf = localeconv();\n return number_format($number, $decimals, $conf['decimal_point'], $conf['thousands_sep']);\n }", "public function formatNumber($value)\n {\n $decimal = Configuration::first()->decimal;\n return number_format($value, $decimal, \".\", \"\");\n }", "public function putFloat(string $name, ?float $value): string;", "public function format ($value, $name=Null)\n {\n if (!isset($name))\n {\n if (isset($this->currency))\n {\n $name = $this->currency;\n }\n else\n {\n throw new \\Exception(\"No currency specified\");\n }\n }\n if (isset($this->currencies[$name]))\n {\n $currency = $this->currencies[$name];\n }\n else\n {\n throw new \\Exception(\"Invalid currency specified\");\n }\n $sign = $currency['sign'];\n if ($this->encode)\n {\n $uro = new \\Lum\\XML\\UTF8NCR();\n $sign = $uro->encode($sign);\n }\n $pos = strtolower($currency['pos']);\n if ($pos == 'left')\n {\n $label = $sign . $value;\n }\n elseif ($pos == 'right')\n {\n $label = \"$value $sign\";\n }\n elseif ($pos == 'infix')\n {\n if (preg_match('/\\./', $value))\n $label = str_replace('.', $sign, $value);\n else\n $label = $value . $sign;\n }\n else\n { // Unrecognized position.\n $label = $value;\n }\n return $label;\n }", "function _fourD_analysis_scientific_notation($d){\n // return _fourD_analysis_round_decimal($d);\n return sprintf(\"%.3e\", $d); // scientific notation - this may change, confirm with Will\n}", "public function prettyFormat()\n {\n $this->_value = number_format($this->parseFloat()->value, 2, '.', ' ');\n return $this;\n }", "public function formatCost()\n { \n $minutes = ($this->totaltime / 60);\n $cost = $minutes * env('AVG_COST_PER_MIN');\n return number_format($cost, 2);\n }", "public function format(string $format, array $options = []): string;", "public static function toFloat($_number, $_decimals = 2) {\n\n if (!$_number) {\n return 0;\n }\n\n if (!filter_var($_number, FILTER_VALIDATE_FLOAT)) {\n\n $_number = str_replace('.', '', $_number);\n $_number = (float)self::getNumbers($_number) / pow(10, $_decimals);\n $_number = str_replace(',', '.', $_number);\n }\n\n return number_format($_number, $_decimals, '.', '');\n }", "function number_format_short( $n, $precision = 1 ) {\r\n\tif ($n < 900) {\r\n\t\t// 0 - 900\r\n\t\t$n_format = number_format($n, $precision);\r\n\t\t$suffix = '';\r\n\t} else if ($n < 900000) {\r\n\t\t// 0.9k-850k\r\n\t\t$n_format = number_format($n / 1000, $precision);\r\n\t\t$suffix = 'K';\r\n\t} else if ($n < 900000000) {\r\n\t\t// 0.9m-850m\r\n\t\t$n_format = number_format($n / 1000000, $precision);\r\n\t\t$suffix = 'M';\r\n\t} else if ($n < 900000000000) {\r\n\t\t// 0.9b-850b\r\n\t\t$n_format = number_format($n / 1000000000, $precision);\r\n\t\t$suffix = 'B';\r\n\t} else {\r\n\t\t// 0.9t+\r\n\t\t$n_format = number_format($n / 1000000000000, $precision);\r\n\t\t$suffix = 'T';\r\n\t}\r\n\t// Remove unecessary zeroes after decimal. \"1.0\" -> \"1\"; \"1.00\" -> \"1\"\r\n\t// Intentionally does not affect partials, eg \"1.50\" -> \"1.50\"\r\n\tif ( $precision > 0 ) {\r\n\t\t$dotzero = '.' . str_repeat( '0', $precision );\r\n\t\t$n_format = str_replace( $dotzero, '', $n_format );\r\n\t}\r\n\treturn $n_format . $suffix;\r\n}", "public function format(string $number): ?string;", "public function float($prompt = 'Float', $message = 'Please enter a floating-point decimal.') {\n return $this->text($prompt, function($result) { \n return filter_var($result, FILTER_VALIDATE_FLOAT); \n }, $message);\n }", "function Cantidades_sd($valor){\t\n\n return number_format($valor,0,',','.');\n\n}", "function usp_ews_format_number($grade, $decimalpoints=1) {\n if (is_null($grade) || $grade == \"\") {\n return '-';\n }\n\telse {\n return number_format($grade, $decimalpoints, '.', '');\n }\n}", "public static function removeDotFromFloat($float): int\n\t{\n\t\tif(fmod($float, 1) != 0) {\n\t\t\treturn self::removeDotFromFloat($float * 10);\n\t\t}\n\n\t\treturn $float;\n\t}" ]
[ "0.7938568", "0.77587324", "0.7663572", "0.762563", "0.74475366", "0.71144634", "0.70554686", "0.697903", "0.69431853", "0.68895704", "0.6722446", "0.66893077", "0.6596752", "0.6564021", "0.6397567", "0.6396771", "0.6337307", "0.61600065", "0.6122503", "0.59950125", "0.599483", "0.59687614", "0.5956411", "0.59295833", "0.58834857", "0.5879959", "0.58706415", "0.5869304", "0.582339", "0.5813802", "0.57982594", "0.5780264", "0.57785505", "0.5769817", "0.5759475", "0.573286", "0.56616175", "0.5633613", "0.56295925", "0.5611595", "0.56031424", "0.55927205", "0.5565517", "0.5560349", "0.55503345", "0.5543326", "0.5540292", "0.5538917", "0.55285513", "0.5512613", "0.55021125", "0.55018294", "0.54920363", "0.5476104", "0.54671943", "0.54522735", "0.54504126", "0.544571", "0.5443865", "0.5435066", "0.54215306", "0.54101884", "0.5408541", "0.5403235", "0.5385467", "0.536276", "0.5352625", "0.5342418", "0.5339964", "0.5328454", "0.5291347", "0.5290899", "0.52898175", "0.52861965", "0.5278292", "0.5270103", "0.52442294", "0.5244135", "0.5241162", "0.5240607", "0.523887", "0.52214897", "0.5215708", "0.52058756", "0.51982385", "0.5186509", "0.51812565", "0.5179799", "0.51756954", "0.5171814", "0.5164804", "0.5154246", "0.5152617", "0.5151994", "0.5148544", "0.51429784", "0.51404893", "0.5140291", "0.51350456", "0.5133431" ]
0.7295886
5
Return a formatted string from the given string. Prepend the string with an ellipsis when it is longer than the limit.
private function string(string $value): string { if ($this->callable && is_callable($value)) { return sprintf('function %s()', $value); } return strlen($value) > $this->strlim ? $this->quoted(substr($value, 0, $this->strlim) . '...') : $this->quoted($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myTruncate2($string, $limit, $break=\" \", $pad=\"...\")\n{\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n}", "function myTruncate2($string, $limit, $break=\" \", $pad=\"\")\n {\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n }", "function myTruncate($string, $limit=10, $pad=\"...\") {\n if(strlen($string) <= $limit) return $string;\n $string = substr($string, 0, $limit) . $pad;\n return $string;\n }", "function truncate($string, $limit, $break=\".\", $pad=\"...\") {\n \tif(strlen($string) <= $limit) return $string;\n \t// is $break present between $limit and the end of the string?\n \tif(false !== ($breakpoint = strpos($string, $break, $limit)))\n \t{ if($breakpoint < strlen($string) - 1)\n \t{ $string = substr($string, 0, $breakpoint) . $pad; } }\n \n \tif (strlen($string) < 400)\n \t{\n \treturn $string;\n \t}\n \n \n \n \t// return with no change if string is shorter than $limit\n \tif(strlen($string) <= $limit) return $string;\n \n \t$string = substr($string, 0, $limit);\n \tif(false !== ($breakpoint = strrpos($string, $break))) {\n \t$string = substr($string, 0, $breakpoint);\n \t}\n \n \treturn $string . $pad;\n }", "function truncate_max($string, $limit, $break=\" \", $pad=\"...\") { // return with no change if string is shorter than $limit \n\tif(strlen($string) <= $limit) return $string; \n\t$string = substr($string, 0, $limit); \n\tif(false !== ($breakpoint = strrpos($string, $break))) \n\t{ $string = substr($string, 0, $breakpoint); } \n\treturn $string . $pad; \n}", "function truncate($string, $limit, $break=\".\", $pad=\"...\") {\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) { if($breakpoint < strlen($string) - 1) { $string = substr($string, 0, $breakpoint) . $pad; } } return $string;\n}", "function myTruncate($string, $limit=80, $break=\".\", $pad=\"...\")\n{\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n \n return restoreTags($string);\n}", "function myTruncate2($string, $limit, $break=\" \", $pad=\"...\") {\n\nif(strlen($string) <= $limit) \n\nreturn $string; \n\n$string = substr($string, 0, $limit); \n\nif(false !== ($breakpoint = strrpos($string, $break))) \n\n{ \n\n$string = substr($string, 0, $breakpoint); \n\n} \n\nreturn $string . $pad; \n\n}", "function truncate2($string, $limit, $break=\" \", $pad=\"...\") {\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n}", "function show_limit($val,$limit = 20){\n\t$str = substr($val, 0, $limit);\n\tif(strlen($val) > $limit) $str .= \"...\";\n\treturn $str;\n}", "function truncate($string, $limit, $break=\".\", $pad=\"...\")\n{\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n}", "function ellipsis($long_string, $max_character = 30) {\n $short_string = strlen($long_string) > $max_character ? substr($long_string, 0, $max_character).\"...\" : $long_string;\n\t\treturn $short_string;\n }", "function myTruncate($string, $limit, $break = \".\", $pad = \"...\") {\r\n// return with no change if string is shorter than $limit\r\n if (strlen($string) <= $limit)\r\n return $string; // is $break present between $limit and the end of the string?\r\n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\r\n if ($breakpoint < strlen($string) - 1) {\r\n $string = substr($string, 0, $breakpoint) . $pad;\r\n }\r\n }\r\n return $string;\r\n}", "function str_shorten(string $string, int $limit, string $break = '.', string $pad = '…'): string\n {\n $strlen = strlen($string);\n // return with no change if string is shorter than $limit\n if ($strlen <= $limit) {\n return $string;\n }\n // is $break present between $limit and the end of the string?\n if (\n ($breakpoint = strpos($string, $break, $limit)) !== false &&\n $breakpoint < $strlen - 1\n ) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n return $string;\n }", "function truncate($string, $limit, $break=\" \", $pad=\"...\") {\n\n // Return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n \n return $string;\n}", "function truncate($string, $limit, $break=\" \", $pad=\"...\") {\n\t if(strlen($string) <= $limit) return $string; \n\t // is $break present between $limit and the end of the string? \n\t if(false !== ($breakpoint = strpos($string, $break, $limit))) \n\t { \n\t \tif($breakpoint < strlen($string) - 1) \n\t \t{ \n\t \t\t$string = substr($string, 0, $breakpoint) . $pad; \n\t \t} \n\t } return $string; \n\t }", "function stringTruncation($string, $limit, $break, $pad)\n{\n if(strlen($string) <= $limit) return $string;\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break)))\n { $string = substr($string, 0, $breakpoint);\n }\n return $string . $pad;\n}", "static function limit(string $s, int $limit = 100, string $end = '...'): string {\n if (mb_strlen($s) <= $limit) {\n return $s;\n }\n error_if(mb_strlen($end) >= $limit, \"useless Str::limit('', limit, end) combination\");\n\n return mb_strimwidth($s, 0, $limit, $end);\n }", "public function myTruncate($string, $limit, $break=\" \", $pad=\"...\")\n {\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < $limit + 30) {\n $string = substr($string, 0, $breakpoint) . $pad;\n } else {\n $string = substr($string, 0, $limit+30) . $pad;\n }\n } else {\n $string = substr($string, 0, $limit+30) . $pad;\n }\n\n return $string;\n }", "protected function limit_length($string, $limit = 127)\n {\n // As the output is to be used in http_build_query which applies URL encoding, the string needs to be\n // cut as if it was URL-encoded, but returned non-encoded (it will be encoded by http_build_query later).\n $url_encoded_str = rawurlencode($string);\n\n if (strlen($url_encoded_str) > $limit) {\n $string = rawurldecode(substr($url_encoded_str, 0, $limit - 3) . '...');\n }\n return $string;\n }", "function truncate($string, $limit, $break = \".\", $pad = \"...\")\n {\n if (strlen($string) <= $limit) {\n return $string;\n }\n\n // is $break present between $limit and the end of the string?\n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\n if ($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n }", "function str_limit($string, $limit = 100, $end = '...')\n {\n return str::limit($string, $limit, $end);\n }", "function limitar($sString, $iLimite) {\n\n if ( strlen($sString) > $iLimite ) {\n $sString = mb_substr($sString, 0, $iLimite - 3) . '...';\n } else {\n $sString = mb_substr($sString, 0, $iLimite);\n }\n\n return $sString;\n}", "function stringTruncation2($string, $limit, $pad)\n{\n if(strlen($string) <= $limit)\n { return $string;\n }\n else \n { $string = substr($string, 0, $limit - 3);\n return $string . $pad;\n }\n}", "function stringTrunc( $string, $limit, $end ) {\n\treturn ( strlen( $string ) > $limit ) ? substr( $string, 0, $limit ) . $end : $string;\n}", "function str_limit($value, $limit = 100, $end = '...')\n {\n return Str::limit($value, $limit, $end);\n }", "function maxlength($text, $max, $shorten=true)\n{\nif(strlen($text) >= $max) {\nif($shorten) {\n$text = substr($text, 0, ($max-3)).\"...\";\n} else {\n$text = substr($text, 0, ($max));\n} }\nreturn $text;\n}", "function adjustLength($string, $max)\r\n {\r\n if (strlen($string) <=$max)\r\n {\r\n return $string;\r\n }\r\n else\r\n {\r\n return substr($string, 0, $max) . '..';\r\n }\r\n }", "public static function myTruncate($string, $limit, $break = \" \", $pad = \"...\") {\n // return with no change if string is shorter than $limit\n if (strlen($string) <= $limit) {\n return $string;\n }\n // is $break present between $limit and the end of the string?\n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\n if ($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n return $string;\n }", "public static function shortenedString ($string, $maxLength = 40)\n {\n $string = self::export($string);\n \n if (strlen($string) > $maxLength) {\n $string = substr($string, 0, $maxLength - 10) . '...' .\n substr($string, - 7);\n }\n \n return str_replace(\"\\n\", '\\n', $string);\n }", "function str_limit($value, $limit = 100, $end = '...')\n {\n return Str::limit($value, $limit, $end);\n }", "function limitText($string, $limit = 50, $break = \" \", $pad = \"\") {\n\tif(strlen($string) <= $limit)\n\t\treturn $string;\n\t$string = substr($string, 0, $limit);\n\tif(false !== ($breakpoint = strrpos($string, $break))){\n\t\t$string = substr($string, 0, $breakpoint);\n\t}\n\treturn $string . $pad;\n}", "public static function truncateString($string, $max = 150, $option = array())\r\n {\r\n $string = Cible_FunctionsGeneral::html2text($string);\r\n\r\n if (strlen($string) > $max)\r\n {\r\n $string = substr($string, 0, $max);\r\n $i = strrpos($string, \" \");\r\n $string = substr($string, 0, $i);\r\n $dot = \"...\";\r\n\r\n if (!empty($option[\"dotStyle\"]))\r\n {\r\n $dot = \"<span class='\" . $option[\"dotStyle\"] . \"'>...</span>\";\r\n }\r\n $string = $string . $dot;\r\n }\r\n\r\n return $string;\r\n }", "function shortenStr ($str, $len) {\n return strlen($str) > $len ? substr($str, 0, $len).\"…\" : $str;\n}", "private function shorten(string $string, int $max_size): string\n {\n return rtrim(mb_substr($string, 0, $max_size), ' .,;:-/\\\\') . '...';\n }", "public static function limitChars($string, $limit = 100, $append = '...')\n {\n if (self::length($string) <= $limit) {\n return $string;\n }\n return rtrim(self::strPart($string, 0, $limit)) . $append;\n }", "function str_limit($value, $limit = 100, $end = '...')\n\t\t{\n\t\t\t\treturn Illuminate\\Support\\Str::limit($value, $limit, $end);\n\t\t}", "function truncate($text)\n{\n $max_char=500;\n // Text length is over the limit\n if (strlen($text)>$max_char){\n // Define maximum char number\n $text = substr($text, 0, $max_char);\n // Get position of the last space\n $position_space = strrpos($text, \" \");\n $text = substr($text, 0, $max_char);\n // Add \"...\"\n $text = $text.\" ...\";\n }\n // Return the text\n return $text;\n}", "public function str_limit($value, $limit = 100, $end = '...')\n {\n return Str::limit($value, $limit, $end);\n }", "public function limit($string, $limit = 100, $end = '...')\n {\n if (mb_strwidth($string, 'UTF-8') <= $limit) {\n return $string;\n }\n\n return rtrim(mb_strimwidth($string, 0, $limit, '', 'UTF-8')) . $end;\n }", "function sttl($str, $limit = NULL, $dots = true){\nif(isset($str) \n\t\t && isset($limit)){\n if(strlen($str) > $limit){\n\t if($dots == true){\n return substr($str, 0, $limit).'...';\t\t\n\t } elseif($dots == false){\n\t\t return substr($str, 0, $limit);\n\t }\n }\n elseif(strlen($str) < $limit){\n\treturn $str; \t \n }\n}\n return false; \n}", "private function _truncate_text($text, $limit, $append='...') {\n\t if(strlen($text) > $limit) {\n\t $text = substr($text, 0, $limit);\n\t $text .= $append;\n\t }\n\t return $text;\n\t}", "public static function cut(string $s, int $limit = 100, string $end = '...'): string {\n if (mb_strlen($s) <= $limit) {\n return $s;\n }\n\n return mb_strimwidth($s, 0, $limit, $end);\n }", "function truncate_text($text, $max_chars = 70) {\n if (strlen($text) > $max_chars) {\n return explode( \"\\n\", wordwrap( $text, $max_chars))[0] . '…';\n }\n return $text;\n}", "function my_string_limit_words($string, $word_limit)\r\n{\r\n $words = explode(' ', $string, ($word_limit + 1));\r\n if(count($words) > $word_limit)\r\n array_pop($words);\r\n return implode(' ', $words).'... ';\r\n}", "function wordlimit($string, $length = 50, $ellipsis = \"...\") {\n $words = explode(' ', strip_tags($string));\n if (count($words) > $length)\n return implode(' ', array_slice($words, 0, $length)) . $ellipsis;\n else\n return $string;\n}", "public function textShorten($text, $limit = 400){\n $text = $text.\"\";\n $text = substr($text, 0, $limit);\n $text = $text .\"..\";\n return $text;\n }", "function Truncate($str, $length=10, $trailing='...') {\n $length-=strlen($trailing);\n if (strlen($str) > $length)\n {\n // string exceeded length, truncate and add trailing dots\n return substr($str,0,$length).$trailing;\n }\n else\n {\n // string was already short enough, return the string\n $res = $str;\n }\n\n return $res;\n}", "public static function shortenString(string $text, int $maxLength = 100): string\n {\n $length = strlen($text);\n if ($length <= $maxLength) {\n return $text;\n }\n return mb_substr($text, 0, $maxLength - 3) . '...';\n }", "function shortenString($string, $len = 140)\n {\n return mb_strimwidth($string, 0, $len, \"...\");\n }", "public function truncate($string, $limit=150, $delimiters=array(' '), $append='...') {\n $return = $string;\n $stringLength = mb_strlen($string);\n\n if ($stringLength > $limit) {\n if (is_string($delimiters)) {\n $delimiters = array($delimiters);\n }\n\n $until = $this->_getMaximumOffset($limit, $this->_getBestCandidates($string, $delimiters, $limit));\n $return = mb_substr($string, 0, $until);\n\n // Do not append if the resulting string is exactly the same as it came in\n if ($return !== $string) {\n $return .= $append;\n }\n }\n\n return $return;\n }", "function str_cut ($str, $size) {\n\t// is the string already short enough?\n\t// we count '…' for 1 extra chars.\n\tif( strlen($str) <= $size+1 ) {\n\t\treturn $str;\n\t}\n\n\treturn substr($str, 0, $size) . '…';\n}", "function truncate($string,$length=500,$append=\"&hellip;\") {\n $string = trim($string);\n\n if(strlen($string) > $length) {\n $string = wordwrap($string, $length);\n $string = explode(\"\\n\", $string, 2);\n $string = $string[0] . $append;\n }\n\n return $string;\n}", "public static function limitString($string,$length,$addDots = false){\r\n\t\t$dots = \"...\";\r\n\r\n\t\tif(strlen($string) > $length)\r\n\t\t\t$string = substr($string,0,($addDots ? $length-strlen($dots) : $length)) . ($addDots ? $dots : \"\");\r\n\r\n\t\treturn $string;\r\n\t}", "function limit_text($text, $limit) {\n\tif (str_word_count($text, 0) > $limit) {\n\t\t$words = str_word_count($text, 2);\n\t\t$pos = array_keys($words);\n\t\t$text = substr($text, 0, $pos[$limit]) . '...';\n\t}\n\treturn $text;\n}", "function truncate_string($string, $maxlength, $extension) {\n $cutmarker = \"**cut_here**\";\n\n // Checking if the given string is longer than $maxlength\n if (strlen($string) > $maxlength) {\n\n // Using wordwrap() to set the cutmarker\n // NOTE: wordwrap (PHP 4 >= 4.0.2, PHP 5)\n $string = wordwrap($string, $maxlength, $cutmarker);\n\n // Exploding the string at the cutmarker, set by wordwrap()\n $string = explode($cutmarker, $string);\n\n // Adding $extension to the first value of the array $string, returned by explode()\n $string = $string[0] . $extension;\n }\n\n // returning $string\n return $string;\n\n}", "public function textShorten($text, $limit = 400){\n\t//blank text\n $text = $text. \"\";\n //substring from 0-400 characters visible\n\t$text = substr($text, 0, $limit);\n //concatenate to show additional text\n\t$text = $text.\"..\";\n //return the text\n\treturn $text;\n }", "public static function limit($value, $limit = 100, $end = '...'){\n if(mb_strwidth($value, 'UTF-8') <= $limit){\n return $value;\n }\n\n return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')) . $end;\n }", "function standard_truncate_text( $string, $character_limit = 50, $truncation_indicator = '...' ) {\n\n\t$truncated = null == $string ? '' : $string;\n if ( strlen( $string ) >= ( $character_limit + 1 ) ) {\n \n $truncated = substr( $string, 0, $character_limit );\n\n if ( substr_count( $truncated, ' ') > 1 ) {\n $last_space = strrpos( $truncated, ' ' );\n $truncated = substr( $truncated, 0, $last_space );\n } // end if\n\n $truncated = $truncated . $truncation_indicator;\n \n } // end if/else\n \n return $truncated;\n \n}", "private function truncateInternal($maxLength, $ellipsis, $safe) {\n if ($this->length() <= $maxLength) {\n // return it unchanged\n return $this;\n }\n // if the string does indeed need to be truncated\n else {\n // if no ellipsis string has been specified\n if ($ellipsis === null) {\n // assume three dots as the default\n $ellipsis = '...';\n }\n\n // calculate the actual maximum length without the ellipsis\n $maxLength -= mb_strlen($ellipsis, $this->charset);\n\n // truncate the string to the desired length\n $rawString = mb_substr($this->rawString, 0, $maxLength, $this->charset);\n\n // if we don't want to break words\n if ($safe) {\n // if the truncated string *does* end *within* a word\n if (!preg_match('/\\\\W/u', mb_substr($this->rawString, $maxLength - 1, 2, $this->charset))) {\n // if there's some word boundary before\n if (preg_match('/.*\\\\W/u', $rawString, $matches)) {\n // truncate there instead\n $rawString = $matches[0];\n }\n }\n }\n\n // return the correctly truncated string together with the ellipsis\n return new static($rawString . $ellipsis, $this->charset);\n }\n }", "function truncate_html_str ($s, $MAX_LENGTH, &$trunc_str_len) {\n\n\t$trunc_str_len=0;\n\n\tif (func_num_args()>3) {\n\t\t$add_ellipsis = func_get_arg(3);\n\n\t} else {\n\t\t$add_ellipsis = true;\n\t}\n\n\tif (func_num_args()>4) {\n\t\t$with_tags = func_get_arg(4);\n\n\t} else {\n\t\t$with_tags = false;\n\t}\n\n\tif ($with_tags){\n\t\t$tag_expr = \"|<[^>]+>\";\n\n\t}\n\n\t$offset = 0; $character_count=0;\n\t# match a character, or characters encoded as html entity\n\t# treat each match as a single character\n\t#\n\twhile ((preg_match ('/(&#?[0-9A-z]+;'.$tag_expr.'|.|\\n)/', $s, $maches, PREG_OFFSET_CAPTURE, $offset) && ($character_count < $MAX_LENGTH))) {\n\t\t$offset += strlen($maches[0][0]);\n\t\t$character_count++;\n\t\t$str .= $maches[0][0];\n\t\t\n\t\n\t}\n\tif (($character_count == $MAX_LENGTH)&&($add_ellipsis)) {\n\t\t$str = $str.\"...\";\n\t}\n\t$trunc_str_len = $character_count;\n\treturn $str;\n\n \n}", "function limitChars($text, $limit = 200, $more = ' ... ')\n{\n $text = mb_substr($text, 0, $limit);\n if (mb_substr($text, mb_strlen($text) - 1, 1) && mb_strlen($text) == $limit) {\n $textReturn = mb_substr($text, 0, mb_strlen($text) - mb_strlen(strrchr($text, ' ')));\n if (!empty($textReturn)) {\n return $textReturn . $more;\n }\n }\n return $text;\n}", "function ts_get_shortened_string($text,$word_limit)\r\n{\r\n\t$words = explode(' ', $text, ($word_limit + 1));\r\n\tif(count($words) > $word_limit)\r\n\t{\r\n\t\tarray_pop($words);\r\n\t\treturn implode(' ', $words).\"...\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn implode(' ', $words);\r\n\t}\r\n}", "protected function truncate($string, $limit, $pad = '...', $break = ' ')\n {\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n }", "function textLimit($string, $limit, $break=\" \", $tail=\"...\")\n\t\t{\n\t\t\t// return with no change if string is shorter than $limit\n\t\t\tif(strlen($string) <= $limit) return $string;\n\n\t\t\t// is $break present between $limit and the end of the string?\n\t\t\tif(false !== ($breakpoint = strpos($string, $break, $limit)))\n\t\t\t{\n\t\t\t\tif($breakpoint < strlen($string) - 1) {\n\t\t\t\t\t$string = substr($string, 0, $breakpoint) . $tail;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $string;\n\t\t}", "function reduce_string_by_chars($string, $max_chars)\n{\n\tif(strlen($string) > $max_chars){\n\t\t$string = substr($string, 0, $max_chars).\"..\";\n\t}\n\t\n\treturn $string;\n}", "public static function truncate($text, $limit = 72, $add = '...') {\n $limit = intval($limit);\n if (strlen($text) <= $limit) return $text;\n \n $text = substr($text, 0, $limit); // crop the string to a given limit\n $text = substr($text, 0, strrpos($text, ' ')); // find the last occurrence of a space and crop the string to it\n \n $text = rtrim($text, '.!?:;,-'); // remove unwanted punctuation from the end of the string\n \n return $text . $add;\n }", "function truncate($string,$length=35,$append=\"&hellip;\") {\n $string = trim($string);\n\n if(strlen($string) > $length) {\n $string = wordwrap($string, $length);\n $string = explode(\"\\n\", $string, 2);\n $string = $string[0] . $append;\n }\n\n return $string;\n }", "public static function setTruncate($strText, $StrNum = 20) {\n return (strlen($strText) > $StrNum) ? substr($strText, 0, $StrNum) . '...' : $strText;\n }", "public static function ellipsize(string $string, int $maxLength, string $suffix = '...') : string\n {\n if ($maxLength < 0) {\n throw new \\InvalidArgumentException('$maxLength is negative');\n }\n\n if (strlen($string) <= $maxLength) {\n return $string;\n }\n\n $trimmedLength = $maxLength - strlen($suffix);\n $string = substr($string, 0, max(0, $trimmedLength));\n\n if ($string === '') {\n return substr($suffix, 0, $maxLength);\n }\n\n return $string . $suffix;\n }", "public function truncation($string) {\n $length = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepagevideo.truncation.limit', 13);\n $string = strip_tags($string);\n return Engine_String::strlen($string) > $length ? Engine_String::substr($string, 0, ($length - 3)) . '...' : $string;\n }", "public function textShorten($text, $limit = 360) {\n\t\t $text = $text . \" \";\n\t\t $text = substr($text, 0, $limit);\n\t\t $text = substr($text, 0, strrpos($text, ' '));\n\t\t $text = $text . \"...\";\n\n\t\t return $text;\n\t }", "function concatenate( $excerpt, $limit = false ) {\n\t\n\tif ( ! $limit )\n\t\t$limit = apply_filters( 'excerpt_length', 30 );\n\n\n\tmb_internal_encoding( 'UTF-8' );\n\n\tif ( mb_strlen( $excerpt ) > $limit )\n\t\t$dots = apply_filters( 'excerpt_more', '[...]' );\n\n\n\t$excerpt = mb_substr( esc_html( $excerpt ), 0, $limit );\n\n\treturn $excerpt;\n\n}", "function truncate($text, $limit = 40)\n{\n if (str_word_count($text, 0) > $limit) {\n $words = str_word_count($text, 2);\n $pos = array_keys($words);\n $text = mb_substr($text, 0, $pos[$limit], 'UTF-8') . '...';\n }\n\n return $text;\n}", "function str_substr($string, $max_length){\n\t\t$string=trim($string);\n\t \tif (strlen($string) > $max_length){\n\t\t $newstring= substr($string, 0, $max_length);\n\t\t}else{\n\t\t $newstring=$string;\n\t\t}\n\t\tif(strlen($string)>strlen($newstring)){\n\t\t\t$newstring.='...';\n\t\t}\n\t\treturn $newstring;\n\t}", "function alaya_truncate($full_str,$max_length) {\n\tif (mb_strlen($full_str,'utf-8') > $max_length ) {\n\t $full_str = mb_substr($full_str,0,$max_length,'utf-8').'...';\n\t}\n\t$full_str = apply_filters('alaya_truncate', $full_str);\nreturn $full_str;\n}", "public static function limit($value, $limit = 100, $end = '...')\n {\n if (mb_strwidth($value, 'UTF-8') <= $limit) {\n return $value;\n }\n\n return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')) . $end;\n }", "function string_cut_string($str, $length)\r\n\t{\r\n\t\t$str = strip_tags($str);\r\n\t\t/*\r\n\t\tif(strpos($str, \" \") === false) {\r\n\t\t\t$str = wordwrap($str, 25, \"<br />\\n\", true);\r\n\t\t}\r\n\t\t*/\r\n\t\tif (strlen($str) > $length)\r\n\t\t{\r\n\t\t\t$str = substr($str, 0, $length);\r\n\t\t\t$last_space = strrpos($str, \" \");\r\n\t\t\t$str = substr($str, 0, $last_space).\"...\";\r\n\t\t} \r\n\r\n\t\treturn $str;\r\n\t}", "function add3dots($string, $repl, $limit) \r\n{\r\n if(strlen($string) > $limit) \r\n {\r\n return substr($string, 0, $limit) . $repl; \r\n }\r\n else \r\n {\r\n return $string;\r\n }\r\n}", "function limitString($string, $limit = 100) {\n if(strlen($string) < $limit) {return $string;}\n\n $regex = \"/(.{1,$limit})\\b/\";\n preg_match($regex, $string, $matches);\n return $matches[1];\n}", "function get_excerpt($str, $startPos = 0, $maxLength = 100) {\n\tif (strlen($str) > $maxLength) {\n\t\t$excerpt = substr($str, $startPos, $maxLength - 3);\n\t\t$lastSpace = strrpos($excerpt, ' ');\n\t\t$excerpt = substr($excerpt, 0, $lastSpace);\n\t\t$excerpt .= '...';\n\t} else {\n\t\t$excerpt = $str;\n\t}\n\n\treturn $excerpt;\n}", "function excerpt($str, $len, $end = '...')\n{\n\tif(strlen($str) > $len)\n\t{\n\t\t$str = mb_substr($str, 0, $len, 'UTF-8');\n\t\t$pos = max(strrpos($str, '.'), strrpos($str, ' '), strrpos($str, \"\\n\"));\n\t\tif($pos) $str = substr($str, 0, $pos);\n\t\t$str .= $end;\n\t}\n\treturn $str;\n}", "function tronquer_texte($texte, $longeur_max)\n{\n if (strlen($texte) > $longeur_max)\n {\n $texte = substr($texte, 0, $longeur_max);\n $dernier_espace = strrpos($texte, \"\");\n $texte = substr($texte, 0, $dernier_espace).\"...\";\n }\n return $texte;\n}", "function strshrink($string, $default_size, $max)\n{\n\t$strlen = strlen($string);\n\t\n\tif (strlen($string) >= $max) {\n\t\t$size = $default_size;\n\t\t\n\t\tfor ($i=0; ($strlen - $max) >= $i; $i += 6) {\n\t\t\t$size -= 1;\n\t\t}\n\t\t\n\t\treturn '<div style=\"display:inline;font-size:' .$size. 'px\">' .$string. '</div>';\n\t}\n\t\n\treturn $string;\n}", "function str_stop($string, $max_length){\n\t if (strlen($string) > $max_length){\n\t\t $string = substr($string, 0, $max_length);\n\t\t $pos = strrpos($string, \" \");\n\t\t if($pos === false) {\n\t\t\t\t return substr($string, 0, $max_length).\"...\";\n\t\t\t }\n\t\t return substr($string, 0, $pos).\"...\";\n\t }else{\n\t\t return $string;\n\t }\n\t}", "function psa_truncate( $string, $length, $append = '&hellip;' ) {\n\tif( strlen( $string ) > $length ) {\n\t\t$string = substr( $string, 0, strrpos( substr( $string, 0, $length ), ' ') );\n\t\t$string .= $append;\n\t}\n\treturn $string;\n}", "public function short(string $full, $limit = 30) : string\n {\n preg_match(PATTERN_CHINESE, $full, $matches);\n\n if (!empty($matches)) {\n if (mb_strlen($full) >= $limit) {\n return mb_substr($full, 0, $limit-1) . \"...\";\n } else {\n return mb_substr($full, 0, $limit);\n }\n } else {\n if (strlen($full) >= $limit) {\n return substr($full, 0, $limit-1) . \"...\";\n } else {\n return substr($full, 0, $limit);\n }\n }\n }", "function get_sub_text ($string, $limit, $break, $pad)\r\n{\r\n\t// return with no change if string is shorter than $limit\r\n\tif(strlen($string) <= $limit)\r\n\t\treturn $string;\r\n\r\n\t// is $break present between $limit and the end of the string?\r\n\t$breakpoint = strpos($string, $break, $limit);\r\n\tif($breakpoint !== false) \r\n\t{\r\n\t\tif($breakpoint < (strlen($string)-1)) \r\n\t\t{\r\n\t\t\t$string = substr($string, 0, $breakpoint) . $pad;\r\n\t\t}\r\n\t}\r\n\treturn $string;\r\n}", "function truncate_it($length, $string)\n{\n if (strlen(strip_tags($string)) < $length) {\n return strip_tags($string);\n }\n return substr(strip_tags($string), 0, $length) . '...';\n}", "function truncate($input,$maxChars,$maxWords=0,$more='...'){\r\n\t//Make sure the input is not just spaces\r\n\tif ((trim($input) != \"\")){\r\n\t\t//split all the words in the input text by using space\r\n\t\t$words = preg_split('/\\s+/', $input);\r\n\r\n\t\t//Check if the maximum words is greater than 0\r\n\t\tif ($maxWords > 0)\r\n\t\t$words = array_slice($words, 0, $maxWords);\r\n\r\n\r\n\t\t$words = array_reverse($words);\r\n\r\n\t\t$chars = 0;\r\n\t\t$truncated = array();\r\n\r\n\t\twhile(count($words) > 0)\r\n\t\t{\r\n\t\t $fragment = trim(array_pop($words));\r\n\t\t $chars += strlen($fragment);\r\n\r\n\t\t if($chars > $maxChars) break;\r\n\r\n\t\t $truncated[] = $fragment;\r\n\t\t}\r\n\r\n\t\t$result = implode($truncated, ' ');\r\n\r\n\t\tif (($result == \"\") || ($maxWords == 0)){\r\n\t\t\treturn substr($input, 0,$maxChars).$more;\r\n\t\t}\r\n\r\n\t\treturn $result . ($input == $result ? '' : $more);\r\n\t}\r\n\r\n}", "private function truncateChars($string = '', $limit = 0) {\n for($i = 0; $i <= $limit AND $i < strlen($string); $i++){\n $output .= $string[$i];\n }\n return (string)trim($output);\n }", "function excerpt($string){\r\n\t$string= substr($string, 0, 10);\r\n\treturn $string . \"...\";\r\n}", "public function limit( $value, $limit = 100, $end = '...' ) {\n\t\tif ( $this->length( $value ) <= $limit ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$value = ( MB_STRING ) ? mb_substr( $value, 0, $limit, $this->encoding ) : substr( $string, 0, $limit );\n\n\t\treturn $value.$end;\n\t}", "function madang_short_excerpt( $limit ) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function my_string_limit_char($excerpt, $substr=0)\r\n{\r\n\r\n\t$string = strip_tags(str_replace('...', '...', $excerpt));\r\n\tif ($substr>0) {\r\n\t\t$string = substr($string, 0, $substr);\r\n\t}\r\n\treturn $string;\r\n\t\t}", "function limitText($string, $limit){\n\t$string = strip_tags($string);\n\tif (strlen($string) > $limit) {\n\t\t// truncate string\n\t\t$stringCut = substr($string, 0, $limit);\n\t\t// make sure it ends in a word so assassinate doesn't become ass...\n\t\t$string = substr($stringCut, 0, strrpos($stringCut, ' ')); \n\t}\n\treturn $string;\t\t\t\t\n}", "function shorten_it( $text ){\n\treturn substr($text, 0, 200) . '&hellip;';\n}", "public static function truncate($text, $max = 27) {\n // If they want <3, we're having none of that\n if ($max <= 3) {\n debug_event('UI', \"truncate called with $max, refusing to do stupid things to $text\", 2);\n return $text;\n }\n\n if (self::check_iconv()) {\n $charset = Config::get('site_charset');\n if (iconv_strlen($text, $charset) > $max) {\n $text = iconv_substr($text, 0, $max - 3, $charset);\n $text .= iconv('ISO-8859-1', $charset, '...');\n }\n }\n else {\n if (strlen($text) > $max) {\n $text = substr($text, 0, $max - 3) . '...';\n }\n }\n\n return $text;\n }", "function truncate_text_at_word($string, $limit, $break = \".\", $pad = \"...\")\n {\n if (strlen($string) <= $limit) {\n return $string;\n }\n if (false !== ($max = strpos($string, $break, $limit))) {\n if ($max < strlen($string) - 1) {\n $string = substr($string, 0, $max) . $pad;\n }\n }\n return $string;\n }", "private static function format_string($string, $length) {\n\t\tif($string == null) {\n\t\t\t$string = \"\";\n\t\t}\n\t\t$strlen = strlen($string);\n\t\tif($strlen > $length) {\n\t\t\treturn substr($string, 0, $length-3).'...';\n\t\t}\n\t\twhile($strlen < $length) {\n\t\t\t$string .= \" \";\n\t\t\t$strlen++;\n\t\t}\n\t\treturn $string;\n\t}", "public static function limit($value, $limit = 100, $end = '...')\n\t{\n\t\tif (static::length($value) <= $limit) return $value;\n\n\t\tif (MB_STRING)\n\t\t{\n\t\t\treturn mb_substr($value, 0, $limit, static::encoding()).$end;\n\t\t}\n\n\t\treturn substr($value, 0, $limit).$end;\n\t}" ]
[ "0.7725753", "0.7652887", "0.7643238", "0.75900453", "0.75834084", "0.75232357", "0.75127375", "0.74889237", "0.7488746", "0.74815345", "0.7468255", "0.74299043", "0.7411431", "0.7411197", "0.7386736", "0.7365229", "0.7320503", "0.7305366", "0.72062933", "0.7199724", "0.7168932", "0.7159301", "0.71156555", "0.71058923", "0.7090526", "0.7053779", "0.70444924", "0.7034796", "0.7009347", "0.7008665", "0.7006162", "0.70024693", "0.69750935", "0.6969061", "0.691882", "0.69138384", "0.68908495", "0.6855843", "0.6829876", "0.6826237", "0.6771171", "0.6752461", "0.67450374", "0.67308134", "0.670961", "0.670605", "0.6702393", "0.6690333", "0.6672082", "0.66714144", "0.66595876", "0.66588384", "0.66559565", "0.6645564", "0.6628169", "0.65988123", "0.6591453", "0.65899265", "0.65824646", "0.65659344", "0.65468425", "0.65449107", "0.6529356", "0.6519532", "0.65101576", "0.65006745", "0.6472627", "0.64608616", "0.6448184", "0.64417255", "0.64350885", "0.642385", "0.6409975", "0.6408713", "0.64083606", "0.64037955", "0.64005834", "0.6395104", "0.6384871", "0.6384221", "0.63804775", "0.6367905", "0.6356047", "0.63463026", "0.6346281", "0.6341383", "0.6331152", "0.63296664", "0.6323478", "0.6310457", "0.63078105", "0.62907255", "0.6284151", "0.6280862", "0.62754524", "0.62605095", "0.62473273", "0.624663", "0.62458473", "0.6238119", "0.62370974" ]
0.0
-1
Return a formatted string from the given array.
private function array(array $value): string { if ($this->callable && is_callable($value)) { $class = ! is_string($value[0]) ? $this->classname($value[0]) : $value[0]; $method = $value[1]; return sprintf('function %s::%s()', $class, $method); } $slice = array_slice($value, 0, $this->arrlim, true); $elems = $this->isAssociative($slice) ? array_map([$this, 'arrayPair'], array_keys($slice), $slice) : array_map([$this, 'arrayValue'], $slice); return vsprintf('[%s%s]', [ implode(', ', $elems), count($value) > $this->arrlim ? ', ...' : '', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function ArrayToString ($array)\n {\n $str = null;\n if (is_array($array))\n foreach ($array as $valore) {\n if(is_string($valore))\n $str = $str.\"-\".$valore;\n else{$str=$str.\"\\n\".$valore->__toString();}\n }\n else\n $str = $array;\n return $str;\n }", "public function format_array_to_text($array){\n return implode(\"\\n\", $array);\n }", "protected function array_to_string($array) \n\t{\n\t\t$str = '';\n\t\tforeach ($array as $item) {\n\t\t\t$str .= $item . '\\n';\n\t\t}\n\n\t\treturn $str;\n\t}", "public function makeString($array)\r\n {\r\n $outval = '';\r\n foreach ($array as $key => $value) {\r\n if(is_array($value)) {\r\n $outval .= !is_numeric($key) ? \"$key\" : false;\r\n $outval .= $this->makestring($value);\r\n } else {\r\n $outval .= (string) $key .\": \".$value .\"\\n\";\r\n }\r\n }\r\n\r\n return $outval;\r\n }", "function arrayToString($array) {\n\t\t$array_temp = array();\n\t\tfor($x=0;$x<sizeof($array);$x++) {\n\t\t\t$array_temp[$x] = \"'\".$array[$x].\"'\";\n\t\t}\n\t\t$string = \"(\".implode(\",\", $array_temp).\")\";\n\t\treturn $string;\n\t}", "public function array_to_string($array)\n {\n $string = \"\";\n for ($i=0; $i < count($array); $i++) {\n if ($i < count($array) - 1) {\n $string .= '\"'.$array[$i].'\",';\n } else {\n $string .= '\"'.$array[$i].'\"';\n }\n }\n\n return $string;\n }", "function arrayToString($array)\n\t{\n\t\t$string = \"\";\n\t\tforeach($array as $row)\n\t\t{\n\t\t\tif(gettype($row) == \"array\")\n\t\t\t{\n\t\t\t\t$string .= arrayToString($row);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$string .= $row.\" \";\n\t\t\t}\n\t\t}\n\t\treturn $string;\n\t}", "private function arrayToString($array){\n\t\t$i = 0;\n\t\t$string = '';\n\t\tforeach ($array as $value) {\n\t\t\tif ($i > 0) $string .= ', ';\n\t\t\tif (preg_match('#', $value)){\n\t\t\t\t$string .= str_replace('#', '', $value);\n\t\t\t}else{\n\t\t\t\t$string .= \"'\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $string;\n\t}", "protected function errorArrayToString($array) \n\t{\n\t\t$str = '';\n\t\tforeach ($array as $item) {\n\t\t\t$str .= $item . '\\n';\n\t\t}\n\n\t\treturn $str;\n\t}", "function array_to_string($array){\n $joined_string=\"\";\n for($count=0;$count<count($array);$count++){\n \n if($count!=count($array)-1){\n $joined_string.= $array[$count].'|';\n }\n else{\n $joined_string.=$array[$count];\n }\n }\n return $joined_string;\n }", "private function arrayToString($array)\r\n {\r\n return var_export($array, true);\r\n }", "Function ArrayToString($array){\n\t\t$array=array_values($array);\n\t\t$String=null;\n\t\t\n\t\tfor($x=0;$x<sizeof($array);$x++){\t\t\t\n\t\t\tif(Strlen($array[$x])>0){\n\t\t\t\tif(Strlen($String)>0){\n\t\t\t\t\t$String=$String.','.$array[$x];\n\t\t\t\t}else{\n\t\t\t\t $String=$array[$x];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t return $String;\n\t}", "public function toString(array $data): string;", "private function formatArrayValues(array $data): string\n {\n return implode(\n ', ',\n array_map(\n function ($value) {\n return '\"'.$value.'\"';\n },\n $data\n )\n );\n }", "function array_to_string(array $array): string\n {\n return '[' . implode(', ', array_map(function ($v): string {\n if (is_array($v) || is_bool($v) || !is_stringable($v)) {\n throw new LogicException('Cannot convert array to string, some values are not stringable');\n }\n\n return '\\'' . $v . '\\'';\n }, $array)) . ']';\n }", "function sprintf_array($format, $arr)\n{\n return call_user_func_array('sprintf', array_merge((array)$format, $arr));\n}", "public static function printArray ($array)\r\n\t{\r\n\t\t# If the input is not an array, convert it\r\n\t\t$array = self::ensureArray ($array);\r\n\t\t\r\n\t\t# Loop through each item\r\n\t\t$hash = array ();\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif ($value === false) {$value = '0';}\r\n\t\t\t$hash[] = \"$key => $value\";\r\n\t\t}\r\n\t\t\r\n\t\t# Assemble the text as a single string\r\n\t\t$text = implode (\",\\n\", $hash);\r\n\t\t\r\n\t\t# Return the text\r\n\t\treturn $text;\r\n\t}", "protected function formatArray(array $values){\n $r = ''; foreach($values as $val) $r.= (empty($r)?'':',').$val;\n return $r;\n }", "public static function stringifyArray(array $array);", "public function format(array $message);", "function makestring($array)\r\n {\r\n $outval = '';\r\n if (is_array($array)) {\r\n foreach($array as $key=>$value)\r\n {\r\n if(is_array($value))\r\n {\r\n $outval = makestring($value);\r\n }\r\n else\r\n {\r\n $outval = $value;\r\n }\r\n }\r\n}\r\n \r\n return $outval;\r\n }", "public static function arrayToString(array $arr) : string\n\t{\n\t\treturn implode('', array_map('strval', $arr));\n\t}", "private function formatArrayToString(array $map): string\n\t{\n\t\t$resultString = '';\n\t\tforeach ($map as $key => $value) {\n\t\t\ttry {\n\t\t\t\t$resultString .= \" [$key] => \";\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t$resultString .= $this->formatArrayToString($value);\n\t\t\t\t} else {\n\t\t\t\t\t$resultString .= strip_tags($value, '<b><i><pre>');\n\t\t\t\t}\n\t\t\t} catch (Throwable $exception) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn $resultString;\n\t}", "function array2string($array, $default = false){\n\tif(!is_array($array))\n\t\treturn $default; \n\t$str = ''; \n\t$len = count($array);\n\t\n\t$j = $len; \n\tif($len >= 1 || ($len == 0 && $default == false)){\n\t\tforeach($array as $obj){\n\t\t\tif(is_object($obj))\n\t\t\t\t$class = get_class($obj);\n\t\t\telse \n\t\t\t\t$class = '';\n\t\t\t$isTable = false; \n\t\t\tif($class)\n\t\t\t\t$isTable = is_subclass_of($obj, 'Table');\n\t\t\t\n\t\t\t$j--; \n\t\t\t\n\t\t\tif($j > 0)\n\t\t\t\t$str = $str . ($isTable ? $obj->link() : $obj) . ($len > 2 ? ', ' : ' ');\n\t\t\telse\n\t\t\t\t$str = $str . ($len > 1 ? 'and ' : '') . ($isTable ? $obj->link() : $obj);\n\t\t\t\n\t\t}\n\t}else{\n\t\t$str = $default; \n\t}\n\t\n\treturn $str; \n }", "function array_to_string($array)\n{\n $str = '';\n if($array)\n foreach($array as $word) {\n $str .= $seporator . addslashes($word);\n $seporator = ',';\n }\n return $str;\n}", "public function getMessagefromArray($array){\n\t\tunset($array[0]);\n\t\treturn implode(' ', $array);\n\t}", "protected function format(array $message)\n\t{\n\t\t$output = self::DEFAULT_FORMAT_ECHO;\n\t\tforeach($message as $part => $value)\n\t\t{\n\t\t\tif('extra' == $part && count($value))\n\t\t\t{\n\t\t\t\t$value = $this->normalize($value);\n\t\t\t}\n\t\t\telse if('extra' == $part)\n\t\t\t{\n\t\t\t\t// Don't print an empty array\n\t\t\t\t$value = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = $this->normalize($value);\n\t\t\t}\n\t\t\t$output = str_replace(\"%$part%\", $value, $output);\n\t\t}\n\t\treturn $output;\n\t}", "private function array_to_string($arr)\n {\n $line = [];\n foreach ($arr as $v) {\n $line[] = is_array($v) ? self::array_to_string($v) : $this->sanitize($v);\n }\n return implode($line);\n }", "function dump_array($array)\n{\n\n\t$_str = \"<table bgcolor = '%s'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table><br>\";\n\n\tif(is_array($array)){\n\n\t\t$size = count($array);\n\t\t$string = \"\";\n\n\t\tif($size) {\n\n\t\t\t$string .= \"{ <br>\";\n\n\t\t\tforeach($array as $a => $b) {\n\n\t\t\t\tif(is_array($b)) { $b = dump_array($b); }\n\t\t\t\tif(is_object($b)) { $b = dump_array(object_to_array($b)); }\n\t\t\t\t$string .= \"&nbsp;&nbsp;&nbsp;&nbsp;<b>$a = '$b'</b><br>\";\n\n \t\t}\n\n\t\t\t$string .= \" }<br>\";\n\t\t}\n\n\t\t$r = sprintf($_str, '#DACE0B', $string);\n\n\t\treturn $r;\n\n } else { return $array; }\n}", "function array_tostring($array){\n\t$string = '';\n\tforeach($array as $value){\n\t\tif ($string != ''){\n\t\t\t$string .= ',';\n\t\t}\n\t\t$string .= $value;\n\t}\n\treturn $string;\n}", "public static function __arrayToString(array $arr)\n\t{\n\t\t$str = '';\n\n\t\tforeach($arr as $k => $v)\n\t\t{\n\t\t\t$str .= $k . ':';\n\n\t\t\tif(is_string($v))\n\t\t\t{\n\t\t\t\t$str .= $v . ', ';\n\t\t\t}\n\t\t\telse if(is_array($v))\n\t\t\t{\n\t\t\t\t$str .= '[' . self::__arrayToString($v) . '], ';\n\t\t\t}\n\t\t}\n\n\t\t$str = rtrim($str, ', ');\n\n\t\treturn $str;\n\t}", "public static function arrayToString(array $arr)\n {\n $pieces = [];\n\n foreach ($arr as $email => $name) {\n $pieces[] = $name ? sprintf('%s <%s>', trim($name), trim($email)) : trim($email);\n }\n\n return implode(', ', $pieces);\n }", "protected abstract function formatArrayValue(array $value);", "private function arrayAssocToString($array){\n\t\t$i = 0;\n\t\t$string = '';\n\t\tforeach ($array as $key => $value) {\n\t\t\tif ($i > 0) $string .= ', ';\n\t\t\tif (preg_match('#', $value)){\n\t\t\t\t$string .= str_replace('#', '', $value);\n\t\t\t}else{\n\t\t\t\t$string .= $key .\"='\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $string;\n\t}", "public static function implode( $array ) {\n\t\t\t$r = '';\n\t\t\tforeach ( $array as $key => $value ) {\n\t\t\t\t$r .= sprintf( '%s: %s ', $key, $value );\n\t\t\t}\n\n\t\t\treturn trim( $r );\n\t\t}", "function arraytostring($array){\r\n\t$text = \"array(\";\r\n\t$x = 0;\r\n\t$count = count($array);\r\n\tforeach ($array as $key => $value) {\r\n\t\t$x++;\r\n\t\tif (is_array($value)) {\r\n\t\t\t$text .= $key.\"=>\".arraytostring($value);\r\n\t\t\tif ($count != $x) $text .= \",\";\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t$text .= \"\\\"$key\\\"=>\\\"$value\\\"\";\r\n\t\tif ($count != $x) $text .= \",\";\r\n\t}\r\n\t$text .= \")\";\r\n\treturn $text;\r\n}", "function arg_array_to_str($arg_array){\r\n \r\n $arg_str = '';\r\n \r\n foreach($arg_array as $arg)\r\n {\r\n $arg_str .= \"$arg,\";\r\n }\r\n \r\n \r\n \r\n return substr($arg_str,0,-1); //eg 'x,y,z' -- substr() cuts off the trailing comma\r\n }", "public static function packArrayToString($format, &$arr)\n {\n $str = call_user_func_array(\"pack\", array_merge([$format], $arr));\n return $str;\n }", "public function arraytostring($array,$delimitatore=','){\n\t\treturn implode($delimitatore,$array);\n\t}", "function generate($array) {\n $result = \"\";\n ob_start();\n if(sizeof($array)) {\n $i = 0;\n foreach($array as $string) {\n $i++;\n echo \"<span style='background-color: \".$this->colors[\"seq\"].\"; border-right: 1px solid #949494;'>\".$i.\".&nbsp;</span>&nbsp;\";\n echo $string.\"<br/>\\r\\n\";\n }\n }\n $result = ob_get_contents();\n ob_end_clean();\n return $result;\n }", "protected function mail_string($array) {\n return array_map(function ($el) use ($array) {\n return ($array[$el] ? \"$array[$el] \": \"\") .\"<$el>\";\n }, array_keys($array));\n }", "public static function encode($array)\n {\n\n // determine type\n if(is_numeric(key($array))) {\n\n // indexed (list)\n $output = '[';\n for($i = 0, $last = (sizeof($array) - 1); isset($array[$i]); ++$i) {\n if(is_array($array[$i])) $output .= self::encode($array[$i]);\n else $output .= self::_val($array[$i]);\n if($i !== $last) $output .= ',';\n }\n $output .= ']';\n\n } else {\n\n // associative (object)\n $output = '{';\n $last = sizeof($array) - 1;\n $i = 0;\n foreach($array as $key => $value) {\n $output .= '\"'.$key.'\":';\n if(is_array($value)) $output .= self::encode($value);\n else $output .= self::_val($value);\n if($i !== $last) $output .= ',';\n ++$i;\n }\n $output .= '}';\n\n }\n\n // return\n return $output;\n\n }", "protected function formatter(array $item): string\n {\n if (is_array($item['field']['factory'])) {\n return $item['field']['factory']['formatter'];\n }\n\n return $item['field']['factory'];\n }", "function content_array_to_string($array){\n $joined_string=\"\";\n for($count=0;$count<count($array);$count++){\n \n if($count!=count($array)-1){\n $joined_string.= $array[$count].'/';\n }\n else{\n $joined_string.=$array[$count];\n }\n }\n return $joined_string;\n }", "function convertArrayIntoString($array) {\n foreach ($array as $value)\n $string .= \"'$value,'\";\n $string = trim($string, ',');\n return $string;\n}", "public function formatErrors($array = array())\n {\n // validation de l'entity a échouée.\n $error_msg = [];\n foreach($array as $errors){\n if(is_array($errors)){\n foreach($errors as $error){\n $error_msg[] = \"<br> - \" . $error;\n }\n }else{\n $error_msg[] = \"<br> - \" . $errors;\n }\n }\n return $error_msg;\n }", "protected function formatArgs(array $args): string\n {\n $result = array();\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('string' === $item[0]) {\n $formattedValue = sprintf(\"'%s'\", $this->escapeHtml($item[1]));\n } elseif ('null' === $item[0]) {\n $formattedValue = '<em>null</em>';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = '<em>'.strtolower(var_export($item[1], true)).'</em>';\n } elseif ('resource' === $item[0]) {\n $formattedValue = '<em>resource</em>';\n } else {\n $formattedValue = str_replace(\"\\n\", '', var_export($this->escapeHtml((string) $item[1]), true));\n }\n\n $result[] = is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $key, $formattedValue);\n }\n\n return implode(', ', $result);\n }", "function array_to_string($array, $splitter = ', ', $lastSplitter = ' and ', $prefix = '', $suffix = '')\n {\n $string = implode($splitter, $array);\n $string = str_replace($splitter . last($array), $lastSplitter . last($array), $string);\n\n return $prefix . $string . $suffix;\n }", "function format_array( $name, &$array2format ){\n $cnt = 0;\n $ret = '';\n\n if( count($array2format) === 0 ){\n //no values, create empty array to have a default in settings.conf\n return $name.'[0]=\"\"';\n }\n\n reset($array2format);\n foreach( $array2format as $val ){\n if( $val != '' ){\n $ret .= $name.\"[$cnt]='$val'\\n\";\n ++$cnt;\n }\n }\n\n $ret = trim($ret, \"\\n\");\n return $ret;\n }", "public function fix_format($array)\n {\n return $this->accountCtrl->fix_format($array);\n }", "public function __toString() {\n $params = [];\n $str = '';\n foreach ($this->data as $x => $row) {\n $str .= '[ ';\n foreach ($row as $y => $value) {\n $str .= \"%s \";\n $params[] = $value;\n }\n $str .= \"]\\n\";\n }\n return vsprintf($str, $params);\n }", "function ArrayToString ($array,$new_array=array()) {\n\t$num = count($array);\n\tfor ($i=0; $i<=$num; $i++){\n\t\tif (isset($array[$i]['name']) && $array[$i]['name'] != '') //multi-array\n\t\t\tarray_push($new_array, $array[$i]['name']);\n\t\telse if ($array['youtube'][0]['source'] != '' && !in_array($array['youtube'][0]['source'], $new_array)) //trailer\n\t\t\tarray_push($new_array, $array['youtube'][0]['source']);\n\t}\n\treturn implode(',', $new_array);\n}", "private function formatArgs(array $args): string\n {\n $result = [];\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf('object(%s)', $item[1]);\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf('array(%s)', \\is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('null' === $item[0]) {\n $formattedValue = 'null';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = strtolower(var_export($item[1], true));\n } elseif ('resource' === $item[0]) {\n $formattedValue = 'resource';\n } else {\n $formattedValue = str_replace(\"\\n\", '', $this->escapeXml(var_export($item[1], true)));\n }\n\n $result[] = \\is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $this->escapeXml($key), $formattedValue);\n }\n\n return implode(', ', $result);\n }", "function format_extensions_to_str($extension_array)\n{\n\t$ext_array = array();\n\t\n\tforeach($extension_array AS $ext)\n\t{\n\t\t# remove the beginning dot (.)\n\t\tarray_push($ext_array, substr($ext, 1));\n\t\t# Add the option of upper case of the extension\n\t\tarray_push($ext_array, strtoupper(substr($ext, 1)));\n\t}\n\t\n\treturn implode(',', $ext_array);\n}", "public function _convertArrayToString(array $arr)\n {\n $str = '[';\n foreach ($arr as $k => $v) {\n $str .= $k.'=>';\n if (is_string($v)) {\n $str .= '\"'.$v.'\"';\n } else {\n $str .= $this->_convertTypeToString($v, true);\n }\n }\n $str .= ']';\n return $str;\n }", "public function format(array $record);", "protected function formatAddresses(array $addresses): string\n {\n $result = [];\n foreach ($addresses as $address) {\n $result[] = $this->formatAddress($address);\n }\n\n return implode(', ', $result);\n }", "protected function formatAddresses(array $addresses) {\n\t\t$formattedAddresses = array();\n\t\tforeach ($addresses as $email => $name) {\n\t\t\t$formattedAddresses[] = sprintf('%s <%s>', $name, $email);\n\t\t}\n\t\treturn implode(', ', $formattedAddresses);\n\n\t}", "public function format(array $messages);", "private function getDataStr(array $data)\n {\n $output = array();\n $callback = function($value, $key) use (&$output)\n {\n if (strpos($value, ':') === 0) {\n $output[] = \"`{$key}` = {$value}\";\n }\n else {\n $output[] = \"`{$key}` = '{$value}'\";\n }\n\n };\n array_walk($data, $callback);\n return implode(', ', $output);\n }", "static function fmt($val){\r\n if (is_array($val)) {\r\n $buf = array();\r\n foreach ($val as $k=>$v) {\r\n $buf[] = self::fmt($k) . '=>' . self::fmt($v);\r\n }\r\n return 'array(' . implode(', ', $buf) . ')';\r\n }\r\n if (is_string($val)) return self::quote($val);\r\n if (is_null($val)) return 'NULL';\r\n if (true===$val) return 'TRUE';\r\n if (false===$val) return 'FALSE';\r\n try {\r\n return strval($val);\r\n }\r\n catch (Exception $e){}\r\n ob_start();\r\n print_r($val);\r\n $val = ob_get_contents();\r\n ob_end_clean();\r\n return $val;\r\n }", "public static function toString(array $array, $inner_glue = '=', $outer_glue = ' ', $keepOuterKey = false)\n {\n \t$output = array();\n \n \tforeach ($array as $key => $item)\n \t{\n \t\tif (is_array($item))\n \t\t{\n \t\t\tif ($keepOuterKey)\n \t\t\t{\n \t\t\t\t$output[] = $key;\n \t\t\t}\n \n \t\t\t// This is value is an array, go and do it again!\n \t\t\t$output[] = self::toString($item, $inner_glue, $outer_glue, $keepOuterKey);\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$output[] = $key . $inner_glue . '\"' . $item . '\"';\n \t\t}\n \t}\n \n \treturn implode($outer_glue, $output);\n }", "public static function convert_multi_array($array) {\n return implode(\"&\",array_map(function($a) {return implode(\"~\",$a);},$array));\n }", "public function array2str($value): string\n {\n if (\\is_string($value)) {\n return $value;\n }\n\n $new_array = [];\n\n foreach ($value as $item) {\n $item = str_replace('%', '%25', $item);\n $item = str_replace(',', '%2C', $item);\n $new_array[] = $item;\n }\n\n return implode(',', $new_array);\n }", "function ar_to_string($ar, $tab = 1) {\n\n\t\t$str = \"\";\n\t\t$tabs = \"\";\n\n\t\tfor ($x = 0; $x < $tab; $x++)\n\t\t\t$tabs .= \"\\t\";\n\n\t\tforeach ($ar as $key => $val) {\n\t\t\tif (is_array($ar[$key]))\n\t\t\t\t$str .= ar_to_string($ar, ($tab + 1));\n\t\t\telse\n\t\t\t\t$str = \"{$tabs}{$key}\\t=>\\t{$val}\\n\";\n\t\t}\n\n\t\treturn $str;\n\t}", "function arrayToString($p) {\n $p2 = __t($p)->map(function($arr){return implode($arr);});\n return $p2();\n }", "protected function formatArrayForConsole(array $array): array\n {\n array_walk($array, function (&$value, $index) {\n $value = sprintf('%s: %s', $index, json_encode($value));\n });\n\n return $array;\n }", "public static function QueryArray($array)\n {\n $r = '';\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $r .= self::Term(self::QueryArray($value), $key, false);\n } else {\n $r .= self::Term($value, $key);\n }\n }\n return $r;\n }", "function Array2Str($kvsep, $entrysep, $a){\n $str = \"\";\n foreach ($a as $k=>$v){\n $str .= \"{$k}{$kvsep}{$v}{$entrysep}\";\n }\n return $str;\n}", "function FormatString($symbol)\n{\n\t$symbolString = \"\";\n\tif(is_array($symbol))\n\t{\n\t\t$len = count($symbol);\n\t\t$i=0;\n\t\tforeach ($symbol as $value) {\n\t\t\t$symbolString .= $value;\n\t\t\tif($len-$i != 1)\n\t\t\t\t$symbolString .= \",\";\n\t\t\t$i++;\n\t\t}\n\t}\n\telse\n\t\treturn $symbol;\n\treturn $symbolString;\n}", "function convertArrayObjectToString($array = [], $field = 'name', $implode = ',') {\n $convert = [];\n foreach ($array as $item) {\n array_push($convert, $item->{$field});\n }\n return implode($implode, $convert);\n}", "public static function stringFromArray($arr, $prefix = '', $sufix = '')\r\n {\r\n if (is_array($arr)) {\r\n $string = ($prefix.ucfirst(implode(\", \", $arr)).$sufix);\r\n } else {\r\n $string = ($prefix.$arr.$sufix);\r\n }\r\n return $string;\r\n }", "public function format_array( $array ) {\n\t\tif ( ! is_array( $array ) ) {\n\t\t\tif ( is_serialized( $array ) ) {\n\t\t\t\t$array = maybe_unserialize( $array );\n\t\t\t} else {\n\t\t\t\t$array = explode( ',', $array );\n\t\t\t}\n\t\t}\n\t\treturn array_filter( array_map( 'trim', array_map( 'strtolower', $array ) ) );\n\t}", "public function toString()\n {\n return Str(json_encode($this->array));\n }", "private function formatContact($key, $array) {\n return sprintf($this->format, $array['last_name'], $array['first_name'],\n $array['phone'], $key);\n }", "protected function makeAddressStringFromArray($addressArr) {\n\t\treturn implode(',', $addressArr);\n\t}", "function format_reservations( $reservation_arr ) {\r\n\t\t\r\n\t\t$reservation_string = '';\r\n\t\tforeach( $reservation_arr as $reservation ) {\r\n\t\t\t\r\n\t\t\t$reservation_string .= $reservation['extras']['user'] . ( $reservation['extras']['level'] == 'member' ? '' : ', level=' . $reservation['extras']['level'] );\r\n\t\t\t\r\n\t\t\tforeach($reservation['extras'] as $key => $value) {\r\n\t\t\t\t\r\n\t\t\t\t// Skip \"user\", \"level\", and any other attributes with this filter\r\n\t\t\t\tif( in_array( $key, apply_filters( 'bp_group_reservation_skipped_extras', array( 'user', 'level' ) ) ) )\tcontinue;\r\n\t\t\t\t$reservation_string .= ', ' . $key . '=' . $value;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$reservation_string .= \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn $reservation_string;\r\n\t\t\r\n\t}", "function _serialize($array)\n\t{\n\t\tif(!is_array($array))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t$str = '';\n\t\tforeach($array as $var => $value)\n\t\t{\n\t\t\tif($str)\n\t\t\t{\n\t\t\t\t$str .= '|';\n\t\t\t}\n\t\t\t$str .= $var . '=' . str_replace('|', '', $value);\n\t\t}\n\t\treturn $str;\n\t}", "private function array2string($myArray)\n\t{\n\t\t$string = \"\";\n\t\tforeach ($myArray as $key => $value)\n\t\t{\n\t\t\t\t$string.= $key.\"=\".$value .\"&\";\n\t\t}\n\t\treturn rtrim($string,\"&\");\n\t}", "private function formatArgs(array $args)\n {\n $result = array();\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf(\"<em>object</em>(%s)\", $this->formatClass($item[1]));\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf(\"<em>array</em>(%s)\", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('string' === $item[0]) {\n $formattedValue = sprintf(\"'%s'\", self::utf8Htmlize($item[1]));\n } elseif ('null' === $item[0]) {\n $formattedValue = '<em>null</em>';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = '<em>'.strtolower(var_export($item[1], true)).'</em>';\n } elseif ('resource' === $item[0]) {\n $formattedValue = '<em>resource</em>';\n } else {\n $formattedValue = str_replace(\"\\n\", '', var_export(self::utf8Htmlize((string) $item[1]), true));\n }\n\n $result[] = is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $key, $formattedValue);\n }\n\n return implode(', ', $result);\n }", "function _stmtArrayToString($op, $stmtArray) {\n $str = '';\n if(count($stmtArray) > 0) {\n $str = ' '.$op.' '.implode(' '.$op.' ', $stmtArray);\n }\n return $str;\n }", "function arrayToSQLString ($arr) {\r\n $sql = \"\";\r\n foreach ($arr as $key => $value) {\r\n $sql = $sql . $value . ',';\r\n }\r\n $sql = rtrim($sql,',');\r\n return $sql;\r\n}", "function printArray($array){\n // will accept arrays of values or arrays of arrays\n\n $c = \"\"; // for the comma :)\n $o = \"\"; // the output\n\n foreach($array as $item){\n if (is_array($item)){\n $o .= $c . printArray($item);\n }\n else{\n $o .= $c . $item;\n }\n $c = ',';\n }\n \n $o = \"[\" . $o . \"]\";\n\n return $o;\n}", "function _formatAuthor($array) {\n\t\tif (!array_key_exists('von', $array)) {\n\t\t\t$array['von'] = '';\n\t\t} else {\n\t\t\t$array['von'] = trim($array['von']);\n\t\t}\n\t\tif (!array_key_exists('last', $array)) {\n\t\t\t$array['last'] = '';\n\t\t} else {\n\t\t\t$array['last'] = trim($array['last']);\n\t\t}\n\t\tif (!array_key_exists('jr', $array)) {\n\t\t\t$array['jr'] = '';\n\t\t} else {\n\t\t\t$array['jr'] = trim($array['jr']);\n\t\t}\n\t\tif (!array_key_exists('first', $array)) {\n\t\t\t$array['first'] = '';\n\t\t} else {\n\t\t\t$array['first'] = trim($array['first']);\n\t\t}\n\t\t$ret = $this->authorstring;\n\t\t$ret = str_replace(\"VON\", $array['von'], $ret);\n\t\t$ret = str_replace(\"LAST\", $array['last'], $ret);\n\t\t$ret = str_replace(\"JR\", $array['jr'], $ret);\n\t\t$ret = str_replace(\"FIRST\", $array['first'], $ret);\n\t\treturn trim($ret);\n\t}", "private static function parseArray(array $array, int $level): string {\n $output = '';\n\n if (static::$depth <= $level) $output .= '[...]';\n else if (empty($array)) $output .= '[]';\n else {\n $keys = array_keys($array);\n $spaces = str_repeat(' ', $level * 4);\n $output .= '[';\n foreach ($keys as $key) $output .= PHP_EOL . \"{$spaces} [$key] => \" . self::parseVariable($array[$key], $level + 1). ',';\n $output .= PHP_EOL . \"{$spaces}]\";\n }\n\n return $output;\n }", "private function prettyPrintArray($arr, $indent = 0, $indentModifier = 4)\n {\n if (!is_array($arr)) {\n return $arr;\n }\n\n $string = \"\";\n\n foreach ($arr as $key => $value) {\n $string = $string . str_repeat(\" \", $indent) . \"[\" . $key . \"]\" . \": \";\n\n if (is_array($value)) {\n $string .= PHP_EOL . $this->prettyPrintArray($value, $indent + $indentModifier) . PHP_EOL;\n } elseif (is_string($value) || settype($item, 'string') !== false || (is_object($value) && method_exists($value, '__toString'))) {\n $string .= $value . PHP_EOL;\n } else {\n throw new \\InvalidArgumentException('Current value cannot be converted to string: value=' . $value);\n }\n }\n return $string;\n }", "private function format_array( $array ) {\n\n if ( !is_array( $array ) ) {\n\n if ( is_serialized( $array ) ) {\n\n $array = maybe_unserialize( $array );\n\n }\n else {\n\n $array = explode( ',', $array );\n\n }\n\n }\n\n return array_filter( array_map( 'trim', array_map( 'strtolower', $array ) ) );\n\n }", "function arrayToString($arrayData, $separator)\n{\n\tif (!is_array($arrayData)) {\n\t\treturn false;\n\t}\n\n\t$arrayDataString = '';\n\tforeach ($arrayData as $value) {\n\t\t$arrayDataString .= $value.$separator;\n\t}\n\n\t//remove the trailing separator\n\t$arrayDataString = substr($arrayDataString, 0, (strlen(trim($arrayDataString)))-1);\n\n\treturn $arrayDataString;\n}", "function buildDateString($date_array)\n{\n return $date_array[\"year\"].'-'.$date_array[\"mon\"].'-'.$date_array[\"mday\"];\n}", "public static function stringizeOrderBy($array)\n {\n //normalize single column orderBy statement\n if (is_string(reset($array)))\n {\n $array = array($array);\n } \n \n $columnsOrderBy = array();\n \n foreach ($array as $orderBy)\n {\n// var_dump($orderBy);\n $columnsOrderBy[] = $orderBy['column'] . ' ' . $orderBy['direction'];\n }\n \n return implode(', ', $columnsOrderBy);\n }", "function getGeneratedStr($inputArr) {\n\t\n\t$outputArr = array();\n\tforeach($inputArr as $val) {\n\t\t$outputArr[] = getFizzBuzz($val); // get the generated value (Fizz, Buzz or the original value)\n\t}\n\t\n\treturn implode(' ', $outputArr);\n}", "public static function printForFile(array $array, $iteration = 1)\n { \n $string = '[';\n \n foreach ($array as $key => $value) {\n $string .= \"\\n\" . str_repeat(\" \", $iteration) . '\\'' . $key . '\\' => ';\n if (is_array($value)) {\n $string .= self::printForFile($value, $iteration + 1);\n } elseif (is_numeric($value)) {\n $string .= $value;\n } elseif (strpos($value, self::PHP_CONTENT) === 0) {\n $string .= substr($value, strlen(self::PHP_CONTENT));\n } else {\n $string .= '\\'' . $value . '\\'';\n }\n \n $string .= ',';\n }\n \n $string .= \"\\n\" . str_repeat(\" \", $iteration - 1) . ']';\n if ($iteration === 1) {\n $string .= ';';\n }\n \n return $string;\n }", "public function convertMeToString($glue,$arr){\n return implode($glue , $arr);\n}", "function implodeArray($array, $glue = ' = ') {\n $return = $array;\n if (is_array($array)) {\n $return = '';\n foreach ($array as $key => $value) {\n if ($return != '') {\n $return .= PHP_EOL;\n }\n $return .= $key . $glue . $value;\n }\n }\n return $return;\n}", "function makeformatstring($names){\n\t$formatstring = '';\n foreach ($names as $name=>$type) {\n \tif($type=='@'){\n \t\t$formatstring .= $type.substr($name,2).\"/\";\n \t} else {\n \t\t$formatstring .= $type.$name.\"/\";\n \t}\n \t\n }\n return $formatstring;\n}", "public static function make_save_str_in($array) {\n\t\t\t$string = self::trim($array);\n\t\t\treturn $string;\n\t\t}", "public function write($arr) {\n\t\t$str = \"\";\n\t\t$this->writeSegment($str, $arr);\n\t\treturn $str;\n\t}", "protected function formatAddress(array $address): string\n {\n list($email, $name) = $address;\n if ($name === null) {\n return $email;\n }\n $name = mb_encode_mimeheader($name, $this->charset, 'B');\n\n return \"{$name} <{$email}>\";\n }", "private function arrayValuesToString(array $array)\n\t{\n\t\tforeach ($array as $key => $value) {\n\t\t\tif (!is_scalar($value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$array[$key] = (string) $value;\n\t\t}\n\n\t\treturn $array;\n\t}", "function htmldump ( $array ) {\r\n\t\tforeach($array as $key => $val) {\r\n\t\t\t$return .= $this->ul(\r\n\t\t\t\t\t\t$this->li($this->font($key)) .\r\n\t\t\t\t\t\t\t$this->ul(\r\n\t\t\t\t\t\t\t\t$this->font(is_array($val) ? $this->htmldump($val) : $this->li($val))\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $return;\r\n\t}" ]
[ "0.78601587", "0.78493977", "0.7774893", "0.77623475", "0.73470896", "0.7331457", "0.72853905", "0.7284715", "0.72781044", "0.72200525", "0.7121584", "0.7077615", "0.7067114", "0.69619787", "0.6941993", "0.69417655", "0.6884951", "0.6858953", "0.680556", "0.68046755", "0.6804553", "0.67910767", "0.6786136", "0.6756884", "0.6737506", "0.67345816", "0.66787744", "0.666523", "0.6664679", "0.6628052", "0.6585085", "0.6582476", "0.6574587", "0.65575016", "0.65555334", "0.65355366", "0.6494509", "0.64908934", "0.64710927", "0.64705", "0.64572287", "0.6417515", "0.6403338", "0.6395692", "0.6383252", "0.6379144", "0.6367594", "0.6314686", "0.6313715", "0.6294917", "0.629381", "0.62912995", "0.6285014", "0.6273999", "0.62614024", "0.62516105", "0.62513655", "0.62443364", "0.62109494", "0.6183504", "0.6182727", "0.6127374", "0.611736", "0.6108079", "0.6098145", "0.60673666", "0.604866", "0.60485995", "0.6040234", "0.60328114", "0.60283613", "0.6021072", "0.60167056", "0.60022897", "0.60005647", "0.59541965", "0.5951123", "0.5931664", "0.5912444", "0.5863709", "0.5862281", "0.58487326", "0.5841937", "0.5819888", "0.5802473", "0.5799234", "0.57891667", "0.5788927", "0.57880497", "0.57852674", "0.57842505", "0.57731044", "0.57714164", "0.57692957", "0.5761338", "0.57398355", "0.5739437", "0.5734053", "0.5727624", "0.57274383" ]
0.6333802
47
Return a formatted string for the given key => value pair.
private function arrayPair($key, $val): string { $key_str = is_int($key) ? $key : $this->quoted($key); $val_str = $this->arrayValue($val); return sprintf('%s => %s', $key_str, $val_str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function format($key, $val)\n {\n if (is_bool($val)) {\n return sprintf(\"%s\", $key);\n } else {\n return sprintf(\"%s%s%s%s%s\", $key, $this->_split, $this->_quote, $val, $this->_quote);\n }\n }", "public function formatKey(string $key): string;", "public function __toString()\n {\n return sprintf('%01.4f, %01.4f, %01.4f, %01.4f', $this->cyan, $this->magenta, $this->yellow, $this->key);\n }", "protected function format_key($key)\n {\n }", "public function format(string $value): string;", "private function formatContact($key, $array) {\n return sprintf($this->format, $array['last_name'], $array['first_name'],\n $array['phone'], $key);\n }", "function format($value);", "public function format($value, $key, $raw = FALSE) {\n if ($raw) return $value;\n $db = $this->db;\n $value = $this->parmConvert($key, $value);\n if ($db) {\n if ($value==='' || $value ===NULL || $value === array()) {\n $value = 'NULL';\n }\n elseif (is_int($value)) {\n $value = (int)$value;\n $value = (string)$value;\n }\n elseif (is_float($value)) {\n $value = (float)$value;\n $value = (string)$value;\n }\n elseif (is_array($value)) {\n if ($value == array()) {\n $value = 'NULL';\n }\n else {\n // Build a array of values string\n $i=0;\n $val ='';\n foreach ($value as $v) {\n $i++;\n if ($i!=1) {\n $val .= ',';\n }\n $val .= $this->quote($v);\n }\n $value = $val;\n }\n }\n else $value = $this->quote($value);\n }\n return (string)$value;\n }", "public function getFormattedValue($key, $value) {\n\n if ($key == 'ts_created') {\n if ($value) {\n $value = $this->dtFormat($value, 'U', 'yyyy-MM-dd');\n } else {\n $value = time();\n }\n }\n if ($key == 'actual') {\n if (!$value) {\n $value = 0;\n }\n }\n return $value;\n }", "static function fmt($val){\r\n if (is_array($val)) {\r\n $buf = array();\r\n foreach ($val as $k=>$v) {\r\n $buf[] = self::fmt($k) . '=>' . self::fmt($v);\r\n }\r\n return 'array(' . implode(', ', $buf) . ')';\r\n }\r\n if (is_string($val)) return self::quote($val);\r\n if (is_null($val)) return 'NULL';\r\n if (true===$val) return 'TRUE';\r\n if (false===$val) return 'FALSE';\r\n try {\r\n return strval($val);\r\n }\r\n catch (Exception $e){}\r\n ob_start();\r\n print_r($val);\r\n $val = ob_get_contents();\r\n ob_end_clean();\r\n return $val;\r\n }", "public function makeString($array)\r\n {\r\n $outval = '';\r\n foreach ($array as $key => $value) {\r\n if(is_array($value)) {\r\n $outval .= !is_numeric($key) ? \"$key\" : false;\r\n $outval .= $this->makestring($value);\r\n } else {\r\n $outval .= (string) $key .\": \".$value .\"\\n\";\r\n }\r\n }\r\n\r\n return $outval;\r\n }", "public function format(): string;", "private function formatKey(string $key): string\n\t{\n\t\treturn str_replace('_', '-', strtolower($key));\n\t}", "static public function format ($key, $transformations, $group = NULL, $culture = NULL, $driver = NULL) {\n $phrase = self::getPhrase($key, $group, $culture, $driver);\n return vsprintf($phrase, $transformations);\n }", "static public function quoteKey($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"`\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"`\";\n }", "public function __get($key)\n\t{\n\t\treturn t($key);\n\t}", "protected function _attribute($key, $value, array $options = array()) {\n\t$defaults = array('escape' => true, 'format' => '%s=\"%s\"');\n\t$options += $defaults;\n\n\tif (in_array($key, $this->_minimized)) {\n\t $isMini = ($value == 1 || $value === true || $value == $key);\n\t if (!($value = $isMini ? $key : $value)) {\n\t\treturn null;\n\t }\n\t}\n\n\t$value = (string) $value;\n\n\tif ($options['escape']) {\n\t return sprintf($options['format'], $this->escape($key), $this->escape($value));\n\t}\n\treturn sprintf($options['format'], $key, $value);\n }", "public function format()\n {\n $formattedString = join('_', $this->toLower());\n if (strpos($formattedString, '_') === 0) {\n $formattedString = substr($formattedString, 1);\n }\n\n return $formattedString;\n }", "function Array2Str($kvsep, $entrysep, $a){\n $str = \"\";\n foreach ($a as $k=>$v){\n $str .= \"{$k}{$kvsep}{$v}{$entrysep}\";\n }\n return $str;\n}", "public function format()\n {\n return sprintf('%s %s %s', $this->x(), $this->y(), $this->z());\n }", "function c2($k, $v ) {\n global $cfg;\n $cfg[] = ($v == '' || strstr($v, ' '))\n ? sprintf('%-15s \"%s\"', $k, $v)\n : sprintf('%-15s %s', $k, $v);\n}", "private function printKey($k, $keysMaxLen, $assoc) {\n\t\t\t$plus = $assoc ? 2 : 0;\n\t\t\t\n\t\t\tif (is_string($k)) {\n\t\t\t\t\n\t\t\t\t$k = \"\\\"{$k}\\\"\";\n\t\t\t\t\n\t\t\t\tif ($this->doAlignKeys) {\n\t\t\t\t\t$k = str_pad($k, $keysMaxLen+$plus);\n\t\t\t\t\t$k = str_replace(' ', '&nbsp;', $k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn \"<span style='color: #8b0000'>{$k}</span>\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif ($this->doAlignKeys) {\n\t\t\t\t\t$k = str_pad(strval($k), $keysMaxLen+$plus);\n\t\t\t\t\t$k = str_replace(' ', '&nbsp;', $k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn \"<span style='color: #8b0000'>{$k}</span>\";\n\t\t\t}\n\t\t}", "private function formatKey($key)\n {\n $key = ucwords(strtolower($key));\n $key = str_replace(' ', '', $key);\n return $key;\n }", "abstract function format();", "public function __toString() {\n\t\t$out = '';\n\t\tforeach($this as $key => $value) {\n\t\t\t$out .= \"\\n\\n$key=$value\";\t\n\t\t}\n\t\t$out = trim($out); \n\t\treturn $out; \n\t}", "protected function objectivateKeyValue(string $key, $value, ?string $qt = null): string\n\t{\n\t\t$str = '';\n\t\t$str .= '{' . $key . ':' . $value . '}';\n\n\t\treturn $str;\n\t}", "public function __toString() {\n $params = [];\n $str = '';\n foreach ($this->data as $x => $row) {\n $str .= '[ ';\n foreach ($row as $y => $value) {\n $str .= \"%s \";\n $params[] = $value;\n }\n $str .= \"]\\n\";\n }\n return vsprintf($str, $params);\n }", "public function toString()\n {\n return sprintf('%s: %s', $this->getFieldName(), $this->getFieldValue());\n }", "protected function formatCacheKey($key)\n {\n return 'SierraRest-' . md5($this->config['Catalog']['host'] . \"|$key\");\n }", "protected function assocToString($array, $keyValueSeparator = ' - ', $pairSeparator = '; ')\n {\n if (! is_array($array)) {\n return print_r($array, true);\n }\n\n foreach ($array as $key => &$value) {\n $value = $key . $keyValueSeparator . $value;\n }\n return implode($pairSeparator, $array);\n }", "public function getKVFormat()\n {\n return $this->getMessage(self::FORMAT_KV);\n }", "function FormatString($symbol)\n{\n\t$symbolString = \"\";\n\tif(is_array($symbol))\n\t{\n\t\t$len = count($symbol);\n\t\t$i=0;\n\t\tforeach ($symbol as $value) {\n\t\t\t$symbolString .= $value;\n\t\t\tif($len-$i != 1)\n\t\t\t\t$symbolString .= \",\";\n\t\t\t$i++;\n\t\t}\n\t}\n\telse\n\t\treturn $symbol;\n\treturn $symbolString;\n}", "private function serializeVariable($key, $value)\n {\n return sprintf('Variable: %s=%s', $key, $value);\n }", "function t($key='', $decorate=TRUE)\n {\n global $aLanguage;\n\n if (empty($key)) return '';\n if (@array_key_exists($key, $aLanguage)) return $aLanguage[$key];\n\n if ($decorate) return '<span style=\"color: #f00; text-decoration: blink;\" title=\"['.$key.'] - not exist\">'. $key.'</span>';\n else return $key;\n }", "public function formatValue(string $value, bool $forceQuotes = false): string;", "public function getString()\n {\n return $this->format('%s%s%s');\n }", "public function format($key, $value)\n\t{\n\t\t$model = $this->revisionable_type;\n\t\t$model = new $model;\n\t\t$revisionFormattedFields = $model->getRevisionFormattedFields();\n\n\t\tif(isset($revisionFormattedFields[$key]))\n\t\t{\n\t\t\treturn FieldFormatter::format($key, $value, $revisionFormattedFields);\n\t\t}\n\n\t\treturn $value;\n\t}", "private static function buildPair(array $pair): string\n {\n if ([0, 1] !== array_keys($pair)) {\n throw new InvalidQueryPair('A pair must be a sequential array starting at `0` and containing two elements.');\n }\n\n list($name, $value) = $pair;\n if (!is_scalar($name)) {\n throw new InvalidQueryPair(sprintf('A pair key must be a scalar value `%s` given.', gettype($name)));\n }\n\n if (is_bool($name)) {\n $name = (int) $name;\n }\n\n if (is_string($name) && preg_match(self::$regexpKey, $name)) {\n $name = preg_replace_callback(self::$regexpKey, [QueryBuilder::class, 'encodeMatches'], $name);\n }\n\n if (is_string($value)) {\n if (!preg_match(self::$regexpValue, $value)) {\n return $name.'='.$value;\n }\n\n return $name.'='.preg_replace_callback(self::$regexpValue, [QueryBuilder::class, 'encodeMatches'], $value);\n }\n\n if (is_numeric($value)) {\n return $name.'='.$value;\n }\n\n if (is_bool($value)) {\n return $name.'='.(int) $value;\n }\n\n if (null === $value) {\n return $name;\n }\n\n throw new InvalidQueryPair(sprintf('A pair value must be a scalar value or the null value, `%s` given.', gettype($value)));\n }", "public function db_update_string()\n {\n $key = $this->key;\n $value = $this->value;\n $string = $key . \" = \\\"\" . addslashes($value) . \"\\\",\";\n return $string;\n }", "public function __toString()\n {\n $str = \"\";\n if(is_array($this->params)){\n foreach($this->params as $key => $value){\n $str .= \"$key=$value\\n\";\n }\n }\n\n return $str;\n }", "public function __toString() {\n\t\treturn sprintf(\"%s: %s\", $this->getName(), $this->getValue());\n\t}", "public static function formatValue($val)\n {\n if (is_object($val)) {\n return ObjectFormatter::formatRef($val);\n } elseif (is_array($val)) {\n return ArrayFormatter::formatRef($val);\n } elseif (is_resource($val)) {\n return sprintf('<%s>', print_r($val, true));\n } else {\n return json_encode($val);\n }\n }", "public function format(Entry $entry) {\n $formatString = $this->getOption('format');\n\n preg_match_all('/%([^%]+)%/', $formatString, $matches);\n\n foreach ($matches[1] as $option) {\n $formattedOption = $this->getFormattedOption($entry, $option);\n $formatString = preg_replace('/%' . preg_quote($option, '/') . '%/', $formattedOption, $formatString);\n }\n\n return $formatString;\n }", "public function __toString()\n {\n $textLabels = $this->_getTextLabels();\n $out = array();\n\n foreach ($this->_attr as $attr => $value) {\n if (isset($textLabels[$attr])) {\n if (in_array($attr, array(\n self::EXPIRE_MONTH,\n self::EXPIRE_YEAR,\n self::NUMBER\n ))) {\n $out[] = sprintf('%15s %s (Encrypted: %s)',\n $textLabels[$attr] . ':',\n $value,\n substr($this->get($attr, true), 0, 8) . '...'\n );\n } else {\n $out[] = sprintf('%15s %s', $textLabels[$attr] . ':', $value);\n }\n }\n }\n\n return implode(\"\\n\", $out) . \"\\n\";\n }", "function erp_print_key_value( $label, $value, $sep = ' : ', $type = 'text' ) {\n if ( empty( $value ) ) {\n $value = '&mdash;';\n\n } else {\n switch ( $type ) {\n case 'email':\n case 'url':\n case 'phone':\n $value = erp_get_clickable( $type, $value );\n break;\n }\n }\n\n printf(\n '<label>%s</label> <span class=\"sep\">%s</span> <span class=\"value\">%s</span>',\n wp_kses_post( $label ),\n esc_html( $sep ),\n wp_kses_post( $value )\n );\n}", "function eligibility_format() {\n\t$print = \"\";\n\t$prefix = \"\";\n\t$eligibility = get_field('eligibility');\n\tif (is_array($eligibility)) {\n\t\tif (!get_field('other') == \"\") {\n\t\t\t$eligibility[] .= get_field('other');\n\t\t}\n\t\tforeach ($eligibility as $value) {\n\n\t\t\t$print .= $prefix . $value;\n\t\t\t$prefix = ', ';\n\t\t}\n\t} else {\n\t\t$print = get_field('eligibility');\n\t}\n\treturn $print;\n}", "protected function getAttributesString()\n {\n $result = '';\n ksort($this->props);\n foreach ($this->props as $k => $v) {\n if (substr($k, 0, 1) !== '_') {\n if ($v === true) {\n $result .= $k . ' ';\n } else {\n $result .= $k . '=\"' . $this->escapeAttr($v) . '\" ';\n }\n }\n }\n if ($result) {\n $result = ' ' . trim($result);\n }\n\n return $result;\n }", "function display_format($var) {\n\tswitch($var) {\n\n\tcase \"sticker\":\t\treturn \"Sticker #\";\n\tcase \"type\":\t\treturn \"Type\";\n\tcase \"description\":\treturn \"Description\";\n\tcase \"serial\":\t\treturn \"Serial\";\n\tcase \"purchasedate\":\treturn \"Purchase Date\";\n\tcase \"temp_assignment\":\treturn \"Assignment\";\n\tcase \"computernumber\":\treturn \"Number\";\n\tcase \"videocard\":\treturn \"Video Card\";\n\tcase \"videobus\":\treturn \"Bus Type\";\n\tcase \"cpu\":\t\treturn \"CPU Type\";\n\tcase \"harddrive\":\treturn \"Hard Drive\";\n\tcase \"memory\":\t\treturn \"Memory\";\n\tcase \"servicetag\":\treturn \"Dell Tag\";\n\tcase \"batch\":\t\treturn \"Batch\";\n\tcase \"expresscode\":\treturn \"Express Code\";\n\tcase \"warranty\":\treturn \"Warranty\";\n\tcase \"mayadongle\":\treturn \"Maya Dongle\";\n\tcase \"firstname\":\treturn \"First Name\";\n\tcase \"lastname\":\treturn \"Last Name\";\n\tcase \"department\":\treturn \"Department\";\n\tcase \"extension\":\treturn \"Extension\";\n\tcase \"status\":\t\treturn \"Status\";\n\tcase \"user_status\":\treturn \"Status\";\n\tcase \"active\":\t\treturn \"Active\";\n\t\t\n\tdefault: return \"NOT FORMATTED: $var\";\n\t}\n}", "private static function format($name, $value)\n {\n return $value ?: ucwords(str_replace('_', ' ', $name));\n }", "protected function makeKeyString($key): string {\n return \"\";\n }", "function implode_assoc(array $array, $betweenKeyAndValue, $beforeItems='', $afterItems='') {\n\t$result = '';\n\tforeach ($array as $k=>$v) {\n\t\t$result .= $beforeItems.$k.$betweenKeyAndValue.$v.$afterItems;\n\t}\n\treturn $result;\n}", "public function get(): string\n {\n $attributes = [];\n foreach ($this->attributes as $k => $v) {\n if (is_string($v)) {\n $attributes[] = \"$k:\\\"$v\\\"\";\n } elseif ($v instanceof Closure) {\n $attributes[] = \"$k:\".$v();\n } elseif (is_bool($v)) {\n $attributes[] = \"$k:\".($v ? 'true' : 'false');\n } else {\n $attributes[] = \"$k:\".intval($v);\n }\n }\n\n return '{'.implode(',', $attributes).'}';\n }", "public function asString(): string\n {\n $hours = floor($this->value / 3600);\n $minutes = floor($this->value / 60) - ($hours * 60);\n $seconds = $this->value - ($minutes * 60) - ($hours * 3600);\n\n $hours = ($hours < 10) ? \"0{$hours}\" : $hours;\n $minutes = ($minutes < 10) ? \"0{$minutes}\" : $minutes;\n $seconds = ($seconds < 10) ? \"0{$seconds}\" : $seconds;\n\n return \"{$hours}:{$minutes}:{$seconds}\";\n }", "public function render(): string\n\t{\n\t\treturn implode(' ', array_filter([\n\n\t\t\t$this->formatted_type,\n\t\t\t$this->formatted_attributes,\n\t\t\t$this->formatted_charset,\n\t\t\t$this->formatted_null,\n\t\t\t$this->formatted_auto_increment,\n\t\t\t$this->formatted_default,\n\t\t\t$this->formatted_comment\n\n\t\t]));\n\t}", "public function makeKeyPretty($activeKey)\n\t{\n\t\t$ak = NData::base64UrlEncode($activeKey);\n\t\t$compareKeyChars = array(1,5,2,7,3,9,11);\n\t\t$key = '';\n\t\tforeach($compareKeyChars as $index)\n\t\t\t$key .= substr ($ak, $index, 1);\n\t\treturn $key;\n\t}", "protected function formatKey($token, $value, $pattern) {\n return str_replace($token, $value, $pattern);\n }", "private function formatArrayToString(array $map): string\n\t{\n\t\t$resultString = '';\n\t\tforeach ($map as $key => $value) {\n\t\t\ttry {\n\t\t\t\t$resultString .= \" [$key] => \";\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t$resultString .= $this->formatArrayToString($value);\n\t\t\t\t} else {\n\t\t\t\t\t$resultString .= strip_tags($value, '<b><i><pre>');\n\t\t\t\t}\n\t\t\t} catch (Throwable $exception) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn $resultString;\n\t}", "function debugPair($key,$value){\n debugLog(\"<b>$key</b> -> $value\");\n}", "public function format()\n {\n $separator = $this->object->config('separator');\n $decimals = $this->object->config('decimals');\n $point = $this->object->config('point');\n\n return number_format($this->object->getValue(), $decimals, $point, str_replace('&#160;', ' ', $separator));\n }", "function format($cols,$name,$value='',$unit=''){\n $vlen=strlen($value.$unit)+1;\n $format='%-'.($cols-$vlen).\".\".($cols-$vlen).\"s\".'%'.($vlen).\".\".($vlen).\"s\"; //name & value+unit\n return sprintf($format,$name,$value.$unit);\n}", "public function asText(){\n $id_length = 2;\n $time_length = 8;\n $times = [];\n foreach($this->times as $id => $time){\n $id_length = max($id_length,strlen($id));\n $time_length = max($time_length,strlen($times[$id] = number_format($time,$this->decimals)));\n }\n $text =\n str_pad('ID',$id_length) . ' | ' . str_pad('time [s]',$time_length,' ',STR_PAD_LEFT) . \"\\n\" .\n str_repeat('-',$id_length) . '-+-' . str_repeat('-',$time_length);\n foreach($this->times as $id => $time)\n $text .= \"\\n\" . str_pad($id,$id_length) . ' | ' . str_pad($times[$id],$time_length,' ',STR_PAD_LEFT);\n return $text;\n }", "public function __toString() {\n $fields = $this->fields();\n return implode(', ', array_keys($fields));\n }", "public function toFormat(){\n $toFormat = '';\n foreach ($this->to() as $to) {\n $toFormat .= $to.', ';\n }\n return $toFormat;\n }", "public function toString() {\n return \"userId : \" . $this->userId . \": item : \" . $this->item . \" : value : \" . $this->value;\n }", "private function parameterValueToString($value)\n {\n switch (true) {\n case $value === null:\n $result = 'null';\n break;\n case is_bool($value):\n $result = $value ? 'true' : 'false';\n break;\n case is_array($value):\n $result = [];\n foreach ($value as $k => $v) {\n $result[] = $k . '=>' . $this->parameterValueToString($v);\n }\n\n $result = 'array(' . implode(',', $result) . ')';\n break;\n default:\n $result = '';\n }\n\n return $result;\n }", "function makeString() {\n\t\t// Returns a string with the properties value. Uppercase the first character of each word\n\t\treturn ucwords($this->id. ' - '. $this->category). '<br />';\n\t }", "private function formatArrayValues(array $data): string\n {\n return implode(\n ', ',\n array_map(\n function ($value) {\n return '\"'.$value.'\"';\n },\n $data\n )\n );\n }", "public function format(Money $money): string;", "private function formatArgs(array $args): string\n {\n $result = [];\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf('object(%s)', $item[1]);\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf('array(%s)', \\is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('null' === $item[0]) {\n $formattedValue = 'null';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = strtolower(var_export($item[1], true));\n } elseif ('resource' === $item[0]) {\n $formattedValue = 'resource';\n } else {\n $formattedValue = str_replace(\"\\n\", '', $this->escapeXml(var_export($item[1], true)));\n }\n\n $result[] = \\is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $this->escapeXml($key), $formattedValue);\n }\n\n return implode(', ', $result);\n }", "public function formatAsString()\n {\n return $this->formatTimeAsString(\n $this->value,\n $this->nanoSeconds\n );\n }", "public function toString(): string\n {\n return implode(' ', $this->toFields());\n }", "function formatValue( $field, $value ) {\n\t\t/** @var $row object */\n\t\t$row = $this->mCurrentRow;\n\t\t$title = Title::newFromId( $row->id );\n\t\t$pageLink = Linker::link( $title );\n\n\t\tswitch ( $field ) {\n\t\t\tcase 'id':\n\t\t\t\t$formatted = $pageLink;\n\t\t\t\tbreak;\n\t\t\tcase 'rev_id':\n\t\t\t\tif ( $value === null ) {\n\t\t\t\t\t$formatted = 'לא אושר אף פעם';\n\t\t\t\t} else {\n\t\t\t\t\t$formatted = ( $row->rev_id === $row->latest_id ) ? 'מאושר'\n\t\t\t\t\t\t: 'לא מאושר ' . $this->getDiffLink( $title, $row->latest_id, $row->rev_id );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'ap_review_timestamp':\n\t\t\t\t$formatted = ( $row->rev_id === $row->latest_id )\n\t\t\t\t\t? $formatted = $this->getLanguage()->userTimeAndDate( $value, $this->getUser() )\n\t\t\t\t\t: '-';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$formatted = $value;\n\t\t}\n\n\t\treturn $formatted;\n\t}", "public function toString()\n {\n $data = $this->getProperties();\n $out = get_class($this).' ('.CRLF;\n foreach ($data as $key => $value) {\n $type = gettype($value);\n $value = is_bool($value) ? (int) $value : $value;\n $value = is_string($value) ? '\"'.$value.'\"' : $value;\n $value = is_object($value) ? implode(CRLF.TAB, explode(CRLF, (string) $value)) : $value;\n $value = is_array($value) ? print_r($value, true) : $value;\n $out .= TAB.$key.' ('.$type.')';\n $out .= ': '.$value.CRLF;\n }\n\n return $out.');';\n }", "public function __toString()\n\t{\n\t\t$output = '';\n\n\t\tforeach (array_keys($this->data) as $key) {\n\t\t\tif (is_array($this->data[$key])) {\n\t\t\t\t$output .= implode(PHP_EOL, $this->data[$key]) . PHP_EOL;\n\t\t\t} else {\n\t\t\t\t$output .= $this->data[$key] . PHP_EOL;\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "public function __toString()\n {\n if ($this->hh <= 9) {\n $retorno = \"0\" . $this->hh . \":\";\n } else {\n $retorno = $this->hh . \":\";\n }\n\n if ($this->mm <= 9) {\n $retorno .= \"0\" . $this->mm . \":\";\n } else {\n $retorno .= $this->mm . \":\";\n }\n\n if ($this->ss <= 9) {\n $retorno .= \"0\" . $this->ss;\n } else {\n $retorno .= $this->ss;\n }\n return $retorno;\n }", "private function Format($args){\n $message = array();\n if( $args ){\n foreach($args as $a){\n $argValue = '';\n if( $a['name'] ){\n $argValue += $a['name']+':';\n }\n if( is_object($a['value']) ){\n $argValue += $a['value']->toCSS();\n }else{\n $argValue += '???';\n }\n $message[] = $argValue;\n }\n }\n return implode(', ',$message);\n }", "protected function formatParams(\\Closure $value)\n {\n $r = new \\ReflectionFunction($value);\n $params = array_map(array($this, 'formatParam'), $r->getParameters());\n\n return implode(', ', $params);\n }", "private function output(string $parameter)\n {\n $value = $this->container->get($parameter);\n $format = $this->formats[gettype($value)];\n\n if ($this->isCollectionAlias($parameter)) {\n $format = $this->formats['collection'];\n }\n\n if (is_bool($value)) {\n $value = $value ? 'true' : 'false';\n }\n\n return sprintf($format, $value);\n }", "private function arrayAssocToString($array){\n\t\t$i = 0;\n\t\t$string = '';\n\t\tforeach ($array as $key => $value) {\n\t\t\tif ($i > 0) $string .= ', ';\n\t\t\tif (preg_match('#', $value)){\n\t\t\t\t$string .= str_replace('#', '', $value);\n\t\t\t}else{\n\t\t\t\t$string .= $key .\"='\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $string;\n\t}", "protected function get_formatted_index(): string\n\t{\n\t\treturn \\implode(' ', \\array_filter([\n\n\t\t\t$this->primary ? 'PRIMARY KEY' : '',\n\t\t\t$this->unique ? 'UNIQUE' : ''\n\n\t\t]));\n\t}", "public function formatString($value)\n {\n $return = \"null\";\n\n if ($value && $this->isConnected()) {\n $return = \"'\" . $value . \"'\";\n }\n\n return $return;\n }", "public function format_search_key($skey=\"\", $replace=\" \")\r\n\t{\t\r\n\t\t$uf_arr = explode(\" \", $skey);\r\n\r\n\t\tforeach($uf_arr as $k=>$v)\r\n\t\t{\r\n\t\t\tif($v != \"\")\r\n\t\t\t{\r\n\t\t\t\t$v = trim(preg_replace('/[.,`\\[\\]\\(\\)\\\"\\';\\/\\\\\\\\?*\\+]/', \"$replace\", $v));\r\n\t\t\t\t$v = trim(preg_replace('/([0-9]{1,})([a-zA-Z]{1,})/', \"\\\\1$replace\\\\2\", $v));\r\n\t\t\t\t$v = trim(preg_replace('/([a-zA-Z]{1,})([0-9]{1,})/', \"\\\\1$replace\\\\2\", $v));\r\n\t\t\t\tif((trim(str_replace('.?', '', $v))) != \"\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$f_arr[] = $v;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tunset($uf_arr[$k]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$sk['unformated'] = $uf_arr;\r\n\t\t$sk['formated'] = $f_arr;\r\n\t\t\r\n\t\treturn $sk;\r\n\t}", "protected function formatArgs(array $args): string\n {\n $result = array();\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('string' === $item[0]) {\n $formattedValue = sprintf(\"'%s'\", $this->escapeHtml($item[1]));\n } elseif ('null' === $item[0]) {\n $formattedValue = '<em>null</em>';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = '<em>'.strtolower(var_export($item[1], true)).'</em>';\n } elseif ('resource' === $item[0]) {\n $formattedValue = '<em>resource</em>';\n } else {\n $formattedValue = str_replace(\"\\n\", '', var_export($this->escapeHtml((string) $item[1]), true));\n }\n\n $result[] = is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $key, $formattedValue);\n }\n\n return implode(', ', $result);\n }", "function echoKeyValuePair($key, $value)\r\n{\r\n if (is_array($value))\r\n {\r\n foreach ($value as $subItem)\r\n {\r\n echoKeyValuePair($key, $subItem);\r\n }\r\n }\r\n \r\n else\r\n { \r\n echo $key.\" => \".$value.PHP_EOL;\r\n }\r\n}", "private function prepareValuesRow(): string\n {\n $values = [];\n foreach ($this->storage as $key => $value) {\n $values[] = \"('{$key}', '{$value}')\";\n }\n\n return implode(', ', $values);\n }", "function assocArgsToStr($assoc_args) {\n $return = '';\n\n foreach ($assoc_args as $key => $value) {\n if ($value === true) {\n $return .= \" --$key\";\n } else {\n $return .= \" --$key=\" . escapeshellarg($value);\n }\n }\n\n return $return;\n}", "public function toString() {\n return 'is similar to ' . $this->exporter->export($this->value);\n }", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n $context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.ExternalAccount: ' . implode(' ', $context) . ' ]';\n }", "function toDebugStr()\n {\n $str = \"\";\n foreach (array_keys(get_class_vars(get_class($this))) as $k) {\n if ($k != \"con\") {\n $str = $str . \"$k [\" . $this->$k . \"]\\n\";\n }\n\n }\n return $str;\n }", "public function toString()\n\t{\n\t\t$str = \"\";\n\t\tforeach($this->headers as $header)\n\t\t{\n\t\t\tforeach ($header[\"values\"] as $value)\n\t\t\t{\n\t\t\t\t$str .= $header[\"name\"] . \": \" . $value . \"\\r\\n\";\n\t\t\t}\n\t\t}\n\n\t\treturn $str;\n\t}", "public function __toString() {\n\t\ttry {\n\t\t\treturn array_flip($this->getConstants())[$this->value];\n\t\t\t// when the value is not in the constants\n\t\t} catch(Exception $e) {\n\t\t\treturn \"Invalid value \".$this->value;\n\t\t}\n\t}", "public function getFormattedCriteriaValue($value) {\n return $value;\n }", "public function __toString()\n\t{\n\t\tif (is_array($this->params[self::PARAM_VALUE]))\n\t\t{\n\t\t\t$param_value = ' ('.join(\",\", $this->params[self::PARAM_VALUE]).')';\n\t\t}\n\t\telseif ($this->params[self::PARAM_VALUE])\n\t\t{\n\t\t\t$param_value = ' ('.$this->params[self::PARAM_VALUE].')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param_value = '';\n\t\t}\n\n\t\t$string = \"Rule: \" . $this->event_name . \" [\" . $this->name . $param_value . \"]\\n\";\n\t\treturn $string;\n\t}", "public function getFormattedString()\r\n {\r\n $string = (string) $this->code;\r\n\r\n if (null !== $this->message) {\r\n $string = $string . ' ' . $this->message;\r\n }\r\n\r\n return $string;\r\n }", "public function getToString()\n {\n $get = $this->allGet();\n $formatted = array();\n foreach($get as $name => $val) {\n $formatted[] = \"$name=$val\";\n }\n\n return implode('&', $formatted);\n }", "public function toString()\n {\n return vsprintf(\n '%08s-%04s-%04s-%02s%02s-%012s',\n $this->fields\n );\n }", "protected function toString($params)\n {\n $temp = array();\n foreach ((array)$params as $key => $val)\n {\n $temp[] = $key;\n $temp[] = $val;\n }\n\n return implode('/', $temp);\n }", "function format_reservations( $reservation_arr ) {\r\n\t\t\r\n\t\t$reservation_string = '';\r\n\t\tforeach( $reservation_arr as $reservation ) {\r\n\t\t\t\r\n\t\t\t$reservation_string .= $reservation['extras']['user'] . ( $reservation['extras']['level'] == 'member' ? '' : ', level=' . $reservation['extras']['level'] );\r\n\t\t\t\r\n\t\t\tforeach($reservation['extras'] as $key => $value) {\r\n\t\t\t\t\r\n\t\t\t\t// Skip \"user\", \"level\", and any other attributes with this filter\r\n\t\t\t\tif( in_array( $key, apply_filters( 'bp_group_reservation_skipped_extras', array( 'user', 'level' ) ) ) )\tcontinue;\r\n\t\t\t\t$reservation_string .= ', ' . $key . '=' . $value;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$reservation_string .= \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn $reservation_string;\r\n\t\t\r\n\t}", "protected function _getTitleFormat($key)\n\t{\n\t\treturn trim($this->getData('title_' . $key));\n\t}", "public function FormatParametersForHeader($params) {\n $parts = array();\n foreach($params as $key => $value) {\n $parts[] = sprintf('%s=\"%s\"', $key, urlencode($value));\n }\n return implode(', ', $parts);\n }", "private function _get_value_line($p_header_val): string {\n if (is_string($p_header_val)) {\n return $p_header_val;\n }\n if (!is_array($p_header_val)) {\n return '';\n }\n\n $options = [];\n\n foreach ($p_header_val as $key => $value) {\n if (is_string($key) && !is_array($value)) {\n $options[] = $key.'='.$value;\n } elseif (is_array($value)) {\n $key = key($value);\n $options[] = $key.'='.$value[$key];\n } elseif (is_numeric($key)) {\n $options[] = $value;\n }\n }\n\n return implode(', ', $options);\n }" ]
[ "0.71842706", "0.7097965", "0.6583337", "0.6288014", "0.6182426", "0.61046255", "0.6099138", "0.6026585", "0.60127693", "0.5998821", "0.5954709", "0.59534186", "0.59448034", "0.5806678", "0.57813424", "0.5775526", "0.5774439", "0.57735425", "0.57613176", "0.5754763", "0.57199246", "0.57180816", "0.5710416", "0.56695145", "0.56608504", "0.5658859", "0.5650034", "0.5635841", "0.56216943", "0.5616661", "0.5615829", "0.55965716", "0.5583718", "0.5580329", "0.55723375", "0.55513555", "0.5546559", "0.552779", "0.55191976", "0.5512598", "0.5511529", "0.5505451", "0.54976505", "0.54750115", "0.5471713", "0.5443832", "0.54405814", "0.5438595", "0.54245085", "0.5423001", "0.5419458", "0.54085505", "0.5407961", "0.5400623", "0.53935224", "0.53925407", "0.53860027", "0.5384379", "0.53683025", "0.5366606", "0.53640556", "0.5359135", "0.53581417", "0.5346668", "0.53461033", "0.53403693", "0.53360057", "0.53235507", "0.5315682", "0.5306338", "0.5304313", "0.5295412", "0.52943987", "0.52898264", "0.52864105", "0.5275402", "0.5264932", "0.5251763", "0.5250865", "0.52477884", "0.52458936", "0.52440685", "0.52304375", "0.5228593", "0.5215362", "0.5208202", "0.52051383", "0.5201067", "0.51989114", "0.5192497", "0.51904917", "0.51889235", "0.51763946", "0.51718783", "0.5170808", "0.5170219", "0.5169281", "0.5168981", "0.5167087", "0.5158876", "0.51579326" ]
0.0
-1
Return a formatted strinf for the given array value.
private function arrayValue($val): string { return ! is_array($val) ? (string) new Printable($val, $this->callable, $this->strlim) : '[...]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function fmt($val){\r\n if (is_array($val)) {\r\n $buf = array();\r\n foreach ($val as $k=>$v) {\r\n $buf[] = self::fmt($k) . '=>' . self::fmt($v);\r\n }\r\n return 'array(' . implode(', ', $buf) . ')';\r\n }\r\n if (is_string($val)) return self::quote($val);\r\n if (is_null($val)) return 'NULL';\r\n if (true===$val) return 'TRUE';\r\n if (false===$val) return 'FALSE';\r\n try {\r\n return strval($val);\r\n }\r\n catch (Exception $e){}\r\n ob_start();\r\n print_r($val);\r\n $val = ob_get_contents();\r\n ob_end_clean();\r\n return $val;\r\n }", "private function ArrayToString ($array)\n {\n $str = null;\n if (is_array($array))\n foreach ($array as $valore) {\n if(is_string($valore))\n $str = $str.\"-\".$valore;\n else{$str=$str.\"\\n\".$valore->__toString();}\n }\n else\n $str = $array;\n return $str;\n }", "protected abstract function formatArrayValue(array $value);", "public function makeString($array)\r\n {\r\n $outval = '';\r\n foreach ($array as $key => $value) {\r\n if(is_array($value)) {\r\n $outval .= !is_numeric($key) ? \"$key\" : false;\r\n $outval .= $this->makestring($value);\r\n } else {\r\n $outval .= (string) $key .\": \".$value .\"\\n\";\r\n }\r\n }\r\n\r\n return $outval;\r\n }", "private function formatArrayValues(array $data): string\n {\n return implode(\n ', ',\n array_map(\n function ($value) {\n return '\"'.$value.'\"';\n },\n $data\n )\n );\n }", "public function format_array_to_text($array){\n return implode(\"\\n\", $array);\n }", "public function array2str($value): string\n {\n if (\\is_string($value)) {\n return $value;\n }\n\n $new_array = [];\n\n foreach ($value as $item) {\n $item = str_replace('%', '%25', $item);\n $item = str_replace(',', '%2C', $item);\n $new_array[] = $item;\n }\n\n return implode(',', $new_array);\n }", "Function ArrayToString($array){\n\t\t$array=array_values($array);\n\t\t$String=null;\n\t\t\n\t\tfor($x=0;$x<sizeof($array);$x++){\t\t\t\n\t\t\tif(Strlen($array[$x])>0){\n\t\t\t\tif(Strlen($String)>0){\n\t\t\t\t\t$String=$String.','.$array[$x];\n\t\t\t\t}else{\n\t\t\t\t $String=$array[$x];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t return $String;\n\t}", "public function toString(array $data): string;", "function stringify_array ($array_obj, $value_separator)\n{\n\tif(is_array($array_obj))\n\t{\n\t\tforeach($array_obj as $val)\n\t\t{\n\t\t\tif(is_array($val))\n\t\t\t{\n\t\t\t\t$value_separator .= stringify_array($val, $value_separator);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value_separator .= $val. \"|\";\n\t\t\t}\n \t\n\t\t}\n\t\treturn $value_separator;\n\t}\n\telse\n\t{\n\t\treturn $value_separator = \"ERROR : $array_obj is not an array\";\n\t}\n}", "function array_to_string($array){\n $joined_string=\"\";\n for($count=0;$count<count($array);$count++){\n \n if($count!=count($array)-1){\n $joined_string.= $array[$count].'|';\n }\n else{\n $joined_string.=$array[$count];\n }\n }\n return $joined_string;\n }", "function _e_($value) {\n if (is_array($value)) {\n $value = sprintf('[%s]', implode(', ', $value));\n }\n echo \"$value\\n\";\n}", "protected function array_to_string($array) \n\t{\n\t\t$str = '';\n\t\tforeach ($array as $item) {\n\t\t\t$str .= $item . '\\n';\n\t\t}\n\n\t\treturn $str;\n\t}", "function makestring($array)\r\n {\r\n $outval = '';\r\n if (is_array($array)) {\r\n foreach($array as $key=>$value)\r\n {\r\n if(is_array($value))\r\n {\r\n $outval = makestring($value);\r\n }\r\n else\r\n {\r\n $outval = $value;\r\n }\r\n }\r\n}\r\n \r\n return $outval;\r\n }", "public function __toString() {\n $params = [];\n $str = '';\n foreach ($this->data as $x => $row) {\n $str .= '[ ';\n foreach ($row as $y => $value) {\n $str .= \"%s \";\n $params[] = $value;\n }\n $str .= \"]\\n\";\n }\n return vsprintf($str, $params);\n }", "function arrayToString($array) {\n\t\t$array_temp = array();\n\t\tfor($x=0;$x<sizeof($array);$x++) {\n\t\t\t$array_temp[$x] = \"'\".$array[$x].\"'\";\n\t\t}\n\t\t$string = \"(\".implode(\",\", $array_temp).\")\";\n\t\treturn $string;\n\t}", "protected function formatArray(array $values){\n $r = ''; foreach($values as $val) $r.= (empty($r)?'':',').$val;\n return $r;\n }", "function arrayToString($array)\n\t{\n\t\t$string = \"\";\n\t\tforeach($array as $row)\n\t\t{\n\t\t\tif(gettype($row) == \"array\")\n\t\t\t{\n\t\t\t\t$string .= arrayToString($row);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$string .= $row.\" \";\n\t\t\t}\n\t\t}\n\t\treturn $string;\n\t}", "private function arrayToString($array){\n\t\t$i = 0;\n\t\t$string = '';\n\t\tforeach ($array as $value) {\n\t\t\tif ($i > 0) $string .= ', ';\n\t\t\tif (preg_match('#', $value)){\n\t\t\t\t$string .= str_replace('#', '', $value);\n\t\t\t}else{\n\t\t\t\t$string .= \"'\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $string;\n\t}", "function format($value);", "protected function errorArrayToString($array) \n\t{\n\t\t$str = '';\n\t\tforeach ($array as $item) {\n\t\t\t$str .= $item . '\\n';\n\t\t}\n\n\t\treturn $str;\n\t}", "public function toString() {\n if (! $this->_value) {\n return '';\n }\n\n $s = array ();\n\n foreach ( $this->_visibleUnits as $unit ) {\n if (! is_array ( $unit ) || ! is_string ( $unit [0] )) {\n continue;\n }\n\n if ($this->_value / $unit [0] > 1) {\n $t = floor ( $this->_value / $unit [0] );\n $s [] = $t . ' ' . $unit [1];\n $this->_value -= $unit [0] * $t;\n }\n }\n\n return implode ( ' ', $s );\n }", "function format_array( $name, &$array2format ){\n $cnt = 0;\n $ret = '';\n\n if( count($array2format) === 0 ){\n //no values, create empty array to have a default in settings.conf\n return $name.'[0]=\"\"';\n }\n\n reset($array2format);\n foreach( $array2format as $val ){\n if( $val != '' ){\n $ret .= $name.\"[$cnt]='$val'\\n\";\n ++$cnt;\n }\n }\n\n $ret = trim($ret, \"\\n\");\n return $ret;\n }", "function sprintf_array($format, $arr)\n{\n return call_user_func_array('sprintf', array_merge((array)$format, $arr));\n}", "public static function printArray ($array)\r\n\t{\r\n\t\t# If the input is not an array, convert it\r\n\t\t$array = self::ensureArray ($array);\r\n\t\t\r\n\t\t# Loop through each item\r\n\t\t$hash = array ();\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif ($value === false) {$value = '0';}\r\n\t\t\t$hash[] = \"$key => $value\";\r\n\t\t}\r\n\t\t\r\n\t\t# Assemble the text as a single string\r\n\t\t$text = implode (\",\\n\", $hash);\r\n\t\t\r\n\t\t# Return the text\r\n\t\treturn $text;\r\n\t}", "function eligibility_format() {\n\t$print = \"\";\n\t$prefix = \"\";\n\t$eligibility = get_field('eligibility');\n\tif (is_array($eligibility)) {\n\t\tif (!get_field('other') == \"\") {\n\t\t\t$eligibility[] .= get_field('other');\n\t\t}\n\t\tforeach ($eligibility as $value) {\n\n\t\t\t$print .= $prefix . $value;\n\t\t\t$prefix = ', ';\n\t\t}\n\t} else {\n\t\t$print = get_field('eligibility');\n\t}\n\treturn $print;\n}", "private function arrayToString($array)\r\n {\r\n return var_export($array, true);\r\n }", "private function array(array $value): string\n {\n if ($this->callable && is_callable($value)) {\n $class = ! is_string($value[0])\n ? $this->classname($value[0])\n : $value[0];\n\n $method = $value[1];\n\n return sprintf('function %s::%s()', $class, $method);\n }\n\n $slice = array_slice($value, 0, $this->arrlim, true);\n\n $elems = $this->isAssociative($slice)\n ? array_map([$this, 'arrayPair'], array_keys($slice), $slice)\n : array_map([$this, 'arrayValue'], $slice);\n\n return vsprintf('[%s%s]', [\n implode(', ', $elems),\n count($value) > $this->arrlim ? ', ...' : '',\n ]);\n }", "private function formatArrayToString(array $map): string\n\t{\n\t\t$resultString = '';\n\t\tforeach ($map as $key => $value) {\n\t\t\ttry {\n\t\t\t\t$resultString .= \" [$key] => \";\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t$resultString .= $this->formatArrayToString($value);\n\t\t\t\t} else {\n\t\t\t\t\t$resultString .= strip_tags($value, '<b><i><pre>');\n\t\t\t\t}\n\t\t\t} catch (Throwable $exception) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn $resultString;\n\t}", "function array_tostring($array){\n\t$string = '';\n\tforeach($array as $value){\n\t\tif ($string != ''){\n\t\t\t$string .= ',';\n\t\t}\n\t\t$string .= $value;\n\t}\n\treturn $string;\n}", "private function array_to_string($arr)\n {\n $line = [];\n foreach ($arr as $v) {\n $line[] = is_array($v) ? self::array_to_string($v) : $this->sanitize($v);\n }\n return implode($line);\n }", "function array_to_string(array $array): string\n {\n return '[' . implode(', ', array_map(function ($v): string {\n if (is_array($v) || is_bool($v) || !is_stringable($v)) {\n throw new LogicException('Cannot convert array to string, some values are not stringable');\n }\n\n return '\\'' . $v . '\\'';\n }, $array)) . ']';\n }", "public static function arrayToString(array $arr) : string\n\t{\n\t\treturn implode('', array_map('strval', $arr));\n\t}", "function array_to_string($array)\n{\n $str = '';\n if($array)\n foreach($array as $word) {\n $str .= $seporator . addslashes($word);\n $seporator = ',';\n }\n return $str;\n}", "function FormatString($symbol)\n{\n\t$symbolString = \"\";\n\tif(is_array($symbol))\n\t{\n\t\t$len = count($symbol);\n\t\t$i=0;\n\t\tforeach ($symbol as $value) {\n\t\t\t$symbolString .= $value;\n\t\t\tif($len-$i != 1)\n\t\t\t\t$symbolString .= \",\";\n\t\t\t$i++;\n\t\t}\n\t}\n\telse\n\t\treturn $symbol;\n\treturn $symbolString;\n}", "public function arraytostring($array,$delimitatore=','){\n\t\treturn implode($delimitatore,$array);\n\t}", "public function array_to_string($array)\n {\n $string = \"\";\n for ($i=0; $i < count($array); $i++) {\n if ($i < count($array) - 1) {\n $string .= '\"'.$array[$i].'\",';\n } else {\n $string .= '\"'.$array[$i].'\"';\n }\n }\n\n return $string;\n }", "public function toString()\n {\n return Str(json_encode($this->array));\n }", "function dump_array($array)\n{\n\n\t$_str = \"<table bgcolor = '%s'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table><br>\";\n\n\tif(is_array($array)){\n\n\t\t$size = count($array);\n\t\t$string = \"\";\n\n\t\tif($size) {\n\n\t\t\t$string .= \"{ <br>\";\n\n\t\t\tforeach($array as $a => $b) {\n\n\t\t\t\tif(is_array($b)) { $b = dump_array($b); }\n\t\t\t\tif(is_object($b)) { $b = dump_array(object_to_array($b)); }\n\t\t\t\t$string .= \"&nbsp;&nbsp;&nbsp;&nbsp;<b>$a = '$b'</b><br>\";\n\n \t\t}\n\n\t\t\t$string .= \" }<br>\";\n\t\t}\n\n\t\t$r = sprintf($_str, '#DACE0B', $string);\n\n\t\treturn $r;\n\n } else { return $array; }\n}", "public function formatdata($value)\n\t{ \n\t\t$finalvalue = '';\n\t\tif(is_array($value))\n\t\t{\n\t\t\tif (empty($value[0]) || empty($value[1]) || empty($value[2]))\n\t\t\t{\n\t\t\t\t$finalvalue = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n $hour \t= (int) $value[0] <= 24 ? sprintf(\"%02s\", (int) $value[0]) : '00';\n\t\t\t\t$minute = (int) $value[1] <= 59 ? sprintf(\"%02s\", (int) $value[1]) : '00';\n \t\t\t\t$second = (int) $value[2] <= 59 ? sprintf(\"%02s\", (int) $value[2]) : '00';\n\n\t\t\t\t$finalvalue = $hour . ':' . $minute . ':' . $second;\n\t\t\t}\n\t\t} \n\n\t\treturn $finalvalue;\n\t}", "protected function formatter(array $item): string\n {\n if (is_array($item['field']['factory'])) {\n return $item['field']['factory']['formatter'];\n }\n\n return $item['field']['factory'];\n }", "function array2string($array, $default = false){\n\tif(!is_array($array))\n\t\treturn $default; \n\t$str = ''; \n\t$len = count($array);\n\t\n\t$j = $len; \n\tif($len >= 1 || ($len == 0 && $default == false)){\n\t\tforeach($array as $obj){\n\t\t\tif(is_object($obj))\n\t\t\t\t$class = get_class($obj);\n\t\t\telse \n\t\t\t\t$class = '';\n\t\t\t$isTable = false; \n\t\t\tif($class)\n\t\t\t\t$isTable = is_subclass_of($obj, 'Table');\n\t\t\t\n\t\t\t$j--; \n\t\t\t\n\t\t\tif($j > 0)\n\t\t\t\t$str = $str . ($isTable ? $obj->link() : $obj) . ($len > 2 ? ', ' : ' ');\n\t\t\telse\n\t\t\t\t$str = $str . ($len > 1 ? 'and ' : '') . ($isTable ? $obj->link() : $obj);\n\t\t\t\n\t\t}\n\t}else{\n\t\t$str = $default; \n\t}\n\t\n\treturn $str; \n }", "static protected function dumpArray($value) {\n\t\t// array\n\t\t$keys = array_keys ( $value );\n\t\tif ((1 == count ( $keys ) && '0' == $keys [0]) || (count ( $keys ) > 1 && array_reduce ( $keys, create_function ( '$v,$w', 'return (integer) $v + $w;' ), 0 ) == count ( $keys ) * (count ( $keys ) - 1) / 2)) {\n\t\t\t$output = array ();\n\t\t\tforeach ( $value as $val ) {\n\t\t\t\t$output [] = self::dump ( $val );\n\t\t\t}\n\t\t\t\n\t\t\treturn sprintf ( '[%s]', implode ( ', ', $output ) );\n\t\t}\n\t\t\n\t\t// mapping\n\t\t$output = array ();\n\t\tforeach ( $value as $key => $val ) {\n\t\t\t$output [] = sprintf ( '%s: %s', self::dump ( $key ), self::dump ( $val ) );\n\t\t}\n\t\t\n\t\treturn sprintf ( '{ %s }', implode ( ', ', $output ) );\n\t}", "public function __toString()\n {\n $references = [];\n foreach ($this->getValue() as $item) {\n $references[] = $item->getMaskedValue();\n }\n\n return $this->arr($references)->implode(', ')->val();\n }", "public static function stringifyArray(array $array);", "protected function outputNotNull($value): string\n {\n if (!is_array($value)) {\n throw TypeConversionException::unexpectedValue($this, 'output', 'array', $value);\n }\n if (0 === count($value)) {\n return '{}';\n }\n\n $requiredSizes = $this->calculateRequiredSizes($value);\n // this can only happen if $item->dimensions() > 0, i.e. it should be an array itself\n if (count($requiredSizes) < 1) {\n throw TypeConversionException::unexpectedValue(\n $this,\n 'output',\n \"array with at least {$this->itemConverter->dimensions()} dimension(s)\",\n reset($value)\n );\n }\n return $this->buildArrayLiteral($value, $requiredSizes);\n }", "public function toFormat(){\n $toFormat = '';\n foreach ($this->to() as $to) {\n $toFormat .= $to.', ';\n }\n return $toFormat;\n }", "public function format(string $value): string;", "function convertArrayIntoString($array) {\n foreach ($array as $value)\n $string .= \"'$value,'\";\n $string = trim($string, ',');\n return $string;\n}", "function toString ($fmt = 'number') {/*{{{*/\n if ($fmt == 'vector') {\n return '[ '.$this->getReal().' '.$this->getI()\n .' '.$this->getJ().' '.$this->getK().' ]';\n } else {\n return ( $this->getReal().\" + \".$this->getI().\"i + \".\n $this->getJ().\"j + \".$this->getK().\"k\");\n }\n }", "public static function formatValue($val)\n {\n if (is_object($val)) {\n return ObjectFormatter::formatRef($val);\n } elseif (is_array($val)) {\n return ArrayFormatter::formatRef($val);\n } elseif (is_resource($val)) {\n return sprintf('<%s>', print_r($val, true));\n } else {\n return json_encode($val);\n }\n }", "public function get_values(){\n $value_str = '';\n if (is_array($this->value)){\n foreach ($this->value as $val){\n $value_str .= $val.' ';\n }\n } else {\n $value_str .= $this->value;\n }\n\n return $value_str;\n }", "function arraytostring($array){\r\n\t$text = \"array(\";\r\n\t$x = 0;\r\n\t$count = count($array);\r\n\tforeach ($array as $key => $value) {\r\n\t\t$x++;\r\n\t\tif (is_array($value)) {\r\n\t\t\t$text .= $key.\"=>\".arraytostring($value);\r\n\t\t\tif ($count != $x) $text .= \",\";\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t$text .= \"\\\"$key\\\"=>\\\"$value\\\"\";\r\n\t\tif ($count != $x) $text .= \",\";\r\n\t}\r\n\t$text .= \")\";\r\n\treturn $text;\r\n}", "public function toString() {\n return 'is similar to ' . $this->exporter->export($this->value);\n }", "private function arrayAssocToString($array){\n\t\t$i = 0;\n\t\t$string = '';\n\t\tforeach ($array as $key => $value) {\n\t\t\tif ($i > 0) $string .= ', ';\n\t\t\tif (preg_match('#', $value)){\n\t\t\t\t$string .= str_replace('#', '', $value);\n\t\t\t}else{\n\t\t\t\t$string .= $key .\"='\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $string;\n\t}", "function getGeneratedStr($inputArr) {\n\t\n\t$outputArr = array();\n\tforeach($inputArr as $val) {\n\t\t$outputArr[] = getFizzBuzz($val); // get the generated value (Fizz, Buzz or the original value)\n\t}\n\t\n\treturn implode(' ', $outputArr);\n}", "protected function format(array $message)\n\t{\n\t\t$output = self::DEFAULT_FORMAT_ECHO;\n\t\tforeach($message as $part => $value)\n\t\t{\n\t\t\tif('extra' == $part && count($value))\n\t\t\t{\n\t\t\t\t$value = $this->normalize($value);\n\t\t\t}\n\t\t\telse if('extra' == $part)\n\t\t\t{\n\t\t\t\t// Don't print an empty array\n\t\t\t\t$value = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = $this->normalize($value);\n\t\t\t}\n\t\t\t$output = str_replace(\"%$part%\", $value, $output);\n\t\t}\n\t\treturn $output;\n\t}", "function content_array_to_string($array){\n $joined_string=\"\";\n for($count=0;$count<count($array);$count++){\n \n if($count!=count($array)-1){\n $joined_string.= $array[$count].'/';\n }\n else{\n $joined_string.=$array[$count];\n }\n }\n return $joined_string;\n }", "public function toString(): string\n {\n if ($this->maxItems === 0) {\n return 'is an empty array';\n }\n\n $description = !$this->ignoreKeys ? 'sequential array' : 'list array';\n if (($this->minItems <= 1) && ($this->maxItems === null)) {\n $text = 'is a' . (($this->minItems > 0) ? ' non-empty' : '') . ' ' . $description;\n $text .= ($this->constraint !== null) ? ' whose items match' : '';\n } else {\n $text = 'is a ' . $description;\n if ($this->minItems && $this->maxItems) {\n if ($this->minItems === $this->maxItems) {\n $text .= ' with exactly ' . $this->minItems . ' ' . (($this->minItems > 1) ? 'items' : 'item');\n } else {\n $text .= ' with ≥ ' . $this->minItems . ' and ≤ ' . $this->maxItems . ' items';\n }\n } elseif ($this->minItems) {\n $text .= ' with ≥ ' . $this->minItems . ' items';\n } elseif ($this->maxItems) {\n $text .= ' with ≤ ' . $this->maxItems . ' items';\n }\n\n $text .= ($this->constraint !== null) ? ' matching' : '';\n }\n\n if ($this->constraint !== null) {\n $text .= sprintf(' the constraint \"%s\"', $this->constraint->toString());\n }\n\n return $text;\n }", "public function format(): string;", "private function parameterValueToString($value)\n {\n switch (true) {\n case $value === null:\n $result = 'null';\n break;\n case is_bool($value):\n $result = $value ? 'true' : 'false';\n break;\n case is_array($value):\n $result = [];\n foreach ($value as $k => $v) {\n $result[] = $k . '=>' . $this->parameterValueToString($v);\n }\n\n $result = 'array(' . implode(',', $result) . ')';\n break;\n default:\n $result = '';\n }\n\n return $result;\n }", "function value_to_string($value, $name = false, $indent = false, $inside = false)\n{\n\tif($indent) {\n\t\t$in = str_repeat(\"\\t\", $it);\n\t\t$sp = ' ';\n\t\t$nl = \"\\n\";\n\t\t$str = $in;\n\t} else {\n\t\t$in = $sp = $nl = $str = '';\n\t}\n\tif($name !== false) {\n\t\t$del = $inside ? '=>' : '=';\n\t\t$str .= value_to_string($name) . $sp . $del . $sp;\n\t}\n\t$nbr = 0;\n\tif(is_array($value))\n\t{\n\t\t$str .= 'array(' . $nl;\n\t\tforeach($value as $key => $val)\n\t\t{\n\t\t\tif($nbr) $str .= ',' . $nl;\n\t\t\t$str .= value_to_string($val, $key, $indent, true);\n\t\t\t$nbr++;\n\t\t}\n\t\t$str .= $nl . $in . ')';\n\t}\n\telse $str .= scalar_to_string($value);\n\treturn $str;\n}", "public static function valdebug($value) {\n if(!isset($value))\n $out = \"NULL\";\n elseif($value === TRUE)\n $out = \"TRUE\";\n elseif($value === FALSE)\n $out = \"FALSE\";\n elseif(is_array($value)\n && array_keys($value) === range(0, count($value) - 1))\n // Consecutive, zero-based, numeric-only arrays\n $out = sprintf('array(%s)',\n implode(\", \", array_map(__METHOD__, $value)));\n elseif(is_array($value))\n // Associative and sparse arrays\n $out = sprintf('array(%s)',\n implode(\", \", array_map(function ($k, $v) {\n return sprintf(\"%s => %s\",\n TestHelpers::valdebug($k),\n TestHelpers::valdebug($v));\n },\n array_keys($value),\n array_values($value))));\n elseif(is_a($value, 'Exception'))\n $out = sprintf(\"Exception(%s('%s', %s))\",\n get_class($value),\n $value->getMessage(),\n $value->getCode());\n elseif(is_object($value))\n $out = sprintf('object(%s)', get_class($value));\n elseif(is_callable($value, FALSE, $callable_name))\n $out = sprintf('function(%s)', $callable_name);\n else\n $out = \"'$value'\";\n\n self::$lastResult = $value;\n return $out;\n }", "protected function valueToString($value) {\n\n\t\t\t// Is it null?\n\t\t\tif (is_null($value)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Array?\n\t\t\tif (is_array($value)) {\n\t\t\t\t$processed = array();\n\t\t\t\tforeach($value as $val) {\n\n\t\t\t\t\t// Another array?\n\t\t\t\t\tif (is_array($val)) {\n\n\t\t\t\t\t\t$processed[] = $this->valueToString($val);\n\n\t\t\t\t\t}\n\t\t\t\t\t// String?\n\t\t\t\t\telseif (is_string($val)) {\n\t\t\t\t\t\t$processed[] = $this->connection->Escape($val);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$processed[] = $val;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\treturn implode(\", \", $processed);\n\t\t\t}\n\n\t\t\treturn $value;\n\n\t\t}", "public static function __arrayToString(array $arr)\n\t{\n\t\t$str = '';\n\n\t\tforeach($arr as $k => $v)\n\t\t{\n\t\t\t$str .= $k . ':';\n\n\t\t\tif(is_string($v))\n\t\t\t{\n\t\t\t\t$str .= $v . ', ';\n\t\t\t}\n\t\t\telse if(is_array($v))\n\t\t\t{\n\t\t\t\t$str .= '[' . self::__arrayToString($v) . '], ';\n\t\t\t}\n\t\t}\n\n\t\t$str = rtrim($str, ', ');\n\n\t\treturn $str;\n\t}", "function get_literal_display($value)\n{\n\t$literal = '';\n\t\n\tif ($literal == '')\n\t{\n\t\tif (is_string($value))\n\t\t{\n\t\t\t$literal = $value;\n\t\t}\n\t}\n\t\n\tif ($literal == '')\n\t{\n\t\tif (is_array($value))\n\t\t{\n\t\t\t$strings = array();\n\t\t\tforeach ($value as $k => $v)\n\t\t\t{\n\t\t\t\t$strings[] = $v;\n\t\t\t}\n\t\t\t$literal = join('/', $strings);\n\t\t}\n\t}\t\n\t\n\treturn $literal;\n}", "public function __toString()\n {\n return sprintf('%01.4f, %01.4f, %01.4f, %01.4f', $this->cyan, $this->magenta, $this->yellow, $this->key);\n }", "abstract function format();", "private function buildArrayLiteral(array $value, array $requiredSizes): string\n {\n $requiredCount = array_shift($requiredSizes);\n if ($requiredCount !== count($value)) {\n throw TypeConversionException::unexpectedValue(\n $this,\n 'output',\n \"array with {$requiredCount} value(s)\",\n $value\n );\n }\n\n $parts = [];\n if (empty($requiredSizes)) {\n foreach ($value as $v) {\n $item = $this->itemConverter->output($v);\n $parts[] = ($item === null) ? 'NULL' : '\"' . addcslashes($item, '\"\\\\') . '\"';\n }\n\n } else {\n foreach ($value as $v) {\n if (!is_array($v)) {\n throw TypeConversionException::unexpectedValue($this, 'output', 'array', $v);\n }\n $parts[] = $this->buildArrayLiteral($v, $requiredSizes);\n }\n }\n\n return '{' . implode(',', $parts) . '}';\n }", "public function __toString()\n\t{\n\t\t$output = '';\n\n\t\tforeach (array_keys($this->data) as $key) {\n\t\t\tif (is_array($this->data[$key])) {\n\t\t\t\t$output .= implode(PHP_EOL, $this->data[$key]) . PHP_EOL;\n\t\t\t} else {\n\t\t\t\t$output .= $this->data[$key] . PHP_EOL;\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "function JSONoutputString($array){\n\t\t return json_encode($array, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);\n\t\t //return json_encode($array, 0);\n\t}", "public function __toString(): string\n {\n return implode(\n '\\n',\n array_map(\n function ($span) {\n return (string)$span;\n },\n $this->getArrayCopy()\n )\n );\n }", "function Deneme(array $Deger):string{\n $Islem = implode(\"<br>\", $Deger);\n return $Islem;\n}", "function ArrayToString ($array,$new_array=array()) {\n\t$num = count($array);\n\tfor ($i=0; $i<=$num; $i++){\n\t\tif (isset($array[$i]['name']) && $array[$i]['name'] != '') //multi-array\n\t\t\tarray_push($new_array, $array[$i]['name']);\n\t\telse if ($array['youtube'][0]['source'] != '' && !in_array($array['youtube'][0]['source'], $new_array)) //trailer\n\t\t\tarray_push($new_array, $array['youtube'][0]['source']);\n\t}\n\treturn implode(',', $new_array);\n}", "function arrayToString($p) {\n $p2 = __t($p)->map(function($arr){return implode($arr);});\n return $p2();\n }", "private function transforme($value){\n if(is_array($value))\n {\n foreach ($value as $x)\n {\n if(is_integer($x))\n {\n $foo[] = $x;\n }\n else if(is_string($x))\n {\n $foo[]=\"'$x'\";\n }\n }\n $result = '('.implode(',',$foo).')';\n }\n //caso seja uma string\n else if(is_string($value))\n {\n $result = \"'$value'\";\n }\n // caso seja uma valor nulo\n else if(is_null($value))\n {\n $result = 'NULL';\n }\n //caso seja boleano\n else if(is_bool($value))\n {\n $result = $value ? 'TRUE' : 'FALSE';\n }\n else\n {\n $result = $value;\n }\n\n return $result;\n }", "public function __toString()\n\t{\n\t\tif(is_array($this->dimensions)) {\n\t\t\treturn implode(' ',$this->dimensions);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "function Array2Str($kvsep, $entrysep, $a){\n $str = \"\";\n foreach ($a as $k=>$v){\n $str .= \"{$k}{$kvsep}{$v}{$entrysep}\";\n }\n return $str;\n}", "private function getDataStr(array $data)\n {\n $output = array();\n $callback = function($value, $key) use (&$output)\n {\n if (strpos($value, ':') === 0) {\n $output[] = \"`{$key}` = {$value}\";\n }\n else {\n $output[] = \"`{$key}` = '{$value}'\";\n }\n\n };\n array_walk($data, $callback);\n return implode(', ', $output);\n }", "public function format(array $record);", "public function toString() {\n $list= '';\n foreach ($this->list as $preference => $q) {\n $list.= (1.0 - $q < 0.001) ? ', '.$preference : sprintf(', %s;q=%.1f', $preference, $q);\n }\n return $this->getClassName().'<'.substr($list, 2).'>';\n }", "function changeArrayToString($data) {\n\t\t$str = '';\n\t\tforeach($data as $value)\n\t\t{\n\t\t\tif(empty($str))\n\t\t\t\t$str = '\"'.trim(strip_tags($value)).'\"';\n\t\t\telse\n\t\t\t\t$str .=' ,\"'.trim(strip_tags($value)).'\"';\n\t\t}\n\t\treturn $str;\n\t}", "function ar_to_string($ar, $tab = 1) {\n\n\t\t$str = \"\";\n\t\t$tabs = \"\";\n\n\t\tfor ($x = 0; $x < $tab; $x++)\n\t\t\t$tabs .= \"\\t\";\n\n\t\tforeach ($ar as $key => $val) {\n\t\t\tif (is_array($ar[$key]))\n\t\t\t\t$str .= ar_to_string($ar, ($tab + 1));\n\t\t\telse\n\t\t\t\t$str = \"{$tabs}{$key}\\t=>\\t{$val}\\n\";\n\t\t}\n\n\t\treturn $str;\n\t}", "public function getArrayFormat()\n {\n return $this->getMessage(self::FORMAT_ARRAY);\n }", "function d2d_value_encode($value) {\n if (is_null($value)) {\n $type = 'n';\n $string = '';\n }\n elseif (is_bool($value)) {\n $type = 'b';\n $string = $value ? '1' : '0';\n }\n else {\n $type = 's';\n $string = strval($value);\n }\n return $type . '$' . $string;\n}", "function format($cols,$name,$value='',$unit=''){\n $vlen=strlen($value.$unit)+1;\n $format='%-'.($cols-$vlen).\".\".($cols-$vlen).\"s\".'%'.($vlen).\".\".($vlen).\"s\"; //name & value+unit\n return sprintf($format,$name,$value.$unit);\n}", "public static function format($f) {\n\n\t\t$arguments = func_get_args();\n\t\t$formatRegExp = '/%[sdj%]/';\n\n\t\tif (!is_string($f)) {\n\t\t\t$objects = array();\n\t\t\tfor ($i = 0; $i < count($arguments); $i++) {\n\t\t\t\t$objects[] = self::inspect($arguments[$i]);\n\t\t\t}\n\t\t\treturn implode(' ', $arguments);\n\t\t}\n\t\t\n\t\t$i = 1;\n\t\t$args = $arguments;\n\t\t$len = count($args);\n\t\t\n\t\t$str = preg_replace_callback($formatRegExp, function($x) use (&$i, $len, $args) {\n\n\t\t\t$x = $x[0];\n\t\t\n\t\t\tif ($x == '%%') {\n\t\t\t\treturn '%';\n\t\t\t}\n\t\t\tif ($i >= $len) {\n\t\t\t\treturn $x;\n\t\t\t}\n\t\t\tswitch ($x) {\n\t\t\t\tcase '%s':\n\t\t\t\t\treturn (string)$args[$i++];\n\t\t\t\tcase '%d':\n\t\t\t\t\treturn (float)$args[$i++];\n\t\t\t\tcase '%j':\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjson_encode($args[$i++]);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\treturn '[Circular]';\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn $x;\n\t\t\t}\t\t\n\t\t}, $f);\n\t\t\n\t\tif ($i < $len) {\n\t\t\tfor ($x = $args[$i]; $i < $len; $x = $args[++$i]) {\n\t\t\t\tif ($x === null || !(is_object($x) || is_array($x))) {\n\t\t\t\t\t$str += ' ' . $x;\n\t\t\t\t} else {\n\t\t\t\t\t$str += ' ' + self::inspect($x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $str;\n\t}", "private function formatScalarValue($value): string\n {\n if ($value === true) {\n return 'true';\n }\n if ($value === false) {\n return 'false';\n }\n if (is_float($value)) {\n return StringHelper::floatToString($value);\n }\n return (string)$value;\n }", "public static function encode($array)\n {\n\n // determine type\n if(is_numeric(key($array))) {\n\n // indexed (list)\n $output = '[';\n for($i = 0, $last = (sizeof($array) - 1); isset($array[$i]); ++$i) {\n if(is_array($array[$i])) $output .= self::encode($array[$i]);\n else $output .= self::_val($array[$i]);\n if($i !== $last) $output .= ',';\n }\n $output .= ']';\n\n } else {\n\n // associative (object)\n $output = '{';\n $last = sizeof($array) - 1;\n $i = 0;\n foreach($array as $key => $value) {\n $output .= '\"'.$key.'\":';\n if(is_array($value)) $output .= self::encode($value);\n else $output .= self::_val($value);\n if($i !== $last) $output .= ',';\n ++$i;\n }\n $output .= '}';\n\n }\n\n // return\n return $output;\n\n }", "public function format()\n {\n return sprintf('%s %s %s', $this->x(), $this->y(), $this->z());\n }", "function stringifyArray ($p_aData, $p_iLvl = 0) {\r\n\t\t\t$sData = '';\r\n\t\t\t$bFirst = true;\r\n\t\t\tif (is_array($p_aData)) {\r\n\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . ' => Array (';\r\n\t\t\t\tforeach($p_aData as $k => $v) {\r\n\t\t\t\t\tif ($bFirst) {\r\n\t\t\t\t\t\t$sData = \"\\n\";\r\n\t\t\t\t\t\t$bFirst = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$sData .= \",\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (is_array($v)) {\r\n\t\t\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . $k . ' => Array ('\r\n\t\t\t\t\t\t\t . __stringifyArray($v, $p_iLvl + 1) . \"\\n\"\r\n\t\t\t\t\t\t\t . str_repeat('\t', $p_iLvl) . ')';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . $k . ' => ' . $v;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$sData .= str_repeat('\t', $p_iLvl) . ')';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sData .= $p_aData;\r\n\t\t\t}\r\n\t\t\treturn $sData;\r\n\t\t}", "public function format(array $message);", "public function transform($value)\n {\n if (null === $value) {\n return null;\n }\n if (!is_array($value)) {\n $value = $value->toArray();\n }\n\n return implode($this->separator, array_map(function($tag) { return $tag->getTitle(); }, $value));\n }", "private function formatContact($key, $array) {\n return sprintf($this->format, $array['last_name'], $array['first_name'],\n $array['phone'], $key);\n }", "public static function format_single_value( $field, $value, $args, $post_id ) {\n\t\t$output = '<tr>';\n\t\tforeach ( $value as $subvalue ) {\n\t\t\t$output .= \"<td>$subvalue</td>\";\n\t\t}\n\t\t$output .= '</tr>';\n\t\treturn $output;\n\t}", "private function formatArgs(array $args): string\n {\n $result = [];\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf('object(%s)', $item[1]);\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf('array(%s)', \\is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('null' === $item[0]) {\n $formattedValue = 'null';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = strtolower(var_export($item[1], true));\n } elseif ('resource' === $item[0]) {\n $formattedValue = 'resource';\n } else {\n $formattedValue = str_replace(\"\\n\", '', $this->escapeXml(var_export($item[1], true)));\n }\n\n $result[] = \\is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $this->escapeXml($key), $formattedValue);\n }\n\n return implode(', ', $result);\n }", "function arg_array_to_str($arg_array){\r\n \r\n $arg_str = '';\r\n \r\n foreach($arg_array as $arg)\r\n {\r\n $arg_str .= \"$arg,\";\r\n }\r\n \r\n \r\n \r\n return substr($arg_str,0,-1); //eg 'x,y,z' -- substr() cuts off the trailing comma\r\n }", "function format_extensions_to_str($extension_array)\n{\n\t$ext_array = array();\n\t\n\tforeach($extension_array AS $ext)\n\t{\n\t\t# remove the beginning dot (.)\n\t\tarray_push($ext_array, substr($ext, 1));\n\t\t# Add the option of upper case of the extension\n\t\tarray_push($ext_array, strtoupper(substr($ext, 1)));\n\t}\n\t\n\treturn implode(',', $ext_array);\n}", "public function toString($factory = null)\n {\n if (is_integer($this->value)) {\n return (string)$this->value;\n }\n\n /**\n * PDF doesn't support exponental format.\n * Fixed point format must be used instead\n */\n $prec = 0; $v = $this->value;\n while (abs( floor($v) - $v ) > 1e-10) {\n $prec++; $v *= 10;\n }\n return sprintf(\"%.{$prec}F\", $this->value);\n }", "function generate($array) {\n $result = \"\";\n ob_start();\n if(sizeof($array)) {\n $i = 0;\n foreach($array as $string) {\n $i++;\n echo \"<span style='background-color: \".$this->colors[\"seq\"].\"; border-right: 1px solid #949494;'>\".$i.\".&nbsp;</span>&nbsp;\";\n echo $string.\"<br/>\\r\\n\";\n }\n }\n $result = ob_get_contents();\n ob_end_clean();\n return $result;\n }" ]
[ "0.70892054", "0.70743716", "0.6995256", "0.694504", "0.69274706", "0.6820102", "0.6771172", "0.67605066", "0.6653382", "0.66412145", "0.6629372", "0.6623236", "0.6594954", "0.656861", "0.65500265", "0.6543388", "0.6529599", "0.6529238", "0.64880055", "0.6413589", "0.6394316", "0.63848454", "0.6340589", "0.63308144", "0.633051", "0.63104343", "0.6264631", "0.624578", "0.6244975", "0.62391263", "0.62244856", "0.6209605", "0.6179603", "0.61706746", "0.61110806", "0.6097703", "0.60936403", "0.6090673", "0.6088774", "0.60839725", "0.6062309", "0.60493803", "0.6043362", "0.60401154", "0.6030975", "0.60133463", "0.59779984", "0.5969933", "0.5950844", "0.59458023", "0.5936864", "0.59279954", "0.5926991", "0.5910883", "0.58990896", "0.5890765", "0.58788383", "0.5866436", "0.58628976", "0.5859971", "0.58423406", "0.58146834", "0.5814448", "0.58127815", "0.57935107", "0.5787134", "0.57841337", "0.5770625", "0.57673734", "0.57479846", "0.57451147", "0.5741646", "0.57366174", "0.5726937", "0.57269275", "0.5725673", "0.5719299", "0.57182837", "0.571607", "0.5707768", "0.57038", "0.57017577", "0.56991476", "0.56927544", "0.5683295", "0.56728065", "0.56513953", "0.5636534", "0.56361467", "0.56319827", "0.56268394", "0.56262994", "0.5619143", "0.56083566", "0.56014854", "0.5600919", "0.5599798", "0.5585587", "0.5576019", "0.5572819" ]
0.6668806
8
Return a formatted string from the given object.
private function object($value): string { $class = $this->classname($value); if ($class == \Closure::class) { return 'function {closure}()'; } return ($this->callable && is_callable($value)) ? sprintf('function %s::__invoke()', $class) : sprintf('Object(%s)', $class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function objectAsString($object);", "public function objectToString($obj);", "function objectToString( &$object ) {\n\n\t}", "public function format($object, $format)\n {\n return $object->format($format);\n }", "function toString ($object)\n{\n\treturn get_class($object);\n}", "public function __toString(): string\n {\n return (string) $this->format();\n }", "function dataToString($object=null) {\r\n\t\treturn $object->__toString();\r\n\t}", "private static function objToStr($obj)\n {\n return method_exists($obj, '__toString') ? (string)$obj : get_class($obj) . '@' . spl_object_hash($obj);\n }", "public function format(): string;", "public function toString($object)\n {\n return $object instanceof Comment\n ? 'Bình luận #' . $object->getId()\n : ''; // shown in the breadcrumb on the create view\n }", "static function objectToString($obj)\n {\n if (is_object($obj) && method_exists($obj, 'toString')) {\n return $obj->toString();\n } else if (is_object($obj) && method_exists($obj, '__toString')) {\n return $obj->__toString();\n } else {\n return $obj;\n }\n }", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\r\n {\r\n return $this->getFormattedString();\r\n }", "public function __toString(){\r\n\t\t$data = array();\r\n\t\t$vars = get_object_vars($this);\r\n\t\tforeach ($vars as $key => $value){\r\n\t\t\tif ($key == '_customFields'){\r\n\t\t\t\tforeach ($this->_customFields as $cfkey => $cfvalue){\r\n\t\t\t\t\t$data[] = 'CF-' . $cfkey . ': ' . $cfvalue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$data[] = $key . ': ' . $value;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$string = implode(\"\\n\", $data);\r\n\t\treturn $string;\r\n\t}", "abstract function format();", "function __toString() \n {\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) {\n if ($obj != NULL) {\n $obj->name = $name; #nombre de la variable que hace de nombre de objecto\n $str .= $obj->label();\n $str .= $obj;\n $str .= \"<br />\\n\";\n }\n }\n return $str;\n }", "public function __toString()\n {\n return $this->formatAsString();\n }", "public function toString($object) {\n return $object instanceof Movie ? $object->getTitle() : 'Movie';\n }", "public function toString($object)\n {\n if ($object instanceof ServiceStatus) {\n return $object->getStatus();\n }\n\n return 'Status';\n }", "public function output($object)\n {\n return strtoupper($this->formatter->output($object));\n }", "function drawObject($object) {\n\t\t\t\t\tif (is_object($object)) {\n\t\t\t\t\t\t$t = new \\Bonita\\Templates($this);\n\t\t\t\t\t\t$t->object = $object;\n\t\t\t\t\t\tif (($result = $t->draw('object/' . get_class($object), false)) !== false) return $result;\n\t\t\t\t\t\tif ($object instanceof BonDrawable) return $t->draw('object/default');\n\t\t\t\t\t}\n\t\t\t\t\treturn '';\n\t\t\t\t}", "public function toString(Container $obj): string\n {\n static $childrenCount, $commaString;\n\n $string = '';\n switch ($obj->getType()) {\n case 'blank':\n $string = \"\\n\";\n break;\n case 'comment':\n $string = ';' . $obj->getContent() . \"\\n\";\n break;\n case 'directive':\n $count = $obj->getParent() !== null\n ? $obj->getParent()->countChildren('directive', $obj->getName())\n : 0;\n $content = $obj->getContent();\n if (!is_array($content)) {\n $content = $this->contentToString($content);\n\n if ($count > 1) {\n // multiple values for a directive are separated by a comma\n if (isset($childrenCount[$obj->getName()])) {\n $childrenCount[$obj->getName()]++;\n } else {\n $childrenCount[$obj->getName()] = 0;\n $commaString[$obj->getName()] = $obj->getName() . '=';\n }\n if ($childrenCount[$obj->getName()] === $count - 1) {\n // Clean the static for future calls to toString\n $string .= $commaString[$obj->getName()] . $content . \"\\n\";\n unset($childrenCount[$obj->getName()], $commaString[$obj->getName()]);\n } else {\n $commaString[$obj->getName()] .= $content . ', ';\n }\n } else {\n $string = $obj->getName() . '=' . $content . \"\\n\";\n }\n } else {\n //array\n $string = '';\n $n = 0;\n foreach ($content as $contentKey => $contentValue) {\n if (is_int($contentKey) && $contentKey === $n) {\n $stringKey = '';\n ++$n;\n } else {\n $stringKey = $contentKey;\n }\n $string .= $obj->getName() . '[' . $stringKey . ']='\n . $this->contentToString($contentValue) . \"\\n\";\n }\n }\n break;\n case 'section':\n if (!$obj->isRoot()) {\n $string = '[' . $obj->getName() . \"]\\n\";\n }\n if ($obj->countChildren() > 0) {\n for ($i = 0, $iMax = $obj->countChildren(); $i < $iMax; $i++) {\n $string .= $this->toString($obj->getChild($i));\n }\n }\n break;\n default:\n $string = '';\n }\n\n return $string;\n }", "protected static function _prepare($obj)\n {\n if (false === is_scalar($obj)) {\n $string = self::_dump($obj);\n } else if (is_numeric($obj)) {\n $string = (string) $obj;\n } else {\n $string = $obj;\n }\n return $string;\n }", "protected static function objToStr(object $obj): string\n {\n return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj);\n }", "public function toString()\n {\n $data = $this->getProperties();\n $out = get_class($this).' ('.CRLF;\n foreach ($data as $key => $value) {\n $type = gettype($value);\n $value = is_bool($value) ? (int) $value : $value;\n $value = is_string($value) ? '\"'.$value.'\"' : $value;\n $value = is_object($value) ? implode(CRLF.TAB, explode(CRLF, (string) $value)) : $value;\n $value = is_array($value) ? print_r($value, true) : $value;\n $out .= TAB.$key.' ('.$type.')';\n $out .= ': '.$value.CRLF;\n }\n\n return $out.');';\n }", "public function __toString() : string {\n return $this->box . ' ' . $this->created->format('c');\n }", "private static function objectToLine($object)\n\t{\n\t\t$line = get_class($object);\n\t\tif ($object instanceof \\DateTime || $object instanceof \\DateTimeInterface) {\n\t\t\t$line .= '(' . $object->format('Y-m-d H:i:s O') . ')';\n\t\t}\n\n\t\treturn $line . '(' . self::hash($object) . ')';\n\t}", "public function __toString()\n {\n return $this->toFormattedString();\n }", "public function __toString()\n {\n notice('Object: \"'.get_class($this).'\" is used as string');\n\n return 'Object('.get_class($this).')';\n }", "protected function getGeneralObjectInfo($object)\n {\n return sprintf(\"%s #%s\", get_class($object), spl_object_hash($object));\n }", "public function visualize()\n {\n \n return new StringWrapper('object('.$this->name().')');\n \n }", "public function __toString() {\n\t\treturn get_class($this) . '-object ' . \"\\n\";\n\t}", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n \t$context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n \t$context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.User: ' . implode(' ', $context) . ' ]';\n }", "public static function format($obj)\n {\n throw new FatalErrorException('format should be implemented by extending classes.');\n }", "function objectToString( &$object, $params )\n\t{\n\t\t$depth = 1;\n\t\t$retval = \"<?xml version=\\\"1.0\\\" ?>\\n<config>\\n\";\n\t\tforeach (get_object_vars( $object ) as $key=>$item)\n\t\t{\n\t\t\tif (is_object($item))\n\t\t\t{\n\t\t\t\t$retval .= \"\\t<group name=\\\"\".$key.\"\\\">\\n\";\n\t\t\t\t$retval .= $this->_buildXMLstringLevel($item, $depth+1);\n\t\t\t\t$retval .= \"\\t</group>\\n\";\n\t\t\t} else {\n\t\t\t\t$retval .= \"\\t<entry name=\\\"\".$key.\"\\\">\".$item.\"</entry>\\n\";\n\t\t\t}\n\t\t}\n\t\t$retval .= '</config>';\n\t\treturn $retval;\n\t}", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n $context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.ExternalAccount: ' . implode(' ', $context) . ' ]';\n }", "public function format($object, $fields = array())\n {\n $fields = $this->mergeFieldsArray($fields);\n $ret = new stdClass();\n\n foreach ($fields as $key => $formatter)\n {\n $ret->$key = $formatter->format($object);\n }\n\n return $ret;\n }", "public static function _format($data, array $context = [])\n {\n if (is_string($data)) {\n return $data;\n }\n\n $object = is_object($data);\n\n if ($object && method_exists($data, '__toString')) {\n return (string)$data;\n }\n\t\t\n\t\tif ($object && $data instanceof Query) {\n\t\t\treturn sql($data);\n\t\t}\n\n if ($object && $data instanceof JsonSerializable) {\n return json_encode($data);\n }\n\n return print_r($data, true);\n }", "public function __toString()\n\t{\n\t\t$ret = get_called_class().'( ';\n\t\t$t = 0;\n\t\tforeach (get_object_vars($this) as $k => $v)\n\t\t{\n\t\t\tif ($k[0] == '_')\n\t\t\t{\n\t\t\t\t$key = substr($k, 1);\n\t\t\t\tif (method_exists(get_called_class(),\n\t\t\t\t\t\t($funname = 'get'.ucfirst(substr($k, 1)))))\n\t\t\t\t\t\t\t$val = $this->$funname();\n\t\t\t\telse\n\t\t\t\t\t$val = $v;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$val = $v;\n\t\t\t\t$key = $k;\n\t\t\t}\n\t\t\t$key .= ':';\n\t\t\tif (gettype($val) == \"array\")\n\t\t\t\t$str = str_replace(\" \", \"\", str_replace(\"\\n\", \"\", var_export($val, true)));\n\t\t\telse if (gettype($val) == \"double\")\n\t\t\t\t$str = sprintf(\"%.2f\", $val);\n\t\t\telse if (is_a($val, \"Color\") or ($val == null and $k === \"_color\"))\n\t\t\t{\n\t\t\t\tif (!self::$verbose or $val == null)\n\t\t\t\t\tcontinue ;\n\t\t\t\t$str = $val;\n\t\t\t\t$key = '';\n\t\t\t}\n\t\t\telse\n\t\t\t\t$str = var_export($val, true);\n\t\t\tif ($t)\n\t\t\t\t$ret .= \", \";\n\t\t\telse\n\t\t\t\t$t = 1;\n\t\t\t$ret .= $key.$str;\n\t\t}\n\t\t$ret .= ' )';\n\t\treturn $ret;\n\t}", "public static function getFingerprint($object): string\n {\n if (is_iterable($object)) {\n $raw = '';\n foreach ($object as $item) {\n $raw .= self::getFingerprint($item);\n }\n return md5($raw);\n } elseif ($object instanceof \\DateTimeInterface) {\n return $object->format('c');\n } else {\n try {\n return (string)$object;\n } catch (\\Error $error) { // @phpstan-ignore-line\n return $error->__toString();\n }\n }\n }", "public function disponibilityStringGenerator(EntryInterface $object): string\n {\n $string = <<<ENDSTRING\n\nAPARTEMENT available: {$this->getName()} {$object->getId()},\nPrice: {$object->getCost()} kr.\nAddress: {$object->getAddress()}\nUrl: {$object->getUrl()}\nENDSTRING;\n\n return $string;\n }", "public function __toString()\n\t{\n\t\tswitch ($this->last_called) {\n\t\t\tcase \"Get_Documents_By_Name\":\n\t\t\tcase \"Get_Documents\":\n\t\t\tcase \"Get_Document_List\":\n\t\t\t\treturn $this->formatDocumentList();\n\t\t\t\t\n\t\t\tcase \"Get_Document_Log\":\n\t\t\tcase \"Log_Document\":\n\t\t\tcase \"Send_Document\":\n\t\t\tcase \"Get_Document_Id\":\n\t\t\tcase \"Get_Application_Data\":\n\t\t\tcase \"Get_Application_History\":\n\t\t\tdefault:\n\t\t\t\treturn $this->obj->__toString();\n\t\t}\n\t}", "public function toString() {\n return sprintf(\n \"%s(#%d, %s: %s)@{\\n\".\n \" [description ] %s\\n\".\n \" [dueOn ] %s\\n\".\n \" [closedIssues ] %s\\n\".\n \" [openIssues ] %s\\n\".\n \" [createdAt ] %s\\n\".\n \" [creator ] %s\\n\".\n \"}\",\n $this->getClassName(),\n $this->number, \n $this->state,\n $this->title,\n $this->description,\n $this->dueOn,\n $this->closedIssues,\n $this->openIssues,\n xp::stringOf($this->createdAt),\n str_replace(\"\\n\", \"\\n \", xp::stringOf($this->creator))\n );\n }", "public function toString()\n {\n $data = $this->origin->data();\n $out = '';\n if (is_scalar($data) || is_null($data)) {\n $out = (string) $data;\n } elseif (is_object($data) && method_exists($data, '__toString')) {\n $out = (string) $data;\n }\n return $out;\n }", "public function __toString()\n {\n return sprintf(\"%s %s\", $this->amount, $this->unit);\n }", "public function toString()\n {\n return json_encode($this->obj);\n }", "static function encodeSimple($o){\n\t\treturn '}{'.(self::isObject($o) ? get_class($o) : '').\"\\n\".\n\t\t\tself::simplify($o);\n\t\t}", "public function __toString() {\n\t\treturn sprintf(\"%s: %s\", $this->getName(), $this->getValue());\n\t}", "public static function toJsonStringPretty($object, $group = NULL)\n\t{\n\t\treturn self::toJson($object, $group, JSON_PRETTY_PRINT);\n\t}", "public function __toString(){\n\t\t$ref = new ReflectionObject($this);\n\t\t$r = \"[\".$ref->getName().\"]\\n\";\n\t\tforeach($ref->getProperties() as $prop){\n\t\t\t$r .= \"\\t - \".$prop->getName().\"=\".$prop->getValue().\"\\n\";\n\t\t}\n\t\treturn $r;\n\t}", "public function __toString()\n {\n return (string) $this->exportTo(SanitasiPeer::DEFAULT_STRING_FORMAT);\n }", "function &format( &$obj, $isShort = true )\r\n {\r\n $returnString = \"<b>Locale error</b>: object or type not supported.\";\r\n\r\n // TODO: implement more options for the date and time format.\r\n $objClass = strtolower( get_class( $obj ) );\r\n switch ( $objClass )\r\n {\r\n case \"ezdate\" :\r\n case \"eztime\" :\r\n case \"ezdatetime\" :\r\n {\r\n if ( $isShort )\r\n {\r\n $date = $this->ShortDateFormat;\r\n $time = $this->ShortTimeFormat;\r\n }\r\n else\r\n {\r\n $date = $this->DateFormat;\r\n $time = $this->TimeFormat;\r\n }\r\n\r\n // ezdate or ezdatetime\r\n if ( $objClass != \"eztime\" )\r\n {\r\n // d - day of the month, 2 digits with leading zeros; i.e. \"01\" to \"31\"\r\n $date =& str_replace( \"%d\", \"\" . $this->addZero( $obj->day() ) . \"\", $date );\r\n\r\n // j - day of the month without leading zeros; i.e. \"1\" to \"31\"\r\n $date =& str_replace( \"%j\", \"\" . $obj->day() . \"\", $date );\r\n\r\n // D - day of the week, textual, 3 letters; i.e. \"Fri\"\r\n $date =& str_replace( \"%D\", \"\" .\r\n $this->dayName( $obj->dayOfWeek( $this->mondayFirst() ) ) .\r\n \"\", $date );\r\n\r\n // E - day of the week, textual, long; i.e. \"Friday\"\r\n $date =& str_replace( \"%E\", \"\" . $this->dayName(\r\n $obj->dayOfWeek( $this->mondayFirst() ), false ) . \"\", $date );\r\n\r\n // F - month, textual, long; i.e. \"January\"\r\n $date =& str_replace( \"%F\", \"\" . $this->monthName( $obj->month(), false ) . \"\", $date );\r\n\r\n // M - month, textual, 3 letters; i.e. \"Jan\"\r\n $date =& str_replace( \"%M\", \"\" . $this->monthName( $obj->month() ) . \"\", $date );\r\n\r\n // m - month; i.e. \"01\" to \"12\"\r\n $date =& str_replace( \"%m\", \"\" . $this->addZero( $obj->month() ), $date );\r\n\r\n // n - month without leading zeros; i.e. \"1\" to \"12\"\r\n $date =& str_replace( \"%n\", \"\" . $obj->month(), $date );\r\n\r\n // t - number of days in the given month; i.e. \"28\" to \"31\"\r\n $date =& str_replace( \"%t\", \"\" . $obj->daysInMonth(), $date );\r\n\r\n // Y - year, 4 digits; i.e. \"1999\"\r\n $date =& str_replace( \"%Y\", \"\" . $obj->year(), $date );\r\n\r\n // y - year, 2 digits; i.e. \"99\"\r\n $date =& str_replace( \"%y\", \"\" . substr( $obj->year(), 2 ), $date );\r\n\r\n $returnString =& $date;\r\n }\r\n\r\n // eztime or ezdatetime\r\n if ( $objClass != \"ezdate\" )\r\n {\r\n // a - \"am\" or \"pm\"\r\n $time =& str_replace( \"%a\", \"\" . $this->ampm( $obj->hour(), false ) . \"\", $time );\r\n\r\n // A - \"AM\" or \"PM\"\r\n $time =& str_replace( \"%A\", \"\" . $this->ampm( $obj->hour(), true ) . \"\", $time );\r\n\r\n // g - hour, 12-hour format without leading zeros; i.e. \"1\" to \"12\"\r\n $time =& str_replace( \"%g\", \"\" . $this->twelveHour( $obj->hour() ) . \"\", $time );\r\n\r\n // h - hour, 12-hour format; i.e. \"01\" to \"12\"\r\n $time =& str_replace( \"%h\", \"\" . $this->addZero( $this->twelveHour( $obj->hour() ) )\r\n . \"\", $time );\r\n\r\n // G - hour, 24-hour format without leading zeros; i.e. \"0\" to \"23\"\r\n $time =& str_replace( \"%G\", \"\" . $obj->hour() . \"\", $time );\r\n\r\n // H - hour, 24-hour format; i.e. \"00\" to \"23\"\r\n $time =& str_replace( \"%H\", \"\" . $this->addZero( $obj->hour() ) . \"\", $time );\r\n\r\n // i - minutes; i.e. \"00\" to \"59\"\r\n $time =& str_replace( \"%i\", \"\" . $this->addZero( $obj->minute() ) . \"\", $time );\r\n\r\n // s - seconds; i.e. \"00\" to \"59\"\r\n $time =& str_replace( \"%s\", \"\" . $this->addZero( $obj->second() ) . \"\", $time );\r\n\r\n $returnString =& $time;\r\n }\r\n\r\n if ( $objClass == \"ezdatetime\" )\r\n {\r\n $returnString = $date . \" \" . $time;\r\n }\r\n\r\n break;\r\n }\r\n\r\n case \"ezcurrency\" :\r\n {\r\n $value = $obj->value();\r\n\r\n $value =& number_format( $value, $this->FractDigits, $this->DecimalSymbol, $this->ThousandsSymbol );\r\n\r\n if ( $obj->isNegative() )\r\n {\r\n if ( $this->NegativePrefixCurrencySymbol == \"yes\" )\r\n {\r\n $value = \"-&nbsp;\" . $this->CurrencySymbol . \"&nbsp;\" . $value;\r\n }\r\n else\r\n {\r\n $value = \"-&nbsp;\" . $value . \"&nbsp;\" . $this->CurrencySymbol;\r\n }\r\n }\r\n else\r\n {\r\n if ( $this->PositivePrefixCurrencySymbol == \"yes\" )\r\n {\r\n $value = $this->CurrencySymbol . \"&nbsp;\" . $value;\r\n }\r\n else\r\n {\r\n $value = $value . \"&nbsp;\" . $this->CurrencySymbol;\r\n }\r\n }\r\n\r\n $returnString =& $value;\r\n\r\n\r\n\r\n break;\r\n }\r\n }\r\n return $returnString;\r\n }", "public static function string(&$object) {\n\t\t\tself::scheme($object);\n\t\t\tself::authority($object);\n\t\t\t$str_arr = array($object->scheme, $object->authority, $object->path);\n\t\t\tif (!empty($object->query)) {\n\t\t\t\t$str_arr[] = '?'.$object->query;\n\t\t\t}\n\t\t\tif (!empty($object->fragment)) {\n\t\t\t\t$str_arr[] = '#'.$object->fragment;\n\t\t\t}\n\t\t\treturn implode('', $str_arr);\n\t\t}", "public function __tostring() {\r\n return (string) $this->object->getId();\r\n }", "public function objectAsName($object);", "public function __toString(): string\n {\n return sprintf(\n '%s(id=%d, name=\"%s\")',\n self::class,\n $this->getId(),\n $this->getName()\n );\n }", "static function toString($var){\n\t\tif(self::isString($var)){\n\t\t\treturn $var;\n\t\t}else if(self::isObject($var)){\n\t\t\tif(self::isStringObject($var) || self::isFileObject($var)){\n\t\t\t\treturn $var->val();\n\t\t\t}\n\t\t}\n\n\t\treturn (string) $var;\n\t}", "function format()\r\n\t{\r\n\t\treturn $this->text;\r\n\t}", "public function __toString() {\n\t\treturn get_class($this) . '-object ' . \"\\n\" .\n\t\t\t 'attributes: ' . print_r($this->attributes, 1) . \"\\n\";\n\t}", "public function render(): string\n\t{\n\t\treturn implode(' ', array_filter([\n\n\t\t\t$this->formatted_type,\n\t\t\t$this->formatted_attributes,\n\t\t\t$this->formatted_charset,\n\t\t\t$this->formatted_null,\n\t\t\t$this->formatted_auto_increment,\n\t\t\t$this->formatted_default,\n\t\t\t$this->formatted_comment\n\n\t\t]));\n\t}", "public function __toString()\n {\n /**\n * @var int $inicioHs\n * @var int $inicioMint\n * @var int $duracionMint\n */\n $inicioHs = intdiv($this->getHorarioInicio(), 3600);\n $inicioMint = intdiv(($this->getHorarioInicio() % 3600), 60);\n $duracionMint = intdiv($this->getDuracion(), 60);\n\n return \"Nombre: \" . $this->getNombre() . \"\\n\" .\n \"Fecha: \" . $this->getFecha() . \"\\n\" .\n \"Horario de inicio: \" . $inicioHs . \":\" . $inicioMint . \"\\n\" .\n \"Duracion de funcion: \" . $duracionMint . \" minutos\" . \"\\n\" .\n \"Precio: \" . $this->getPrecio() . \"\\n\";\n }", "public function format()\n {\n return sprintf('%s %s %s', $this->x(), $this->y(), $this->z());\n }", "public function toString()\n {\n return sprintf('%s: %s', $this->getFieldName(), $this->getFieldValue());\n }", "public function toString() {\n $s= $this->getClassName().'@('.$this->hashCode().\"){\\n\";\n $s.= ' [ name ] '.$this->name.\"\\n\";\n $s.= ' [ value ] '.$this->value.\"\\n\";\n $s.= ' [ mustUnderstand ] '.xp::stringOf($this->mustUnderstand).\"\\n\";\n $s.= ' [ encodingStyle ] '.$this->encodingStyle.\"\\n\";\n $s.= ' [ actor ] '.$this->actor.\"\\n\";\n return $s.'}';\n }", "public function __toString()\n {\n return sprintf(self::TEMPLATE, $this->value->type(), $this->role, $this->type);\n }", "abstract function to_str();", "public function __toString() {\n $params = [];\n $str = '';\n foreach ($this->data as $x => $row) {\n $str .= '[ ';\n foreach ($row as $y => $value) {\n $str .= \"%s \";\n $params[] = $value;\n }\n $str .= \"]\\n\";\n }\n return vsprintf($str, $params);\n }", "public function __toString()\n {\n return sprintf(\n 'Payment \"%s\" for \"%s\": %s %s',\n $this->id,\n $this->label,\n $this->getAmount()->getAmount(),\n $this->getAmount()->getCurrency()\n );\n }", "public function _convertObjectToString($obj, $quoted = false)\n {\n if (!is_object($obj)) {\n throw new InvalidArgumentException('$obj expects object');\n }\n\n $str = '';\n if (method_exists($obj, '__toString')) {\n $str = (string)$obj;\n if ($quoted === true) {\n $str = '\"'.$str.'\"';\n }\n } else {\n $str = '('.get_class($obj).')';\n }\n\n return $str;\n }", "public function __toString()\n\t{\n\t\treturn \n\t\t\t'$id\t\t\t\t: ' . $this->id .\t\t\t\t'<br/>' .\n\t\t\t'$id_person\t\t\t: ' . $this->id_person .\t\t\t'<br/>' .\n\t\t\t'$aanvraag\t\t\t: ' . $this->aanvraag .\t\t\t'<br/>' .\n\t\t\t'$invitation\t\t: ' . $this->invitation\t . '<br/>' .\n\t\t\t'$invitationSent\t: ' . $this->invitationSent . '<br/>' .\n\t\t\t'$reaction\t: ' . $this->reaction . '<br/>';\n\t\t\t'$emailadres\t: ' . $this->emailadres . '<br/>';\n\t}", "public function __toString()\n {\n return sprintf('%01.4f, %01.4f, %01.4f, %01.4f', $this->cyan, $this->magenta, $this->yellow, $this->key);\n }", "public function ToFormattedText() {\n $result = 'First Name: '.$this->firstName.'<br />';\n $result .= 'LastName: '.$this->lastName.'<br />';\n $result .= 'email: '.$this->email.'<br />';\n\n if( ! is_null($this->dob ) )\n $result .= 'Date of Birth: '.$this->dob.'<br />';\n\n if( ! is_null($this->address ) )\n $result .= 'Address: '.$this->address.'<br />';\n\n return $result;\n }", "public function toString(): string\n {\n return implode(' ', $this->toFields());\n }", "public function __toString(): string\n {\n $replacements = [\n '%name%' => $this->getName(),\n '%number%' => $this->getNumber(),\n '%elements%' => $this->getElements(),\n ];\n\n $streetString = str_replace(array_keys($replacements), array_values($replacements), $this->format);\n\n return $streetString;\n }", "public function createComponent() : string\n {\n return Formatter::format( $this );\n }", "function twitter_format(\\stdClass $tweet)\n {\n return JoePritchard\\LaravelTwitterTextFormatter\\Formatter::format($tweet);\n }", "public function __toString() : string\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString(): string\n {\n $tags = [];\n foreach ($this->getTags() as $tag) {\n if ($tag === null) {\n $tags[] = null;\n continue;\n }\n\n $tags[] = '{' . trim('@' . $tag->getName() . ' ' . $tag) . '}';\n }\n\n return vsprintf($this->getBodyTemplate(), $tags);\n }", "public function __toString() {\n\t\t\treturn sprintf('OnlineDonation Object %s', $this->intId);\n\t\t}", "public function __toString(): string\n {\n return sprintf(\n '%s persons=\"%s\", products=\"%s\")]',\n parent::__toString(),\n $this->getCodesTxt($this->getPersons()),\n $this->getCodesTxt($this->getProducts())\n );\n }", "public function getToStringFormat()\n {\n return $this->_to_string_format;\n }", "public function ToString($format) {\r\n return $this->ToString();\r\n }", "public function __toString()\n {\n if ($this->getTypeCategory() === self::CATEGORY_PK) {\n $format = '{type}{check}{comment}{append}';\n } else {\n $format = $this->format;\n }\n\n return $this->buildCompleteString($format);\n }", "public function format($result)\n {\n if (is_object($result) === true && method_exists($result, '__toString') === true) {\n return (string) $result;\n } elseif (is_object($result) === true || is_array($result) === true) {\n return var_export($result, true);\n } elseif (is_bool($result) === true && true === $result) {\n return 'true';\n } elseif (is_bool($result) === true && false === $result) {\n return 'false';\n }\n\n return (string) $result;\n }", "public function __toString()\n {\n return sprintf('%s -> %s', $this->getLugar(), $this->getMotivo());\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString(): string\n {\n return sprintf(\n '%3d - %20s - %30s - %1d - %1d',\n $this->id,\n utf8_encode($this->username),\n utf8_encode($this->email),\n $this->enabled,\n $this->isAdmin\n );\n }", "public function getString()\n {\n return $this->format('%s%s%s');\n }", "public function __tostring();", "public function toHTML($object){\n\t\t$title = Resource::get_title($object);\n\t\t$url = Resource::get_url($object);\n\t\t$html = \"<a href='{$url}'>{$title}</a>\";\n\t\treturn $html;\n\t}", "public function __toString(): String\n {\n return $this->amount . \"\" . $this->currency;\n }", "public function __toString()\n {\n try {\n return $this->toString();\n } catch (\\Exception $e) {\n return '';\n }\n }", "public function __toString()\n {\n return Text::format(self::DEFAULT_TO_STRING, get_class($this));\n }" ]
[ "0.74279374", "0.7420128", "0.68975186", "0.68241805", "0.68169683", "0.67029935", "0.6640796", "0.66158426", "0.65539575", "0.6550896", "0.65468526", "0.65013593", "0.65013593", "0.65013593", "0.6470318", "0.6438645", "0.6395432", "0.63893306", "0.6386968", "0.6375427", "0.6361223", "0.63499475", "0.6347484", "0.63355273", "0.6323384", "0.6298229", "0.62688607", "0.6241457", "0.6224028", "0.62232745", "0.6214303", "0.6211378", "0.6183197", "0.6168493", "0.61478007", "0.6117113", "0.6101139", "0.61002225", "0.6091915", "0.6065315", "0.60096675", "0.5980979", "0.59722775", "0.5970347", "0.5942851", "0.59425753", "0.5935927", "0.59352416", "0.59244984", "0.5912021", "0.5909222", "0.5907919", "0.5897955", "0.5896248", "0.58900756", "0.5883733", "0.58782494", "0.5877644", "0.5872909", "0.5871496", "0.586914", "0.58603746", "0.5857555", "0.58554137", "0.58446044", "0.58404857", "0.5837984", "0.58369964", "0.58346474", "0.5834166", "0.58316034", "0.58275557", "0.5820174", "0.58129454", "0.5812212", "0.5807167", "0.5803389", "0.57997346", "0.5798511", "0.5798511", "0.5795057", "0.5791298", "0.57844716", "0.5783982", "0.57796323", "0.57769257", "0.5773153", "0.5773034", "0.5763731", "0.5763731", "0.5763731", "0.5763731", "0.5763731", "0.5763731", "0.5763445", "0.57630235", "0.57629216", "0.5762253", "0.57567436", "0.57550526", "0.57540363" ]
0.0
-1
Return a formatted string from the given resource.
private function resource($value): string { return (string) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dumpResource($resource, $format = 'html')\n {\n $this->checkResourceParam($resource, true);\n\n if (isset($this->index[$resource])) {\n $properties = $this->index[$resource];\n } else {\n return '';\n }\n\n $plist = array();\n foreach ($properties as $property => $values) {\n $olist = array();\n foreach ($values as $value) {\n if ($value['type'] == 'literal') {\n $olist []= Utils::dumpLiteralValue($value, $format, 'black');\n } else {\n $olist []= Utils::dumpResourceValue($value['value'], $format, 'blue');\n }\n }\n\n $pstr = RdfNamespace::shorten($property);\n if ($pstr == null) {\n $pstr = $property;\n }\n if ($format == 'html') {\n $plist []= \"<span style='font-size:130%'>&rarr;</span> \".\n \"<span style='text-decoration:none;color:green'>\".\n htmlentities($pstr) . \"</span> \".\n \"<span style='font-size:130%'>&rarr;</span> \".\n join(\", \", $olist);\n } else {\n $plist []= \" -> $pstr -> \" . join(\", \", $olist);\n }\n }\n\n if ($format == 'html') {\n return \"<div id='\".htmlentities($resource, ENT_QUOTES).\"' \" .\n \"style='font-family:arial; padding:0.5em; \".\n \"background-color:lightgrey;border:dashed 1px grey;'>\\n\".\n \"<div>\".Utils::dumpResourceValue($resource, $format, 'blue').\" \".\n \"<span style='font-size: 0.8em'>(\".\n $this->classForResource($resource).\")</span></div>\\n\".\n \"<div style='padding-left: 3em'>\\n\".\n \"<div>\".join(\"</div>\\n<div>\", $plist).\"</div>\".\n \"</div></div>\\n\";\n } else {\n return $resource.\" (\".$this->classForResource($resource).\")\\n\" .\n join(\"\\n\", $plist) . \"\\n\\n\";\n }\n }", "public function get_resource() : string\n {\n return $this->resource;\n }", "public function format($resource, Headers $headers);", "public function getResource(): string\n {\n return $this->resource;\n }", "public function getResource(): string\n {\n return $this->resource;\n }", "public function resource(): ?string\n {\n $requestResource = $this->parameters()[1] ?? null;\n\n return Str::of($requestResource)\n ->plural()\n ->lower()\n ->__toString();\n }", "public function format() {\r\n\t\t$this->resource->format();\r\n\t}", "private function format_resources($resources) {\n $result = '';\n foreach ($resources as $resource) {\n $result .= $this->parser->parse('theme/_resource', (array) $resource, true);\n }\n return $result;\n }", "public function getString()\n {\n return $this->format('%s%s%s');\n }", "public function serialize(ResourceInterface $resource, ResourceSerializationContext $context): string;", "public function __toString()\n {\n if (is_object($this->resource) and method_exists($this->resource, '__toString')) {\n\n return $this->resource->__toString();\n }\n\n return json_encode($this->resource);\n }", "function getResourceName($resource_id = '')\n {\n if (empty($resource_id)) {\n $resource_id = $this->resource_id;\n }\n $db = DBManagerFactory::getInstance();\n $resourceType = $db->getConnection()\n ->executeQuery(\n 'SELECT DISTINCT resource_type FROM project_resources WHERE resource_id = ?',\n [$resource_id]\n )->fetchColumn();\n if (false !== $resourceType) {\n if (empty($resourceType)) {\n return '&nbsp;';\n }\n $resourceBean = BeanFactory::newBean($resourceType);\n if (!$resourceBean instanceof SugarBean) {\n return '&nbsp;';\n }\n $resourceTableName = $resourceBean->getTableName();\n $resource = $db->concat($resourceTableName, array('first_name', 'last_name'));\n return $db->getConnection()\n ->executeQuery(\n \"SELECT {$resource} as resource_name FROM {$resourceTableName} WHERE id = ?\",\n [$resource_id]\n )->fetchColumn();\n } else {\n return '';\n }\n }", "static function resource($resource) {\n\t\treturn self::_getLoader()->resource($resource);\n\t}", "public function getResource(): ?string\n {\n return $this->resource ?? Str::snake(Str::pluralStudly(class_basename($this)));\n }", "public function get_resource_name();", "public function fromResource(Resource $resource)\n {\n $file = $resource->getFilenameShort(false);\n $path = $resource->getRelativePath(true);\n return $this->urlizeRecursive($path . '/' . $file);\n }", "public function getResourceId($resource): string\n {\n if (is_resource($resource)) {\n $data = stream_get_meta_data($resource);\n $resource = $data['wrapper_data'];\n }\n\n return spl_object_hash($resource);\n }", "public static function get( $stack_name, $format = null )\n\t{\n\t\t$out = '';\n\t\t$stack = self::get_sorted_stack( $stack_name );\n\t\t$stack = Plugins::filter( 'stack_out', $stack, $stack_name, $format );\n\t\tforeach ( $stack as $element ) {\n\t\t\t/** @var StackItem $element */\n\t\t\tif ( is_callable( $format ) ) {\n\t\t\t\t$out.= call_user_func_array( $format, (array) $element->resource );\n\t\t\t}\n\t\t\telseif ( is_string( $format ) ) {\n\t\t\t\t$out .= vsprintf( $format, (array) $element->resource );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$out.= $element;\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "protected function plural(string $resource): string\n {\n $resource = strtolower($resource);\n if (substr($resource, -1) === 's') {\n return $resource;\n }\n\n return $resource.'s';\n }", "private function return_seeAlso_resource($resource) {\r\n $resource = add_query_arg('feed','lhrdf', $resource);\r\n $resource = add_query_arg('format',$this->format, $resource);\r\n return $resource;\r\n }", "public function toString() {\n return \"Resource Relation: \" . ($this->role ? $this->role->getTerm() . \" \" : \"\") . ($this->resource ? $this->resource->getTitle() . \" \" : $this->content);\n }", "public function format(): string;", "protected function getSuccessfulUpdateMessage(string $resource = ''): string\n {\n return ! empty($resource) ? ucfirst($resource) . ' updated successfully.' : 'Updated successfully.';\n }", "protected static function _get_local_resource( $resource ) {\r\n return file_get_contents( \r\n $resource \r\n ); \r\n }", "public function getResourceUrl(string $resource): string\n {\n Assert::oneOf(\n $resource,\n array_keys($this->serverResources),\n 'Resource type \"%s\" is not supported by the ACME server (supported: %2$s)'\n );\n\n return $this->serverResources[$resource];\n }", "protected function getUri($resource)\n {\n return rtrim($this->getConfig('endpoint'), '\\\\/ ').'/'.trim($resource, '\\\\/ ');\n }", "public function getFrom($resource);", "public function get_resource();", "public function versionedResource($resource) {\n \treturn Celsus_Resource::version($resource);\n }", "protected function getResource($resource)\r\n\t{\r\n\t\t$hyperLink = new Hyperlink();\r\n\t\t\r\n\t\t$p_resource = $resource->nodeValue;\r\n\t\t$p_title \t= $resource->getAttribute('title');\r\n\t\t\r\n\t\tif($p_title != '')\r\n\t\t\t$return = $hyperLink->Display($p_resource, $p_title);\r\n\t\telse\r\n\t\t\t$return = $hyperLink->Display($p_resource, $p_resource);\r\n\t\t\t\r\n\t\tunset($hyperLink);\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "public function getResourceName()\n {\n return $this->resource_name;\n }", "public static function getFormat(): string;", "function celerity_get_resource_uri($resource, $source = 'phabricator') {\n $resource = ltrim($resource, '/');\n\n $map = CelerityResourceMap::getNamedInstance($source);\n $response = CelerityAPI::getStaticResourceResponse();\n return $response->getURI($map, $resource);\n}", "protected function getResourceName($resource)\r\n {\r\n if (is_resource($resource) && 'stream' === get_resource_type($resource)) {\r\n $meta = stream_get_meta_data($resource);\r\n\r\n return $meta['uri'];\r\n }\r\n\r\n return null;\r\n }", "public function getResourceName();", "public static function format($str, $template) {}", "public function formatNotFoundError()\n {\n return 'Given resource could not be found.';\n }", "public function getModelAttribute(Resource $resource): string\n {\n return $this->attribute;\n }", "function get_post_format_string($slug)\n {\n }", "abstract function format();", "public function get(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (str_ends_with($resource, '/')) { // query for children of $resource\n $json = $this->getChildren(rtrim($resource, '/'), $fs);\n } elseif (array_key_exists($resource, $fs)) { // get item\n $item = $fs[$resource];\n $json = json_encode($item, JSON_NUMERIC_CHECK);\n }\n return $json;\n }", "public static function toJson($resource)\n {\n return json_encode($resource);\n }", "public function resourceUri($resource)\n {\n return $this->getDispatchFabricator()->resource($resource);\n }", "public function getDefaultResourceFormatter(): DefaultResourceFormatter;", "protected static function factory(){\n\t\t\treturn 'Resources';\n\t\t}", "public function render(): string\n\t{\n\t\treturn implode(' ', array_filter([\n\n\t\t\t$this->formatted_type,\n\t\t\t$this->formatted_attributes,\n\t\t\t$this->formatted_charset,\n\t\t\t$this->formatted_null,\n\t\t\t$this->formatted_auto_increment,\n\t\t\t$this->formatted_default,\n\t\t\t$this->formatted_comment\n\n\t\t]));\n\t}", "private static function _getUrl(String $resource)\n {\n if (null == static::$api_url) {\n static::$api_url = 'https://' .\n substr(\n static::$api_key,\n strrpos(static::$api_key, '-') + 1\n ) .\n '.api.mailchimp.com/3.0';\n }\n return rtrim(static::$api_url, '/') . \"/\" . $resource;\n }", "function format()\r\n\t{\r\n\t\treturn $this->text;\r\n\t}", "public static function getLocalizedResourceLabel(string $entity): string\n {\n $label = collect(Filament::getResources())->filter(function ($resource) use ($entity) {\n return $resource === $entity;\n })->first()::getModelLabel();\n\n return Str::of($label)->headline();\n }", "function idOrSlug(array $resource): string\n{\n global $config;\n return htmlspecialchars($config[\"use_url_rewrite\"] ? $resource[\"slug\"] : $resource[\"id\"]);\n}", "public function get(Resource $resource);", "static public function getMessageFromResource( IDirected &$aContext, $aMessageResource, $aResourceData=null )\n\t{\n\t\t$theResource = $aMessageResource;\n\t\tif (is_string($aResourceData))\n\t\t\t$theResource .= '/' . $aResourceData ;\n\t\telse if (is_array($aResourceData))\n\t\t\t$theResource .= '/' . implode('/', $aResourceData);\n\t\treturn $aContext->getRes( $theResource ) ;\n\t}", "public function getResourceName()\n {\n return $this->_resourceName;\n }", "protected function formatRating(RatingEntity $entity): string\n {\n return $this->translator->trans(\n '%id%, %moduleName%, %objectId%, %rating%, %ratingSystem%',\n [\n '%id%' => $entity->getId(),\n '%moduleName%' => $entity->getModuleName(),\n '%objectId%' => $entity->getObjectId(),\n '%rating%' => $entity->getRating(),\n ],\n 'rating'\n );\n }", "public function getApiResourceValue()\n {\n return \"\\$this->{$this->name}\";\n }", "public function getStringRepresentation(): string;", "public function createComponent() : string\n {\n return Formatter::format( $this );\n }", "public function getResourceName()\n {\n return static::$resource ?: strtolower($this->getEntityName());\n }", "public function getFormatName();", "public function renderOne($resource)\n {\n $transformer = new $this->transformerClass;\n $item = new Item($resource, $transformer);\n\n return $this->manager->createData($item)->toArray();\n }", "public function subtitle()\n {\n return $this->resource->getName();\n }", "private function output(string $parameter)\n {\n $value = $this->container->get($parameter);\n $format = $this->formats[gettype($value)];\n\n if ($this->isCollectionAlias($parameter)) {\n $format = $this->formats['collection'];\n }\n\n if (is_bool($value)) {\n $value = $value ? 'true' : 'false';\n }\n\n return sprintf($format, $value);\n }", "public function getFormatContent(): string\n {\n $this->label = rtrim($this->label,';');\n return \"\\e[{$this->label}m{$this->content}\\e[0m\";\n }", "function t($message, $style, $resource_name, $line, $plural='', $count=1)\n\t{\n\t\tglobal $opt;\n\n\t\tif ($message == '')\n\t\t\treturn '';\n\n\t\tif ($plural != '' && $count!=1)\n\t\t\t$message = $plural;\n\t\t$search = $this->prepare_text($message);\n\n\t\t$trans = gettext($search);\n\t\t\n\t\t// safe w/o mb because asc(%) < 128\n\t\tif (strpos($trans, \"%\")>=0)\n\t\t\t$trans = $this->v($trans);\n\t\t\n\t\treturn $trans;\n\t}", "public static function getResourceId($resource)\n {\n if (isset($resource->identifiers) || is_array($resource->identifiers)) {\n foreach ($resource->identifiers as $identifier) {\n if (substr($identifier, 0, 15) == 'action_network:') {\n return substr($identifier, 15);\n }\n }\n }\n }", "public function getStringRepresentation()\n {\n $representation = $this->getContainer();\n if($this->getRow())\n $representation .= '.'.$this->getRow();\n $representation .= '.'.$this->getAction();\n return $representation;\n }", "public function resource($resource) {\n // If the resource has already been computed and cached, just use it. Otherwise, compute and cache it somewhere.\n // Big case statement for each possible type of resource\n // Likely going to be using $this->reference a lot\n switch ($resource) {\n case 'offers':\n return $this->offers; // Special case... No caching because of how offers are nested inside products\n case 'category':\n return $this->reference->resourceById('categories', $this->attr('category'));\n case 'brand':\n return $this->reference->resourceById('brands', $this->attr('brand'));\n }\n }", "protected function loadFile($resource)\n {\n return file_get_contents($resource);\n }", "public function buildUrl($resource)\n {\n return $this->baseUrl.$resource.'/'.$this->method;\n }", "function toString() {\r\n\r\n\t\t$sb = 'MessageResourcesConfig[';\r\n\t\t$sb .= 'factory=';\r\n\t\t$sb .= $this->factory;\r\n\t\t$sb .= 'null=';\r\n\t\t$sb .= $this->nullValue;\r\n\t\t$sb .= ',parameter=';\r\n\t\t$sb .= $this->parameter;\r\n\t\t$sb .= ']';\r\n\t\treturn $sb;\r\n\r\n\t}", "public function resource() : Resource\n {\n return Resources::forName($this->resource);\n }", "protected function getResourceEntity()\n\t{\n\t\treturn $this->arguments->getArgument(static::$RESOURCE_ARGUMENT_NAME)->getValue();\n\t}", "public function __toString(): string\n {\n return (string) $this->format();\n }", "public function __toString()\n {\n return sprintf(self::TEMPLATE, $this->value->type(), $this->role, $this->type);\n }", "public function str() {\n\t\t\treturn \\uri\\generate::string($this->object);\n\t\t}", "protected function alertMessage(string $message, Resource $resource, Request $request): string\n {\n return trans($message, [\n 'nombre_modelo' => $resource->getLabel(),\n 'valor_modelo' => $resource->title(),\n ]);\n }", "public function getResourceUuid()\n {\n return $this->resource_uuid;\n }", "public function getName(): string\n {\n if (static::NAME) {\n return (string) static::NAME;\n } elseif ($shortName = (new ReflectionClass($this))->getShortName()) {\n if (substr($shortName, -6) === 'Format') {\n return strtolower(substr($shortName, 0, strlen($shortName) - 6));\n }\n }\n\n // If made it here...\n throw new RuntimeException(sprintf(\n 'Could not automatically derive format name from class: %s',\n get_called_class()\n ));\n }", "public function __toString()\n {\n return sprintf(\n '<div class=\"mb-6\">\n\t\t\t\t %s\n\t\t\t\t <div class=\"m-2 p-2 inline-block font-medium text-xs leading-tight\">\n\t\t\t\t <p class=\"text-red-500 hover:text-red-700\"> %s</p>\n\t\t\t\t </div>\n </div>',\n $this->renderInput(),\n $this->model->getFirstError($this->attribute)\n );\n }", "private function varIsResource($var): void {\r\n\t\t$this->makeTableHeader( 'resourceC', 'resource',1);\r\n\t\techo \"<tr>\\n<td>\\n\";\r\n\t\tswitch(get_resource_type($var)) {\r\n\t\t\tcase 'pgsql result':\r\n\t\t\t\t$this->varIsDBResource($var);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'gd':\r\n\t\t\t\t$this->varIsGDResource($var);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'xml':\r\n\t\t\t\t$this->varIsXmlResource($var);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\techo get_resource_type($var).$this->closeTDRow();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\techo $this->closeTDRow().\"</table>\\n\";\r\n\t}", "public function __toString() {\n return sprintf('HTTP/1.1 %d %s', $this->getStatus(), $this->getDescription());\n }", "public static function createButtonLabel()\n {\n return __('Request :resource', ['resource' => static::singularLabel()]);\n }", "public function retrieve(Resource $resource);", "public function strRepresentation() {\n\t\t$retstr = \"\";\n\t\t$retstr .= \"Card \".$this->name.\" - \".$this->id.\" is a(n) \".$this->getTypeAsStr().\" card with a cost of \".$this->cost.\".<br />It boosts the following stats:<br />\";\n\t\t$retstr .= \"Body: \";\n\t\t$retstr .= print_r($this->body, true);\n\t\t$retstr .= \"<br />Mind: \";\n\t\t$retstr .= print_r($this->mind, true);\n\t\t$retstr .= \"<br />Soul: \";\n\t\t$retstr .= print_r($this->soul, true);\n\t\t$retstr .= \"<br />And gives a vitality boost of \".$this->vit;\n\t\treturn $retstr;\n\t}", "public function templateFormat($var = null): string\n {\n return $this->loadHeaderProperty(\n 'template_format',\n $var,\n function ($value) {\n return ltrim($value ?? $this->getNestedProperty('header.append_url_extension') ?: Utils::getPageFormat(), '.');\n }\n );\n }", "public function getString(){\n return \"Side: \" . $this -> side\n . \"<br> Volume: \" . $this -> getVolume()\n . \"<br> Surface: \" . $this -> getSurface();\n }", "public function asString() {\n $result = '';\n if ($this->_currentUsage > 0 || $this->_peakUsage > 0) {\n $result .= 'Memory Usage: '.number_format($this->_currentUsage, 0, '.', ',').' bytes';\n if ($this->_diffUsage >= 0) {\n $result .= ' (+'.number_format($this->_diffUsage, 0, '.', ',').' bytes)';\n } else {\n $result .= ' (-'.number_format($this->_diffUsage * -1, 0, '.', ',').' bytes)';\n }\n $result .= \" | Peak Usage: \".number_format($this->_peakUsage, 0, '.', ',').' Bytes';\n }\n return $result;\n }", "public function getFullName(): string\n {\n return $this->getResource()->getFullName() . ':' . $this->getName();\n }", "function format_throwable(Throwable $throwable): string\n {\n return di()->get(FormatterInterface::class)->format($throwable);\n }", "public function getResource()\n {\n $path = $this->getPath();\n $query = isset($this->urlParts['query']) ? '?' . $this->urlParts['query'] : '';\n\n return $path . $query;\n }", "public function format(OperationInterface $operation): string\n {\n return $operation instanceof DescribableOperationInterface\n ? (string)$operation\n : sprintf(\n 'Generic operation %s',\n spl_object_hash($operation)\n );\n }", "public function getResourceClass(): string\n {\n if (!$this->_resourceClass) {\n $default = Resource::class;\n $self = static::class;\n $parts = explode('\\\\', $self);\n\n if ($self === self::class || count($parts) < 3) {\n return $this->_resourceClass = $default;\n }\n\n $alias = Inflector::singularize(substr(array_pop($parts), 0, -8));\n /** @psalm-var class-string<\\Muffin\\Webservice\\Model\\Resource> */\n $name = implode('\\\\', array_slice($parts, 0, -1)) . '\\Resource\\\\' . $alias;\n if (!class_exists($name)) {\n return $this->_resourceClass = $default;\n }\n\n return $this->_resourceClass = $name;\n }\n\n return $this->_resourceClass;\n }", "public function getFormattedString()\r\n {\r\n $string = (string) $this->code;\r\n\r\n if (null !== $this->message) {\r\n $string = $string . ' ' . $this->message;\r\n }\r\n\r\n return $string;\r\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function __toString()\r\n {\r\n return $this->getFormattedString();\r\n }", "public function format(LogRecord $record) {\n $formatted_record = $this->format;\n $formatted_record = str_replace(\"%L\", $record->getLevel(), $formatted_record);\n $formatted_record = str_replace(\"%T\", $record->getTime($this->dateFormat), $formatted_record);\n $formatted_record = str_replace(\"%R\", $record->getResource(), $formatted_record);\n $formatted_record = str_replace(\"%M\", $record->getMessage(), $formatted_record);\n $formatted_record = str_replace(\"%O\", $record->getObject(), $formatted_record);\n return $formatted_record;\n }", "public function resourceLabel(): string\n {\n return $this->model->name;\n }" ]
[ "0.72970563", "0.6715958", "0.6566269", "0.6277017", "0.6277017", "0.6186849", "0.6111677", "0.6071556", "0.6042277", "0.6020532", "0.59589577", "0.59408116", "0.5888256", "0.58469653", "0.58182526", "0.57464063", "0.57165956", "0.57059216", "0.569613", "0.5692319", "0.56775814", "0.5671045", "0.56704485", "0.56463265", "0.5645358", "0.5592825", "0.55453354", "0.5541335", "0.5539308", "0.54893994", "0.5481699", "0.5448197", "0.54331315", "0.5417433", "0.54169583", "0.54024696", "0.5399482", "0.53893447", "0.5386686", "0.5383178", "0.5359984", "0.53453", "0.534074", "0.53197116", "0.52907217", "0.5273971", "0.5252137", "0.52450126", "0.5244845", "0.5239059", "0.5204385", "0.5177771", "0.51742417", "0.51640373", "0.5163771", "0.51633465", "0.5156032", "0.51532555", "0.51522535", "0.51419353", "0.51379406", "0.51290506", "0.512787", "0.51160294", "0.51139957", "0.5112076", "0.5110154", "0.5102383", "0.50991476", "0.5097717", "0.5093111", "0.50922227", "0.5060656", "0.50540215", "0.5053593", "0.5026642", "0.50256544", "0.5019803", "0.5018818", "0.50069994", "0.50044537", "0.49998406", "0.4990046", "0.49738544", "0.4958143", "0.49559966", "0.49496058", "0.49491942", "0.49473834", "0.49376476", "0.49368984", "0.49350333", "0.49317676", "0.49310586", "0.49310586", "0.49310586", "0.49310586", "0.49297455", "0.4926112", "0.49246922" ]
0.5337834
43
Return a quoted string.
private function quoted(string $value): string { return sprintf('\'%s\'', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function intoQuote($string){ return \"'\".$string.\"'\"; }", "public function quote($string)\n {\n return $string;\n }", "function Quote( $text ) {\n\t\treturn '\\'' . getEscaped( $text ) . '\\'';\n\t}", "protected function quote(?string $value): string {\n\n\t\t\t$quote = $this->quoteInputEncoded;\n\n\t\t\tif ($value === null)\n\t\t\t\treturn \"{$quote}{$quote}\";\n\n\t\t\t$value = str_replace($quote, \"{$quote}{$quote}\", $value);\n\n\t\t\treturn \"{$quote}{$value}{$quote}\";\n\t\t}", "abstract public function quoteString($value);", "public function quoteAndEscape(string $str): string;", "static function quote($s){\r\n return '\"' . str_replace('\"', '\\\"', $s) . '\"';\r\n }", "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "public static function quote(mixed $val = \"\", string $q = \"\\\"\"): string\n {\n if (is_string($val)) {\n return $q . $val . $q;\n } elseif (is_numeric($val)) {\n return $val;\n } elseif (is_array($val)) {\n return \"StringUtils::quote returned 'array'! \";\n } else {\n return $q . $val . $q;\n }\n }", "public static function quote($s){\r\n\t\treturn LEFT_QUOTES . $s . RIGHT_QUOTES;\r\n\t}", "protected function TitleQuoted() {\n\treturn '&ldquo;'.$this->TitleString().'&rdquo;';\n }", "public static function quote( $value ) {\n\t\t# Quote \\ here, because it needs always escaping\n\t\t$value = addcslashes( $value, '\\\\' );\n\n\t\t# For readability\n\t\t$single = \"'\";\n\t\t$double = '\"';\n\t\t$quote = $single;\n\n\t\t# It is safe to use '-quoting, unless there is '-quote in the text\n\t\tif ( strpos( $value, $single ) !== false ) {\n\t\t\t# In case there is no variables that need to be escaped, just use \"-quote\n\t\t\tif ( strpos( $value, $double ) === false && !preg_match( '/\\$[^0-9]/', $value ) ) {\n\t\t\t\t$quote = $double;\n\t\t\t# Something needs quoting, pick the quote which causes less quoting\n\t\t\t} else {\n\t\t\t\t$doubleEsc = substr_count( $value, $double ) + substr_count( $value, '$' );\n\t\t\t\t$singleEsc = substr_count( $value, $single );\n\n\t\t\t\tif ( $doubleEsc < $singleEsc ) {\n\t\t\t\t\t$quote = $double;\n\t\t\t\t\t$extra = '$';\n\t\t\t\t} else {\n\t\t\t\t\t$extra = '';\n\t\t\t\t}\n\n\t\t\t\t$value = addcslashes( $value, $quote . $extra );\n\t\t\t}\n\t\t}\n\n\t\treturn $quote . $value . $quote;\n\t}", "public function getQuoteChar();", "public static function quotedString($str)\n {\n }", "function quote($s) { \n return \"'\".str_replace('\\\\\"', '\"', addslashes($s)).\"'\"; \n }", "public function getQuoting() {\n return $this->quoting;\n }", "public function quote($str) {\n\t\treturn $this->_resource->quote($str);\n\t}", "public function quote($stringValue);", "public function getQuotationQuote()\n {\n return $this->traitGetQuotationQuote();\n }", "public function quote($value) {\n\t\treturn $this -> getAdapter() -> quote($value);\n\t}", "public static function escapeQuote($val){\n\t\t\tswitch(gettype($val)){\n\t\t\t\tcase 'array': case 'object':\n\t\t\t\t\t$val=(array)$val;\n\t\t\t\t\tforeach($val as $k=>$v)\n\t\t\t\t\t\t$val[$k]=self::escapeQuote($v);\n\t\t\t\t\treturn $val;\n\t\t\t\tcase 'string':\n\t\t\t\t\treturn '\"'.self::escape($val).'\"';\n\t\t\t\tcase 'NULL':\n\t\t\t\t\treturn 'NULL';\n\t\t\t\tcase 'boolean':\n\t\t\t\t\treturn $val ? 'TRUE' : 'FALSE';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strval($val); \n\t\t\t}\n\t\t}", "protected function getQuotedString(string $str, ?string $qt = null): string\n\t{\n\t\t$qt = $this->getQuote($qt);\n\n\t\t// escaping Slashes or Backslashes in Commands ..observe this behavour case should never happend\n\t\t$str = ( in_array( $qt, [ self::SQ, self::SQE ] ) ) ?\n\t\t\tstr_replace( self::SQ, self::SQE, $str ) :\n\t\t\tstr_replace( self::DQ, self::DQE, $str );\n\n\t\treturn $qt . $str . $qt;\n\t}", "public function quote($str)\n {\n $str = \"'\" . addslashes($str) . \"'\";\n return $str;\n }", "public function quote($stringValue) {\n return $this->escapeStringChar . $stringValue . $this->escapeStringChar;\n }", "function add_quotes($str) {\n if (is_string($str)) {\n return sprintf(\"'%s'\", $str);\n } elseif (is_null($str)) {\n return sprintf(\"%s\", \"null\");\n } else {\n return sprintf(\"%s\", $str);\n }\n}", "public function quote($value)\n\t{\n\t\treturn $this->c->quote($value);\n\t}", "function bab_pm_quote($str)\n{\n return '\"' . str_replace('\"', '\"\"', $str) . '\"';\n}", "protected function getQuote(?string $qt = null): string\n\t{\n\t\treturn $qt && \\in_array($qt, self::$allowedQuotes, true) ? $qt : $this->sQuoteCharacter;\n\t}", "public static function quote($val)\n {\n if (is_null($val))\n return 'null';\n\n if (is_int($val) || is_double($val))\n return self::quote_number($val);\n\n if (is_scalar($val))\n return self::quote_string($val);\n\n if (is_array($val))\n {\n $out = array(); foreach ($val as $v) $out[] = self::quote($v);\n return sprintf('(%s)', join(',', $out));\n }\n\n if (is_object($val))\n return strval($val);\n\n if (is_callable($val))\n return $val();\n\n return 'null';\n }", "static function quote($value)\n\t{\n\t\treturn \"'\" . str_replace(\"'\", \"\\\\'\", $value) . \"'\";\n\t}", "protected function _quote($value) {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "static protected function _quote($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "protected function quote ( $str ) {\n\n\t\tif(strpos($str, '\"')) {\n\t\t\t$str = str_replace('\"', '\\\"', $str);\n\t\t\t$str = '\"'.$str.'\"';\n\t\t}\n\t\telseif(strpos($str, \"'\")) {\n\t\t\t$str = str_replace(\"'\", \"\\'\", $str);\n\t\t\t$str = \"'\".$str.\"'\";\n\t\t}\n\n\t\treturn $str;\n }", "protected function _quoteString($value)\n {\n return (string)$value;\n }", "public function quoteString($str)\n {\n return $this->quote($str);\n }", "public function quote($value){\n $connection = $this -> connect();\n return pg_escape_literal($value);\n }", "function qstr($string, $magic_quotes=false)\n\t{\t\n\t\tif (!$magic_quotes) {\n\t\t\treturn \"'\".str_replace(\"'\", \"''\", $string).\"'\";\n\t\t}\n\t\t$string = str_replace(\"\\\\'\", \"''\", str_replace('\\\\\\\\', '\\\\', str_replace('\\\\\"', '\"', $string)));\n\t\treturn \"'\" . $string . \"'\";\n\t}", "public function quote($value) {\n $connection = $this -> connect();\n return \"'\" . $connection -> real_escape_string($value) . \"'\";\n }", "public function quote($value)\n\t{\n\t\tif ($value === null) {\n\t\t\treturn 'NULL';\n\t\t} else if ($value === false) {\n\t\t\treturn '0';\n\t\t} else if ($value === true) {\n\t\t\treturn '1';\n\t\t} else if ($value instanceof As_SqlFunction) {\n\t\t\treturn $value->__toString();\n\t\t}\n\t\t\n\t\treturn \"'\" . str_replace(\"'\", \"''\", $value) . \"'\";\n\t}", "function quote( $string, $quotes = false ) {\r\n return $this->link->quote( ( $quotes )? stripslashes( $string ) : $string, null, true, true );\r\n }", "private function quote($string)\n {\n return \"'\" . addcslashes($string, \"'\") . \"'\";\n }", "function quoted_printable_encode($str, $wrap=true)\n\t{\n\t $return = '';\n\t $iL = strlen($str);\n\t for($i=0; $i<$iL; $i++)\n\t {\n\t $char = $str[$i];\n\t if(ctype_print($char) && !ctype_punct($char)) $return .= $char;\n\t else $return .= sprintf('=%02X', ord($char));\n\t }\n\t return ($wrap === true) ? wordwrap($return, 74, \" =\\n\") : $return;\n\t\n\t}", "private function createQuote($string) {\n\t\t$string = $this->cleanString($string);\n\t\t$string = '</p><div class=\"quote\">'.$string.'</div><p>';\n\t\treturn $string;\n\t}", "public function quote($string) {\n return $this->_connection->quote($string);\n }", "static function squote($s){\r\n return \"'\" . str_replace(\"'\", '\\'', $s) . \"'\";\r\n }", "public function getRandomQuote(): string\n {\n return (string)$this->getAllQuotes()->random();\n }", "public function quote($string)\n {\n return \"'\" . str_replace(\"\\\\\\\"\", '\"', str_replace(\"\\\\&quot;\", '&quot;', $this->escape($string))) . \"'\";\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "function qescape($str)\n{\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n return str_replace('\"', '\\\\\"', $str);\n}", "function sql_quote_string($val,$dbh=NULL) {\n global $SQL_DBH;\n if (is_null($dbh))\n return $SQL_DBH->quote($val);\n else\n return $dbh->quote($val);\n }", "public function quote($text);", "public function quoteString($str)\n {\n return $this->quote($str);\n }", "protected function quote_escaped()\n {\n }", "protected function enclosureCharacter () : string {\n return '\"';\n }", "public function quote($value) {\n\t\t$connection = $this -> connect();\n\t\treturn \"'\" . $connection -> real_escape_string($value) . \"'\";\n\t}", "public function addIdentifierQuotes( $s ) {\n\t\treturn '\"' . str_replace( '\"', '\"\"', $s ) . '\"';\n\t}", "public function addQuotes( $s ) {\n\t\tif ( $s === null ) {\n\t\t\treturn 'NULL';\n\t\t} else {\n\t\t\t# This will also quote numeric values. This should be harmless,\n\t\t\t# and protects against weird problems that occur when they really\n\t\t\t# _are_ strings such as article titles and string->number->string\n\t\t\t# conversion is not 1:1.\n\t\t\treturn \"'\" . $this->strencode( $s ) . \"'\";\n\t\t}\n\t}", "protected function escapeString($value)\n {\n return $this->entityManager->getConnection()->quote($value);\n }", "static public function addSingleQuotes($arg) \n { \n /* single quote and escape single quotes and backslashes */ \n return \"'\" . addcslashes($arg, \"'\\\\\") . \"'\"; \n }", "public function doubleQuoteValue($value) {\n\t\t$value = addcslashes(\n\t\t\t$value,\n\t\t\timplode('', static::DOUBLE_QUOTED_MUST_ESCAPE)\n\t\t);\n\t\treturn '\"' . $value . '\"';\n\t}", "public function quote($input)\n {\n return \"'\" . str_replace(\"'\",\"''\",$input) . \"'\";\n }", "public function getRightQuote()\n\t{\n\t\treturn '';\n\t}", "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "public static function quote($value) {\n $connection = self::getConnection();\n return $connection -> quote($value);\n }", "public function quoteAndEscape(string $str): string\n {\n return $this->stringQuotingCharacter . $this->escape($str) . $this->stringQuotingCharacter;\n }", "function toString($str){\n\treturn \"'\" . $str . \"'\";\n}", "public function quoteString(?string $value): string\n {\n if ($value===null || $value==='') return 'null';\n\n return \"'\".$this->mysqli->real_escape_string($value).\"'\";\n }", "protected function pSingleQuotedString(string $string): string\n {\n return '\\'' . \\preg_replace(\"#'|\\\\\\\\(?=[\\\\\\\\']|$)#\", '\\\\\\\\$0', $string) . '\\'';\n }", "public function quote($value) {\n $connection = $this->connect();\n return \"'\" . $connection->real_escape_string($value) . \"'\";\n }", "function quote($s) {\n return \"'\" . addslashes(canonicalize_whitespace($s)) . \"'\";\n}", "private function escapeString(string $value): string\n {\n return str_replace(\"'\", \"''\", $value);\n }", "protected function _getEnclosure() {\n\t\treturn '\"';\n\t}", "private function quote($string,$param=''){\n\t\tif(empty($param)){\n\t\t\treturn \"'$string'\";\n\t\t}\n\t\treturn $string;\n\t}", "function qstr($s,$magic_quotes=false)\n\t{\n\t\tif (is_bool($s)) return $s ? 'true' : 'false';\n\n\t\tif (!$magic_quotes) {\n\t\t\tif (ADODB_PHPVER >= 0x5200 && $this->_connectionID) {\n\t\t\t\treturn \"'\".pg_escape_string($this->_connectionID,$s).\"'\";\n\t\t\t}\n\t\t\tif (ADODB_PHPVER >= 0x4200) {\n\t\t\t\treturn \"'\".pg_escape_string($s).\"'\";\n\t\t\t}\n\t\t\tif ($this->replaceQuote[0] == '\\\\'){\n\t\t\t\t$s = adodb_str_replace(array('\\\\',\"\\0\"),array('\\\\\\\\',\"\\\\\\\\000\"),$s);\n\t\t\t}\n\t\t\treturn \"'\".str_replace(\"'\",$this->replaceQuote,$s).\"'\";\n\t\t}\n\n\t\t// undo magic quotes for \"\n\t\t$s = str_replace('\\\\\"','\"',$s);\n\t\treturn \"'$s'\";\n\t}", "public function getString()\n {\n return $this->format('%s%s%s');\n }", "function nice_addslashes($string)\n{\n // if magic quotes is on the string is already quoted, just return it\n if(MAGIC_QUOTES)\n return $string;\n else\n return addslashes($string);\n}", "function addQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"||\",\"'\",$var);\n\t\t\t$string = str_replace('||||','\"',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "private function _backupQuote($str) {\n $str = str_replace(array(\"\\x00\", \"\\x0a\", \"\\x0d\", \"\\x1a\"), array('\\0', '\\n', '\\r', '\\Z'), $str);\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n\n return str_replace('\\'', '\\'\\'', $str);\n }", "public function quote(string $value): string\n {\n return implode('.', array_map(function ($part) {\n return \"`$part`\";\n }, explode('.', $value)));\n }", "public static function quote($value)\n {\n return QueryParser::quote($value);\n }", "function quote_smart($value)\n {\n return $value;\n }", "function qa_gpc_to_string($string)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\treturn get_magic_quotes_gpc() ? stripslashes($string) : $string;\n}", "protected function quote($literal)\n {\n return \"'\" . addslashes($literal) . \"'\";\n }", "static public function escape ( $str )\n\t{\n\t\treturn trim(self::instance(0)->quote($str), '\\'');\n\t}", "public function quote ( $mVal )\n {\n return (is_string($mVal)) ? PDO::quote($mVal) : $mVal;\n }", "function escapeSimple($string) {\n return $this->dbH->quote($string);\n }", "public function quote($value)\n\t{\n\t\tif ($value === NULL)\n\t\t{\n\t\t\treturn 'NULL';\n\t\t}\n\t\telseif ($value === TRUE)\n\t\t{\n\t\t\treturn \"'1'\";\n\t\t}\n\t\telseif ($value === FALSE)\n\t\t{\n\t\t\treturn \"'0'\";\n\t\t}\n\t\telseif ($value instanceof Expression)\n\t\t{\n\t\t\t// Use the raw expression\n\t\t\treturn $value->value();\n\t\t}\n\t\telseif ($value instanceof Query)\n\t\t{\n\t\t\treturn '('.$value->compile($this).') ';\n\t\t}\n\t\telseif (is_int($value))\n\t\t{\n\t\t\treturn (int) $value;\n\t\t}\n\t\telseif (is_float($value))\n\t\t{\n\t\t\t// Convert to non-locale aware float to prevent possible commas\n\t\t\treturn sprintf('%F', $value);\n\t\t}\n\t\telseif (is_array($value))\n\t\t{\n\t\t\t// Supports MVA attributes\n\t\t\treturn '('.implode(',', $this->quoteArr($value)).')';\n\t\t}\n\n\t\treturn $this->escape($value);\n\t}", "function escapeQuote($input, $strip=1) {\r\n\r\n\t$string = stripslashes(trim($input));\r\n\tif ($strip) $string = strip_tags($string);\r\n\t$result = \"\";\r\n\t\r\n\tfor ($i=0;$i<strlen($string);$i++) {\r\n\r\n\t\t$char = substr($string,$i,1);\r\n\t\tif ($char == \"'\") $result .= \"''\";\r\n\t\telseif ($char == \"\\r\") $result .= \"\";\r\n\t\telse $result .= $char;\r\n\r\n\t}\r\n\r\n\treturn \"'\".$result.\"'\";\r\n\r\n}", "public function quote($value)\n {\n if ($value === null)\n {\n return 'null';\n }\n elseif ($value === true)\n {\n return \"'1'\";\n }\n elseif ($value === false)\n {\n return \"'0'\";\n }\n elseif (is_object($value))\n {\n // 未使用,因为query并没有分开到db_query类去\n //if ($value instanceof db_query)\n //{\n //// Create a sub-query\n //return '('.$value->compile($this).')';\n //}\n if ($value instanceof db_expression)\n {\n // Use a raw expression\n return $value->value();\n }\n else\n {\n // Convert the object to a string\n return $this->quote((string) $value);\n }\n }\n elseif (is_array($value))\n {\n return '('.implode(', ', array_map(array($this, __FUNCTION__), $value)).')';\n }\n elseif (is_int($value))\n {\n return \"'{$value}'\";\n }\n elseif (is_float($value))\n {\n // Convert to non-locale aware float to prevent possible commas\n //return sprintf('%F', $value);\n return $value;\n }\n\n return $this->escape($value);\n }", "protected function quoteContent(string $content): string {\n return \"'\".str_replace(\n ['\\\\', \"\\r\", \"\\n\", \"'\"],\n ['\\\\\\\\', '\\\\r', '\\\\n', \"\\\\'\"],\n $content\n ).\"'\";\n }", "public function toString($escape = '\"'): string\n {\n $r = '';\n $a = $this->toArray($escape);\n foreach ($a as $i) {\n $r .= ' ' . $i;\n }\n return trim($r);\n }", "public function quote($text, $escaped = true) {\n return '\\'' . ($escaped ? $this->getEscaped($text) : $text) . '\\'';\n }", "public function escapeString(string $value): string;", "public function nameQuote($name)\n {\n return json_encode($name);\n\n }", "public static function quote($n) {\n global $_STORAGE;\n return \"'\" . $_STORAGE['Controller']->EscapeString($n) . \"'\";\n }", "function Quote($var='')\n\t{\n\t\tif (is_string($var) || is_numeric($var) || is_null($var)) {\n\t\t\treturn trim(str_replace(\"'\",\"''\",$var));\n\t\t} else if (is_array($var)) {\n\t\t\treturn array_map(array($this, 'Quote'), $var);\n\t\t} else {\n\t\t\ttrigger_error(\"Invalid type passed to DB quote\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\t}", "public function escape($string) {\n\t\t\treturn str_replace(\"'\", \"''\", $string);\n\t\t}" ]
[ "0.76372737", "0.7116245", "0.68340015", "0.6698825", "0.66868883", "0.6665269", "0.6660876", "0.66060334", "0.6601523", "0.65798753", "0.6541228", "0.6525636", "0.6521907", "0.6472696", "0.645455", "0.6454229", "0.6442873", "0.64425737", "0.64340484", "0.6418185", "0.64106715", "0.6408622", "0.6405615", "0.64002496", "0.6399424", "0.63959527", "0.6388709", "0.6379702", "0.6359681", "0.63531405", "0.6331455", "0.632138", "0.6321368", "0.6296406", "0.6290947", "0.6287325", "0.6263726", "0.62600183", "0.6246015", "0.6237149", "0.6225864", "0.6210231", "0.61869895", "0.61862904", "0.6182462", "0.61754537", "0.61725235", "0.6169977", "0.6169977", "0.6165657", "0.616299", "0.61604565", "0.6147294", "0.6141329", "0.6131443", "0.61308134", "0.6115168", "0.6113888", "0.6106481", "0.6105097", "0.60997874", "0.6081008", "0.6077414", "0.60664487", "0.60664487", "0.60664487", "0.60637265", "0.6061851", "0.60615", "0.6060678", "0.6033109", "0.60320544", "0.6027498", "0.60272163", "0.6026462", "0.6016256", "0.6012512", "0.60101885", "0.59952515", "0.59842324", "0.59554523", "0.5946267", "0.59454495", "0.5935589", "0.5927853", "0.59254766", "0.5913926", "0.5887711", "0.58866084", "0.5878829", "0.5877679", "0.5874546", "0.58730066", "0.58695436", "0.5848906", "0.5843786", "0.58430904", "0.58223766", "0.5814207", "0.58106095" ]
0.7508239
1
Return the classname of the given object.
private function classname($value): string { $class = get_class($value); return preg_match('/^class@anonymous/', $class) ? 'class@anonymous' : $class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getClassName($object)\n {\n if (!static::isObject($object)) {\n throw new \\InvalidArgumentException('Param $object is not object type.');\n }\n return get_class($object);\n }", "public function getClassName( $object ) {\n\t\tif ( !\\is_object( $object ) ) {\n\t\t\tthrow new \\InvalidArgumentException( \"The argument 'object' must be of type object.\" );\n\t\t}\n\n\t\treturn '\\\\' . \\get_class( $object );\n\t}", "function get_class_basename($object_or_class): string\n {\n $class = is_object($object_or_class) ? get_class($object_or_class) : $object_or_class;\n\n return basename(str_replace('\\\\', '/', $class));\n }", "function object_or_classname($object) {\n\n\tif (PHP_MAJOR_VERSION === 7) {\n\t\treturn 'object';\n\t} else {\n\n\t\t// Can be aither string (class name) or an actual object.\n\t\treturn is_string($object)\n\t\t\t? $object\n\t\t\t: get_class($object);\n\n\t}\n\n}", "public function getObjectName($object){\n\t\t$parts = explode('\\\\', get_class($object));\n\t\treturn strtolower(array_pop($parts));\n\t}", "public static function getClass(IIdentity $object): string\n\t{\n\t\treturn self::getRealClass(get_class($object));\n\t}", "private function getClassName($object, ?string $className = null): string\n {\n if (null !== $className) {\n return $className;\n }\n\n if (\\is_object($object)) {\n return ClassUtils::getClass($object);\n }\n\n throw new \\RuntimeException('Impossible to determine the class name. Either specify it explicitly or give an object');\n }", "public static function getShortClassName($object): string\n {\n $reflect = new \\ReflectionClass($object);\n\n return $reflect->getShortName();\n }", "public function objectAsName($object);", "function wpt_class_shortname( $object )\n{\n return is_object($object) ? (new \\ReflectionObject($object))->getShortName() : '';\n}", "public function getObjectTypeName() \n\t{\n\t\treturn self::$object_type[$this->object_type];\n\t}", "public static function get_actual_class($obj) {\n $classname = get_class($obj);\n\n if (preg_match('@\\\\\\\\([\\w]+)$@', $classname, $matches)) {\n $classname = $matches[1];\n }\n\n return $classname;\n }", "static function findBaseName($object)\n {\n $reflect = new \\ReflectionClass($object);\n \n return $reflect->getShortName();\n }", "function getAbsClassName($object) {\n $classNameWithNamespace = get_class($object);\n\n if(substr($classNameWithNamespace, strrpos($classNameWithNamespace, '\\\\')+1) == \"SendEmailCCMUserController\") {\n return \"Send Emails\";\n }\n\n return substr($classNameWithNamespace, strrpos($classNameWithNamespace, '\\\\')+1);\n }", "public function getClass($object)\n {\n $key = $this->collection->getKey($object);\n\n return null !== $key && \\array_key_exists($key, $this->keys)\n ? $this->keys[$key][0]\n : null;\n }", "public function getClassName();", "public function getClassName();", "public function getClassNameByObjectName($objectName) {\n\t\treturn $this->objectContainer->getClassNameByObjectName($objectName);\n\n\t}", "public function getClassNameByObjectName($objectName)\n {\n if (!isset($this->objects[$objectName])) {\n return class_exists($objectName) ? $objectName : false;\n }\n return $this->objects[$objectName]['c'] ?? $objectName;\n }", "public abstract function objectsClassName();", "public static function get_real_class($obj) {\r\n\t\tif(!is_object($obj))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$classname = get_class($obj);\r\n\r\n\t\tif (preg_match('@\\\\\\\\([\\w]+)$@', $classname, $matches)) {\r\n\t\t\t$classname = $matches[1];\r\n\t\t}\r\n\r\n\t\treturn $classname;\r\n\t}", "public function get_object_name() : string ;", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "public function getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}", "public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}", "static private function getType($object) {\n return get_class($object);\n }", "function getClassName($objectType) {\n\t\t$type = strtolower($objectType);\n\t\tif ($this->plugin) {\n\t\t\t$path = Inflector::pluralize($type);\n\t\t\tif ($type === 'helper') {\n\t\t\t\t$path = 'views' . DS . $path;\n\t\t\t} elseif ($type === 'component') {\n\t\t\t\t$path = 'controllers' . DS . $path;\n\t\t\t} elseif ($type === 'behavior') {\n\t\t\t\t$path = 'models' . DS . $path;\n\t\t\t}\n\t\t\t$options = App::objects($type, App::pluginPath($this->plugin) . $path, false);\n\t\t} else {\n\t\t\t$options = App::objects($type);\n\t\t}\n\t\t$this->out(sprintf(__('Choose a %s class', true), $objectType));\n\t\t$keys = array();\n\t\tforeach ($options as $key => $option) {\n\t\t\t$this->out(++$key . '. ' . $option);\n\t\t\t$keys[] = $key;\n\t\t}\n\t\t$selection = $this->in(__('Choose an existing class, or enter the name of a class that does not exist', true));\n\t\tif (isset($options[$selection - 1])) {\n\t\t\treturn $options[$selection - 1];\n\t\t}\n\t\treturn $selection;\n\t}", "public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }", "public function getClassName()\n {\n return $this->class_name;\n }", "public function getClassName() : string\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->_sClass;\n }", "public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName() : string\n {\n\n return $this->className;\n }", "public function getName()\n {\n $class = get_class($this);\n\n return str_replace($this->getObjectType(), '',\n str_replace(CADRE_appNameSpace.$this->getObjectTypePlural().'\\\\', '', $class));\n }", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "function get_class_simple($object, $lower_case=false)\n{\n $array = explode('\\\\',get_class($object));\n $res = $array[count($array)-1];\n\treturn $lower_case?strtolower($res):$res;\n}", "public function getClassName() {\n\t\treturn $this->_className;\n\t}", "public function getClassName() {\n\t\treturn $this->className;\n\t}", "public static function getClassName() {\n return self::$className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName() : string;", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}", "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "protected function getClassName(): string\n {\n return $this->className;\n }", "public static function convertClassToName($object)\n {\n if (is_object($object)) {\n if (method_exists($object, '__toString')) {\n return 'Object class: <strong>' . get_class($object) . '</strong> to string: <em>' .\n $object->__toString() . '</em>';\n }\n return 'Object class: <strong>' . get_class($object) . '</strong>';\n }\n if (! is_array($object)) {\n return $object;\n }\n $results = array();\n foreach ($object as $key => $value) {\n $results[$key] = self::convertClassToName($value);\n }\n return $results;\n }", "public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}", "public function getClassName(): string;", "public function getClassName()\n\t{\n\t\tif (null === $this->_className) {\n\t\t\t$this->setClassName(get_class($this));\n\t\t}\n\t\t\n\t\treturn $this->_className;\n\t}", "public static function className()\n\t{\n\t\treturn static::class;\n\t}", "public function getClassLabel()\n {\n if(is_object($this->_model_class)) {\n $class = $this->_model_class->className();\n return $class::getModelLabel();\n } else {\n return NULL;\n }\n }", "private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }", "public function getClassName()\n {\n return __CLASS__;;\n }", "public static function getClassName()\n {\n return get_called_class();\n }", "public function getName() {\n $path = explode('\\\\', get_class($this->object[\"data\"]));\n return array_pop($path);\n }", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "function toString ($object)\n{\n\treturn get_class($object);\n}", "public function getClass()\n {\n return $this->_className;\n }", "function get_object_name()\n {\n return $this->_object_name;\n }", "public static function getClassName() {\n return get_called_class();\n }", "public static function className() : string {\n return get_called_class();\n }", "function class_basename($class)\n{\n $class = is_object($class) ? get_class($class) : $class;\n\n return basename(str_replace('\\\\', '/', $class));\n}", "public function getClassByOID(string $oid): string;", "public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}", "public function getLaravelValidationClassName($object): ?string;", "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "public function getClassName()\n {\n return get_class($this->element);\n }", "public function getClassName() { return __CLASS__; }", "public static function shortName($object) : string\n {\n if (!is_object($object) and !is_string($object)) {\n throw new InvalidArgumentException('Must provide an object'\n . ' or class string ' . gettype($object) . ' given.');\n }\n\n $class = is_object($object) ? get_class($object) : $object;\n\n return substr(strrchr($class, '\\\\') ?: '', 1);\n }", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }", "public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }", "public function getObjectClass()\n {\n return $this->objectClass;\n }", "public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}", "public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }", "public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }", "public function getName()\n {\n return __CLASS__;\n }", "function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }", "public static function class_name($model)\n\t{\n\t\tif ($model instanceof Jelly)\n\t\t{\n\t\t\treturn strtolower(get_class($model));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn strtolower(Jelly_Meta::$_prefix.$model);\n\t\t}\n\t}", "public function getClass();" ]
[ "0.803258", "0.8000159", "0.76642525", "0.7644215", "0.75797004", "0.75261647", "0.7477878", "0.741998", "0.7391454", "0.7370593", "0.7324694", "0.72672856", "0.717568", "0.7171539", "0.7117209", "0.7059098", "0.7059098", "0.7031992", "0.7002794", "0.695349", "0.69474", "0.6941608", "0.69370663", "0.68301445", "0.68301445", "0.68301445", "0.68301445", "0.68268055", "0.68268055", "0.68106186", "0.6810108", "0.6807644", "0.6777782", "0.6761045", "0.6741318", "0.6730656", "0.6720524", "0.66937196", "0.66830236", "0.66814506", "0.66777694", "0.66777694", "0.66777694", "0.66777694", "0.66777694", "0.66777694", "0.66777694", "0.66777694", "0.6661066", "0.6654607", "0.6648214", "0.6647209", "0.66470844", "0.6636889", "0.6630115", "0.6613158", "0.6613158", "0.659782", "0.658488", "0.6580323", "0.6580323", "0.65782034", "0.65519387", "0.65490055", "0.6538997", "0.6516117", "0.65135807", "0.65109617", "0.6504396", "0.6486602", "0.6481377", "0.6446585", "0.64350307", "0.6430924", "0.6429045", "0.64122677", "0.63941437", "0.6389184", "0.6382549", "0.6374042", "0.637278", "0.6360218", "0.6357069", "0.6349032", "0.63467485", "0.63378304", "0.6333228", "0.6320382", "0.6311521", "0.62828976", "0.6275539", "0.62733316", "0.6253852", "0.62519", "0.62495804", "0.6243422", "0.622825", "0.62098503", "0.62058955", "0.6203389", "0.62032634" ]
0.0
-1
Return whether the given array is associative.
private function isAssociative(array $value): bool { return count(array_filter(array_keys($value), 'is_string')) > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAssociative( array &$array )\n {\n return count(array_filter(array_keys($array), 'is_string')) > 0;\n }", "public static function isAssoc($array) {\n $return = true;\n foreach(array_keys($array) as $a) {\n $return = $return & is_string($a);\n }\n return (bool)$return;\n }", "private function isAssocArray($array = array()){\n\t if(!is_numeric(array_shift(array_keys($array)))){\n\t return true;\n\t }\n \treturn false;\n\t}", "public static function isAssociative($array)\n {\n if (!\\is_array($array)) {\n return false;\n }\n\n return !self::isIndexed($array);\n }", "function array_is_associative(array $array) {\n if ($array == array()) {\n return true;\n }\n\n $keys = array_keys($array);\n\n if (array_keys($keys) !== $keys) {\n foreach ($keys as $key) {\n if ( ! is_numeric($key)) {\n return true;\n }\n }\n }\n\n return false;\n }", "function is_assoc($array)\n {\n return arr::isAssoc($array);\n }", "function is_associative(array $arr): bool\n {\n return $arr !== [] && array_keys($arr) !== range(0, count($arr) - 1);\n }", "public static function isAssociativeArray ($array)\r\n\t{\r\n\t\t# Return false if not an array\r\n\t\tif (!is_array ($array)) {return false;}\r\n\t\t\r\n\t\t# Loop through each and check each key\r\n\t\t$index = 0;\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\t\r\n\t\t\t# If the key does not exactly match the index (i.e. is not numeric type or is not in pure order of 0, 1, 2, ...), then it is associative\r\n\t\t\tif ($key !== $index) {return true;}\r\n\t\t\t$index++;\r\n\t\t}\r\n\t\t\r\n\t\t# Otherwise return false as all keys are integers in natural order\r\n\t\treturn false;\r\n\t}", "private static function isAssocArray($array) {\n return count(array_filter(array_keys($array), 'is_string')) > 0;\n }", "public static function isAssociative(array $array) : bool\n\t{\n\t\t$keys = array_keys($array);\n\n\t\treturn array_keys($keys) !== $keys;\n\t}", "protected function isAssociativeArray(array $array)\n {\n return (bool) \\count(\\array_filter(\\array_keys($array), 'is_string'));\n }", "private function _isAssociative(array $array) : bool\n {\n if([] === $array) {\n return false;\n }\n return array_keys($array) !== range(0, count($array) - 1);\n }", "public static function isAssociative($array)\n {\n \tif (is_array($array))\n \t{\n \t\tforeach (array_keys($array) as $k => $v)\n \t\t{\n \t\t\tif ($k !== $v)\n \t\t\t{\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t}\n \n \treturn false;\n }", "public static function isAssoc( $array ) {\n\treturn (is_array($array) && 0 !== count(array_diff_key($array, array_keys(array_keys($array)))));\n }", "public static function isAssocArray($array) {\n\t\tif (!is_array($array)) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($array as $key => $value) {\n\t\t\tif (!is_numeric($key)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function isAssociative(array $arr)\n {\n if (array() === $arr) {\n return false;\n }\n\n $result = array_keys($arr) !== range(0, count($arr) - 1);\n\n return $result;\n }", "protected function isAssoc(array $array) {\n\t\treturn (bool) count(array_filter(array_keys($array), 'is_string'));\n\t}", "public static function isAssoc( $array ) {\n\t\treturn (is_array($array) && 0 !== count(array_diff_key($array, array_keys(array_keys($array)))));\n\t}", "private function is_assoc($array) {\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n}", "private function isAssoc(array $array)\n {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "public static function isAssoc( array $array )\n\t{\n\t\t// Keys of the array\n\t\t$keys = array_keys( $array );\n\n\t\t// If the array keys of the keys match the keys, then the array must\n\t\t// not be associative (e.g. the keys array looked like {0:0, 1:1...}).\n\t\treturn array_keys( $keys ) !== $keys;\n\t}", "function isAssoc () {\r\n\t\treturn Arr::is_assoc($this->data);\r\n }", "public static function is_assoc( $array ) {\n return (is_array($array) && 0 !== count(array_diff_key($array, array_keys(array_keys($array)))));\n }", "protected function isAssocArray(array $array) {\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n }", "function is_associative_array($array){\n if (!is_array($array) || empty($array)) return false;\n $keys = array_keys($array);\n return array_keys($keys) !== $keys;\n}", "public static function isAssoc(array $array): bool\n {\n // Keys of the array\n $keys = array_keys($array);\n\n // If the array keys of the keys match the keys, then the array must\n // not be associative (e.g. the keys array looked like {0:0, 1:1...}).\n return array_keys($keys) !== $keys;\n }", "function acf_is_associative_array($array)\n{\n}", "public function is_assoc($array){\n return array_keys($array) !== range(0, count($array) - 1);\n }", "function is_assoc (&$arr) {\n try{\n return (is_array($arr) && (!count($arr) || count(array_filter(array_keys($arr),'is_string')) == count($arr)));\n }catch(Exception $e){\n return false;\n }\n }", "static public function IS_ASSOC(array $arr)\n {\n return SculpinUtil::IS_ASSOC($arr);\n }", "function isAssoc(array $array): bool\n{\n if (empty($array)) {\n return false;\n }\n\n return ctype_digit(implode('', array_keys($array))) === false;\n}", "protected static function isAssoc(array $array)\n {\n $keys = array_keys($array);\n\n // If the array keys of the keys match the keys, then the array must\n // not be associative (e.g. the keys array looked like {0:0, 1:1...}).\n return array_keys($keys) !== $keys;\n }", "function is_assoc(array $array)\n {\n // Check if the keys are a zero-based index\n return array() === $array ? false : array_keys($array) !== range(0, count($array) - 1);\n }", "public function isAssoc()\n {\n if ($this->isEmpty()) {\n return false;\n }\n\n foreach ($this->getKeys() as $key) {\n if (!is_string($key)) {\n return false;\n }\n }\n\n return true;\n }", "public static function is_assoc(array $array) {\n // Keys of the array\n $keys = array_keys($array);\n\n // If the array keys of the keys match the keys, then the array must\n // not be associative (e.g. the keys array looked like {0:0, 1:1...}).\n return array_keys($keys) !== $keys;\n }", "public function isAssociativeArray(array $array) {\r\n return !empty($array) && array_keys($array) !== range(0, count($array) - 1);\r\n }", "public static function isAssoc(array $array)\n {\n $keys = array_keys($array);\n\n return array_keys($keys) !== $keys;\n }", "public function isAssociative() {\n\t\t\n\t\t// compare the keys of this array to their keys\n\t\t$keys = array_keys( $this->store );\n\n\t\treturn array_keys( $keys ) !== $keys;\n\t}", "function is_assoc($array) {\n //sometimes there is a single block, sometimes an array, this helps figure out which is which\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n}", "private static function tinydb_is_assoc($array)\n {\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n }", "protected static function isAssocArray(iterable $array): bool\n {\n $idx = 0;\n\n foreach ($array as $key => $val) {\n if ($key !== $idx) {\n return true;\n }\n ++$idx;\n }\n\n return false;\n }", "public static function assoc($array)\n {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "public function isAssoc()\n {\n return $this->keys()->filter('is_int')->length !== $this->length;\n }", "public static function isAssociative(array $data): bool\n {\n return array_keys($data) !== range(0, count($data) - 1);\n }", "protected function is_assoc( array $array ) {\n\n return array_keys( $array ) !== range( 0, count( $array ) - 1 );\n\n }", "function is_assoc(array $arr)\n {\n if (array() === $arr) return false;\n return array_keys($arr) !== range(0, count($arr) - 1);\n }", "public function isAssoc(array $arr):bool\n {\n if (array() === $arr) return false;\n return array_keys($arr) !== range(0, count($arr) - 1);\n }", "private function isAssoc($arr)\n {\n return array_keys($arr) !== range(0, count($arr) - 1);\n }", "function is_assoc($arr) {\n return (is_array($arr) && count(array_filter(array_keys($arr),'is_string')) == count($arr));\n}", "function is_assoc($a){\n\t\tif(!is_array($a)) return false;\n\t\treturn !!count(array_diff(array_keys($a),range(0,count($a)-1)));\n\t}", "public static function isAssociative(array $items)\n {\n return array() === $items ? false : array_keys($items) !== range(0, count($items) - 1);\n }", "function is_array_assoc(array $arr)\n\t{\n\t\tif (array() === $arr) return false;\n\t\treturn array_keys($arr) !== range(0, count($arr) - 1);\n\t}", "protected function isAssoc($arr)\n {\n if (!is_array($arr)) {\n return false;\n }\n return array_keys($arr) !== range(0, count($arr) - 1);\n }", "function is_assoc($array)\n{\n return array_keys($array) !== range(0, count($array) - 1);\n}", "protected static function isAssociative(array $array, bool $allStrings = true): bool\n {\n if (! \\is_array($array) || empty($array)) {\n return false;\n }\n\n if ($allStrings) {\n foreach ($array as $key => $value) {\n if (! \\is_string($key)) {\n return false;\n }\n }\n\n return true;\n }\n\n foreach ($array as $key => $value) {\n if (\\is_string($key)) {\n return true;\n }\n }\n\n return false;\n }", "protected static function isAssoc(array $var): bool {\r\n return array_keys($var) !== range(0, count($var) - 1);\r\n }", "function isAssocArray(array $arr)\r\n{\r\n return array_keys($arr) !== range(0, count($arr) - 1);\r\n}", "protected static function is_array_assoc ($array) {\n\t\tif (empty($array) || !is_array($array)) {\n\t\t\treturn false;\n\t\t}\n\t\t// Very naive approach, but is enough in most cases\n\t\treturn !isset($array[count($array) - 1]);\n\t}", "public function testIsAssociativeArray() {\r\n $array = range(1,100);\r\n $this->assertFalse($this->_utils->isAssociativeArray($array));\r\n\r\n $array = array('1' => 11, 'a' => 'AA');\r\n $this->assertTrue($this->_utils->isAssociativeArray($array));\r\n\r\n $array = array(1 => 11, 2 => 'AA');\r\n $this->assertTrue($this->_utils->isAssociativeArray($array));\r\n\r\n $array = array();\r\n $this->assertFalse($this->_utils->isAssociativeArray($array));\r\n\r\n $array = array(1, 3, 5);\r\n $this->assertFalse($this->_utils->isAssociativeArray($array));\r\n }", "public function isAssociative(array $stats)\n\t{\n\t\treturn array_keys($stats) !== range(0, count($stats) - 1);\n\t}", "public static function is_assoc(array $r){\n $keys = array_keys($r);\n $c = count($keys);\n for ( $i = 0; $i < $c; $i++ ){\n if ( $keys[$i] !== $i ){\n return 1;\n }\n }\n return false;\n }", "function is_assoc_array(array $arr) {\n if (array() === $arr) return false;\n return array_keys($arr) !== range(0, count($arr) - 1);\n}", "function is_assoc_array(array $arr) {\n if (array() === $arr) return false;\n return array_keys($arr) !== range(0, count($arr) - 1);\n}", "function array_is_indexed(array $array) {\n if ($array == array()) {\n return true;\n }\n\n return ! array_is_associative($array);\n }", "public static function is_assoc($var): bool {\n\t\t\treturn (is_array($var) && (array_values($var) !== $var));\n\t\t}", "public function testIsAssociative()\n {\n $isAssociative = array(\n 'hello' => 'world',\n 'world' => 'hello'\n );\n\n $isTooAssociative = array(\n 'hello' => array(\n 'hello' => 'world',\n 'world' => array(\n 'hello' => 'world'\n )\n )\n );\n\n $isNotAssociative = array('hello', 'world');\n\n $this\n ->given($array = new classToTest())\n ->then\n ->boolean($array::isAssociative($isAssociative))\n ->isTrue()\n ->boolean($array::isAssociative($isTooAssociative))\n ->isTrue()\n ->boolean($array::isAssociative($isNotAssociative))\n ->isFalse()\n ;\n }", "private static function _isDict($array)\n\t{\n\t\treturn (is_array($array) && 0 !== count(array_diff_key($array, array_keys(array_keys($array)))));\n\t}", "public static function isIndexed($array)\n {\n if (!\\is_array($array)) {\n return false;\n }\n\n if (empty($array)) {\n return true;\n }\n\n // keys are strings : associative array\n if ((bool) count(array_filter(array_keys($array), 'is_string'))) {\n return false;\n }\n\n // Create normal index and compare\n $indexes = \\array_keys(\\array_fill(0, count($array), null));\n if ((bool) count(\\array_diff($indexes, \\array_keys($array)))) {\n return false;\n }\n\n return true;\n }", "public function associativeArray() {\r\n\r\n if ($this->object->loadRule()) {\r\n $crud = $this->myCRUD();\r\n return $crud->associativeArrayFromEncapsuledObject($this->object);\r\n } else {\r\n return false;\r\n }\r\n }", "public static function IsHash($array) {\n\n\t\t\tif (!is_array($array)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$keys = array_keys($array);\n\t\t\treturn @is_string($keys[0]) ? true : false;\n\t\t\n\t\t}", "public static function IsAnIndexedArray($array) {\n if (!is_array($array))\n return false;\n return (bool) (array_values($array) === $array);\n }", "public function isAssocResult()\n\t{\n\t\treturn $this->assocResult;\n\t}", "public static function IsMap(array $array) {\n return (bool) sizeof(array_filter(array_keys($array), 'is_string'));\n }", "public static function accessible($array)\n {\n return is_array($array) || $array instanceof ArrayAccess;\n }", "function is_in_array($associative_array = array(), $look_up_key = \"\", $look_up_value = \"\") {\n\t\tforeach ($associative_array as $associative) {\n\t\t\t$keys = array_keys($associative);\n\t\t\tfor($i = 0; $i < count($keys); $i++){\n\t\t\t\tif ($keys[$i] == $look_up_key) {\n\t\t\t\t\tif ($associative[$look_up_key] == $look_up_value) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function isSequentialArray($array)\n {\n $counter = 0;\n foreach ($array as $key => $value) {\n if ($counter !== $key) {\n return false;\n }\n $counter++;\n }\n\n return true;\n }", "protected function isIndexed($array){\n $flag='';\n foreach ($array as $key => $v) {\n if(!(is_int($key))){\n $flag = 1;\n }\n \n }\n if($flag == 1){\n return FALSE;\n }else{\n return TRUE;\n }\n }", "public function isNotAssoc()\n {\n return ! $this->isAssoc();\n }", "protected static function is_array_indexed ($array) {\n\t\tif (!is_array($array)) {\n\t\t\treturn false;\n\t\t}\n\t\t// Very naive approach, but is enough in most cases\n\t\treturn isset($array[count($array) - 1]);\n\t}", "public function isArray(): bool\n {\n return $this->phpType === self::HASH;\n }", "public function isArray()\n {\n return ($this->countOwnAttributes() === 1 && stripos($this->getName(), 'array') !== false);\n }", "function acf_is_array($array)\n{\n}", "protected function containsOnlyStringKeys(array $array)\n\t{\n\t\treturn count($array) === count(array_filter(array_keys($array), 'is_string'));\n\t}", "public static function areset($array, $keys) {\n\t\tforeach ($keys as $key)\n\t\t\tif (!isset($array[$key]))\n return false;\n\n\t\treturn true;\n\t}", "private function isTrueArray($array) {\n if (is_array($array) && isset($array) && count($array)) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "function hasArray($arr) {\r\n\tforeach ($arr as $value) {\r\n\t\tif(is_array($value))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "function arrayExists($array, $key)\n {\n return array_key_exists($key, $array);\n }", "public static function arrayOfArray( $array )\n {\n $arr = array_shift( $array );\n // Checks to see if first item of the array is an array.\n if( is_array( $arr ) )\n {\n // First item is we assume the rest are.\n return true;\n }\n else\n {\n // First item isn't, we assume the rest are not.\n return false;\n }\n }", "protected function containsOnlyStringKeys(array $array)\n {\n return count($array) === count(array_filter(array_keys($array), 'is_string'));\n }", "protected function arrayIsObject(array $array): bool\n {\n $encoded = json_encode($array);\n\n return false !== $encoded && $encoded[0] === '{';\n }", "public static function exists( $array, $key ): bool {\n\t\t\tif ( $array instanceof ArrayAccess ) {\n\t\t\t\treturn $array->offsetExists( $key );\n\t\t\t}\n\n\t\t\treturn array_key_exists( $key, $array );\n\t\t}", "public static function isKeySet($key, &$arr, $default = NULL)\n\t{\n\t\tif (Helper_Check::isStringEmptyOrNull($key))\treturn FALSE;\n\t\t\t\n\t\tif (isset($arr[$key]) && $arr[$key] !== NULL)\treturn TRUE;\n\t}", "public function isLeftAssociative()\n {\n return ($this->getAssociativity() === self::LEFT_ASSOCIATIVE);\n }", "function has_string_keys( $arr ) {\n\tforeach ( $arr as $key => $value ) {\n\t\tif ( is_string( $key ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "public static function is_array_set(array $object_set) {\n foreach ($object_set as $key => $object) {\n if (!\\is_object($object) || \\runkit_object_id($object) !== $key) {\n return false;\n }\n }\n return true;\n }", "public function valid()\n {\n echo __METHOD__,PHP_EOL;\n $key = key($this->a);\n return ($key !== NULL && $key !== FALSE);\n }", "public static function isArray(array $arrayInput, array $hashOptions = array())\n {\n if (!is_array($arrayInput)) {\n return false;\n }\n\n if (!isset($hashOptions['flag'])\n ||\n isset($hashOptions['flag']) && !in_array($hashOptions['flag'], array(1, 2, 3, 4, 6, 7), true)) {\n $hashOptions['flag'] = 0;\n }\n if (isset($hashOptions['other'])\n && is_array($hashOptions['other']) && ($hashOptions['flag'] & self::ARRAY_IDENTICAL_TO) !== 0) {\n return empty(array_diff_assoc($arrayInput, $hashOptions['other']));\n } else {\n foreach ($arrayInput as $mixedKey => $mixedValue) {\n if (($hashOptions['flag'] & self::ARRAY_CONTAINS_ALL_KEYS) !== 0) {\n if (!isset($hashOptions['keys']) || (is_array($hashOptions['keys'])\n && !in_array($mixedKey, $hashOptions['keys'], true))) {\n return false;\n }\n }\n if (($hashOptions['flag'] & self::ARRAY_CONTAINS_ALL_VALUES) !== 0) {\n if (!isset($hashOptions['values']) || (is_array($hashOptions['values'])\n && !in_array($mixedValue, $hashOptions['values'], true))) {\n return false;\n }\n }\n }\n }\n return true;\n }", "private function _hasKey() {\n return is_array($this->_keys) && count($this->_keys) > 0;\n }", "function acf_is_sequential_array($array)\n{\n}", "function array_keys_exist( array $array, $keys ) {\n $count = 0;\n if ( ! is_array( $keys ) ) {\n $keys = func_get_args();\n array_shift( $keys );\n }\n foreach ( $keys as $key ) {\n if ( array_key_exists( $key, $array ) ) {\n $count ++;\n }\n }\n\n return count( $keys ) === $count;\n }" ]
[ "0.8472658", "0.84039444", "0.8336737", "0.83296174", "0.8319503", "0.830065", "0.82802474", "0.8274557", "0.82632333", "0.8244767", "0.8239783", "0.81908685", "0.8184574", "0.8161016", "0.8159468", "0.8145837", "0.8145683", "0.8133168", "0.8124042", "0.8123998", "0.8099353", "0.80857176", "0.8077827", "0.80676806", "0.80623686", "0.80514693", "0.80513924", "0.8008732", "0.796753", "0.7955293", "0.79247606", "0.79229295", "0.7895576", "0.789458", "0.78880644", "0.7874366", "0.7856847", "0.784384", "0.7813392", "0.77959293", "0.7775141", "0.7737994", "0.77330387", "0.77232754", "0.7715429", "0.77067333", "0.76864386", "0.7615983", "0.7612472", "0.76041204", "0.7601472", "0.75738645", "0.75339454", "0.7509724", "0.7448174", "0.74387234", "0.7383048", "0.7372297", "0.7342755", "0.73327893", "0.72335565", "0.7206015", "0.7206015", "0.7113994", "0.71075094", "0.6997981", "0.6638304", "0.6547761", "0.6510782", "0.64272064", "0.6358954", "0.63292813", "0.6157501", "0.6150773", "0.6117955", "0.6060931", "0.60441816", "0.5986994", "0.5947533", "0.59028137", "0.58899295", "0.58659726", "0.5837001", "0.5791356", "0.5782448", "0.5766527", "0.5725922", "0.5719522", "0.5683842", "0.5652303", "0.5620408", "0.5619988", "0.55901974", "0.55756193", "0.55696994", "0.55629593", "0.55560523", "0.5551203", "0.55396175", "0.55324924" ]
0.7652363
47
create a task and give it some dummy data for this example
public function indexAction(Request $request) { $article = new Post(); $article->setDate(new \DateTime('today')); ; $form = $this->createFormBuilder($article) ->add('image', FileType::class, array('label' => "Image")) // ->add('image', FileType::class, array('label' => "Image")) // ->add('image', 'file') ->add('titre', TextType::class, array('label' => "Titre")) ->add('article', TextareaType::class, array('label' => "Article")) ->add('auteur', TextType::class, array('label' => "Auteur")) ->add('date', DateType::class, array('label' => "Date")) ->add('save', SubmitType::class, array('label' => 'Créer un article')) ->getForm(); if ($request->isMethod('POST')){ $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($article); $em->flush(); $request->getSession()->getFlashBag()->add('notice', 'Annonce bien enregistrée'); return $this->redirectToRoute('jg_form_valid'); // return $this->redirectToRoute('jg_form_valid', array('id' => $article->getId())); // return $this->render("JGFormBundle:Default:valid.html.twig", array( // 'titre' => $titre, // )); } } return $this->render('JGFormBundle:Default:index.html.twig', array( 'form' => $form->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateTask()\n {\n }", "public function createTask()\n {\n return factory($this->model)->create();\n }", "public function instantiate($task);", "public function run()\n { \n factory(Task::class,5)->create();\n \n /*\n $date = \\Carbon\\Carbon::now()->toDateString();\n $types = array(\n array('keep' =>'detalle'\n ),\n array('keep' =>'detalle 2' \n ),\n array('keep' =>'detalle')\n );\n\n foreach($types as $type)\n {\n $task = new \\App\\Task();\n $task->keep = $type['keep'];\n $task->save();\n\n }\n */\n }", "public function createTasks()\n {\n if (count($this->tasks) == 0)\n throw new \\Drupal\\ClassLearning\\Exception('No tasks defined for TaskFactory');\n\n foreach($this->tasks as $name => $task) :\n if (isset($task['count']))\n $count = $task['count'];\n else\n $count = 1;\n\n // Some need multiple tasks. Ex: grading a soln\n // This can be expanded to as many as needed\n for ($i = 0; $i < $count; $i++) :\n $t = new WorkflowTask;\n $t->workflow_id = $this->workflow->workflow_id;\n\n // We're not assigning users at this stage\n $n = null;\n if(isset($task['behavior']))\n \t$n = $task['behavior'];\n\t\telse\n\t\t\t$n = $name;\n\t\t\n\t\t$t->type = $n;\n $t->status = 'not triggered';\n $t->start = NULL;\n\n $t->settings = $this->tasks[$n];\n $t->data = [];\n\t\t\n\t\tif(isset($task['criteria'])){\n\t\t\t$t->setData('grades',$task['criteria']);\n\t\t}\n\t\t\n $t->save();\n endfor;\n endforeach;\n\t\n }", "protected function Create() {\n // Assignment: Generate unique id for the new task\n $this->TaskId = $this->getUniqueId();\n $this->TaskName = 'New Task';\n $this->TaskDescription = 'New Description';\n }", "public function testCreateTaskVariable()\n {\n }", "public function create(TaskInterface $task): void;", "public function run()\n {\n Task::create([\n 'name' => 'Task 1',\n 'user_id' => '2',\n 'project_id' => '2',\n 'description' => 'you have to bla bla bla',\n 'status' => 'toDo'\n ]);\n\n Task::create([\n 'name' => 'Task 2',\n 'user_id' => '2',\n 'project_id' => '2',\n 'description' => 'you have to bla bla bla',\n 'status' => 'toDo'\n ]);\n }", "public function run()\n {\n factory(\\App\\Task::class, 50)->create()\n ->each(function ($task) {\n if (mt_rand(0, 3) == 1) {\n $task->parent_task_id = App\\Task::inRandomOrder()\n ->where('id', '!=', $task->id)->first()->id;\n\n $task->save();\n }\n });\n }", "public function run()\n {\n Task::create([\n 'title' => 'Editar arquivos de teste',\n 'description' => 'Alterar erros no arquvio de teste',\n 'status' => ('A fazer'),\n 'user_id' => 2,\n ]);\n }", "public function __construct($task)\n {\n $this->task = $task;\n }", "public function run()\n {\n $task = new \\App\\Task();\n $task->id = 1;\n $task->sprint_id = 1;\n $task->nr= '1.1';\n $task->name = 'Testtask';\n $task->estimatedtime = '00:30:00';\n $task->save();\n }", "public function run()\n {\n \\App\\Task::create([\n 'title' => 'Lorem Ipsum',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n \\App\\Task::create([\n 'title' => 'Dolor Sit',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n }", "public function CreateTask()\n {\n\n $data = $this->GetParamsFromRequestBody('create');\n\n if (!isset($data['status'])) {\n $data['status'] = \"open\";\n }\n\n $data['createdby'] = $this->loggedUser->getId();\n\n $this->insertArrayIntoDatabase('todo_task', $data);\n $id = mysql_insert_id();\n\n $this->response = array(\n \"status\" => 0,\n \"id\" => $id\n );\n $this->responseStatus = 201;\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n\n\t \tTask::create([\n 'user_id' => User::all()->random()->user_id,\n 'content' => str_random(50),\n\t ]);\n\n \t}\n }", "public function __construct(Task $task)\n {\n $this->task = $task;\n }", "public function __construct(Task $task)\n {\n $this->task = $task;\n }", "public function createTask()\n\t{\n\t\tif ( $this->taskValidate() ) {\n\t\t\tTask::create([\n\t\t\t\t\t'name' => htmlspecialchars($_POST['inputTaskName']),\n\t\t\t\t\t'email' => htmlspecialchars($_POST['inputTaskMail']),\n\t\t\t\t\t'text' => htmlspecialchars($_POST['inputTaskText'])\n\t\t\t\t]);\n\t\t}\n\t\t// to index\n\t\t\theader('Location: /');\n\t}", "public function testTask()\n\t{\n \n //Need also define the ssh keys and password in config.php\n \n //Insert first a task\n \n /*$arr_task=['name_task' => 'live', 'descripton_task' => 'Script for check if server is alive', 'arguments' => [], 'status' => 0, 'url_return' => '', 'server' => SERVER_REMOTE];\n \n $new_task=$m->task->insert($arr_task);\n \n $id=$m->task->insert_id();\n \n $this->assertNotFalse($new_task);\n \n $arr_task['IdTask']=$id;*/\n \n //Select task from db\n \n //Execute task\n \n $task=new Task(SERVER_REMOTE);\n \n $task->files=[['vendor/phangoapp/leviathan/tests/script/alive.sh', 0755]];\n \n $task->commands_to_execute=[['/bin/bash', 'vendor/phangoapp/leviathan/tests/script/alive.sh', ''], ['sudo', 'vendor/phangoapp/leviathan/tests/script/alive.sh', '']];\n \n $task->delete_files=['vendor/phangoapp/leviathan/tests/script/alive.sh'];\n \n $task->delete_directories=['vendor/phangoapp/leviathan/tests'];\n \n $task->name_task='Live';\n \n $task->description_task='Check if server is alive';\n \n $task->codename_task='live';\n \n $result=$task->exec();\n \n echo $task->txt_error;\n \n $this->assertTrue($result);\n \n \n \n }", "public function create(): void {\n\t\t$rawdata = array(\n\t\t\t'datetime' => $this->request->request->get('datetime', null),\n\t\t\t'priority' => $this->request->request->getInt('priority', 1),\n\t\t\t'description' => $this->request->request->get('description'),\n\t\t);\n\n\t\t$rawdata['datetime'] ??= new DateTime();\n\n\t\tif ($rawdata['description'] !== '') {\n\t\t\tpreg_match('/^(.+?) ?(?:\\\\[(\\\\d+)\\\\]|)$/', strip_tags($rawdata['description'] ?? ''), $matches);\n\t\t\t$rawdata['description'] = $matches[1];\n\t\t}\n\n\t\t$data = array(\n\t\t\t'name' => $rawdata['description'],\n\t\t\t'donereward' => $matches[2] ?? 0,\n\t\t\t'priority' => $rawdata['priority'],\n\t\t\t'duedate' => $rawdata['datetime'],\n\t\t\t'user' => $this->user\n\t\t);\n\n\t\t$task = $this->di_repo->new(TaskModel::class, $data);\n\n\t\tif (($validResult = $task->valid()) === true) {\n\t\t\tif (!$task->save()) {\n\t\t\t\tthrow new RuntimeException('Could not save new task valid?:'.var_export($task->valid(), true));\n\t\t\t}\n\n\t\t\t$this->view->set('errors', false);\n\t\t} else {\n\t\t\t$this->view->set('errors', $validResult->getAll());\n\t\t}\n\n\t\t$this->respondTo('json');\n\t}", "public function testNewTask()\n {\n $userId = User::first()->value('id');\n\n $response = $this->json('POST', '/api/v1.0.0/users/'.$userId.'/tasks', [\n 'description' => 'A new task from PHPUnit',\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'description' => 'A new task from PHPUnit',\n ]);\n }", "public function setUp() {\n $this->task = new Task();\n }", "public function run()\n {\n factory(\\App\\User::class,5)->create();\n\n $task = new \\App\\Models\\Task();\n $task->name = \"牛乳を買いに行く\";\n $task->priority = 1;\n $task->save();\n\n $task = new \\App\\Models\\Task();\n $task->name = \"借りた本を読み切る\";\n $task->priority = 2;\n $task->save();\n\n $task = new \\App\\Models\\Task();\n $task->name = \"部屋の掃除をする\";\n $task->priority = 3;\n $task->save();\n\n $task = new \\App\\Models\\Task();\n $task->name = \"ゼミの課題に着手する\";\n $task->priority = 4;\n $task->save();\n\n $task = new \\App\\Models\\Task();\n $task->name = \"旅行の予定を立てる\";\n $task->priority = 5;\n $task->save();\n\n\n // $this->call(UserSeeder::class);\n }", "public static function blankTask() {\n $task = new Task();\n $task->setPriority(1);\n return $task;\n }", "public function testTask()\n {\n $task = new Task();\n $user = new User();\n\n $this->assertNull($task->getId());\n $task->setTitle('test');\n $this->assertSame('test', $task->getTitle());\n $task->setContent('testcontent');\n $this->assertSame('testcontent', $task->getContent());\n $task->toggle(true);\n $this->assertTrue( $task->isDone());\n $task->setUser($user);\n $this->assertInstanceOf(User::class, $task->getUser());\n $task->setCreatedAt(new \\DateTime());\n $this->assertNotEmpty($task->getCreatedAt());\n }", "public function testCreateTask()\n {\n $this->logInUserObject();\n $crawler = $this->client->request('GET', '/tasks/create');\n $form = $crawler->selectButton('Ajouter')->form();\n $form['task[title]'] = 'Titre test';\n $form['task[content]'] = 'Contenu de test pour la création d\\'une tâche';\n $this->task = $this->client->submit($form);\n\n $crawler = $this->client->followRedirect();\n $response = $this->client->getResponse();\n $statusCode = $response->getStatusCode();\n\n $this->assertEquals(200, $statusCode);\n $this->assertContains('Superbe! La tâche a été bien été ajoutée.', $crawler->filter('div.alert.alert-success')->text());\n }", "public function run()\n {\n factory(Task::class,200)\n -> create() // questa restitusce una COLLEZIONE cioe un array avvanzato a cui si possono aplicare diversi metodi ->> per esempio each (che è ciclo metodo si puo dire)\n -> each(function($tas) {\n\n $emps = Employee::inRandomOrder()// $emps restituirà un array degli employees e length del array sarà compresa tra 5 e 10 in modo casuale\n -> take(rand(5, 10))\n -> get();// restituisce query??\n $tas -> employees() -> attach($emps);// many to many-s shemtxvevashi associate-is magivrad viyenebt attach-s\n\n });\n }", "public function run()\n {\n $task = new Task();\n $task->id = 1;\n $task->title = 'Cong viec 1';\n $task->content = 'tao project laravel';\n $task->created = '2018-09-27 04:57:57';\n $task->due_date = '2018-09-26';\n $task->image = 'anh';\n $task->save();\n }", "public function test_create_task()\n {\n \n $response = $this->post('/task', [\n 'name' => 'Task name', \n 'priority' => 'urgent', \n 'schedule_date_date' => '2020-12-12',\n 'schedule_date_time' => '12:22',\n 'project_id' => 1,\n ]);\n $response->assertStatus(302);\n }", "public function run()\n {\n $items = [\n \n ['id' => 1, 'name' => 'Project 1', 'task_belongs_to' => 'Catalin', 'in_analysis' => 1, 'in_process' => 0, 'done' => 0,],\n\n ];\n\n foreach ($items as $item) {\n \\App\\AllTask::create($item);\n }\n }", "public function testGetTaskInstanceVariable()\n {\n }", "function getTask() ;", "public function testTask1(){\n\n }", "public function create(array $task)\n {\n $attributes = array_intersect_key($task, array_flip(self::$keysToPersist));\n \n list($code, $createdTask) = $this->httpClient->post(\"/tasks\", $attributes);\n return $createdTask; \n }", "public function created(Task $task)\n {\n broadcast(new Created($task))->toOthers();\n }", "public function run()\n {\n DB::table('task')->insert([\n 'name' => str_random(10),\n 'date_created' => '11111'\n ]);\n }", "public function testCreateAndFindTask()\n\t{\n\t\t$user = factory(User::class)->create();\n\t\tPassport::actingAs($user);\n\t\t$category = factory(Category::class)->create(['user_id' => $user->id]);\n\t\t$array_task = array(\n\t\t\t'category_id' => $category->id,\n\t\t\t\"description\" => \"Needs to study more\"\n\t\t);\n\n\t\t$task = factory(Task::class)->create($array_task);\n\n\t\t$response = $this->get('api/categories/' . $category->id . '/tasks/' . $task->id);\n\n\t\t$response->assertStatus(200);\n\t\t$this->assertDatabaseHas('tasks', $array_task);\n\t}", "public function run()\n {\n $task = new Task();\n $task->name = 'Nguyễn Thiên';\n $task->age = 26;\n $task->phone = 0353377104;\n $task->address = 'Quảng Trị';\n $task->email = '[email protected]';\n $task->save();\n\n $task = new Task();\n $task->name = 'Vũ Văn Mạnh';\n $task->age = 20;\n $task->phone = 03134314314;\n $task->address = 'Hải Dương';\n $task->email = '[email protected]';\n $task->save();\n\n\n }", "public function run()\n {\n DB::table('tasks')->insert([\n 'name' => str_random(10),\n 'completed' => 1,\n 'project_id' => 1,\n ]);\n }", "function seedTasks($nbTasks){\n echo \"ADD RECORDS IN TABLE tasks : \";\n\n //on crée une première moitié des tâches n'ayant pas été affecté et terminée\n\n for ($i=0;$i<$nbTasks/2;$i++){\n $faker = Faker\\Factory::create('fr_FR');\n $title = $faker->sentence(3);\n $description = $faker->text(11);\n $creationDate = $faker->date();\n $scheduledDate = null;\n $doneDate = null;\n $workDuration = null;\n $departmentId = $faker->numberBetween(1,500);\n $locationId = $faker->numberBetween(1,20);\n $userId = $faker->numberBetween(2,1000);\n $assignUserId = null;\n $task = [\n 'title' => $title,\n 'description' => $description,\n 'creationDate' => $creationDate,\n 'scheduledDate' => $scheduledDate,\n 'doneDate' => $doneDate,\n 'workDuration' => $workDuration,\n 'department_id' => $departmentId,\n 'location_id' => $locationId,\n 'user_id' => $userId,\n 'assign_user_id' => $assignUserId\n ];\n\n // Make sure it dosen't aleadry exists\n if (Tasks::count('title=\"'.$task['title'].'\"')==0)\n {\n Tasks::create($task);\n echo '-' ;\n }\n else{\n $i--;\n }\n }\n\n // Puis enfin une deuxième moitié ayant un responsable qui a terminée la tâche\n\n for ($i=0;$i<$nbTasks/2;$i++){\n $faker = Faker\\Factory::create('fr_FR');\n $title = $faker->sentence(3);\n $description = $faker->text(11);\n $creationDate = $faker->date();\n $scheduledDate = dateUpper($creationDate);\n $doneDate = dateUpper($creationDate);\n $workDuration = $faker->time();\n $departmentId = $faker->numberBetween(1,500);\n $locationId = $faker->numberBetween(1,20);\n $userId = $faker->numberBetween(2,1000);\n $assignUserId = $faker->numberBetween(2,1000);\n $task = [\n 'title' => $title,\n 'description' => $description,\n 'creationDate' => $creationDate,\n 'scheduledDate' => $scheduledDate,\n 'doneDate' => $doneDate,\n 'workDuration' => $workDuration,\n 'department_id' => $departmentId,\n 'location_id' => $locationId,\n 'user_id' => $userId,\n 'assign_user_id' => $assignUserId\n ];\n\n // Make sure it dosen't aleadry exists\n if (Tasks::count('title=\"'.$task['title'].'\"')==0)\n {\n Tasks::create($task);\n Connection::insert('tasks',$task,null);\n echo '-' ;\n }\n else{\n $i--;\n }\n }\n\n echo \"\\n\";\n\n }", "public function test_create_task_all_fields_correct()\n {\n\n $credential = [\n 'body' => 'testing task'\n ];\n\n $token = User::factory()->create()->createToken('my-app-token')->plainTextToken;\n\n $response = $this->json('POST', '/api/tasks', $credential, ['Accept' => 'application/json', 'Authorization' => 'Bearer '.$token]);\n\n $response\n ->assertStatus(201)\n ->assertJsonStructure(['message'])\n ->assertJsonPath('message', \"Task created successfully.\");\n }", "public function testGetTask()\n {\n }", "public function run()\n {\n Task::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 6; $i++) {\n $taskLetter = chr(65 + $i);\n Task::create([\n 'name' => \"משימה $taskLetter\",\n 'done' => $faker->boolean,\n ]);\n }\n }", "public function testTask2(){\n\n }", "public function created($task)\n {\n $task->notifyMembers('Created');\n }", "function _add_task( $data=array() )\n\t{\n\t\t$taskfunc = $this->ipsclass->load_class( ROOT_PATH.'sources/lib/func_taskmanager.php', 'func_taskmanager' );\n\t\t\n\t\t$task = array();\n\t\t\n\t\t$task['task_title'] = $data['task_title']['VALUE'];\n\t\t$task['task_file'] = $data['task_file']['VALUE'];\n\t\t$task['task_week_day'] = $data['task_week_day']['VALUE'];\n\t\t$task['task_month_day'] = $data['task_month_day']['VALUE'];\n\t\t$task['task_hour'] = $data['task_hour']['VALUE'];\n\t\t$task['task_minute'] = $data['task_minute']['VALUE'];\n\t\t$task['task_cronkey'] = md5( microtime() );\n\t\t$task['task_log'] = $data['task_log']['VALUE'];\n\t\t$task['task_description'] = $data['task_description']['VALUE'];\n\t\t$task['task_enabled'] = $data['task_enabled']['VALUE'];\n\t\t$task['task_key'] = $data['task_key']['VALUE'];\n\t\t$task['task_safemode'] = $data['task_safemode']['VALUE'];\n\t\t$task['task_next_run'] = $taskfunc->generate_next_run( $task );\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'task_manager', $task );\n\t\t\n\t\t$taskfunc->save_next_run_stamp();\n\t}", "public function runTestTask()\n\t{\n\t\t$this->runTask(1);\n\t}", "public function run()\n {\n Task::insert([\n [\n 'user_id'=>1,\n 'task'=>'Woke up at 6am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Take Breakfast at 7am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Meet With Mr.Client at 10am',\n ]\n ]);\n }", "public function createTask($description){\n $this->tasks()->create(['description'=>$description]);\n }", "public function run()\n {\n factory(App\\Task::class, 'task_with_desc', 20)->create();\n $users = factory(App\\User::class, 20)->create();\n\n\n\n factory(App\\Friend::class, 30)->create([\n 'user_id' => $users->pluck('id')->random()\n ]);\n }", "public function run()\n {\n $names = [\n 'PHP_task',\n 'Node_task',\n 'BootStrap_task',\n 'Angular_task',\n 'IOS_task'\n\n ];\n\n $description= [\n 'Develop PHP Back-End',\n 'Develop Node Back-End',\n 'Develop BootStrap Front-End',\n 'Develop Angular Front-End',\n 'Develop IOS Front-End'\n\n ];\n\n\n $limit = 5;\n for ($i = 0; $i < $limit; $i++) {\n\n Tasks::create([\n 'name' => $names[$i],\n 'task_description' => $description[$i],\n\n ]);\n\n }\n }", "public function run()\n {\n User::factory(100)->create();\n Task::factory(100)->create();\n TaskComment::factory(200)->create();\n }", "private function createTask() {\n $query = $this->createQuery();\n\n\t\techo $query;\n\n $task = $this->database->prepare($query);\n $task->execute($this->queryProperty->getWhereArgs());\n return $task;\n }", "public function run()\n {\n factory(\\App\\User::class, 6)->create()->each(function ($user) {\n factory(\\App\\Task::class, rand(1, 4))->create([\n 'user_id' => $user->id\n ]);\n });\n }", "public function run()\n {\n $this->createNew('Actif', 'actif', 1);\n $this->createNew('Inactif', 'inactif', 0);\n }", "public function getTask() {}", "public function getTask() {}", "public function getTask() {}", "public function actionCreateTask() {\n // Check settings, show errors if there are any\n try {\n craft()->goLive_settings->verifySettings();\n }\n catch (Exception $e) {\n header('HTTP/1.1 ' . 500);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n catch (HttpException $e) {\n header('HTTP/1.1 ' . $e->statusCode);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n\n // Settings look good, create and run the task.\n // Also, set a random-ish backup file name to be referenced within the task steps\n $deployTask = craft()->tasks->createTask(\n 'GoLive_Deploy',\n 'GoLive_Deploy',\n array(\n 'backupFileName' => uniqid('goLive_') . '.sql'\n )\n );\n\n // Tries to end the HTTP session, and definitely starts running the pending tasks.\n // Our task may or may not be first in that queue.\n craft()->tasks->closeAndRun();\n }", "public function addTask($task){\n $this->tasks()->create($task);\n\n \n \n }", "public function run()\n {\n $data = [\n [\n 'task_name' => 'Example Sentences for tasks',\n 'task_description' => 'A regret for the mistakes of yesterday must not, however, blind us to the tasks of today.\n\nThe tasks we face are difficult, and we can accomplish them only if we work together.\n\nNo one spoke; the three workers kept at their tasks as if no other person had been in the room with them.\n\nOne after another the men came to report the completion of their tasks.\n\nThere he plied his tasks so diligently that he excelled all in book-learning.\n\nI have therefore had to create for myself some tasks which will hold me to my chains.\n\nHow these expeditions accomplished their tasks shall be told later.\n\nThe overseers were brutal when the slaves did not do the tasks set for them.\n\nThese, also, make easier and bolder the electrician\\'s tasks.\n\nThe daily tasks and pleasures were picked up where they had been dropped.'\n ]\n ];\n\n \\Illuminate\\Support\\Facades\\DB::table('tasks')->insert($data);\n }", "public function create(TaskRequest $request)\n\t\t{\n\t $data = $request->only([\"task\", \"priority\"]);\n\t // create article with data and store in DB\n\t $task = Task::create($data);\n\t // return the article along with a 201 status code\n\t return response($task, 201);\n\n\t\t}", "private function CreateCustomTask() {\n\t\t$lRecipientsData = $this->m_taskModel->GetCustomTaskRecipientsData($this->m_customRecipients, $this->m_customReplaceSql);\n\t\t$lCnt = 0;\n\t\tforeach ($lRecipientsData as $key => $value) {\n\t\t\t$lTempl = $this->ReplaceEmailTaskTemplate($this->m_customTemplate, $value[0]);\n\t\t\t$lSubj = $this->ReplaceEmailTaskTemplate($this->m_customSubject, $value[0]);\n\t\t\t\n\t\t\t\n\t\t\t$lUsersArr[] = (int)$value[0]['id'];\n\t\t\t$lUserTemplArr[] = '\\'' . q($lTempl) . '\\'';\n\t\t\t$lUserSubjArr[] = '\\'' . q($lSubj) . '\\'';\n\t\t\t$lUsersRoleArr[] = 0;\n\t\t\t\n\t\t\t$lCnt++;\n\t\t}\n\t\t$lUsersArrString = 'ARRAY[' . implode(\",\", $lUsersArr) . ']';\n\t\t$lUsersRoleArrString = 'ARRAY[' . implode(\",\", $lUsersRoleArr) . ']';\n\t\t$lUserTemplArrString = 'ARRAY[' . implode(\",\", $lUserTemplArr) . ']';\n\t\t$lUserSubjArrString = 'ARRAY[' . implode(\",\", $lUserSubjArr) . ']';\n\t\t\n\t\t$lTaskData = $this->m_taskModel->CreateTask(\n\t\t\t(int)$this->m_eventId, \n\t\t\t(int)SEND_EMAIL_TASK_DEFINITION_ID, \n\t\t\t$lUsersArrString, \n\t\t\t$lUserTemplArrString, \n\t\t\t$lUsersRoleArrString, \n\t\t\t'false', \n\t\t\t$lUserSubjArrString,\n\t\t\t''\n\t\t);\n\t}", "public function addTask($task) {\n \t$this->tasks()->create($task);\n }", "public function run()\n {\n Task::create([\n 'title' => 'Tutorial Task',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio cumque ratione beatae dolores dolorum. Molestias sed, neque ullam, eaque quasi laudantium ipsa officiis, exercitationem nesciunt perspiciatis sequi vitae maxime ab.',\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio cumque ratione beatae dolores dolorum. Molestias sed',\n 'media' => [\"videos/XKTNfPMikiF4PKn5XIfSmBrglHhav4644NZ2b4w4.mp4\"],\n 'media_type' => 'video',\n 'type' => 'tutorial',\n ]);\n Task::create([\n 'title' => 'Library Task',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio cumque ratione beatae dolores dolorum. Molestias sed, neque ullam, eaque quasi laudantium ipsa officiis, exercitationem nesciunt perspiciatis sequi vitae maxime ab.',\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio cumque ratione beatae dolores dolorum. Molestias sed',\n 'media' => [\"img/9NLX91evBUR3jyOKeDtT5DR6DKFRrCsVaPHOtA9O.jpeg\"],\n 'media_type' => 'image',\n 'type' => 'library',\n ]);\n Task::create([\n 'title' => 'Ad Task',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio cumque ratione beatae dolores dolorum. Molestias sed, neque ullam, eaque quasi laudantium ipsa officiis, exercitationem nesciunt perspiciatis sequi vitae maxime ab.',\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio cumque ratione beatae dolores dolorum. Molestias sed',\n 'media' => [\"img/9NLX91evBUR3jyOKeDtT5DR6DKFRrCsVaPHOtA9O.jpeg\"],\n 'media_type' => 'image',\n 'type' => 'library',\n ]);\n }", "public function run()\n {\n Group::create(['name' => 'General'])->tasks()->createMany([\n ['name' => 'Wash the car'],\n ['name' => 'Do the dishes'],\n ['name' => 'Clean my room'],\n ]);\n\n Group::create(['name' => 'Groceries'])->tasks()->createMany([\n ['name' => 'Milk'],\n ['name' => 'Eggs'],\n ['name' => 'Bread'],\n ]);\n }", "public function run()\n {\n $tasks = [\n 0 =>[\n 'nome' => 'dormir',\n 'status' => '0'],\n 1 =>[\n 'nome' => 'bebet',\n 'status' => '0']\n ];\n DB::table('tasks')->insert($tasks);\n }", "public function run()\n {\n Task::create([\n 'title' => 'Webshop',\n 'estimation' => '10',\n 'description' => 'Create a webshop',\n 'start_date' => Carbon\\Carbon::now(),\n 'end_date' => Carbon\\Carbon::now()->addMonth(2),\n 'priority' => 7,\n 'status_id' => 1,\n 'type_id' => 1,\n 'client_id' => 1,\n ]);\n\n Task::create([\n 'title' => 'Make a webshop design',\n 'estimation' => 10,\n 'description' => 'Requires at least x',\n 'start_date' => Carbon\\Carbon::now(),\n 'end_date' => Carbon\\Carbon::now()->addDays(7),\n 'priority' => 8,\n 'status_id' => 1,\n 'type_id' => 1,\n 'client_id' => 1,\n 'parent_id' => 1,\n ]);\n\n Task::create([\n 'title' => 'Create a logo',\n 'estimation' => '3',\n 'description' => 'Requires at least x',\n 'start_date' => Carbon\\Carbon::now(),\n 'end_date' => Carbon\\Carbon::now()->addDays(3),\n 'priority' => 7,\n 'status_id' => 1,\n 'type_id' => 1,\n 'client_id' => 1,\n 'parent_id' => 2,\n ]);\n\n Task::create([\n 'title' => 'Create templates',\n 'estimation' => 8,\n 'description' => 'Requires at least x',\n 'start_date' => Carbon\\Carbon::now(),\n 'end_date' => Carbon\\Carbon::now()->addDays(4),\n 'priority' => 4,\n 'status_id' => 1,\n 'type_id' => 1,\n 'client_id' => 1,\n 'parent_id' => 2,\n ]);\n\n Task::create([\n 'title' => 'Make a homepage template',\n 'estimation' => 8,\n 'description' => 'Requires at least x',\n 'start_date' => Carbon\\Carbon::now(),\n 'end_date' => Carbon\\Carbon::now()->addDays(4),\n 'priority' => 4,\n 'status_id' => 1,\n 'type_id' => 1,\n 'client_id' => 1,\n 'parent_id' => 4,\n ]);\n\n Task::create([\n 'title' => 'Make templates for other pages',\n 'estimation' => 10,\n 'description' => 'Requires at least x',\n 'start_date' => Carbon\\Carbon::now(),\n 'end_date' => Carbon\\Carbon::now()->addDays(4),\n 'priority' => 4,\n 'status_id' => 1,\n 'type_id' => 1,\n 'client_id' => 1,\n 'parent_id' => 4,\n ]);\n\n Task::create([\n 'title' => 'Create a mobile application',\n 'estimation' => 40,\n 'description' => 'Requires at least x',\n 'start_date' => Carbon\\Carbon::now(),\n 'end_date' => Carbon\\Carbon::now()->addMonths(4),\n 'priority' => 7,\n 'status_id' => 1,\n 'type_id' => 1,\n 'client_id' => 1,\n ]);\n\n }", "public function getTask();", "public function getTask();", "public function createTask(TaskInterface $task) {\n\n return $this->request('tasks', 'POST', [], json_encode($task->getProperties()));\n }", "public function create()\n\t{\n\t\tglobal $ilUser,$lng;\n\t\t\n\n\t\t// Write on task (fillPdfTemplate for every candidate) and finally merge them in one PDF.\n\t\tinclude_once './Services/ADN/Report/classes/class.adnTaskScheduleWriter.php';\n\t\t$writer = new adnTaskScheduleWriter();\n\t\t$writer->xmlStartTag('tasks');\n\n\t\t$this->createAssignments($writer);\n\t\t\n\t\t$writer->xmlEndTag('tasks');\n\t\t#$GLOBALS['ilLog']->write($writer->xmlDumpMem(true));\n\t\t\n\t\ttry\n\t\t{\n\t\t\tinclude_once './Services/ADN/Base/classes/class.adnRpcAdapter.php';\n\t\t\t$adapter = new adnRpcAdapter();\n\t\t\t$adapter->transformationTaskScheduler(\n\t\t\t\t$writer->xmlDumpMem()\n\t\t\t);\n\t\t\t\n\t\t}\n\t\tcatch(adnReportException $e)\n\t\t{\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function run()\n {\n $dataStatus = TaskManagementConstant::ALL_STATUS;\n foreach ($dataStatus as $status) {\n $dataMainTask = [\n 'project_name' => 'SIS project',\n 'owner_id' => 2168978,\n 'created_by' => 2168978,\n 'short_description' => 'This project is good',\n 'type' => 'Main task',\n 'owner_id_no_sql' => '6284b5c0d04110010102b047',\n ];\n\n $mainTask = MainTaskSQL::query()->create($dataMainTask);\n $taskStatus = TaskStatusSQL::query()->create(['name' => $status]);\n $dataSubTask = [\n 'task_name' => 'Create new content',\n 'type' => 'sub-task',\n 'deadline' => '2022/08/06',\n 'assignee_id' => 2168978,\n 'reviewer_id' => 2168978,\n 'created_by' => 2168978,\n 'description' => 'If you want to be happy, do not dwell in the past, do not worry about the future, focus on living fully in the present.',\n 'main_task_id' => $mainTask->id,\n \"task_status_id\" => $taskStatus->id,\n 'owner_id' => 2168978,\n 'owner_id_no_sql' => '6284b5c0d04110010102b047',\n ];\n $subTask = SubTaskSQL::query()->create($dataSubTask);\n $dataComment = [\n 'name' => \"John Asian\",\n 'avatar' => null,\n 'content' => \"If you want to be happy, do not dwell in the past, do not worry about the future, focus on living fully in the present.\",\n \"sub_task_id\" => $subTask->id,\n \"created_by\" => 2168978,\n ];\n TaskCommentSQl::query()->create($dataComment);\n }\n }", "public function run()\n {$faker = Faker::create();\n\n \tforeach (range(1,10) as $i) {\n \n \t\tDB::table('tasks')->insert([\n \t\t\t'employee_id' => $faker->numberBetween($min = 4000, $max = 4010),\n \t\t\t'title' => $faker->sentence(10),\n \t\t\t'description' => $faker->sentence(10),\n \t\t\t'attachment' => $faker->image($dir, $width, $height, 'cats', false) ,\n \t\t\t'deadline' => $faker-> date($format = 'Y-m-d', $max = 'now'),\n \t\t\t 'created_at' => $faker->dateTime($max = 'now'),\n 'updated_at' => $faker->dateTime($max = 'now'),\n \n\n\n \t\t]);\n \t\n }\n}", "public function run()\n {\n $users = User::all();\n $clients = Client::all();\n\n collect(range(1, 100))->each(static function ($i) use ($users, $clients) {\n factory(Task::class, 1)->create([\n 'client_id' => $clients->random()->id,\n 'creator_id' => $users->random()->id,\n 'assignee_id' => $users->random()->id\n ]);\n });\n }", "public function run()\n {\n tasks::table([\n 'title' =>Str::random(8),\n 'discription'=>Str::random(8),\n\n ]);\n }", "public function createPpDataset(PpDataset $ppDataset=null, PpTask $ppTask=null) {\n throw new NotImplementedException();\n // TODO: Implement createPpDataset() method.\n }", "public function run()\n {\n \\App\\AdminTaskType::create([ 'name' => 'Phone', 'system' => 1, 'active' => 1, ]);\n \\App\\AdminTaskType::create([ 'name' => 'Text', 'system' => 1, 'active' => 1, ]);\n \\App\\AdminTaskType::create([ 'name' => 'Email', 'system' => 1, 'active' => 1, ]);\n \\App\\AdminTaskType::create([ 'name' => 'Mail', 'system' => 1, 'active' => 1, ]);\n \\App\\AdminTaskType::create([ 'name' => 'Newsletter', 'system' => 1, 'active' => 1, ]);\n \\App\\AdminTaskType::create([ 'name' => 'Note', 'system' => 1, 'active' => 1, ]);\n }", "public function testCreateTaskComments()\n {\n }", "public function createFromName(string $name) : Task\n {\n // First we create a blank Task object\n $task = new Task();\n\n // Then we need to make sure the Task's name is not empty and not used\n // by another Task\n try {\n $this->taskValidationService->validateName($name);\n } catch (TaskNameIsEmptyException | TaskNameIsAlreadyExistedException $e) {\n throw $e;\n }\n\n // When we are sure the name is ok, just set the name\n $task->setName($name);\n\n // Return Task object\n return $task;\n }", "public function run()\n {\n\n $faker = Faker\\Factory::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('tasks')->insert([\n \t'name'=>$faker->realText($faker->numberBetween(10,20)),\n 'description'=>$faker->realText($faker->numberBetween(100,200)),\n 'user_id'=>1\n ]);\n }\n }", "public function run()\n {\n $users = User::all();\n $faker = Faker::create();\n\n foreach ($users as $user) {\n for ($i = 0; $i <= 50; $i++) {\n Task::create([\n 'title' => $faker->streetName,\n 'description' => $faker->text,\n 'user_id' => $user->id\n ]);\n }\n }\n }", "public function createNewTask($request) \n\t{\n\t\ttry {\n\t\t\t$data = [\n\t\t\t\t'user_id'\t\t=> $request->user_id,\n\t\t\t\t'title'\t\t\t=> $request->title,\n\t\t\t\t'body'\t\t\t=> $request->body,\n\t\t\t\t'type'\t\t\t=> $request->type,\n\t\t\t\t'deadline'\t\t=> $request->deadline,\n\t\t\t\t'isactive'\t\t=> $request->isactive,\n\t\t\t\t'settings'\t\t=> $request->settings\n\t\t\t];\n\t\t\t$task = Task::create($data);\n\t\t\t$this->setTask($task);\n\t\t} catch (\\Exception $e) {\n\t\t\tthrow new \\App\\Exceptions\\ModelException($e->getMessage());\n\t\t}\n\t}", "function tasks_fill(){\n\n\t\t//existing tracker deletion\n\t\t$this->deleteTrackers();\n\n\t\t//Tracker creation\n\t\t$this->taskCreationArray = array(); // This array is used to store each projectGroup and each artifacts which will be imported later, we need to stop the script so as to update permissions again (default to Read for each new TaskTracker, and thus nobody can be assigned to a task except userid 100 which is Nobody)\n\t\tforeach ($this->trackers as $data){\n\t\t\t$output = $this->createTaskTracker($data);\n\t\t\tif($output){\n\t\t\t\t$this->taskCreationArray[]=$output;\n\t\t\t}\n\t\t}\n\t}", "public function addTask($task){\n\n $this->tasks()->create($task);\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++){\n DB::table('tasks')->insert([\n 'body' => $faker->text,\n 'user_id' => $faker->numberBetween($min = 1, $max = 10),\n 'done' => $faker->numberBetween($min = 0, $max = 1),\n ]);\n }\n\n }", "public function testGetTasks()\n {\n }", "public function run()\n {\n foreach(range(1,50) as $index)\n {\n Task::create($this->data($index));\n }\n }", "public function testCreate()\n {\n $taskData = new Task();\n $taskData->setTitle('The Avengers');\n $taskData->setContent('Must defeat Thanos!');\n\n $container = self::$kernel->getContainer();\n\n $em = $container->get('doctrine.orm.entity_manager');\n $em->persist($taskData);\n $em->flush();\n\n $task = $container->get('doctrine')\n ->getRepository(Task::class)->find(1);\n\n $this->assertNotNull($task);\n $this->assertSame('The Avengers', $task->getTitle());\n $this->assertSame('Must defeat Thanos!', $task->getContent());\n }", "public function testExecuteTaskAction()\n {\n }", "public function run()\n {\n DB::table('tasks')->insert([\n 'user_id' => 1,\n 'description' => 'This is the first task for user 1.',\n 'status' => \"In Progress\",\n 'priority' => \"High\",\n 'due_at' => '2019-12-01',\n 'created_at' => '2019-10-01 12:20:02',\n 'updated_at' => '2019-10-01 12:20:02'\n ]);\n\n DB::table('tasks')->insert([\n 'user_id' => 2,\n 'description' => 'This is the first task for user 2.',\n 'status' => \"Not Started\",\n 'priority' => \"Medium\",\n 'due_at' => '2019-12-11',\n 'created_at' => '2019-10-01 12:20:02',\n 'updated_at' => '2019-10-01 12:20:02'\n ]);\n\n DB::table('tasks')->insert([\n 'user_id' => 1,\n 'description' => 'This is the second task for user 1.',\n 'status' => \"Not Started\",\n 'priority' => \"Low\",\n 'due_at' => '2020-02-01',\n 'created_at' => '2019-10-01 12:20:02',\n 'updated_at' => '2019-10-01 12:20:02'\n ]);\n\n }", "public function add_task($data){ // Add Task \n\t\n\t \n\t if($data):\n\t \n\t \t\t $this->db->insert('task_details', $data);\t\n\t \n\t endif;\n\t\n\t\n\t}", "public function run()\n {\n \\CodeProject\\Entities\\ProjectTask::truncate();\n factory(\\CodeProject\\Entities\\ProjectTask::class, 10)->create();\n }", "private function add_task()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator(); \t \n \t$task = $serviceManager->get('PM/Model/Tasks');\n \t$result = $task->getTaskById($this->pk);\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t$this->add_breadcrumb($task_url, $result['name'], TRUE);\n \t}\n }", "public function insertTask() {\n\t\t$conn=parent::connect();\n\t\t$sql = \"INSERT INTO \" . TBL_TASK . \" (\n\t\t\ttask_name,\n\t\t\ttask_hourly_rate,\n\t\t\ttask_bill_by_default,\n\t\t\ttask_common\n\t\t\t) VALUES (\n\t\t\t:task_name,\n\t\t\t:task_hourly_rate,\n\t\t\t:task_bill_by_default,\n\t\t\t:task_common\n\t\t\t)\";\n\t\ttry {\n\t\t\t$st = $conn->prepare($sql);\n\t\t\t$st->bindValue(\":task_name\", $this->data[\"task_name\"], PDO::PARAM_STR);\n\t\t\t$st->bindValue(\":task_hourly_rate\", $this->data[\"task_hourly_rate\"], PDO::PARAM_STR);\n\t\t\t$st->bindValue(\":task_bill_by_default\", $this->data[\"task_bill_by_default\"], PDO::PARAM_INT);\n\t\t\t$st->bindValue(\":task_common\", $this->data[\"task_common\"], PDO::PARAM_INT);\n\t\t\t$st->execute();\n\t\t\tparent::disconnect($conn);\n\t\t} catch (PDOException $e) {\n\t\t\tparent::disconnect($conn);\n\t\t\tdie(\"Query failed on insert, sql is $sql \" . $e->getMessage());\n\t\t}\t\n\t}", "public function run()\n {\n factory(Employee::class, 10) -> create(); //il 50 è riferito al numero di employee che mi interessa avere nella tabella\n }", "public function run()\n {\n Todo::factory()\n ->count(20)\n ->create();\n }", "public function __construct( User $user, Task $task)\n {\n $this->user=$user;\n $this->task=$task;\n }", "public function show_create_form_task()\n {\n $user = factory(User::class)->create();\n $user->assignRole('task-manager');\n $this->actingAs($user);\n View::share('user', $user);\n\n factory(User::class, 5)->create();\n\n $response = $this->get('/tasks_php/create');\n $response->assertSuccessful();\n $response->assertViewIs('tasks.create_task');\n\n $users = User::all();\n $response->assertViewHas('users', $users);\n\n $response->assertSeeText('Create Task:');\n }", "public function testGetTasks()\n {\n\n }" ]
[ "0.80974364", "0.6984518", "0.6972922", "0.6954161", "0.6893589", "0.6888547", "0.6866951", "0.6861794", "0.68391645", "0.6803488", "0.67698014", "0.67443424", "0.6708355", "0.6701192", "0.6700433", "0.669181", "0.6602728", "0.6602728", "0.65995365", "0.65809983", "0.65795684", "0.6571222", "0.6565631", "0.6546963", "0.652256", "0.651151", "0.6428249", "0.6399239", "0.6394175", "0.6386436", "0.6377365", "0.6374301", "0.63725257", "0.63653994", "0.63595587", "0.63423294", "0.6336866", "0.63195515", "0.63160914", "0.631271", "0.6305632", "0.6296091", "0.62896955", "0.6270672", "0.6243555", "0.6239445", "0.6238716", "0.6217592", "0.62126327", "0.6207025", "0.6194695", "0.61921036", "0.6184298", "0.6176571", "0.6148857", "0.61461097", "0.6145023", "0.61440474", "0.61440474", "0.6130403", "0.61266184", "0.6120629", "0.61203873", "0.6097882", "0.60902506", "0.60766876", "0.60721105", "0.6059333", "0.60316557", "0.6028073", "0.6028073", "0.6028033", "0.6019884", "0.6007116", "0.5989826", "0.5987368", "0.59787047", "0.597178", "0.59716415", "0.59673524", "0.5960387", "0.5960193", "0.5947183", "0.5944923", "0.5934195", "0.5926093", "0.59233886", "0.5920246", "0.59063375", "0.59024745", "0.58888596", "0.58862764", "0.5881808", "0.58757377", "0.5874367", "0.5866826", "0.58553666", "0.5854215", "0.5851893", "0.5846164", "0.5843425" ]
0.0
-1
Get list of target emails.
public function getTo(): iterable;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->settings['recipients'] as $item ) {\n\t\t\t$emails[] = $item['value'];\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function getEmails()\n\t{\n \\Phalcon\\DI::getDefault()->get('logger')->log(\"Emails: \" . print_r($this->emails, true));\n\t\treturn $this->emails;\n\t}", "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function emails()\n {\n return $this->emails;\n }", "public function getEmailReferrers();", "public function getEmails() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'];\n\t}", "public function getRecipients();", "public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }", "public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"[email protected]\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }", "public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }", "public function getTargetsForUser($email) {\n\t\t$wf = new WebFingerer();\n\t\t$links = $wf->getUserLinks($email);\n\t\n\t\t// Look for preferred-service relations\n\t\t$userSvcOexUrls = array();\n\t\tforeach($links as $link) {\n\t\t\tif ($link[\"REL\"] == \"http://oexchange.org/spec/0.8/rel/user-target\") {\n\t\t\t\tarray_push($userSvcOexUrls, $link[\"HREF\"]);\n\t\t\t}\n\t\t}\n\t\n\t\t// Fetch the targets\n\t\t$targets = array();\n\t\tforeach($userSvcOexUrls as $targetXrdUrl) {\n\t\t\t//echo \"Checking preferred service url: \" . $targetXrdUrl;\t\t\n\t\t\t$target = $this->getTargetInfoFromXrd($targetXrdUrl);\n\t\t\tif (isset($target)) array_push($targets, $target);\n\t\t}\n\t\treturn $targets;\n\t}", "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "public function getAllRecipients() {}", "public function getEmails()\n {\n if (!isset($this->options['keep'])) {\n throw new BadMethodCallException(\"This function only works with the `keep` option\");\n }\n \n return $this->emails;\n }", "public function getAllEmails() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('email')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('email')->all();\n }", "public function emails()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Mailinglist\\\\Email', 'mid');\n\t}", "private function disposableEmailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function getAllEmailAddresses() {\n $saveCurrentFolder = $this->folder;\n $emails = array();\n foreach($this->getFolders() as $folder) {\n $this->selectFolder($folder);\n foreach($this->getMessages(false) as $message) {\n $emails[] = $message['from'];\n $emails = array_merge($emails, $message['to']);\n if (isset($message['cc'])) {\n $emails = array_merge($emails, $message['cc']);\n }\n }\n }\n $this->selectFolder($saveCurrentFolder);\n return array_unique($emails);\n }", "function getRecipients() {\n\t\treturn $this->getData('recipients');\n\t}", "function listEmails(){\n \n $conn = $this->connect();\n $ret = '';\n \n $sql = 'select email from ' . $this->dbtable;\n\t\t\t$query = mysql_query( $sql, $conn );\n \n\t\t\twhile( $row = mysql_fetch_assoc( $query ) ){\n\t\t\t\t$ret .= $row['email'] . \";\\n\";\n\t\t\t}\n \n mysql_close( $conn );\n \n\t\t\treturn $ret;\n }", "public function getOrderEmailList(){\n // Set method and action\n $method = 'email';\n $action = 'getOrderEmailList';\n\n // Set data\n $data = array('params' => true);\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}", "public static function getExportDestinationEmails() {\n\n return get_option( 'geb_gfe_export_destination_emails' );\n }", "public function getContactAllEmail()\n\t{\n\t\t$emails = 'nothing';\n\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$url = $this->url . \"/Contacts/filter\";\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$response = self::call($url, $this->token, 'GET',$filter_arguments);\n\n\t\t\t$email_records = $response->records;\n\n\t\t\tforeach($email_records as $record)\n\t\t\t{\n\t\t\t\t$emails[] = $record->portal_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function getUserMails()\r\n\t{\r\n\t\t$userDir = __DIR__ . '/../../settings/users';\r\n\t\t\t\t\r\n\t\t/* check if users directory exists */\r\n\t\tif(!is_dir($userDir)){ return array(); }\r\n\t\t\r\n\t\t/* get all user files */\r\n\t\t$users = array_diff(scandir($userDir), array('..', '.'));\r\n\t\t\r\n\t\t$usermails\t= array();\r\n\r\n\t\tforeach($users as $key => $user)\r\n\t\t{\r\n\t\t\tif($user == '.logins'){ continue; }\r\n\r\n\t\t\t$contents \t= file_get_contents($userDir . DIRECTORY_SEPARATOR . $user);\r\n\r\n\t\t\tif($contents === false){ continue; }\r\n\r\n\t\t\t$searchfor \t= 'email:';\r\n\r\n\t\t\t# escape special characters in the query\r\n\t\t\t$pattern \t= preg_quote($searchfor, '/');\r\n\t\t\t\r\n\t\t\t# finalise the regular expression, matching the whole line\r\n\t\t\t$pattern \t= \"/^.*$pattern.*\\$/m\";\r\n\r\n\t\t\t# search, and store first occurence in $matches\r\n\t\t\tif(preg_match($pattern, $contents, $match)){\r\n\t\t\t\t$usermails[] = trim(str_replace(\"email:\", \"\", $match[0]));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $usermails;\r\n\t}", "function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}", "public function listRecipients()\n {\n $recipients = $this->recipients;\n if (!count($recipients))\n return null;\n\n $recipients->transform(function ($recipient) {\n if (!$recipient->messagable) return FALSE;\n if (!$recipient->messagable->staff) return FALSE;\n\n return $recipient->messagable->staff;\n });\n\n return $recipients;\n }", "function get_emails($return_email = '')\n\t{\n\t\t$xml = $this->load_url(\"settings/emailaddresses\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t// parse into nicer array\n\t\t$emails = array();\n\t\t$_emails = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\t\tif(is_array($_emails)):\n\t\t\tif(isset($_emails[0]['link_attr']['href'])):\n\t\t\t\tforeach($_emails as $k => $v):\n\t\t\t\t\t$id = $this->get_id_from_link($v['link_attr']['href']);\n\t\t\t\t\t$email = $v['content']['Email'];\n\t\t\t\t\t$email['id'] = $id;\n\n\t\t\t\t\tif($return_email && $return_email == $v['content']['Email']['EmailAddress']):\n\t\t\t\t\t\t// return single email\n\t\t\t\t\t\treturn $email;\n\t\t\t\t\tendif;\n\n\t\t\t\t\t$emails[] = $email;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$id = $this->get_id_from_link($_emails['link_attr']['href']);\n\t\t\t\t$email = $_emails['content']['Email'];\n\t\t\t\t$email['id'] = $id;\n\t\t\t\t$emails[] = $email;\n\n\t\t\t\tif($return_email && $return_email == $_emails['content']['Email']['EmailAddress']):\n\t\t\t\t\t// return single email\n\t\t\t\t\treturn $email;\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\tendif;\n\n\t\treturn $emails;\n\t}", "private function filterEmailNotificationsRecipients()\n {\n return collect($this->getEmailNotificationsRecipients())\n ->filter(function (array $recipient) {\n return isset($recipient['address'])\n && is_email($recipient['address']);\n })\n ->toArray();\n }", "protected function getEmailNotificationsRecipients()\n {\n return [\n ['address' => null, 'name' => null],\n ];\n }", "public function getEmailAddresses()\n {\n return isset($this->EmailAddresses) ? $this->EmailAddresses : null;\n }", "public static function getAllAdminEmails()\n {\n $pdo = static::getDB();\n\n $user_role = User::ROLE_ADMIN;\n\n $sql = \"select email from users where user_role = :email\";\n\n $result = $pdo->prepare($sql);\n \n $result->execute([$user_role]);\n\n return $result->fetchAll(PDO::FETCH_COLUMN, 0); \n }", "public function getRecipients()\n {\n return $this->getMessage()['recipient'];\n }", "public function getMails(): Collection\n {\n\n return $this->mails;\n\n }", "public function GetTargets()\n {\n $Q = $this->DB->GET('MUP.domains.targets', ['active' => '1','mailing' => '1'], '*', 10000);\n foreach ($Q as $i => $q) {\n $this->TDOMS[$q['domain']] = $q['target'];\n $this->TGETS[$q['target']] = $q['target'];\n }\n $this->ALERTS[] = \" ~ Targets: (\".GRN.count($Q).WHT.\")\";\n }", "public function getAllUnreadEmailsSenders()\n {\n $messages = collect(LaravelGmail::message()->unread()->preload()->all());\n $fromList = [];\n\n $messages->each(function ($message) use (&$fromList) {\n $fromList[] = $message->getFrom();\n });\n\n // TODO: can be optimized\n return $this->getUnreadEmailsList($fromList);\n }", "public function getAllRecipientAddresses()\n {\n return $this->all_recipients;\n }", "public function getRecipients()\r\n {\r\n return ['to' => $this->to, 'cc' => $this->cc, 'bcc' => $this->bcc];\r\n }", "public function getNewsletterRecipientIDs();", "public function retrieveEmailTemplates()\n {\n return $this->start()->uri(\"/api/email/template\")\n ->get()\n ->go();\n }", "public function getExtraEmailAddresses(): array\n {\n if (empty($this->extra_emails)) {\n return [];\n }\n\n return collect($this->extra_emails)\n ->map(function ($email) {\n return trim($email['email']);\n })\n ->all();\n }", "function getMailList() {\n return getAll(\"SELECT id,`email` FROM `member` WHERE id != ?\"\n , [getLogin()['mid']]);\n}", "public function getAdminEmails() {\n //get administration email array\n $administration_email = Doctrine::getTable('AdministrationEmails')->getEmails();\n\n\n //create admin email query\n $admin_email_query = Doctrine_Query::create()\n ->select('sgu.email_address')\n ->from('sfGuardUser sgu')\n ->leftJoin('sgu.sfGuardUserPermission sgup')\n ->whereNotIn('sgu.email_address', $administration_email)\n ->andWhere('sgup.user_id IS NOT NULL');\n $admin_email_record = $admin_email_query->fetchArray();\n $administration_email_array = array('Dirección de correo electrónico Selecte');\n foreach ($admin_email_record as $index => $email) {\n $administration_email_array[$email['email_address']] = $email['email_address'];\n }\n return $administration_email_array;\n }", "public function getEmailTemplatesFromRepository()\n {\n $today = Carbon::today()->toDateString();\n\n return $this->bannedEmailsRepository\n ->datatable(['email'])\n ->where('expired_at', '>', $today)\n ->pluck('email');\n }", "public function getSentEmails(){\n\t\treturn $this->sent_emails;\n\t}", "public function buildRecipientList() {\n $actors = $this->loadAllActors();\n $actors = $this->filterDeliverableActors($actors);\n return mpull($actors, 'getPHID');\n }", "public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' );\n\n $mails = Tolist::findMany( array(\n 'to_id' => Auth::user()->id . '_' . $gname\n ), array(\n 'email'\n ) )->all( 'email' );\n\n return Helper::cleanGroups( $mails, '|' );\n\n }", "public function recipients()\n {\n return $this->participants()->where('user_id', '!=', $this->user_id);\n }", "public function getAllEmail()\n {\n $query = $this->db->select('first_name, last_name, email')\n ->get('user');\n return $query->result_object();\n }", "public function getWhoToNotifyByEmail()\n\t{\n\t\t//return array\n\t\t$group = Group::model()->findByPk($this->groupId);\n\t\t$emails = $group->getMembersByStatus(User::STATUS_ACTIVE);\n\t\treturn $emails->data;\n\t}", "public function getCaApprovalCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_APPROVAL_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getRecipients ()\n\t\t{\n\t\t\t$recipients = array();\n\t\t\t$n = imap_num_msg ( $this->mbox );\n\t\t\tfor ( $i = 1; $i <= $n; $i++ )\t// Yes: starts with 1, not 0\n\t\t\t{\n\t\t\t\t$recipients[$i] = $this->getRecipient ( $i );\n\t\t\t}\t\n\t\t\t\n\t\t\treturn $recipients;\n\t\t}", "public function getEmailQueue()\n {\n return $this->query(null, ['isEmail' => 1, 'isEmailed' => 0]);\n }", "protected function get_notified_email_address()\n\t{\n\t\treturn [];\n\t}", "public function getRecipients(): ?array\n {\n return $this->recipients;\n }", "public function get_targets() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/targets.json\");\n }", "public function getEmails($filters = [])\n {\n $authUser = Auth::user();\n $user = [];\n\n if (!ine($filters, 'users')) {\n $user[] = $authUser->id;\n\t\t} else {\n\t\t\t$user = $filters['users'];\n\t\t\tif($user != 'all') {\n\t\t\t\t$user = (array)$user;\n\t\t\t}\n }\n\n if (ine($filters, 'users') && !$authUser->isAuthority()) {\n $user[] = (array)$authUser->id;\n }\n\n if ((ine($filters, 'customer_id') || ine($filters, 'job_id') || ine($filters, 'stage_code'))) {\n if($authUser->isSubContractorPrime() && isset($filters['users'])) {\n\t\t\t\t$user = (array)$filters['users'];\n\t\t\t} else {\n\t\t\t\t$user = [];\n\t\t\t}\n }\n $filters['users'] = $user;\n $emails = $this->repo->getEmails($filters);\n return $emails;\n }", "public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }", "public function get_verified_emails() {\r\n\r\n\t\tset_error_handler( array( $this, 'ses_error_handler' ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler\r\n\r\n\t\t$data = $this->get_client()->listVerifiedEmailAddresses();\r\n\t\t$emails = array();\r\n\r\n\t\tif ( isset( $data['Addresses'] ) ) {\r\n\t\t\t$emails = $data['Addresses'];\r\n\t\t\tDebug::clear();\r\n\t\t}\r\n\r\n\t\treturn $emails;\r\n\t}", "public function getToList(): string {\n\t\treturn $this->createEMailList($this->getTo());\n\t}", "public function emails()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select([DB::raw('IFNULL(prefix, \"Email\") AS type'), 'value AS url', 'is_primary'])\n ->where('type', 'email');\n }", "public static function emails($text = '') {\n\t\t$matches = [];\n\t\t$regex = '/' . self::REGEX_MATCH_TAG . '|' . self::REGEX_CHAR_BACK . self::REGEX_EMAIL . '/i';\n\t\tpreg_match_all($regex, $text, $matches);\n\t\t$results = array_filter($matches[2]);\n\t\treturn array_unique($results);\n\t}", "public function getModeratorEmails() {\n $moderatorNames = $this->get('moderators');\n $moderatorNames = explode(',',$moderatorNames);\n $moderators = array();\n foreach ($moderatorNames as $name) {\n $c = $this->xpdo->newQuery('modUser');\n $c->innerJoin('modUserProfile','Profile');\n $c->select(array('modUser.id','Profile.email'));\n $c->where(array('username' => $name));\n $user = $this->xpdo->getObject('modUser',$c);\n if ($user) {\n $moderators[] = $user->get('email');\n }\n }\n\n /* now get usergroup moderators */\n $moderatorGroup = $this->get('moderator_group');\n $c = $this->xpdo->newQuery('modUserProfile');\n $c->innerJoin('modUser','User');\n $c->innerJoin('modUserGroupMember','UserGroupMembers','User.id = UserGroupMembers.member');\n $c->innerJoin('modUserGroup','UserGroup','UserGroup.id = UserGroupMembers.user_group');\n $c->where(array(\n 'UserGroup.name' => $moderatorGroup,\n ));\n $members = $this->xpdo->getCollection('modUserProfile',$c);\n foreach ($members as $member) {\n $email = $member->get('email');\n if (!empty($email)) array_push($moderators,$email);\n }\n $moderators = array_unique($moderators);\n\n return $moderators;\n }", "public function getToAddresses()\n {\n return $this->to;\n }", "public function getAllRecipientAddresses()\n {\n }", "public function getFailedRecipients() {}", "final public function getAllEmails($maxEmails=null, $includePublicEmail = true) {\n\t\treturn implode(', ', $this->getAllEmailsAsArray($maxEmails, $includePublicEmail) );\n\t}", "public function getCcEmails()\n {\n return $this->cc_emails;\n }", "public function getEmailCopyTo()\n {\n $data = $this->getConfigValue(self::XML_PATH_EMAIL_COPY_TO, $this->getStore()->getStoreId());\n if (!empty($data)) {\n return array_map('trim', explode(',', $data));\n }\n return false;\n }", "public function getSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id = %1d AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function getEmailDomains()\n {\n $domains = array();\n \n foreach(Core_Model_DiFactory::getClientManager()->getClients() as $clientId => $client) {\n if($client->hasService(MazelabVpopqmail_Model_ConfigManager::MODULE_NAME)) {\n $domains = array_merge($domains, $this->getEmailDomainsByOwner($clientId));\n }\n }\n \n return $domains;\n }", "public function getCaRemoveCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_REMOVE_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getTargetIDs() {\n return $this->sessionData[\"targets\"];\n }", "function getMailList_moderator($exclude='')\r\n\t{\r\n\t\t/* exclude must be an array of values\r\n\t\t * OR not quoted list separated by ,\r\n\t\t */\r\n\r\n\t\t$database =& JFactory::getDBO();\r\n\r\n\t if (is_array($exclude)) {\r\n\t $exclude = implode(',', $exclude);\r\n\t }\r\n\r\n /* Moderators(if requested) */\r\n\r\n $moderator_maillist = array();\r\n\r\n if ($this->_notify_moderator && $this->_moderator) {\r\n $usertype = '';\r\n foreach($this->_moderator as $moderator) {\r\n $usertype .= ($usertype ? ',':'') . \"'\" . JOSC_utils::getJoomlaUserType($moderator) . \"'\";\r\n }\r\n\t\t\t$query \t= \"SELECT DISTINCT email \"\r\n\t\t\t\t\t. \"\\n FROM `#__users` \"\r\n\t\t\t\t\t. \"\\n WHERE email <> '' \"\r\n\t\t\t\t\t. \"\\n AND usertype IN ($usertype)\"\r\n\t\t\t\t\t;\r\n\t\t\tif ($exclude) {\r\n\t\t\t\t$quoted = str_replace( ',', \"','\", $exclude); /* add quotes */\r\n\t\t\t\t$query .= \"\\n AND email NOT IN ('$quoted')\";\r\n\t\t\t}\r\n\t\t\t$database->setQuery( $query );\r\n\t\t\t$moderator_maillist = $database->loadResultArray(); //tableau\r\n\t\t\t//echo implode(';' , $moderator_maillist); // liste s�par� par des ;\r\n } elseif ($this->_notify_admin && $this->_notify_email <> '') {\r\n $moderator_maillist[] = $this->_notify_email;\r\n }\r\n return $moderator_maillist;\r\n\t}", "function getCoordinatorEmailAll() {\n $sqlQuery = \"SELECT coordinatorEmail FROM congregation_coordinator\";\n $result = $this->DB->executeQuery($sqlQuery, $this->Functions->paramsIsZero(), \"select\");\n if($result) {\n return $result;\n }else {\n return null;\n }\n }", "public function default_reply_to_addresses() {\n\n\t\t_deprecated_function( __CLASS__ . '::' . __METHOD__, '2.1.1 of WP Mail SMTP plugin' );\n\n\t\t$gmail_creds = ( new Auth() )->get_user_info();\n\n\t\tif ( empty( $gmail_creds['email'] ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t$gmail_creds['email'] => [\n\t\t\t\t$gmail_creds['email'],\n\t\t\t\t'',\n\t\t\t],\n\t\t];\n\t}", "public function getTargetLists() {\n $result = $this->runSugarQuery('ProspectLists', array('id', 'mailchimp_list', 'date_modified', 'last_sync_date'), array('isNotEmpty' => 'mailchimp_list'));\n if($result) {\n return $result;\n }\n return array();\n }", "public function getRecipients()\n\t{\n\t\t$me\t\t\t= $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$table\t\t= $this->getTable();\n\t\t$params\t\t= $this->getService('com://admin/ninjaboard.model.settings')->getParams();\n\t\t$topic\t\t= $this->getService('com://site/ninjaboard.model.topics')->id($this->_state->topic)->getItem();\n\t\t$forum\t\t= $this->getService('com://site/ninjaboard.model.forums')->id($topic->forum_id)->getItem();\n\t\t$ids\t\t= array();\n\t\t\n\t\tif($params->email_notification_settings->auto_notify_admins == 'yes') {\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('id')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('sendEmail', '=', 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', '!=', $me->id);\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this topic\n\t\tif($this->_state->topic)\n\t\t{\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('topic'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', '=', $this->_state->topic)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this forum and/or parent forum(s)\n\t\tif($forum->id)\n\t\t{\n\t\t\t$forums = array_filter(explode('/', $forum->path));\n\t\t\t$forums[] = $forum->id;\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('forum'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $forums)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Recipients subscribed to me\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('person'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t{\n\t\t\t// we most have access to this forum to get notifications\n\t\t\t$person = $this->getService('com://admin/ninjaboard.model.people')->id($id)->getItem();\n\n\t\t\t// check we have permission for this forum\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t->select('tbl.level AS level')\n\t\t\t\t\t\t\t->from('ninjaboard_assets AS tbl')\n\t\t\t\t\t\t\t->order('tbl.level', 'DESC')\n\t\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t\t->where('tbl.name', '=', 'com_ninjaboard.forum.'.$forum->id.'.'.$person->ninjaboard_usergroup_id.'.forum');\n\n\t\t\t$result = $table->getDatabase()->select($query, KDatabase::FETCH_FIELD);\n\t\t\t$result = isset($result) ? $result : $person->forum_permissions;\n\n\t\t\tif (!$result) continue;\n\n\t\t\t$ids[$id] = $id;\n\n\t\t}\n\t\t\n\t\tif(!$ids) return array();\n\t\t\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select(array('name', 'email'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', 'in', $ids);\n\t\treturn $table->getDatabase()->select($query, KDatabase::FETCH_OBJECT_LIST);\n\t}", "public function getRecipients($context = null) {\n\t\t$recipients = ArrayList::create();\n\n\t\t// if we have a context, use that for returning the recipients\n\t\tif ($context && ($context instanceof NotifiedOn) || method_exists($context, 'getRecipients')) {\n\t\t\t$contextRecipients = $context->getRecipients($this->Identifier);\n\t\t\tif ($contextRecipients) {\n\t\t\t\t$recipients->merge($contextRecipients);\n\t\t\t}\n\t\t}\n\n\t\tif ($context instanceof Member) {\n\t\t\t$recipients->push($context);\n\t\t} else if ($context instanceof Group) {\n\t\t\t$recipients = $context->Members();\n\t\t}\n\n\t\t// otherwise load with a preconfigured list of recipients\n\t\treturn $recipients;\n\t}", "public function emails()\n {\n return $this->hasMany(Email::class);\n }", "public function getExternalSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id, s.user_email, p.is_public'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id IS NULL AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public static function getListUserEmail($except = array()) {\n $criteria = new CDbCriteria();\n $criteria->addCondition('t.status=' . Users::STATUS_ACTIVE . ' AND role_id<>' . Roles::getRoleByName(Roles::ROLE_CUSTOMER)->id);\n if (isset($except['roles'])) {\n $sParamsIn = implode(DomainConst::SPLITTER_TYPE_2, $except['roles']);\n $criteria->addCondition(\"t.role_id NOT IN($sParamsIn)\");\n }\n if (isset($except['ids'])) {\n $sParamsIn = implode(DomainConst::SPLITTER_TYPE_2, $except['ids']);\n if (!empty($sParamsIn)) {\n $criteria->addCondition(\"t.id NOT IN ($sParamsIn)\");\n }\n }\n $criteria->addCondition('t.email <> \"\" AND t.email IS NOT NULL');\n\n return Users::model()->findAll($criteria);\n }", "public function findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "public function get_email_instance() {\n\n\t\treturn $this->emails;\n\t}", "function getToRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND to_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "abstract function getEmailsArray() : array;", "public function to(array $emails);", "public function getMatchedEmailAddress();", "public function getAllMails()\n {\n $user = Auth::user();\n $emails = DB::table('users')->select('id','email')->get();\n return response()->json($emails);\n }", "public function alertEmailList($accountId) {\n $result = $this->db->where('id', $accountId)->select('support_email,fault_alert_email,safety_alert_email')->from('accounts')->get();\n\n if ($result->num_rows() > 0) {\n\n return $result->result_array();\n } else {\n return FALSE;\n }\n }", "private function worker(array $args): Recipients\n {\n # 1. call API method\n # Exceptions will be caught by the calling function\n $envelope_api = $this->clientService->getEnvelopeApi();\n try {\n $results = $envelope_api->listRecipients($args['account_id'], $args['envelope_id']);\n } catch (ApiException $e) {\n $this->clientService->showErrorTemplate($e);\n exit;\n }\n\n return $results;\n }", "public function NotificationRecipients() {\n\t\t$members = new ArrayList();\n\t\t$members->merge($this->NotifyMembers());\n\t\t/** @var \\Group $group */\n\t\tforeach ($this->NotifyGroups() as $group) {\n\t\t\t$members->merge($group->Members());\n\t\t}\n\t\t$members->removeDuplicates();\n\t\treturn $members;\n\t}", "public function getBillingEmailArray()\n {\n $emails = str_replace(\";\", \",\", $this->email);\n return explode(',', $emails);\n }", "public function getGetMaillistReply()\n {\n return $this->get(self::_GET_MAILLIST_REPLY);\n }", "public function getNotificationEmailAddresses()\n {\n if (array_key_exists(\"notificationEmailAddresses\", $this->_propDict)) {\n return $this->_propDict[\"notificationEmailAddresses\"];\n } else {\n return null;\n }\n }", "public function getReplyToAddresses()\n {\n }", "function getMailList($contentid='', $exclude='')\r\n\t{ /* exclude must be an array of values\r\n\t\t * OR not quoted list separated by ,\r\n\t\t *\r\n\t\t * contentid should be an array of values\r\n\t\t * OR not quoted list separated by ,\r\n\t\t */\r\n\r\n\t\t$database =& JFactory::getDBO();\r\n\r\n\t if (is_array($contentid)) {\r\n\t $contentid = implode(',', $contentid);\r\n\t }\r\n\t if (is_array($exclude)) {\r\n\t $exclude = implode(',', $exclude);\r\n\t }\r\n\r\n\t if ($this->_notify_users && $contentid) {\r\n\t /* Unregistered users */\r\n\t\t\t$query \t= \"SELECT DISTINCT email \"\r\n\t\t\t\t\t. \"\\n FROM `#__comment` \"\r\n\t\t\t\t\t. \"\\n WHERE contentid IN ($contentid) AND component='$this->_component'\"\r\n\t\t\t\t\t. \"\\n AND ( userid = NULL OR userid = 0 )\"\r\n\t\t\t\t\t. \"\\n AND email <> ''\"\r\n\t\t\t\t\t. \"\\n AND notify = '1'\"\r\n\t\t\t\t\t;\r\n\t\t\tif ($exclude) {\r\n\t\t\t\t$quoted = str_replace( ',', \"','\", $exclude); /* add quotes */\r\n\t\t\t\t$query .= \"\\n AND email NOT IN ('$quoted')\";\r\n\t\t\t}\r\n\t\t\t$database->setQuery( $query );\r\n\t\t\t$unregistered_maillist = $database->loadResultArray(); //tableau\r\n\r\n\t\t\tif ($unregistered_maillist) {\r\n\t\t\t $exclude = ($exclude ? $exclude.',' : '') . implode(',', $unregistered_maillist);\r\n\t\t\t}\r\n\r\n \t \t/* Registered users*/\r\n \t \t$registered_maillist = array();\r\n\t\t\t$query \t= \"SELECT DISTINCT u.email \"\r\n\t\t\t\t\t. \"\\n FROM `#__comment` AS c \"\r\n\t\t\t\t\t. \"\\n INNER JOIN `#__users` AS u ON u.id = c.userid \"\r\n\t\t\t\t\t. \"\\n WHERE c.contentid IN ($contentid) AND component='$this->_component'\"\r\n\t\t\t\t\t. \"\\n AND u.email <> ''\"\r\n\t\t\t\t\t. \"\\n AND c.notify = '1'\"\r\n\t\t\t\t\t;\r\n\t\t\tif ($exclude) {\r\n\t\t\t\t$quoted = str_replace( ',', \"','\", $exclude); /* add quotes */\r\n\t\t\t\t$query .= \"\\n AND u.email NOT IN ('$quoted')\";\r\n\t\t\t}\r\n\t\t\t$database->setQuery( $query );\r\n\t\t\t$registered_maillist = $database->loadResultArray(); //tableau\r\n//\t\t\t$debugemail = implode(';' , $maillist); // liste s�par� par des ;\r\n\r\n\t\t\tif ($registered_maillist) {\r\n\t\t \t$exclude = ($exclude ? $exclude.',' : '') . implode(',', $registered_maillist);\r\n\t\t\t}\r\n\t }\r\n\r\n\t\t$moderator_maillist = $this->getMailList_moderator($exclude);\r\n\r\n\t\t$maillist = array();\r\n\t\tif (isset($unregistered_maillist) && is_array($unregistered_maillist))\r\n\t\t\t$maillist = array_merge( $maillist, $unregistered_maillist);\r\n\t\tif (isset($registered_maillist) && is_array($registered_maillist))\r\n\t\t\t$maillist = array_merge( $maillist, $registered_maillist);\r\n\t\tif (isset($moderator_maillist) && is_array($moderator_maillist))\r\n\t\t\t$maillist = array_merge( $maillist, $moderator_maillist);\r\n\r\n\t\treturn ($maillist);\r\n\t}", "public function findAllEmails()\r\n {\r\n try {\r\n $query = 'SELECT email FROM login';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n if ($result == false) {\r\n return false;\r\n } else {\r\n return $result;\r\n }\r\n } catch (PDOException $e) {\r\n echo \"get accounts error\";\r\n die();\r\n }\r\n }" ]
[ "0.7263601", "0.72609824", "0.7215528", "0.72111434", "0.71579057", "0.71579057", "0.71130055", "0.70832914", "0.6968444", "0.68862325", "0.68136454", "0.6746407", "0.67319614", "0.6709346", "0.66817", "0.6647166", "0.6631594", "0.66088796", "0.65977633", "0.6581527", "0.65281975", "0.6491951", "0.64723283", "0.6447819", "0.6413345", "0.63782877", "0.6376873", "0.6297629", "0.62936926", "0.62846875", "0.62576425", "0.6241719", "0.62135744", "0.6207297", "0.6201493", "0.6201333", "0.6191912", "0.61754584", "0.61558676", "0.6131236", "0.6080955", "0.603631", "0.60355043", "0.6026768", "0.6026597", "0.6006773", "0.60052633", "0.60014373", "0.60000664", "0.5979688", "0.59769714", "0.5969375", "0.5955237", "0.59538126", "0.5952201", "0.5944759", "0.5941773", "0.59413195", "0.5938939", "0.59300715", "0.5927263", "0.5918212", "0.59029746", "0.59020746", "0.58827174", "0.58683455", "0.585171", "0.5851005", "0.58381945", "0.5837386", "0.5826512", "0.58155227", "0.57865506", "0.57860017", "0.5785987", "0.57686794", "0.57400304", "0.5734236", "0.5725915", "0.5723881", "0.57121634", "0.57019234", "0.5689082", "0.5686786", "0.56717783", "0.5658936", "0.5644821", "0.563854", "0.5626934", "0.5626781", "0.56237894", "0.5619751", "0.5617675", "0.560773", "0.56039834", "0.5602202", "0.56011516", "0.5595669", "0.55749947", "0.55721045", "0.55672836" ]
0.0
-1
Get list of Cc emails.
public function getCc(): iterable;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCcEmails()\n {\n return $this->cc_emails;\n }", "public function getCcList(): string {\n\t\treturn $this->createEMailList($this->getCc());\n\t}", "public function getCc()\n {\n return $this->getAddressListFromHeader('cc', '\\Zend\\Mail\\Header\\Cc');\n }", "public function getCcAddresses()\n {\n return $this->cc;\n }", "public function getAllEmailAddresses() {\n $saveCurrentFolder = $this->folder;\n $emails = array();\n foreach($this->getFolders() as $folder) {\n $this->selectFolder($folder);\n foreach($this->getMessages(false) as $message) {\n $emails[] = $message['from'];\n $emails = array_merge($emails, $message['to']);\n if (isset($message['cc'])) {\n $emails = array_merge($emails, $message['cc']);\n }\n }\n }\n $this->selectFolder($saveCurrentFolder);\n return array_unique($emails);\n }", "public function getCcAddresses()\n {\n }", "public function getBccList(): string {\n\t\treturn $this->createEMailList($this->getBcc());\n\t}", "public function getContactAllEmail()\n\t{\n\t\t$emails = 'nothing';\n\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$url = $this->url . \"/Contacts/filter\";\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$response = self::call($url, $this->token, 'GET',$filter_arguments);\n\n\t\t\t$email_records = $response->records;\n\n\t\t\tforeach($email_records as $record)\n\t\t\t{\n\t\t\t\t$emails[] = $record->portal_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "private function disposableEmailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function cc(array $emails);", "public function getContactList()\r\n {\r\n return $this->exec('contact_list');\r\n }", "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->settings['recipients'] as $item ) {\n\t\t\t$emails[] = $item['value'];\n\t\t}\n\n\t\treturn $emails;\n\t}", "function getCcRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND cc_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "public static function getMailingList($criteria) {\n $mailingList = array();\n\n $arr = X2Model::model('Contacts')->findAll();\n foreach ($arr as $contact) {\n $i = preg_match(\"/$criteria/i\", $contact->backgroundInfo);\n if ($i >= 1) {\n $mailingList[] = $contact->email;\n }\n }\n return $mailingList;\n }", "public function getAllRecipients() {}", "public function getContactsList() {\n return $this->_get(6);\n }", "public function getRecipients();", "private function getCc(): ?array {\n\t\treturn $this->cc;\n\t}", "public function getCc()\n {\n return $this->config['Destination']['CcAddresses'];\n }", "function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}", "public function getContactsList() {\n return $this->_get(7);\n }", "public function getEmails()\n\t{\n \\Phalcon\\DI::getDefault()->get('logger')->log(\"Emails: \" . print_r($this->emails, true));\n\t\treturn $this->emails;\n\t}", "public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }", "public function emails()\n {\n return $this->emails;\n }", "function listEmails(){\n \n $conn = $this->connect();\n $ret = '';\n \n $sql = 'select email from ' . $this->dbtable;\n\t\t\t$query = mysql_query( $sql, $conn );\n \n\t\t\twhile( $row = mysql_fetch_assoc( $query ) ){\n\t\t\t\t$ret .= $row['email'] . \";\\n\";\n\t\t\t}\n \n mysql_close( $conn );\n \n\t\t\treturn $ret;\n }", "public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getAllEmails() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('email')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('email')->all();\n }", "public function getCaRemoveCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_REMOVE_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}", "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "public function getEmailCCAddress() { return $this->_emailCCAddress; }", "public function column_cc( $item ) {\n\n\t\t$cc_emails = $item->get_people( 'cc' );\n\n\t\tforeach ( $cc_emails as $key => $email ) {\n\t\t\t$cc_emails[ $key ] = $this->generate_email_search_link( $email );\n\t\t}\n\n\t\tif ( ! empty( $cc_emails ) ) {\n\t\t\t$cc_emails = implode( ', ', $cc_emails );\n\t\t} else {\n\t\t\t$cc_emails = esc_html__( 'N/A', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $cc_emails;\n\t}", "protected function getEmailCC($email)\n {\n return json_encode($this->extractAddressesFromArray($email->getCc()));\n }", "public function getCc()\n {\n return $this->cc;\n }", "public function getCaApprovalCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_APPROVAL_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getAllConsents($email)\n {\n return $this->model->getAll($email);\n }", "public function getCc() {\n\t\treturn $this->cc;\n\t}", "public function fetchContacts()\n {\n return $this->contacts;\n }", "function getCampaignList() {\n\t\treturn $this->gateway->execCommad('getCampaignList',\"\");\n\t}", "public function getAll()\r\n {\r\n return $this->contactManager->fetchAll(true, null, null);\r\n }", "public function getEmails() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'];\n\t}", "public function getRecipients()\r\n {\r\n return ['to' => $this->to, 'cc' => $this->cc, 'bcc' => $this->bcc];\r\n }", "public function getCCString ( \\r8\\Mail $mail )\n {\n return $this->getAddressList( $mail->getCC() );\n }", "public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }", "public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"[email protected]\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }", "public function getAllVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], null);\n }", "public function getMails(): Collection\n {\n\n return $this->mails;\n\n }", "public function bcc(array $emails);", "public function getEmailDomains()\n {\n $domains = array();\n \n foreach(Core_Model_DiFactory::getClientManager()->getClients() as $clientId => $client) {\n if($client->hasService(MazelabVpopqmail_Model_ConfigManager::MODULE_NAME)) {\n $domains = array_merge($domains, $this->getEmailDomainsByOwner($clientId));\n }\n }\n \n return $domains;\n }", "public function getMailCc($instance=false){\n if ($instance && !is_object($this->_data['mail_cc'])){\n $this->setMailCc('',array('required'=>false));\n }\n return $this->_data['mail_cc'];\n }", "private function _fetchEmailsFromInbox()\n {\n // refresh the cache\n $this->imapConnection->getResource()->clearLastMailboxUsedCache();\n $messages = $this->inbox->getMessages();\n if ($messages instanceof \\ArrayIterator) {\n $messages = iterator_to_array($messages);\n }\n\n return $messages;\n }", "public static function getAllSearchingEmailConversations($options = array()) {\n //Build the list\n $options = $options + (new RecordList)->getDefaultOptions();\n $options['sql'] = \"SELECT conversations.id, message\n FROM conversations\n LEFT JOIN messages ON (conversations.id = messages.conversations_id)\n WHERE (SELECT id FROM messages WHERE conversations_id = conversations.id ORDER BY date_created DESC LIMIT 1) = messages.id\n AND conversations.method = 'EMAIL'\n AND messages.date_created < now() + INTERVAL -\" . (int)\\UNL\\VisitorChat\\Controller::$conversationTTL . \" MINUTE\n AND (conversations.status = 'CHATTING' OR conversations.status = 'SEARCHING')\";\n\n return self::getBySql($options);\n }", "public function getContacts(){\n\t\t$db = Dbconn::getDB();\n\t\t$sql = \"SELECT * FROM contacts\";\n\t\t$result = $db->query($sql);\n\n\t\t$contacts = array();\n\n\t\tforeach ($result as $row){\n\t\t\t$contact = new Contact(\n\t\t\t\t$row['contact_fname'],\n\t\t\t\t$row['contact_lname'],\n\t\t\t\t$row['contact_email'],\n\t\t\t\t$row['contact_phone'],\n\t\t\t\t$row['contact_msg']\n\t\t\t\t);\n\t\t\t$contacts[] = $contact;\n\t\t}\n\n\t\treturn $contacts;\n\t}", "public function getBccAddresses()\n {\n }", "public function getContactEmails(array $ids)\n {\n $response = $this->request('GET', 'contacts/email', ['ids' => implode(',', $ids)]);\n\n return array_reduce($response['results'], function ($result, $item) {\n $result[$item['contactId']] = $item['email'];\n\n return $result;\n }, []);\n }", "public function getEmailReferrers();", "public function list(Query $body = null)\n {\n $domainrobotPromise = $this->listAsync($body);\n $domainrobotResult = $domainrobotPromise->wait();\n\n Domainrobot::setLastDomainrobotResult($domainrobotResult);\n \n $data = $domainrobotResult->getResult()['data'];\n $contacts = array();\n\n foreach ($data as $d) {\n $c = new SslContact($d);\n array_push($contacts, $c);\n }\n return $contacts;\n }", "public function getMailChimpCampaigns() {\n $result = $this->campaign->getCampaigns($this->default['campaign_fields']);\n if($result) {\n $count = $result['total_items'];\n if($count > 0) {\n return $result['campaigns'];\n }\n }\n return false;\n }", "public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }", "public function get_contacts($list_id = self::SENDGRID_FXPROTOOLS_LIST_ID)\n\t\t{\n\t\t\t$sg = new \\SendGrid( self::SENDGRID_API_KEY );\n\t\t\t$query_params = json_decode('{\"page\": 1, \"page_size\": 1, }');\n\t\t\t$response = $sg->client->contactdb()->lists()->_($list_id)->recipients()->get(null, $query_params);\n\t\t\treturn $response->body();\n\t\t}", "public function getContacts()\r\n {\r\n return $this->_contacts;\r\n }", "public function returnMailboxListArr(){\n\t\treturn imap_list($this->stream,$this->mbox,'*');\n\t}", "public function getContacts() {\n return $this->contacts;\n }", "public function getContacts(){\n\t\n\t\t$db\t\t= $this->getDbo();\n\t\t\n\t\t$query\t= $db->getQuery( true );\n\t\t$query->select( '*' );\n\t\t$query->from( '#__zbrochure_providers_contacts as c' );\n\t\t$query->join( 'LEFT','#__zbrochure_providers as p on p.provider_id = c.provider_id' );\n\t\t\n\t\t$db->setQuery( $query );\n\t\t$contacts = $db->loadObjectList();\n\t\t\n\t\treturn $contacts;\n\t}", "public function getContacts()\n {\n if (! isset($this->contacts)) {\n $this->contacts = new AddressBook\\Model\\Collection\\ContactCollection();\n }\n return $this->contacts;\n }", "public function getEmailCopyTo()\n {\n $data = $this->getConfigValue(self::XML_PATH_EMAIL_COPY_TO, $this->getStore()->getStoreId());\n if (!empty($data)) {\n return array_map('trim', explode(',', $data));\n }\n return false;\n }", "public static function getEmails($customer_id) {\n \t$emails = array();\n \t\n \tif(is_numeric($customer_id)){\n\t \t$mainmail = Customers::getEmailAddress($customer_id);\n\t \tif(!empty($mainmail)){\n\t \t\t$emails[] = $mainmail;\n\t \t}\n\t \t\n\t $records = Doctrine_Query::create ()->select ( 'contact_id, contact as email' )\n\t \t\t\t\t\t\t\t ->from ( 'Contacts c' )\n\t \t\t\t\t\t\t\t ->leftJoin ( 'c.ContactsTypes t' )\n\t \t\t\t\t\t\t\t ->where ( \"customer_id = ? and t.name = ?\", array($customer_id, \"email\") )\n\t \t\t\t\t\t\t\t ->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n\t \n\t foreach ($records as $record){\n\t \t$emails[] = $record['email'];\t\n\t }\t\t\t\t\t \n\t \n\t return !empty($emails) ? $emails : NULL;\n \t}\n }", "function getMailList() {\n return getAll(\"SELECT id,`email` FROM `member` WHERE id != ?\"\n , [getLogin()['mid']]);\n}", "public function emails()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Mailinglist\\\\Email', 'mid');\n\t}", "public function getContacts()\n\t{\n\t\treturn $this->contacts; \n\n\t}", "public function emails()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select([DB::raw('IFNULL(prefix, \"Email\") AS type'), 'value AS url', 'is_primary'])\n ->where('type', 'email');\n }", "public function getCemail()\n {\n return $this->cemail;\n }", "public function getEmailAddresses()\n {\n return isset($this->EmailAddresses) ? $this->EmailAddresses : null;\n }", "function getContactEmailAssocList($prj_id, $customer_id)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getContactEmailAssocList($customer_id);\n }", "public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' );\n\n $mails = Tolist::findMany( array(\n 'to_id' => Auth::user()->id . '_' . $gname\n ), array(\n 'email'\n ) )->all( 'email' );\n\n return Helper::cleanGroups( $mails, '|' );\n\n }", "public function findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "protected function getEmailRecipients($email)\n {\n return json_encode(array_merge(\n $this->extractAddressesFromArray($email->getTo()),\n $this->extractAddressesFromArray($email->getCc()),\n $this->extractAddressesFromArray($email->getBcc())\n ));\n }", "public function getBillingEmailArray()\n {\n $emails = str_replace(\";\", \",\", $this->email);\n return explode(',', $emails);\n }", "function obtenirListeEmailPersonnesAJourDeCotisation()\n {\n $timestamp = time() - 60 * 86400;\n // Personne physique seule\n $requete = \"SELECT group_concat(DISTINCT email SEPARATOR ';')\n FROM (\n SELECT app.email\n FROM afup_cotisations ac\n INNER JOIN afup_personnes_physiques app ON app.id = ac.id_personne\n WHERE date_fin >= \" . $timestamp . \"\n AND type_personne = 0\n AND etat = 1\n UNION\n SELECT app.email\n FROM afup_cotisations ac\n INNER JOIN afup_personnes_physiques app ON app.id_personne_morale = ac.id_personne\n WHERE date_fin >= \" . $timestamp . \"\n AND type_personne = 1\n AND etat = 1 ) tmp\";\n return $this->_bdd->obtenirUn($requete);\n }", "public function getEmails()\n {\n if (!isset($this->options['keep'])) {\n throw new BadMethodCallException(\"This function only works with the `keep` option\");\n }\n \n return $this->emails;\n }", "public function buildRecipientList() {\n $actors = $this->loadAllActors();\n $actors = $this->filterDeliverableActors($actors);\n return mpull($actors, 'getPHID');\n }", "public function getRecipients ()\n\t\t{\n\t\t\t$recipients = array();\n\t\t\t$n = imap_num_msg ( $this->mbox );\n\t\t\tfor ( $i = 1; $i <= $n; $i++ )\t// Yes: starts with 1, not 0\n\t\t\t{\n\t\t\t\t$recipients[$i] = $this->getRecipient ( $i );\n\t\t\t}\t\n\t\t\t\n\t\t\treturn $recipients;\n\t\t}", "function get_all_contacts() {\n //get all the users\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n //return the array of contacts\n return $contacts;\n\n }", "function getCcString() {\n\t\treturn $this->getAddressArrayString($this->getCcs());\n\t}", "function getBccRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND bcc_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "static function listCampaignNames() {\n $campaigns = EmailmarketingCampaign::where('active', '1');\n $result = $campaigns->get()->toArray();\n if (count($result)>0) return $result;\n return array();\n }", "public function getUserMails()\r\n\t{\r\n\t\t$userDir = __DIR__ . '/../../settings/users';\r\n\t\t\t\t\r\n\t\t/* check if users directory exists */\r\n\t\tif(!is_dir($userDir)){ return array(); }\r\n\t\t\r\n\t\t/* get all user files */\r\n\t\t$users = array_diff(scandir($userDir), array('..', '.'));\r\n\t\t\r\n\t\t$usermails\t= array();\r\n\r\n\t\tforeach($users as $key => $user)\r\n\t\t{\r\n\t\t\tif($user == '.logins'){ continue; }\r\n\r\n\t\t\t$contents \t= file_get_contents($userDir . DIRECTORY_SEPARATOR . $user);\r\n\r\n\t\t\tif($contents === false){ continue; }\r\n\r\n\t\t\t$searchfor \t= 'email:';\r\n\r\n\t\t\t# escape special characters in the query\r\n\t\t\t$pattern \t= preg_quote($searchfor, '/');\r\n\t\t\t\r\n\t\t\t# finalise the regular expression, matching the whole line\r\n\t\t\t$pattern \t= \"/^.*$pattern.*\\$/m\";\r\n\r\n\t\t\t# search, and store first occurence in $matches\r\n\t\t\tif(preg_match($pattern, $contents, $match)){\r\n\t\t\t\t$usermails[] = trim(str_replace(\"email:\", \"\", $match[0]));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $usermails;\r\n\t}", "protected function getRecipients(Swift_Mime_Message $message)\n {\n $to = [];\n if ($message->getTo()) {\n $to = array_merge($to, $message->getTo());\n }\n if ($message->getCc()) {\n $to = array_merge($to, $message->getCc());\n }\n if ($message->getBcc()) {\n $to = array_merge($to, $message->getBcc());\n }\n $recipients = [];\n foreach ($to as $address => $name) {\n $recipients[] = ['Email' => $address, 'Name' => $name];\n }\n return $recipients;\n }", "public function getBccAddresses()\n {\n return $this->bcc;\n }", "public function getContacts() {\n $sforce = $this->getDataSource();\n $SOQL = $sforce->getConfigSOQL();\n $resultSet = $this->queryBatch($SOQL);\n \n return $resultSet;\n }", "public function getOrderEmailList(){\n // Set method and action\n $method = 'email';\n $action = 'getOrderEmailList';\n\n // Set data\n $data = array('params' => true);\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "public function listAddresses($cid = null) {\r\n\r\n $addresses = array ();\r\n\r\n if( $this->cid > 0 && (!isset($cid)) ) {\r\n\r\n $sql = Connection::getHandle()->prepare(\r\n \"SELECT * FROM bs_customer_addresses WHERE cid = ? ORDER BY default_billing DESC, default_shipping DESC\"\r\n );\r\n\r\n $sql->execute(array ($this->cid));\r\n\r\n while ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\r\n $addresses[] = $row;\r\n }\r\n\r\n return $addresses;\r\n\r\n } else if(isset($cid)) {\r\n\r\n $sql = Connection::getHandle()->prepare(\r\n \"SELECT * FROM bs_customer_addresses WHERE cid = ? ORDER BY default_billing DESC, default_shipping DESC\"\r\n );\r\n\r\n $sql->execute(array ($cid));\r\n\r\n while ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\r\n $addresses[] = $row;\r\n }\r\n\r\n return $addresses;\r\n\r\n }else{\r\n\r\n return FALSE;\r\n }\r\n\r\n\t\t}", "function getCoordinatorEmailAll() {\n $sqlQuery = \"SELECT coordinatorEmail FROM congregation_coordinator\";\n $result = $this->DB->executeQuery($sqlQuery, $this->Functions->paramsIsZero(), \"select\");\n if($result) {\n return $result;\n }else {\n return null;\n }\n }", "private function setCcData()\n {\n if($this->getCcs()){\n $ccArray = [];\n foreach($this->getCcs() as $cc){\n $ccArray[] = $this->setEmailNameString($cc['email'], $cc['name']);\n } \n\n return implode(',', $ccArray); \n }\n \n return '';\n }", "public function getContacts(){\n\t\t// ***\n\t\t// the following code should be ported\n\t\t// so multiple backends are allowed\n\t\t$userOnlineMapper = $this->app['UserOnlineMapper'];\n\t\t$usersOnline = $userOnlineMapper->getOnlineUsers();\n\t\t$syncOnline = $this->app['SyncOnlineCommand'];\n\t\t$syncOnline->execute();\n\t\t// ***\n\n\t\tif(count(self::$contacts) == 0){\n\t\t\t$cm = \\OC::$server->getContactsManager();\n\n\t\t\t$result = $cm->search('',array('FN'));\n\t\t\t$receivers = array();\n\t\t\t$contactList = array();\n\t\t\t$contactsObj = array();\n\t\t\tforeach ($result as $r) {\n\t\t\t\t$data = array();\n\n\t\t\t\t$contactList[] = $r['FN'];\n\n\t\t\t\t$data['id'] = $r['id'];\n\t\t\t\t$data['online'] = in_array($r['id'], $usersOnline);\n\t\t\t\t$data['displayname'] = $r['FN'];\n\n\t\t\t\tif(!isset($r['EMAIL'])){\n\t\t\t\t\t$r['EMAIL'] = array();\n\t\t\t\t}\n\n\t\t\t\tif(!isset($r['IMPP'])){\n\t\t\t\t\t$r['IMPP'] = array();\n\t\t\t\t}\n\t\t\t\t$data['backends'] = $this->contactBackendToBackend($r['EMAIL'], $r['IMPP']);\n\t\t\t\tlist($addressBookBackend, $addressBookId) = explode(':', $r['addressbook-key']);\n\t\t\t\t$data['address_book_id'] = $addressBookId;\n\t\t\t\t$data['address_book_backend'] = $addressBookBackend;\n\t\t\t\t$receivers[] = $data;\n\t\t\t\t$contactsObj[$r['id']] = $data;\n\t\t\t}\n\t\t\tself::$contacts = array('contacts' => $receivers, 'contactsList' => $contactList, 'contactsObj' => $contactsObj);\n\t\t}\n\t\treturn self::$contacts;\n\t}", "public function getContacts()\n {\n // Perform query\n $this->connect();\n $result = $this->conn -> query(\"SELECT * FROM contatti ORDER BY nome\");\n if($result==false){\n echo \"getItems fallita\";\n $this->disconnect();\n return false;\n }\n $rows = array();\n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n $this->disconnect();\n return $rows;\n }" ]
[ "0.82332474", "0.76475674", "0.6949082", "0.69474703", "0.67353076", "0.67345697", "0.6712412", "0.662762", "0.65460145", "0.6544456", "0.64792466", "0.64251584", "0.63426346", "0.6269376", "0.62402177", "0.618871", "0.61698055", "0.6151413", "0.6143905", "0.61408985", "0.61174756", "0.61027217", "0.60807186", "0.60462123", "0.60396236", "0.60270536", "0.60251796", "0.6017432", "0.6016668", "0.6016668", "0.6011225", "0.60007894", "0.5983676", "0.59474164", "0.5930892", "0.5922287", "0.5918721", "0.5879215", "0.58745646", "0.58565825", "0.58323556", "0.5831254", "0.5830205", "0.5825597", "0.5797032", "0.5793896", "0.578933", "0.57627285", "0.57423764", "0.57421166", "0.5722796", "0.57053995", "0.56936413", "0.5687725", "0.5682736", "0.56421065", "0.5638834", "0.56345564", "0.562967", "0.56264395", "0.5621735", "0.5612434", "0.5598071", "0.55875766", "0.5585565", "0.55847657", "0.5568798", "0.5566565", "0.55568254", "0.55552155", "0.55484635", "0.55429876", "0.5535841", "0.5535334", "0.5533932", "0.55308753", "0.55252594", "0.5520757", "0.5519503", "0.55154616", "0.54915875", "0.5490667", "0.5488839", "0.54879296", "0.54861593", "0.54758054", "0.5475163", "0.5473004", "0.54709876", "0.54663366", "0.5464326", "0.5462693", "0.54600877", "0.5438113", "0.5436009", "0.5434906", "0.5434457", "0.5426808", "0.54222727", "0.5422248" ]
0.6878432
4
Get list of Bcc emails.
public function getBcc(): iterable;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBccList(): string {\n\t\treturn $this->createEMailList($this->getBcc());\n\t}", "public function getCcEmails()\n {\n return $this->cc_emails;\n }", "public function getCcList(): string {\n\t\treturn $this->createEMailList($this->getCc());\n\t}", "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "public function getBccAddresses()\n {\n }", "public function getBccAddresses()\n {\n return $this->bcc;\n }", "public function bcc(array $emails);", "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->settings['recipients'] as $item ) {\n\t\t\t$emails[] = $item['value'];\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function getAllEmailAddresses() {\n $saveCurrentFolder = $this->folder;\n $emails = array();\n foreach($this->getFolders() as $folder) {\n $this->selectFolder($folder);\n foreach($this->getMessages(false) as $message) {\n $emails[] = $message['from'];\n $emails = array_merge($emails, $message['to']);\n if (isset($message['cc'])) {\n $emails = array_merge($emails, $message['cc']);\n }\n }\n }\n $this->selectFolder($saveCurrentFolder);\n return array_unique($emails);\n }", "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function getContactAllEmail()\n\t{\n\t\t$emails = 'nothing';\n\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$url = $this->url . \"/Contacts/filter\";\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$response = self::call($url, $this->token, 'GET',$filter_arguments);\n\n\t\t\t$email_records = $response->records;\n\n\t\t\tforeach($email_records as $record)\n\t\t\t{\n\t\t\t\t$emails[] = $record->portal_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $emails;\n\t}", "function getBccRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND bcc_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}", "function getBccs() {\n\t\treturn $this->getData('bccs');\n\t}", "public function getAllEmails() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('email')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('email')->all();\n }", "private function disposableEmailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }", "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "function listEmails(){\n \n $conn = $this->connect();\n $ret = '';\n \n $sql = 'select email from ' . $this->dbtable;\n\t\t\t$query = mysql_query( $sql, $conn );\n \n\t\t\twhile( $row = mysql_fetch_assoc( $query ) ){\n\t\t\t\t$ret .= $row['email'] . \";\\n\";\n\t\t\t}\n \n mysql_close( $conn );\n \n\t\t\treturn $ret;\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getEmails()\n\t{\n \\Phalcon\\DI::getDefault()->get('logger')->log(\"Emails: \" . print_r($this->emails, true));\n\t\treturn $this->emails;\n\t}", "public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }", "public function getAllRecipients() {}", "public function getCc(): iterable;", "public static function getMailingList($criteria) {\n $mailingList = array();\n\n $arr = X2Model::model('Contacts')->findAll();\n foreach ($arr as $contact) {\n $i = preg_match(\"/$criteria/i\", $contact->backgroundInfo);\n if ($i >= 1) {\n $mailingList[] = $contact->email;\n }\n }\n return $mailingList;\n }", "function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}", "public function getCcAddresses()\n {\n return $this->cc;\n }", "public function getRecipients();", "public function emails()\n {\n return $this->emails;\n }", "function getCcRecipients($emailId) {\n // SELECT * FROM `email_recipients` WHERE `id_email` = %s AND `to_recipient` = 1\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND cc_recipient = 1\", $emailId);\n\n $recipients = '';\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n //$recipients = array();\n //$i=0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n //$recipients = array_fill($i, 1, $row['email'].';');\n //$i++;\n $recipients .= $row['name'] . '<' . $row['email'] . '>;';\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "public function getCcAddresses()\n {\n }", "public function getBcc()\n {\n return $this->config['Destination']['BccAddresses'];\n }", "public function getCc()\n {\n return $this->getAddressListFromHeader('cc', '\\Zend\\Mail\\Header\\Cc');\n }", "public function getBillingEmailArray()\n {\n $emails = str_replace(\";\", \",\", $this->email);\n return explode(',', $emails);\n }", "public function getRecipients()\r\n {\r\n return ['to' => $this->to, 'cc' => $this->cc, 'bcc' => $this->bcc];\r\n }", "public function getEmails() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'];\n\t}", "protected function getEmailBCC($email)\n {\n return json_encode($this->extractAddressesFromArray($email->getBcc()));\n }", "private function getBcc(): ?array {\n\t\treturn $this->bcc;\n\t}", "public function getMails(): Collection\n {\n\n return $this->mails;\n\n }", "function getMailList() {\n return getAll(\"SELECT id,`email` FROM `member` WHERE id != ?\"\n , [getLogin()['mid']]);\n}", "public function getBCCString ( \\r8\\Mail $mail )\n {\n return $this->getAddressList( $mail->getBCC() );\n }", "public function getEmailReferrers();", "public function getEmailCCAddress() { return $this->_emailCCAddress; }", "public function getCaApprovalCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_APPROVAL_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getCaRemoveCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_REMOVE_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function cc(array $emails);", "public function getContactList()\r\n {\r\n return $this->exec('contact_list');\r\n }", "public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"[email protected]\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }", "public function getEmailAddresses()\n {\n return isset($this->EmailAddresses) ? $this->EmailAddresses : null;\n }", "public function getBannedAccountsList() {\n\t\t$result = $this->db->queryFetch(\"SELECT \"._CLMN_MEMBID_.\", \"._CLMN_USERNM_.\", \"._CLMN_EMAIL_.\" FROM \"._TBL_MI_.\" WHERE \"._CLMN_BLOCCODE_.\" = 1 ORDER BY \"._CLMN_MEMBID_.\" ASC\");\n\t\tif(!is_array($result)) return;\n\t\treturn $result;\n\t}", "public static function getEmails($customer_id) {\n \t$emails = array();\n \t\n \tif(is_numeric($customer_id)){\n\t \t$mainmail = Customers::getEmailAddress($customer_id);\n\t \tif(!empty($mainmail)){\n\t \t\t$emails[] = $mainmail;\n\t \t}\n\t \t\n\t $records = Doctrine_Query::create ()->select ( 'contact_id, contact as email' )\n\t \t\t\t\t\t\t\t ->from ( 'Contacts c' )\n\t \t\t\t\t\t\t\t ->leftJoin ( 'c.ContactsTypes t' )\n\t \t\t\t\t\t\t\t ->where ( \"customer_id = ? and t.name = ?\", array($customer_id, \"email\") )\n\t \t\t\t\t\t\t\t ->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n\t \n\t foreach ($records as $record){\n\t \t$emails[] = $record['email'];\t\n\t }\t\t\t\t\t \n\t \n\t return !empty($emails) ? $emails : NULL;\n \t}\n }", "public function getEmails()\n {\n if (!isset($this->options['keep'])) {\n throw new BadMethodCallException(\"This function only works with the `keep` option\");\n }\n \n return $this->emails;\n }", "public function getOrderEmailList(){\n // Set method and action\n $method = 'email';\n $action = 'getOrderEmailList';\n\n // Set data\n $data = array('params' => true);\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "public function getEmailBCCAddress() { return $this->_emailBCCAddress; }", "public function getBcc()\n {\n return $this->bcc;\n }", "public function getAllConsents($email)\n {\n return $this->model->getAll($email);\n }", "public function getAllIBCEmails() {\n\t\t$dao = $this->getDao(new IBCEmailGen());\n $whereClauseGroup = new WhereClauseGroup(\n\t\t\tarray(\n\t\t\t\tnew WhereClause('module','=', IBCEmailGen::$MODULE_NAME)\n\t\t\t)\n );\n $responses = $dao->getAllWhere($whereClauseGroup);\n return $responses;\n\t}", "public function getAllVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], null);\n }", "public function getBcc() {\n\t\treturn $this->bcc;\n\t}", "public function getAllEmail()\n {\n $query = $this->db->select('first_name, last_name, email')\n ->get('user');\n return $query->result_object();\n }", "public function column_bcc( $item ) {\n\n\t\t$bcc_emails = $item->get_people( 'bcc' );\n\n\t\tforeach ( $bcc_emails as $key => $email ) {\n\t\t\t$bcc_emails[ $key ] = $this->generate_email_search_link( $email );\n\t\t}\n\n\t\tif ( ! empty( $bcc_emails ) ) {\n\t\t\t$bcc_emails = implode( ', ', $bcc_emails );\n\t\t} else {\n\t\t\t$bcc_emails = esc_html__( 'N/A', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $bcc_emails;\n\t}", "function getArrayOfRecipientsInMailBox($emailId, $mailbox) {\n if ($this->connectToMySql()) {\n if ($mailbox == 'to') {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND to_recipient = 1\", $emailId);\n } elseif ($mailbox == 'cc') {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND cc_recipient = 1\", $emailId);\n } elseif ($mailbox == 'bcc') {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE id_email = %s AND bcc_recipient = 1\", $emailId);\n }\n\n $recipients = array();\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n } else {\n if (mysql_num_rows($result) > 0) {\n $i = 1;\n while ($row = mysql_fetch_assoc($result)) {\n $recipients[$i] = array('name' => $row['name'], 'email' => $row['email']);\n $i++;\n }\n }\n }\n }\n $this->closeConnection();\n return $recipients;\n }", "public function emails()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Mailinglist\\\\Email', 'mid');\n\t}", "protected function getEmailRecipients($email)\n {\n return json_encode(array_merge(\n $this->extractAddressesFromArray($email->getTo()),\n $this->extractAddressesFromArray($email->getCc()),\n $this->extractAddressesFromArray($email->getBcc())\n ));\n }", "public function getCCString ( \\r8\\Mail $mail )\n {\n return $this->getAddressList( $mail->getCC() );\n }", "public function getExtraEmailAddresses(): array\n {\n if (empty($this->extra_emails)) {\n return [];\n }\n\n return collect($this->extra_emails)\n ->map(function ($email) {\n return trim($email['email']);\n })\n ->all();\n }", "public function findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "public function getEmailCopyTo()\n {\n $data = $this->getConfigValue(self::XML_PATH_EMAIL_COPY_TO, $this->getStore()->getStoreId());\n if (!empty($data)) {\n return array_map('trim', explode(',', $data));\n }\n return false;\n }", "public function getMailingLists() {\n $path = 'mailinglists.json';\n return $this->request($path);\n }", "public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' );\n\n $mails = Tolist::findMany( array(\n 'to_id' => Auth::user()->id . '_' . $gname\n ), array(\n 'email'\n ) )->all( 'email' );\n\n return Helper::cleanGroups( $mails, '|' );\n\n }", "public function getMailBcc($instance=false){\n if ($instance && !is_object($this->_data['mail_bcc'])){\n $this->setMailBcc('',array('required'=>false));\n }\n return $this->_data['mail_bcc'];\n }", "public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }", "public function findAllEmails()\r\n {\r\n try {\r\n $query = 'SELECT email FROM login';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n if ($result == false) {\r\n return false;\r\n } else {\r\n return $result;\r\n }\r\n } catch (PDOException $e) {\r\n echo \"get accounts error\";\r\n die();\r\n }\r\n }", "public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }", "public function get()\n {\n if (!$this->connect()) {\n throw new Exception('ERROR: Could not connect.');\n }\n\n if ($this->id) {\n $this->emails = array();\n\n $this->emails[] = $this->getEmail($this->id);\n\n return $this->emails;\n }\n\n $this->emails = array();\n\n $this->email_index = imap_search(\n $this->stream(),\n $this->modes(),\n false,\n $this->encoding\n );\n\n if (!$this->limit) {\n $this->limit = isset($this->email_index) && is_array($this->email_index) ? count($this->email_index) : 0;\n }\n\n if ($this->email_index) {\n if ($this->order == 'DESC') {\n rsort($this->email_index);\n } else {\n sort($this->email_index);\n }\n\n if ($this->limit || ($this->limit && $this->offset)) {\n $this->email_index = array_slice(\n $this->email_index,\n $this->offset,\n $this->limit\n );\n }\n\n $this->emails = array();\n\n foreach ($this->email_index as $id) {\n $this->emails[] = $this->getEmailByMessageSequence($id);\n\n if ($this->mark_as_read) {\n $this->markAsRead($id);\n }\n }\n }\n\n return $this->emails;\n }", "function getMailList($contentid='', $exclude='')\r\n\t{ /* exclude must be an array of values\r\n\t\t * OR not quoted list separated by ,\r\n\t\t *\r\n\t\t * contentid should be an array of values\r\n\t\t * OR not quoted list separated by ,\r\n\t\t */\r\n\r\n\t\t$database =& JFactory::getDBO();\r\n\r\n\t if (is_array($contentid)) {\r\n\t $contentid = implode(',', $contentid);\r\n\t }\r\n\t if (is_array($exclude)) {\r\n\t $exclude = implode(',', $exclude);\r\n\t }\r\n\r\n\t if ($this->_notify_users && $contentid) {\r\n\t /* Unregistered users */\r\n\t\t\t$query \t= \"SELECT DISTINCT email \"\r\n\t\t\t\t\t. \"\\n FROM `#__comment` \"\r\n\t\t\t\t\t. \"\\n WHERE contentid IN ($contentid) AND component='$this->_component'\"\r\n\t\t\t\t\t. \"\\n AND ( userid = NULL OR userid = 0 )\"\r\n\t\t\t\t\t. \"\\n AND email <> ''\"\r\n\t\t\t\t\t. \"\\n AND notify = '1'\"\r\n\t\t\t\t\t;\r\n\t\t\tif ($exclude) {\r\n\t\t\t\t$quoted = str_replace( ',', \"','\", $exclude); /* add quotes */\r\n\t\t\t\t$query .= \"\\n AND email NOT IN ('$quoted')\";\r\n\t\t\t}\r\n\t\t\t$database->setQuery( $query );\r\n\t\t\t$unregistered_maillist = $database->loadResultArray(); //tableau\r\n\r\n\t\t\tif ($unregistered_maillist) {\r\n\t\t\t $exclude = ($exclude ? $exclude.',' : '') . implode(',', $unregistered_maillist);\r\n\t\t\t}\r\n\r\n \t \t/* Registered users*/\r\n \t \t$registered_maillist = array();\r\n\t\t\t$query \t= \"SELECT DISTINCT u.email \"\r\n\t\t\t\t\t. \"\\n FROM `#__comment` AS c \"\r\n\t\t\t\t\t. \"\\n INNER JOIN `#__users` AS u ON u.id = c.userid \"\r\n\t\t\t\t\t. \"\\n WHERE c.contentid IN ($contentid) AND component='$this->_component'\"\r\n\t\t\t\t\t. \"\\n AND u.email <> ''\"\r\n\t\t\t\t\t. \"\\n AND c.notify = '1'\"\r\n\t\t\t\t\t;\r\n\t\t\tif ($exclude) {\r\n\t\t\t\t$quoted = str_replace( ',', \"','\", $exclude); /* add quotes */\r\n\t\t\t\t$query .= \"\\n AND u.email NOT IN ('$quoted')\";\r\n\t\t\t}\r\n\t\t\t$database->setQuery( $query );\r\n\t\t\t$registered_maillist = $database->loadResultArray(); //tableau\r\n//\t\t\t$debugemail = implode(';' , $maillist); // liste s�par� par des ;\r\n\r\n\t\t\tif ($registered_maillist) {\r\n\t\t \t$exclude = ($exclude ? $exclude.',' : '') . implode(',', $registered_maillist);\r\n\t\t\t}\r\n\t }\r\n\r\n\t\t$moderator_maillist = $this->getMailList_moderator($exclude);\r\n\r\n\t\t$maillist = array();\r\n\t\tif (isset($unregistered_maillist) && is_array($unregistered_maillist))\r\n\t\t\t$maillist = array_merge( $maillist, $unregistered_maillist);\r\n\t\tif (isset($registered_maillist) && is_array($registered_maillist))\r\n\t\t\t$maillist = array_merge( $maillist, $registered_maillist);\r\n\t\tif (isset($moderator_maillist) && is_array($moderator_maillist))\r\n\t\t\t$maillist = array_merge( $maillist, $moderator_maillist);\r\n\r\n\t\treturn ($maillist);\r\n\t}", "public function returnMailboxListArr(){\n\t\treturn imap_list($this->stream,$this->mbox,'*');\n\t}", "public function getMailCc($instance=false){\n if ($instance && !is_object($this->_data['mail_cc'])){\n $this->setMailCc('',array('required'=>false));\n }\n return $this->_data['mail_cc'];\n }", "protected function getEmailCC($email)\n {\n return json_encode($this->extractAddressesFromArray($email->getCc()));\n }", "public function emails()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select([DB::raw('IFNULL(prefix, \"Email\") AS type'), 'value AS url', 'is_primary'])\n ->where('type', 'email');\n }", "function getBCC(){\n\t\t\treturn $this->bcc;\n\t\t}", "public function getAllMails()\n {\n $user = Auth::user();\n $emails = DB::table('users')->select('id','email')->get();\n return response()->json($emails);\n }", "public function get_verified_emails() {\r\n\r\n\t\tset_error_handler( array( $this, 'ses_error_handler' ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler\r\n\r\n\t\t$data = $this->get_client()->listVerifiedEmailAddresses();\r\n\t\t$emails = array();\r\n\r\n\t\tif ( isset( $data['Addresses'] ) ) {\r\n\t\t\t$emails = $data['Addresses'];\r\n\t\t\tDebug::clear();\r\n\t\t}\r\n\r\n\t\treturn $emails;\r\n\t}", "public function getMailinglist() {\n return $this->getValue('mailinglist');\n }", "public function getCc()\n {\n return $this->config['Destination']['CcAddresses'];\n }", "public function column_cc( $item ) {\n\n\t\t$cc_emails = $item->get_people( 'cc' );\n\n\t\tforeach ( $cc_emails as $key => $email ) {\n\t\t\t$cc_emails[ $key ] = $this->generate_email_search_link( $email );\n\t\t}\n\n\t\tif ( ! empty( $cc_emails ) ) {\n\t\t\t$cc_emails = implode( ', ', $cc_emails );\n\t\t} else {\n\t\t\t$cc_emails = esc_html__( 'N/A', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $cc_emails;\n\t}", "public static function emails($text = '') {\n\t\t$matches = [];\n\t\t$regex = '/' . self::REGEX_MATCH_TAG . '|' . self::REGEX_CHAR_BACK . self::REGEX_EMAIL . '/i';\n\t\tpreg_match_all($regex, $text, $matches);\n\t\t$results = array_filter($matches[2]);\n\t\treturn array_unique($results);\n\t}", "function getCampaignList() {\n\t\treturn $this->gateway->execCommad('getCampaignList',\"\");\n\t}", "private function getCc(): ?array {\n\t\treturn $this->cc;\n\t}", "abstract function getEmailsArray() : array;", "public function listAddresses($cid = null) {\r\n\r\n $addresses = array ();\r\n\r\n if( $this->cid > 0 && (!isset($cid)) ) {\r\n\r\n $sql = Connection::getHandle()->prepare(\r\n \"SELECT * FROM bs_customer_addresses WHERE cid = ? ORDER BY default_billing DESC, default_shipping DESC\"\r\n );\r\n\r\n $sql->execute(array ($this->cid));\r\n\r\n while ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\r\n $addresses[] = $row;\r\n }\r\n\r\n return $addresses;\r\n\r\n } else if(isset($cid)) {\r\n\r\n $sql = Connection::getHandle()->prepare(\r\n \"SELECT * FROM bs_customer_addresses WHERE cid = ? ORDER BY default_billing DESC, default_shipping DESC\"\r\n );\r\n\r\n $sql->execute(array ($cid));\r\n\r\n while ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\r\n $addresses[] = $row;\r\n }\r\n\r\n return $addresses;\r\n\r\n }else{\r\n\r\n return FALSE;\r\n }\r\n\r\n\t\t}", "function getBccString() {\n\t\treturn $this->getAddressArrayString($this->getBccs(), false);\n\t}", "public function getSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id = %1d AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function getContactsList() {\n return $this->_get(6);\n }", "private function filterEmailNotificationsRecipients()\n {\n return collect($this->getEmailNotificationsRecipients())\n ->filter(function (array $recipient) {\n return isset($recipient['address'])\n && is_email($recipient['address']);\n })\n ->toArray();\n }", "public function getContactsList() {\n return $this->_get(7);\n }", "public function getEmailBCCName() { return $this->_emailBCCName; }", "protected function getRecipients(Swift_Mime_Message $message)\n {\n $to = [];\n if ($message->getTo()) {\n $to = array_merge($to, $message->getTo());\n }\n if ($message->getCc()) {\n $to = array_merge($to, $message->getCc());\n }\n if ($message->getBcc()) {\n $to = array_merge($to, $message->getBcc());\n }\n $recipients = [];\n foreach ($to as $address => $name) {\n $recipients[] = ['Email' => $address, 'Name' => $name];\n }\n return $recipients;\n }", "public function company_email_list($lead_email_ID)\n {\n $result = common_select_values('Distinct company_email', 'emails', ' lead_email = \"'.$lead_email_ID.'\"', 'result');\n return $result;\n }" ]
[ "0.79858184", "0.78118825", "0.72321475", "0.7092049", "0.7072787", "0.69521785", "0.6893801", "0.68477285", "0.6815625", "0.6790566", "0.6786614", "0.6766851", "0.6731078", "0.661084", "0.66004354", "0.65710896", "0.65681326", "0.6567035", "0.652824", "0.65194553", "0.65194553", "0.6509806", "0.64847666", "0.6481193", "0.64498365", "0.6438663", "0.64352435", "0.64322895", "0.64112294", "0.63954514", "0.6392737", "0.6386076", "0.635246", "0.6305866", "0.6300412", "0.6237038", "0.62098587", "0.6207502", "0.61831385", "0.6174575", "0.61710376", "0.61706036", "0.6170254", "0.6165871", "0.61417866", "0.61359394", "0.6129274", "0.6115328", "0.61109436", "0.6098211", "0.6082761", "0.6050955", "0.6046784", "0.6046618", "0.6029442", "0.6027801", "0.6005401", "0.60038936", "0.5948251", "0.59402835", "0.5935182", "0.5915105", "0.5910333", "0.58908844", "0.5865847", "0.58517253", "0.58506894", "0.5847203", "0.58469206", "0.5845901", "0.58371264", "0.5810405", "0.58014154", "0.57902", "0.57878125", "0.5786079", "0.5782131", "0.57776195", "0.57457435", "0.57398635", "0.57268894", "0.57264304", "0.57248193", "0.5722438", "0.572176", "0.5715425", "0.5704982", "0.57045645", "0.5694072", "0.56883615", "0.5688175", "0.5684577", "0.56742746", "0.5671286", "0.5668919", "0.56532377", "0.5642974", "0.56421536", "0.5639125", "0.56220865" ]
0.65424365
18
Get subject of the email.
public function getSubject(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function retrieveSubject() : string {\n\n // Get header of current email\n $header = $this->getHeader();\n\n // Return the subject in \"ASCII\" format\n return $this->decodeMimeHeaderExtension($header->subject, false);\n }", "protected function getSubject()\n {\n // NOTE: Subject header is always present,\n // so it's safe to call this without checking for header presence\n return $this->getHeader('Subject');\n }", "protected function _getMailSubject()\n {\n $subject = $this->config->get('subject');\n $subject = $this->_macros->renderText($subject, $this->getOrder());\n $subject = JString::trim($subject);\n\n if (empty($subject)) {\n $subject = $this->getName();\n }\n\n return $subject;\n }", "protected function getEmailSubject($email)\n {\n return $email->getSubject();\n }", "public function getSubject()\n {\n return $this->EmailSubject ? $this->EmailSubject : $this->getCurrentPageTitle();\n }", "public function getSubject() : string {\n return $this->_subject;\n }", "public function getSubject(): string\n {\n return $this->subject;\n }", "public function getEmailSubject() { return $this->_emailSubject; }", "protected function getEmailSubject() {}", "protected function getEmailSubject()\r\n\t{\r\n\t\treturn isset($this->subject) ? $this->subject : 'Your Password Reset Link';\r\n\t}", "protected function getSubject(): string\n {\n if ($this->subject) {\n $this->subject = mb_encode_mimeheader($this->subject, $this->charset, 'B');\n }\n\n return $this->subject;\n }", "function getSubject() {\n\t\treturn $this->getData('subject');\n\t}", "function getSubject() {\n\t\treturn $this->getData('subject');\n\t}", "public function getSubject() {\n\t\treturn $this->subject;\n\t}", "public function getSubject()\n\t{\n\t\treturn $this->subject;\n\t}", "public function getSubject()\n {\n\n // Subject Already Set\n if (!empty($this->subject)) {\n return $this->subject;\n }\n\n // Default Subject\n return 'Customize your search alerts - Never miss a hot deal';\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n if (array_key_exists(\"subject\", $this->_propDict)) {\n return $this->_propDict[\"subject\"];\n } else {\n return null;\n }\n }", "public function getSubject() \n\t{\n\t\treturn $this->subject;\n\t}", "public function getSubject()\n {\n return $this->getValue('nb_icontact_prospect_subject');\n }", "public function getSubject(): string\n {\n return 'mailingSubject';\n }", "public function getSubject(): ?string\n {\n return $this->getClaimSafe(SharedClaimsInterface::CLAIM_SUBJECT);\n }", "public function getSubject(): mixed\n {\n return $this->subject;\n }", "protected function getEmailSubject($email): string\n {\n return $this->getDecodedEmailProperty($email, $email->Content->Headers->Subject[0]);\n }", "public function get_subject() {\n\t\tif ( $this->object['voucher_count'] == 1 ) {\n\t\t\treturn apply_filters( 'woocommerce_email_subject_' . $this->id, $this->format_string( $this->subject ), $this->object );\n\t\t} else {\n\t\t\treturn apply_filters( 'woocommerce_email_subject_' . $this->id, $this->format_string( $this->subject_multiple ), $this->object );\n\t\t}\n\t}", "public function getSubject()\n {\n\n // Subject Already Set\n if (!empty($this->subject)) {\n return $this->subject;\n }\n\n // Previous Saved Search\n $updated = $this->data['updated'];\n\n // Default Subject\n return 'Saved Search Notification' . (!empty($updated) ? ' (Updated)' : '');\n }", "public function getSubjectName()\n {\n $subjectName = $this->getCourse()->getName();\n if ($this->getSubject()) {\n $subjectName = $this->getSubject()->getName();\n }\n return $subjectName;\n }", "function getSubject(){\n\t\t\treturn $this->subject;\n\t\t}", "public function getSubjectName()\n {\n if (array_key_exists(\"subjectName\", $this->_propDict)) {\n return $this->_propDict[\"subjectName\"];\n } else {\n return null;\n }\n }", "public function getSubject(): string\n {\n return $this->getPayloadClaim('sub');\n }", "function getSubject()\n {\n return $this->_subject;\n }", "protected function getEmailSubject()\n {\n if ($this->_description) {\n return 'Scheduled Job Output (' . $this->_description . ')';\n }\n\n return 'Scheduled Job Output';\n }", "public function getSubject()\n {\n return $this->config['Message']['Subject']['Data'];\n }", "protected function _fcpoGetClearingDataEmailSubject()\n {\n $oLang = $this->_oFcpoHelper->getFactoryObject('oxLang');\n $oShop = $this->_oFcpoHelper->getFactoryObject('oxShop');\n $oShop->load($this->oxorder__oxshopid->value);\n $sSubject = $oShop->oxshops__oxname->value.\" - \";\n $sSubject .= $oLang->translateString('FCPO_EMAIL_CLEARING_SUBJECT').\" \";\n $sSubject .= $this->oxorder__oxordernr->value;\n\n return $sSubject;\n }", "public function getOriginalSubject(): string\n {\n return $this->decodeForHeader($this->subject);\n }", "protected function getEmailNotificationsSubject()\n {\n $env = Str::upper(app()->environment());\n $name = $this->getName();\n\n return \"[{$env}] %level_name% in `{$name}` command\";\n }", "public function getSubjectAttribute()\n {\n if (isset($this->_subject)) {\n return $this->_subject;\n }\n\n return null;\n }", "public function getSubject() \r\n { \r\n return $this->_subject; \r\n }", "public function getMailSubject(Notification $notification) : string;", "protected function makeSubjectHeaderString() {\n\t\tif(($this->_mailProtocol != 'mail') AND (!empty($this->_mailSubject))) { \n\t\t\treturn 'Subject: ' . $this->_mailSubject . $this->_endString;\n\t\t}\n\t\treturn '';\n\t}", "function getEmailSubject($emailId) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT subject FROM scuola.email_store WHERE id_email = %s\", $emailId);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n $row = mysql_fetch_assoc($result);\n $subject = $row['subject'];\n }\n $this->closeConnection();\n return ($subject == null || strlen($subject) == 0) ? '<NO SUBJECT>' : test_input($subject);\n }", "function getSubject($locale) {\n\t\treturn isset($this->localeData[$locale]['subject']) ? $this->localeData[$locale]['subject'] : '';\n\t}", "public function subject()\n {\n return $this->belongsTo(\n __NAMESPACE__ . '\\Subject', 'email_subject_id', 'id'\n );\n }", "public function getSubject();", "public function getSubject();", "public function getSubject();", "public function getSubject();", "public function getSubject();", "public function getSubject();", "public function getSubject();", "public function getSubjectID()\n {\n return $this->subject->getID();\n }", "public function getSubject()\n {\n }", "public function getMailSubject($instance=false){\n if ($instance && !is_object($this->_data['mail_subject'])){\n $this->setMailSubject('',array('required'=>false));\n }\n return $this->_data['mail_subject'];\n }", "public function getSubject($key)\n {\n $translator = Container::getInstance()->make('translator');\n\n if ($translator->has($key)) {\n return $translator->get('user.emails.email_confirmation.subject');\n }\n\n return 'Please confirm your new email address';\n }", "protected function prepareSubject(Mail\\Message $message) {\r\n\t\t$headers = $message->getHeaders ();\r\n\t\tif (! $headers->has ( 'subject' )) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$header = $headers->get ( 'subject' );\r\n\t\treturn $header->getFieldValue ( HeaderInterface::FORMAT_ENCODED );\r\n\t}", "protected function prepareSubject(\\Zend\\Mail\\Message $message)\n {\n $headers = $message->getHeaders();\n if (!$headers->has('subject')) {\n return;\n }\n $header = $headers->get('subject');\n\n return $header->getFieldValue(HeaderInterface::FORMAT_ENCODED);\n }", "public function getUserSubject()\n {\n return $this->usersubject;\n }", "public function getSubject($type = null)\n {\n if( null === $this->_subject ) {\n throw new Khcn_Model_Exception(\"getSubject was called without first setting a subject. Use hasSubject to check\");\n } else if( is_string($type) && $type !== $this->_subject->getType() ) {\n throw new Khcn_Model_Exception(\"getSubject was given a type other than the set subject\");\n } else if( is_array($type) && !in_array($this->_subject->getType(), $type) ) {\n throw new Khcn_Model_Exception(\"getSubject was given a type other than the set subject\");\n }\n \n return $this->_subject;\n }", "protected function getEmailSubject()\n {\n return 'Your Password Reset Link';\n }", "public function getPressAnnouncementSubject()\n {\n if ($this->hasPressAnnouncement()) {\n return $this->getXml()->getElementsByTagName('PressAnnouncementSubject')->item(0)->nodeValue;\n }\n return null;\n }", "function sc_mailbox_message_subject($parm = '')\n {\n // if(e107::getParser()->filter($_GET['id']))\n // {\n // return $this->var['message_subject'];\n // }\n\n \n $urlparms = array(\n 'id' => $this->var['message_id'],\n );\n\n // Check if draft, because then it requires a link to continue writing the message (compose)\n if(e107::getParser()->filter($_GET['page']) == 'draftbox')\n {\n $url = e107::url('mailbox', 'composeid', $urlparms);\n }\n else\n {\n $url = e107::url('mailbox', 'read', $urlparms);\n }\n\n if($parm['type'] == 'url')\n {\n return $url; \n }\n\n return $this->var['message_subject']; \n \n }", "public function getSubject($encoding = 'UTF-8') {}", "public function getSubject($encoding = 'UTF-8') {}", "public function getX509SubjectKeyIdentifier()\n {\n if ($this->keyType != self::TYPE_PUBLIC) {\n return null;\n }\n $x509 = openssl_x509_parse($this->key);\n if (!isset($x509['extensions']['subjectKeyIdentifier'])) {\n return null;\n }\n $keyid = explode(':', $x509['extensions']['subjectKeyIdentifier']);\n $data = '';\n foreach ($keyid as $hexchar) {\n $data .= chr(hexdec($hexchar));\n }\n\n return base64_encode($data);\n }", "abstract function getSubject() : string;", "abstract public function get_subject();", "function the_ticket_subject() {\n\n // Get ticket\n $ticket = md_the_component_variable('support_single_ticket');\n\n // Verify if ticket exists\n if ( $ticket ) {\n return $ticket[0]['subject'];\n } else {\n return false;\n }\n \n }", "public function getSubject()\n {\n return $this->hasOne(Subject::className(), ['subject_id' => 'subject_id']);\n }", "public function getSubject(): ?SslCertificateEntity {\n $val = $this->getBackingStore()->get('subject');\n if (is_null($val) || $val instanceof SslCertificateEntity) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'subject'\");\n }", "function getEmailSubject() { return 'JS BUILDER'; }", "protected function getEmailSender($email): string\n {\n return $this->getDecodedEmailProperty($email, $email->Content->Headers->From[0]);\n }", "abstract protected function getSubject();", "private static function get_email_subject($user_data)\n {\n }", "public function getSubjectRaw( $params ) {\n\t\treturn empty( $params['subject_escaped'] ) ? @$params['subject'] : $this->unhtmlspecialchars( @$params['subject'] );\n\t}", "public function getPlainMail()\n {\n return $this->get(self::_PLAIN_MAIL);\n }", "function getSubject($code) {\n $con = getConnection();\n $sql = \"SELECT email_subject FROM email_text_tab WHERE email_code = ?;\";\n $subject = \"\";\n if ($stmt = mysqli_prepare($con, $sql)) {\n mysqli_stmt_bind_param($stmt, \"s\", $code);\n mysqli_stmt_execute($stmt); \n mysqli_stmt_bind_result($stmt, $result);\n while(mysqli_stmt_fetch($stmt)) {\n $subject = $result;\n }\n mysqli_stmt_close($stmt);\n }\n closeConnection($con);\n return $subject;\n }", "public function subject()\n {\n return $this->hasOne(Subject::class,\n SchemaConstant::PRIMARY_KEY,\n SchemaConstant::SUBJECT_FOREIGN_KEY);\n }", "public function setEmailSubject($value) { $this->_emailSubject = $value; }", "protected function getKeyword(): string\n {\n return 'SUBJECT';\n }", "public function getInformSubjectTypeName()\n {\n return $this->inform_subject_type_name;\n }", "private function getSubject(Language $cartLanguage): string\n {\n return $this->translator->trans(\n 'Process the payment of your order',\n [],\n 'Emails.Subject',\n $cartLanguage->locale\n );\n }", "public function getSubjectNameFormat()\n {\n if (array_key_exists(\"subjectNameFormat\", $this->_propDict)) {\n if (is_a($this->_propDict[\"subjectNameFormat\"], \"\\Beta\\Microsoft\\Graph\\Model\\SubjectNameFormat\") || is_null($this->_propDict[\"subjectNameFormat\"])) {\n return $this->_propDict[\"subjectNameFormat\"];\n } else {\n $this->_propDict[\"subjectNameFormat\"] = new SubjectNameFormat($this->_propDict[\"subjectNameFormat\"]);\n return $this->_propDict[\"subjectNameFormat\"];\n }\n }\n return null;\n }", "public static function buildSubject($job) {\n\t\treturn \"Invitation To Bid: \" . $job['name'];\n\t}", "function setSubject( $email_subject ) {\n $this->email_subject = $email_subject;\t\n\t}", "protected function _subject($additional = array()) {\n\t\treturn $this->_crud()->getSubject($additional);\n\t}" ]
[ "0.84139824", "0.83461076", "0.8236247", "0.821378", "0.81589085", "0.81302947", "0.81113905", "0.80099833", "0.79848564", "0.79620343", "0.7918792", "0.79007953", "0.79007953", "0.78616744", "0.78403294", "0.7832319", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "0.78250796", "0.7795727", "0.76613724", "0.76360255", "0.7557289", "0.7551312", "0.7536879", "0.7473733", "0.7393903", "0.7390838", "0.7384128", "0.73452836", "0.7343554", "0.72920686", "0.7228729", "0.7202445", "0.7161908", "0.7144505", "0.7116062", "0.70663995", "0.6975541", "0.69744766", "0.69661754", "0.69582856", "0.69132584", "0.68928146", "0.6853337", "0.6853337", "0.6853337", "0.6853337", "0.6853337", "0.6853337", "0.6853337", "0.68450224", "0.68090034", "0.6753573", "0.67246705", "0.6645709", "0.6615767", "0.6510694", "0.6414433", "0.63975257", "0.63724196", "0.6340166", "0.6310818", "0.6305248", "0.62414813", "0.6184726", "0.616383", "0.60942227", "0.60813725", "0.6001104", "0.59802145", "0.59098107", "0.5903915", "0.5886003", "0.5881733", "0.5877101", "0.5866559", "0.5863137", "0.58584344", "0.58495533", "0.5839571", "0.58309597", "0.5798053", "0.5788783", "0.57850224", "0.5784945" ]
0.71307707
50
Get body of the email.
public function getBody(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBody()\n {\n $parser = $this->getParser();\n $return = $parser->getMessageBody();\n return $return;\n }", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "public function getBody(): string\n {\n return $this->message;\n }", "public function getBody() : string {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->values[\"body\"];\n }", "public function getBody() : string\n {\n return $this->body;\n }", "public function getBody() : string\n {\n return $this->body;\n }", "public function getBody() : string\n {\n return $this->body;\n }", "public function getBody()\r\n\t{\r\n\t\treturn $this->_body;\r\n\t}", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\r\n {\r\n return $this->_body;\r\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getMessageBody()\n {\n return $this->messageBody;\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody(): string\n {\n return $this->body;\n }", "public function getBody(): string\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->getAttribute('body', false, null);\n }", "public function getBody()\n\t{\n\t\treturn $this->body;\n\t}", "public function getBody() {\n\t\treturn $this->body;\n\t}", "public function getBody(): string {\n\t\treturn $this->body;\n\t}", "public function getBody() {\n\t\treturn $this->body;\n }", "public function getBody() {\n\t\treturn $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\r\n return $this->__body;\r\n }", "public function getBody()\n {\n if (!isset($this->body)) {\n $this->body = $this->createDefaultBody();\n }\n \n return $this->body;\n }", "public function getBody() {\n\t\t$body = \"\";\n\t\t$chunk = \"\";\n\n\t\t// Read all body contents into a string\n\t\twhile (($chunk = $this->read())) {\n\t\t\t$body .= $chunk;\n\t\t}\n\n\t\treturn $body;\n\t}", "public function body() { return $this->_m_body; }", "public function body() { return $this->_m_body; }", "final public function getBody()\n {\n return $this->body;\n }", "public function body() {\n\t\treturn $this->getBody();\n\t}", "public function getBody() {\n return $this->get('body', 'news');\n }", "public function getBody()\n {\n return $this->Body;\n }", "public function getHTMLBody()\n {\n $parser = $this->getParser();\n $return = $parser->getMessageBody('html');\n return $return;\n }", "function getEmailBody($emailId) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT body FROM scuola.email_store WHERE id_email = %s\", $emailId);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n $row = mysql_fetch_assoc($result);\n $body = $row['body'];\n }\n $this->closeConnection();\n return ($body == null || strlen($body) == 0) ? '<NO BODY>' : test_input($body);\n }", "function\n\tgetBody ()\n\t{\n\t\treturn $this->_body;\n\t}", "protected function getEmailBody($email)\n {\n $body = '';\n if ($email->getBodyHtml()) {\n $body = $email->getBodyHtml();\n $body .= \"\\n\\n\";\n }\n\n $body .= $email->getBodyText();\n\n return $body;\n }", "public function body() {\n return $this->body;\n }", "function getBody() {\n return $this->_body;\n }", "public function body()\n\t{\n\t\treturn $this->body;\n\t}", "public function getRawBody()\n {\n return $this->job->getMessageBody();\n }", "public function getBody()\n {\n return $this->rawBody;\n }", "public function body() {\n return $this->body ;\n }", "public function getBodyContent() {\n return htcms_get_body_content();\n }", "public function getBody(){\n return $this->body;\n }", "protected function getBody()\n {\n return $this->getRequest()->getBody();\n }", "public function getBody()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody() : string\n {\n return implode(PHP_EOL, $this->getBodyLines());\n }", "public function getMailBody()\n {\n if (sfContext::hasInstance())\n {\n sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');\n }\n\n $content = \n \"<div>\n %%message%%\n </div>\n <div>\n %%partial%%\n </div>\";\n\n $partial = $this->getPartial();\n\n $content = str_replace(array('%%message%%', '%%partial%%'), \n array($this->getMessage(), empty($partial) || !sfContext::hasInstance()? '' : get_partial($partial, array('mt_alert_message' => $this))),\n $content);\n return $content;\n }", "public function getBody() {}", "public function get_body_string() \n\t{ \n\t\treturn $this->body_string; \n\t}", "public function getBody()\n {\n // TODO: Implement getBody() method.\n }", "public function getRawBody()\n {\n return $this->rawMessage;\n }", "public function getBody()\r\n {\r\n // TODO: Implement getBody() method.\r\n }", "public function getBody()\n {\n $this->set('returnTransfer', 1);\n\n return $this->send();\n }", "public function getBody()\n {\n if (array_key_exists(\"body\", $this->_propDict)) {\n return $this->_propDict[\"body\"];\n } else {\n return null;\n }\n }", "public function get_body()\n {\n }", "public function getBody(): ?string\n {\n return $this->body;\n }", "public function getRawBody()\n {\n return array_key_exists('Body', $this->job) ? $this->job['Body'] : $this->job['body'];\n }", "public function retrieveBody($id)\n {\n try\n {\n //init the catching\n $this->exceptionThrower->start();\n $body = $this->get_part($this->mailbox, $id, \"TEXT/HTML\");\n // fallback to plain text\n if ($body == \"\") {\n $body = $this->get_part($this->mailbox, $id, \"TEXT/PLAIN\");\n }\n $this->exceptionThrower->stop();\n return $body;\n }catch (\\Exception $e)\n {\n throw new SimpleMailReceiverException(\"Error retrieving body no: \". $id . \" .\" . $e->getMessage(), $e->getCode());\n }\n }" ]
[ "0.8102492", "0.8044588", "0.8044588", "0.8005752", "0.800394", "0.79950976", "0.79762447", "0.79762447", "0.79762447", "0.7944881", "0.7937049", "0.7937049", "0.7937049", "0.7937049", "0.7928341", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7911979", "0.7906723", "0.7906723", "0.7906723", "0.7906723", "0.7899669", "0.7899669", "0.7889728", "0.7884797", "0.7877735", "0.787587", "0.7871415", "0.7871415", "0.7870152", "0.7870152", "0.7870152", "0.7869179", "0.7865588", "0.7823183", "0.7820332", "0.7820332", "0.7804598", "0.77861583", "0.7781169", "0.7776382", "0.7774097", "0.77593476", "0.775777", "0.77382225", "0.7730626", "0.7707776", "0.7698653", "0.76800734", "0.765327", "0.7643288", "0.7607049", "0.7601938", "0.75945634", "0.7581462", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7575505", "0.7545322", "0.75418186", "0.75130516", "0.74386454", "0.7430581", "0.74235547", "0.7409012", "0.7387819", "0.7359714", "0.7344215", "0.7322797", "0.73135525", "0.7312682" ]
0.0
-1
Tells if body is in html format.
public function isHtml(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isHtml()\n\t{\n\t\treturn stripos($this->getContentType(), 'html') !== false;\n\t}", "static public function isHTML() {\n\t\treturn (self::$page_type === 0);\n\t}", "public function isHtml() {}", "public function isHTML(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_HTML );\n\t}", "public function isHTML($isHtml = true)\n {\n }", "public function isHTML($isHtml = true)\n {\n if ($isHtml) {\n $this->ContentType = 'text/html';\n } else {\n $this->ContentType = 'text/plain';\n }\n }", "public function IsHTML($ishtml = true) {\n\t if ($ishtml) {\n\t $this->ContentType = 'text/html';\n\t } else {\n\t $this->ContentType = 'text/plain';\n\t }\n\t}", "public function headerIsHtml(): bool\n {\n return $this->headerIsHtml;\n }", "public function IsHtmlRequested(){\r\n\t\treturn $this->ForceOutputHtml||(strlen(file_get_contents('php://input'))<1&&!$this->ForceNotOutputHtml);\r\n\t}", "private function hasHTMLTags()\n {\n return !(strcmp($this->content, strip_tags($this->content)) == 0);\n }", "private function isHtml(Response $response): bool\n {\n return 0 === strpos($response->headers->get('Content-Type'), 'text/html');\n }", "public function getBodyIsText()\n {\n return $this->bodyIsText;\n }", "public function getBodyIsText()\n {\n return $this->bodyIsText;\n }", "public static function isHtml($string)\n\t{\n \t\treturn preg_match(\"/<[^<]+>/\",$string,$m) != 0;\n\t}", "public function isXhtml() {}", "function isHTML($a_text)\n\t{\n\t\tif (preg_match(\"/<[^>]*?>/\", $a_text))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE; \n\t\t}\n\t}", "public function set_html_content_type() {\n\n\t\treturn 'text/html';\n\n\t}", "public function set_html_content_type() {\n\t\treturn 'text/html';\n\t}", "public function isHtmlBlock()\n {\n return (! $this->isPhpBlock());\n }", "static function is_html_document($path)\r\n {\r\n return (preg_match('/\\.x?html?$/', $path) === 1);\r\n }", "function has_html() {\n\t\treturn $this->settings['popup'];\n\t}", "public function isHtml($string)\n {\n return preg_match('/<[^<]+>/', $string, $m) != 0;\n }", "function isValid() {\n return $this->isValidHTML;\n }", "public static function isHtmlView()\n {\n if (self::$_isHtmlView === NULL) {\n self::$_isHtmlView = false;\n\n $view = Registry::get('view');\n if ($view === NULL) {\n $template = ViewAbstract::getTemplateConfig();\n if (is_array($template)\n and isset($template['type'])\n and $template['type'] === ViewInterface::TYPE_HTML) {\n self::$_isHtmlView = true;\n }\n } else if ($view instanceof View and $view->getType() == ViewInterface::TYPE_HTML) {\n self::$_isHtmlView = true;\n }\n }\n\n return self::$_isHtmlView;\n }", "function fcl_utilities_is_html($string) {\r\n return preg_match('/<\\s?[^\\>]*\\/?\\s?>/i', $string);\r\n}", "function mc_html_type() {\n\n\treturn 'text/html';\n}", "protected function isHtmlResponse(Response $response)\n {\n $headers = $response->headers;\n\n // Check the content type of the response, when there is no content type\n // set just assume that it's html.\n return strtolower($headers->get('Content-Type', 'text/html')) === 'text/html';\n }", "function isHTMLContent($c)\t{\n\t\t$c = trim($c);\n\t\t$first = strtolower(substr($c,0,6));\n\t\t$last = strtolower(substr($c,-7));\n\t\tif ($first.$last=='<html></html>')\treturn 1;\n\t}", "public function isPlain()\n\t{\n\t\treturn Str::contains($this->getHeaderLine('Content-Type'), '/plain');\n\t}", "abstract protected function getHtmlBody();", "private static function typeHTML()\n {\n $h = 'Content-type: text/html; charset=\"' . self::$CHARSET . '\"' . PHP_EOL;\n $bit = (strtolower( self::$CHARSET ) === 'utf-8') ? '8bit' : '7bit';\n $h .= 'Content-Transfer-Encoding: ' . $bit . PHP_EOL;\n return $h;\n }", "public function setBodyHtml($html);", "public function html($html)\n {\n return $this->type($html, \"text/html\");\n }", "function hasBody() {\n\t\t$body = strip_tags($this->body, \"<img><a>\");\n\t\t$body = trim($body);\n\t\tif (empty($body)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function setHTML($value = true)\n {\n $this->multimailer->isHTML($value);\n }", "public function has_PLAIN_not_HTML()\n\t{\n\t\treturn $this->PLAIN != '' && $this->HTML == '';\n\t}", "public static function fixBodyTag($html) {\n // Body can only be added if there is no existing head or html tags.\n if ((stripos($html, '<head') === FALSE) && (stripos($html, '<html') === FALSE)) {\n // Check for <body tag.\n $open = (stripos($html, '<body') === FALSE) ? '<body>' : '';\n $close = (stripos($html, '</body') === FALSE) ? '</body>' : '';\n $html = \"{$open}{$html}{$close}\";\n }\n\n return $html;\n }", "public function get_true_body()\n {\n return parent::__get('body');\n }", "static public function isXHTML() {\n\t\treturn (self::$page_type === 1);\n\t}", "function set_html_content_type(){\n\treturn 'text/html';\n}", "public static function isValidBodyType($type) {\n $types = array(\n self::TYPE_BEST,\n self::TYPE_HTML,\n self::TYPE_TEXT,\n );\n\n return in_array($type, $types);\n }", "function tidy_is_xhtml(tidy $object) {}", "public function getBodyHtml(): string\n {\n return $this->htmlMessage;\n }", "public function hasHtml($content) {\n\t\t$result = FALSE;\n\t\t//we compare the length of the string with html tags and without html tags\n\t\tif (strlen($content) != strlen(strip_tags($content))) {\n\t\t\t$result = TRUE;\n\t\t}\n\t\treturn $result;\n\t}", "function is_html(string $string): bool\n {\n return strcasecmp($string, strip_tags($string)) !== 0;\n }", "public function isHtml5() {\n }", "public function getHTMLBody()\n {\n $parser = $this->getParser();\n $return = $parser->getMessageBody('html');\n return $return;\n }", "function get_content_type($html_test){\n\t\tif($html_test){\n\t\t\t$this->content_type = 'text/html';\n\t\t}else{\n\t\t\t$this->content_type = 'text/plain';\n\t\t}\n\t}", "function html_body($html) {\n\t\tif (strpos($html, '<body') !== false) {\n\t\t\t$html = substr($html, strpos($html, '<body')+5);\n\t\t\t$html = substr($html, strpos($html, '>')+1);\n\t\t\t$html = substr($html, 0, strpos($html, '</body>'));\n\t\t}\n\t\treturn $html;\n\t}", "public static function is_html(string $str)\n {\n return strlen(strip_tags($str)) < strlen($str);\n }", "public static function is_html(string $str): bool\n {\n if ($str === '') {\n return false;\n }\n\n // init\n $matches = [];\n\n $str = self::emoji_encode($str); // hack for emoji support :/\n\n \\preg_match(\"/<\\\\/?\\\\w+(?:(?:\\\\s+\\\\w+(?:\\\\s*=\\\\s*(?:\\\".*?\\\"|'.*?'|[^'\\\">\\\\s]+))?)*\\\\s*|\\\\s*)\\\\/?>/u\", $str, $matches);\n\n return $matches !== [];\n }", "private function htmlFix() {\n // First, check if html is allowed\n if (!$this->allow_html) {\n $html = false;\n } elseif ($this->standard_html) {\n $html = true;\n } else {\n $html = false;\n }\n\n $newParseArray = array();\n while ($tag = array_shift($this->parseArray)) {\n switch ($tag) {\n case self::TAG_NOHTML_OPEN:\n case self::TAG_HTML_CLOSE:\n $html = false;\n break;\n case self::TAG_HTML_OPEN:\n case self::TAG_NOHTML_CLOSE:\n if ($this->allow_html) {\n $html = true;\n }\n break;\n\n default:\n if ($html) {\n if ($tag == self::BR_TAG) {\n $tag = \"\\n\";\n } // Really, no BR's in html code is wanted.\n $newParseArray[] = $tag;\n } else {\n $newParseArray[] = htmlspecialchars($tag);\n }\n }\n }\n $this->parseArray = $newParseArray;\n return true;\n }", "public function canHaveBody() {\n return ( $this->status < 100 || $this->status >= 200 ) &&\n (!in_array($this->status, array(201, 204, 304)));\n }", "public function setHtmlBody($body) {\r\n $this->htmlBody = $body;\r\n $this->html = true;\r\n }", "protected abstract function generateHtmlBody() : string;", "public function testHtmlTag()\n {\n $this->assertProduces('<b>not bold</b>', '&lt;b&gt;not bold&lt;/b&gt;');\n $this->assertProduces('[b]<b>bold</b>[/b] <hr>', '<strong>&lt;b&gt;bold&lt;/b&gt;</strong> &lt;hr&gt;');\n }", "public function html() {}", "protected function containsHtml($string)\n {\n return preg_match(\"/<[^<]+>/\", $string, $m) != 0;\n }", "public abstract function asHTML();", "public function html() {\r\n\t\tif (!@$_REQUEST['noCache'] && ($this->cacheable === true\r\n\t\t|| $this->cacheable === 'true')) {\r\n\t\t\t$this->cache();\r\n\t\t} else {\r\n\t\t\techo $this->getContent();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static function cleanHtmlBody($body) {\n $dirtyTags = array (\n \"'<!doctype[^>]*>'si\",\n \"'<html[^>]*>'si\",\n \"'</html>'si\",\n \"'<body[^>]*>'si\",\n \"'</body>'si\",\n //TODO: Make problems with <head\\n>!?\n \"'<head[^>]*>.*?</head>'si\",\n \"'<style[^>]*>.*?</style>'si\",\n \"'<script[^>]*>.*?</script>'si\",\n \"'<object[^>]*>.*?</object>'si\",\n \"'<embed[^>]*>.*?</embed>'si\",\n \"'<applet[^>]*>.*?</applet>'si\",\n \"'<mocha[^>]*>.*?</mocha>'si\",\n \"'<meta[^>]*>'si\",\n \"'<o:p[^>]*>.*?</o:p>'si\" //Outlook\n );\n $cleanBody = preg_replace($dirtyTags, '', $body);\n return trim($cleanBody);\n }", "public function isRTE() {}", "public function html();", "function get_html_post_body_ini();", "public static final function switchHTML () {\r\n switch (self::$objContainerHTML->toInt () == 0) {\r\n case TRUE:\r\n // Switch showing of HTML container;\r\n self::$objContainerHTML->setInt (1);\r\n self::$objHTWriteIt->setInt (1);\r\n self::$objRequestIsPHP->setInt (1);\r\n return new B (TRUE);\r\n break;\r\n\r\n case FALSE:\r\n // Switch showing of HTML container;\r\n self::$objContainerHTML->setInt (0);\r\n self::$objHTWriteIt->setInt (0);\r\n self::$objRequestIsPHP->setInt (0);\r\n return new B (TRUE);\r\n break;\r\n }\r\n }", "static public function sc_wpfmp_wp_mail_content_type()\n {\n return \"text/html\";\n }", "private function renderBody() {\n\t\t\n\t\t\t$this->outputLine('<body>');\n\t\t\t\n\t\t\tif (isset($this->_template)) {\n\t\t\t\t$templatePath = DM_APP_PATH . DS . 'templates' . DS . $this->_template . DS . 'body.php';\n\t\t\t\t\n\t\t\t\tif (file_exists($templatePath)) {\n\t\t\t\t\trequire_once($templatePath);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new DMDocumentException('Template file missing');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->outputLine($this->_content);\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('</body>');\n\t\t\n\t\t}", "public function getBodyHTML()\n\t{\n\t\tif(!$this->elements['body']){\n\t\t\treturn false;\n\t\t}\n\n\t\tif(is_array($this->elements['body']['html'])){\n\t\t\t$this->elements['body']['html'] = Grid::generate($this->elements['body']['html']);\n\t\t}\n\n\t\t$id = str::getAttrTag(\"id\", $this->elements['body']['id']);\n\t\t$class = str::getAttrTag(\"class\", [\"modal-body\", $this->elements['body']['class']]);\n\t\t$style = str::getAttrTag(\"style\", $this->elements['body']['style']);\n\t\t$progress = Progress::generate($this->elements['body']['progress']);\n\t\t$script = str::getScriptTag($this->elements['body']['script']);\n\n\t\treturn \"<div{$class}{$id}{$style}>{$progress}{$this->elements['body']['html']}</div>{$script}\";\n\t}", "public static function purifyHtml($body) {\n $config = array('keep_bad' => 0,\n 'schemes' => 'href:aim,feed,file,ftp,gopher,http,https,irc,mailto,news,nntp,sftp,ssh,telnet; src:cid,http,https; style:!; *:file,http,https',\n 'valid_xhtml' => 1);\n \n return htmLawed($body, $config);\n }", "public static function ok_tags($html){\n \treturn self::closetags(strip_tags($html, \"<b><strong><i><em>\"));\n }", "function gather_ua_jobs_set_html_content_type() {\n return 'text/html';\n}", "public abstract function html(): string;", "public function getBodyTag() {}", "public function sendHtmlEmail()\n {\n try\n {\n $this->prepareHtmlEmail();\n $this->sendMail();\n }\n catch(Exception $e)\n {\n global $CFG;\n $CFG->current_app->gcError('Email Error: ' . $e->getMessage());\n }\n return true;\n }", "public function shouldAddBody()\n\t{\n\t\t// done? definitely don't add the body\n\t\tif ($this->done)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// eval'd and false? don't show the body\n\t\tif ($this->last_could_eval == TRUE && $this->last_result == FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function html($value=''): bool\n\t{\n\t\treturn (strip_tags($value) != $value)? true:false;\n\t}", "public function html(): string;", "public function testCanOpenFileAndRead()\n {\n $target = $this->path . \"testfiles/\" . $this->testfiles[0];\n\n $eater = new HTML2PHP($target);\n $raw = $eater->getHTMLString();\n\n $this->assertContains(\"body\", $raw);\n }", "private function ensureDocumentType($html)\n {\n $hasDocumentType = stripos($html, '<!DOCTYPE') !== false;\n if ($hasDocumentType) {\n return $html;\n }\n\n return static::DEFAULT_DOCUMENT_TYPE . $html;\n }", "function getFormat() {\n return 'xhtml';\n }", "public function allowBody($object)\n\t{\n\t\treturn (($object instanceof PNavMenuItem) || ($object instanceof PNavMenuItemContainer));\n\t}", "static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}", "public function htmlIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return $this->versionIsValid($this->scan_attributes->html_version);\n }", "public function asHTML() {\n $page = $this->doctype;\n $page .= $this->buildPage();\n if ( $this->indent ) {\n $cleaning_object = new CleanOutput();\n $page = $cleaning_object->clean( $page );\n }\n return $page;\n }", "function wp_kses_allowed_html($context = '')\n {\n }", "function check_html($message){\r\n\tstatic $tags = array('<a','<abbr','<acronym','<address','<applet','<area','<b','<base','\t\t\t<basefront','<bdo','<big','<blockquote','<body','<button','<caption','<center','<cite','<code','<col','<colgroup','<dd','<del','<dir','<div','<dfn','<dl','<dt','<em','<fieldset','<font','<form','<frame','<frameset','<h1','<h2','<h3','<h4','<h5','<h6','<i','<iframe','<ins','<isindex','<kbd','<label','<legend','<li','<link','<map','<menu','<noframes','<noscript','<object','<ol','<optgroup','<options','<p','<param','<pre','<q','<s','<samp','<select','<small','<span','<strike','<strong','<sub','<sup','<table','<tbody','<td','<textarea','<tfoot','<th','<thead','<tr','<tt','<u','<ul','<var','<xmp');\r\n\t//does not include <input /><img /><br /><hr /><embed /> because empty tags\r\n\tstatic $prohib_tags = array('<body', '<html','<head','<meta','<script','<style','<title'); \r\n\t$errors = 0;\r\n\t$error_log = \"\";\r\n\t//check for prohibited tags\r\n\t$n=0;\r\n\twhile($prohib_tags[$n]!=NULL){\r\n\t\tif((strpos($message,$prohib_tags[$n] . \" \",0)!==false) or (strpos($message,$prohib_tags[$n] . \">\",0)!==false) or (strpos($message,\"</\" . substr($prohib_tags[$n],1) . \" \",0)!==false) or (\tstrpos($message,\"</\" . substr($prohib_tags[$n],1) . \">\",0)!==false) ){\r\n\t\t\t$errors++;\r\n\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Prohibited use of &lt;\" . substr($prohib_tags[$n],1) . \"&gt; element<br />\";\r\n\t\t}\r\n\t\t$n++;\r\n\t}\r\n\t//check proper tag nesting\r\n\t$n=0;\r\n\t$nest_lvl = 0;\r\n\twhile($tags[$n]!=NULL){\r\n\t\t$tag = $tags[$n];\r\n\t\t$tag_e = \"</\" . substr($tags[$n], 1) . \">\";\r\n\t\t$count = substr_count($message, $tag . \">\") + substr_count($message, $tag . \" \");\r\n\t\t$count_e = substr_count($message, $tag_e);\r\n\t\tif($count == $count_e){\r\n\t\t\tfor($m=0;$m<=strlen($message);$m++){\r\n\t\t\t\tif((substr($message,$m,strlen($tag)+1)== $tag . \">\")or((substr($message,$m,strlen($tag)+1)== $tag . \" \"))){\r\n\t\t\t\t\t$nest_lvl++;\r\n\t\t\t\t}\r\n\t\t\t\tif((substr($message,$m,strlen($tag_e))==($tag_e))){\r\n\t\t\t\t\t$nest_lvl--;\r\n\t\t\t\t}\r\n\t\t\t\tif($nest_lvl<0){\r\n\t\t\t\t\t$errors++;\r\n\t\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Improper &lt;\" . substr($tag,1) . \"&gt; tag nesting<br />\";\r\n\t\t\t\t\t$m=strlen($message);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$nest_lvl = 0;\r\n\t\t}else{\r\n\t\t\t$errors++;\r\n\t\t\tif($count>$count_e){\r\n\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Missing &lt;&#47;\" . substr($tag,1) . \"&gt; end tag(s)!<br />\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Missing &lt;\" . substr($tag,1) . \"&gt; start tag(s)!<br />\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$n++;\r\n\t}\r\n\t//check proper \"</>\" use. example: <content>else> or <whatsoever<content>\r\n\t$tri_brkt!=0;\r\n\tfor($m=0;$m<=strlen($message);$m++){\r\n\t\tif(substr($message,$m,1)==\"<\"){\r\n\t\t\t$tri_brkt++;\r\n\t\t}\r\n\t\tif(substr($message,$m,1)==\">\"){\r\n\t\t\t$tri_brkt--;\r\n\t\t}\r\n\t}\r\n\tif($tri_brkt!=0){\r\n\t\t$errors++;\r\n\t\t$error_log = $error_log . \"Error \" . $errors . \": improper \\\"&lt;&#47;&gt;\\\" usage<br />\";\r\n\t}\r\n\t$error_log = \"Errors: \" . $errors . \"<br />\" . $error_log . \"<br />\";\r\n\treturn $error_log;\r\n\t//END OF TAG INSPECTION\r\n}", "public static function send_html_mail( $content_type ) {\n return 'text/html';\n }", "function parseBody() {\r\n $count = count($this->body);\r\n for ($i = 0; $i < $count; $i++) {\r\n if ($this->html)\r\n $content.= \"<b>\";\r\n $content .= $this->body[$i][\"key\"] . ': ';\r\n if ($this->html)\r\n $content.= \"</b>\";\r\n if ($this->html)\r\n $content .= nl2br($this->body[$i][\"value\"]) . \"\\n\";\r\n else\r\n $content .= $this->body[$i][\"value\"];\r\n if ($this->html)\r\n $content.= \"<hr noshade size=1>\\n\";\r\n else\r\n $content.= \"\\n\" . str_repeat(\"-\", 80) . \"\\n\";\r\n }\r\n\r\n $this->body = $content;\r\n }", "public static function is_embedded_html( $p ) {\n\t\treturn is_array( $p ) && ! wp_is_numeric_array( $p ) && isset( $p['value'] ) && isset( $p['html'] );\n\t}", "function allowed_html() {\n $arr = array();\n return array(\n 'a' => array(\n 'href' => $arr,\n 'title' => $arr\n ),\n 'span' => array(\n 'style' => $arr\n ),\n 'u' => $arr,\n 'b' => $arr,\n 'i' => $arr,\n 'em' => $arr,\n 'strong' => $arr,\n );\n }", "public function isRTF() {\r\n return substr($this->contents, 2, 3) === \"rtf\";\r\n }", "public function renderHTML()\n {\n }", "public function body($body);", "function set_email_to_html(){\n\treturn true;\n}", "function getHTMLContentType() {\n\t\tif (t3lib_div::int_from_ver(TYPO3_version) < 4002002) {\n\t\t\treturn (count($this->theParts['html']['media']) && $this->includeMedia) ? 'multipart/related;' : 'multipart/alternative;';\n\t\t} else {\n\t\t\treturn (count($this->theParts['html']['media']) && $this->includeMedia) ? 'multipart/related' : 'multipart/alternative';\t\n\t\t}\n\t}", "public function testNoHead(): void\n {\n // setup\n $htmlReport = new Html();\n\n // test body\n $htmlReport->body();\n\n // assertions\n $this->assertEquals('<html><body></body></html>', $htmlReport->compile());\n }", "public function pi_set_content_type(){\n \treturn \"text/html\";\n\t}", "public function get_html() \n\t{\n\t\treturn $this->HTML; \n\t}", "public function isBeforeBodyClose()\r\n\t{\r\n\t\treturn false;\r\n\t}", "function html()\n {\n }" ]
[ "0.8062697", "0.78244203", "0.7820633", "0.77645075", "0.7462531", "0.73192567", "0.73011106", "0.6984416", "0.6763567", "0.66424525", "0.66154706", "0.6466208", "0.6466208", "0.64329565", "0.6427029", "0.64014447", "0.6396571", "0.6383146", "0.637626", "0.6369965", "0.6278167", "0.6261922", "0.6232519", "0.62274086", "0.62149197", "0.618458", "0.61771107", "0.6170984", "0.612793", "0.61246777", "0.6107728", "0.60777676", "0.6073203", "0.60455656", "0.60345757", "0.60307866", "0.60128045", "0.60013753", "0.59872425", "0.5960269", "0.5955483", "0.5951306", "0.5935995", "0.5918905", "0.5908625", "0.5899033", "0.588512", "0.5850004", "0.5843167", "0.5840261", "0.5788829", "0.57797587", "0.57724845", "0.5748573", "0.5717936", "0.57134145", "0.5702251", "0.5699042", "0.5696344", "0.56910026", "0.5676951", "0.56316286", "0.5605626", "0.56006974", "0.55903274", "0.5588481", "0.5580098", "0.55717593", "0.5562164", "0.55602306", "0.55133253", "0.5512348", "0.5510961", "0.5508255", "0.5507242", "0.55012006", "0.54579246", "0.54576105", "0.5450473", "0.54472035", "0.5425923", "0.54204017", "0.5410011", "0.5407801", "0.54045445", "0.539258", "0.5372333", "0.5365717", "0.5343088", "0.53393245", "0.5339245", "0.53341174", "0.5317818", "0.53068906", "0.5297037", "0.5293406", "0.52902716", "0.5267166", "0.5266001", "0.52507657" ]
0.75239027
4
Generates web routes for this package
public static function webAdminRoutes(): void { Route::namespace("\\Orq\\Laravel\\Starter\\Controllers\\Admin")->group(function () { // 后台管理员 Route::get('/admin/index', 'AdminController@index')->name('AdminIndex'); Route::get('/admin/new', 'AdminController@new')->name('AdminNew'); Route::get('/admin/edit', 'AdminController@edit')->name('AdminEdit'); Route::post('/admin/save', 'AdminController@save')->name('AdminSave'); Route::post('/admin/deactivate', 'AdminController@deactivate')->name('AdminDeactivate'); Route::post('/admin/restore', 'AdminController@restore')->name('AdminRestore'); Route::post('/admin/update', 'AdminController@update')->name('AdminUpdate'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateRoutes()\n {\n $routes = property_exists(app(), 'router')? app()->router->getRoutes() : app()->getRoutes();\n foreach ($routes as $route) {\n array_push($this->routes, [\n 'method' => $route['method'],\n 'uri' => $route['uri'],\n 'name' => $this->getRouteName($route),\n 'action' => $this->getRouteAction($route),\n 'middleware' => $this->getRouteMiddleware($route),\n 'map' => $this->getRouteMapTo($route)\n ]);\n }\n }", "protected function mapWebRoutes()\n {\n Route::group(lit_base_path('routes/web.php'));\n }", "public static function routes(): void\n {\n //\n }", "protected function mapWebRoutes()\n {\n $this->mapDefaultWebRoutes();\n\n $this->mapUnauthenticatedWebRoutes();\n\n $this->mapAuthenticatedWebRoutes();\n $this->mapAdminAuthenticatedWebRoutes();\n $this->mapClientAuthenticatedWebRoutes();\n\n $this->mapPaginationRoutes();\n $this->mapAdminPaginationRoutes();\n $this->mapClientPaginationRoutes();\n\n $this->mapAjaxRoutes();\n $this->mapAdminAjaxRoutes();\n $this->mapClientAjaxRoutes();\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n\n /**\n * Porteiro; Routes\n */\n $this->loadRoutesForRiCa(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'routes');\n }", "public function routes()\n {\n register_rest_route('can', '/donation-forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'fundraisingPages'\n ],\n ]);\n\n register_rest_route('can', '/forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'forms'\n ],\n ]);\n\n register_rest_route('can', '/petitions', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'petitions'\n ],\n ]);\n\n register_rest_route('can', '/person/add', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'addPerson'\n ],\n ]);\n }", "function defineRoutes() {\n Router::map('homepage', '', array('controller' => DEFAULT_CONTROLLER, 'action' => DEFAULT_ACTION, 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('admin', 'admin', array('controller' => 'admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('public', 'public', array('controller' => 'public', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('wireframe_updates', 'wireframe-updates', array('controller' => 'backend', 'action' => 'wireframe_updates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('menu_refresh_url', 'refresh-menu', array('controller' => 'backend', 'action' => 'refresh_menu', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('quick_add', 'quick-add', array('controller' => 'backend', 'action' => 'quick_add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // API\n Router::map('info', 'info', array('controller' => 'api', 'action' => 'info', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Disk Space\n Router::map('disk_space_admin', 'admin/disk-space', array('controller' => 'disk_space_admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_usage', 'admin/disk-space/usage', array('controller' => 'disk_space_admin', 'action' => 'usage', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_admin_settings', 'admin/disk-space/settings', array('controller' => 'disk_space_admin', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_application_cache', 'admin/disk-space/tools/remove-application-cache', array('controller' => 'disk_space_admin', 'action' => 'remove_application_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_logs', 'admin/disk-space/tools/remove-logs', array('controller' => 'disk_space_admin', 'action' => 'remove_logs', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_old_application_versions', 'admin/disk-space/tools/remove-old-application-versions', array('controller' => 'disk_space_admin', 'action' => 'remove_old_application_versions', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Appearance\n Router::map('appearance_admin', 'admin/appearance', array('controller' => 'appearance', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_add_scheme', 'admin/appearance/add-scheme', array('controller' => 'appearance', 'action' => 'add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_edit_scheme', 'admin/appearance/:scheme_id/edit', array('controller' => 'appearance', 'action' => 'edit', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_rename_scheme', 'admin/appearance/:scheme_id/rename', array('controller' => 'appearance', 'action' => 'rename', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_delete_scheme', 'admin/appearance/:scheme_id/delete', array('controller' => 'appearance', 'action' => 'delete', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_set_as_default_scheme', 'admin/appearance/:scheme_id/set-as-default', array('controller' => 'appearance', 'action' => 'set_as_default', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Scheduled Tasks Admin\n Router::map('scheduled_tasks_admin', 'admin/scheduled-tasks', array('controller' => 'scheduled_tasks_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Network settings\n Router::map('network_settings', 'admin/network', array('controller' => 'network_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Indices admin\n Router::map('indices_admin', 'admin/indices', array('controller' => 'indices_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild', 'admin/indices/rebuild', array('controller' => 'indices_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild_finish', 'admin/indices/rebuild/finish', array('controller' => 'indices_admin', 'action' => 'rebuild_finish', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n Router::map('object_contexts_admin_rebuild', 'admin/indices/object-contexts/rebuild', array('controller' => 'object_contexts_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('object_contexts_admin_clean', 'admin/indices/object-contexts/clean', array('controller' => 'object_contexts_admin', 'action' => 'clean', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Scheduled tasks\n Router::map('frequently', 'frequently', array('controller' => 'scheduled_tasks', 'action' => 'frequently', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('hourly', 'hourly', array('controller' => 'scheduled_tasks', 'action' => 'hourly', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('daily', 'daily', array('controller' => 'scheduled_tasks', 'action' => 'daily', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // trash related\n Router::map('trash', 'trash', array('controller' => 'trash', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_section', 'trash/:section_name', array('controller' => 'trash', 'action' => 'section', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_empty', 'trash/empty', array('controller' => 'trash', 'action' => 'empty_trash', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('object_untrash', 'trash/untrash-object', array('controller' => 'trash', 'action' => 'untrash_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n Router::map('object_delete', 'trash/delete-object', array('controller' => 'trash', 'action' => 'delete_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n\n // Control Tower\n Router::map('control_tower', 'control-tower', array('controller' => 'control_tower', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_empty_cache', 'control-tower/empty-cache', array('controller' => 'control_tower', 'action' => 'empty_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_delete_compiled_templates', 'control-tower/delete-compiled-templates', array('controller' => 'control_tower', 'action' => 'delete_compiled_templates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_images', 'control-tower/rebuild-images', array('controller' => 'control_tower', 'action' => 'rebuild_images', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_localization', 'control-tower/rebuild-localization', array('controller' => 'control_tower', 'action' => 'rebuild_localization', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('control_tower_settings', 'admin/control-tower', array('controller' => 'control_tower', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n\t // Firewall\n\t Router::map('firewall', 'admin/firewall', array('controller' => 'firewall', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n }", "public static function get_all_route()\n {\n return include BASE_PATH . 'routes'. DIRECTORY_SEPARATOR . 'web.php';\n }", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "public function route() {\n return array(\n '/^sitemap\\.xml$/' => 'actionMap',\n '/^download\\/(.+?).html/' => array(\n 'class' => 'Download',\n 'argument' => '$1'\n )\n );\n }", "function add_listing_routes()\n {\n $this->add_route('GET', '/routes', function(){\n print \"<h1>Routes</h1>\";\n foreach($this->routes as $method => $routes) {\n print \"<h3>\".$method.\"</h3>\";\n print \"<ul>\";\n foreach ($routes as $route) {\n print \"<li>\".$route->path.\"</li>\";\n }\n print \"</ul>\";\n }\n });\n }", "public function route()\n {\n $this->dashboardRouting($this->relativeCmsUri);\n $this->logOffRouting($this->request, $this->relativeCmsUri);\n $this->apiRouting($this->relativeCmsUri);\n $this->documentRouting($this->userRights, $this->relativeCmsUri);\n $this->valuelistsRouting($this->userRights, $this->relativeCmsUri);\n $this->sitemapRouting($this->userRights, $this->relativeCmsUri);\n $this->redirectRouting($this->userRights, $this->relativeCmsUri);\n $this->imageRouting($this->userRights, $this->relativeCmsUri);\n $this->filesRouting($this->userRights, $this->relativeCmsUri);\n $this->configurationRouting($this->userRights, $this->relativeCmsUri);\n $this->searchRouting($this->relativeCmsUri);\n }", "protected function mapWebRoutes()\n {\n Route::group([\n 'namespace' => $this->namespace, 'middleware' => 'web',\n ], function ($router) {\n require base_path('routes/web.php');\n });\n }", "function create_initial_rest_routes()\n {\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->prefix('nova-vendor/media-library')\n ->group(__DIR__.'/../routes/api.php');\n }", "protected function mapWebRoutes()\n {\n Route::group([\n 'middleware' => 'web',\n 'namespace' => $this->namespace,\n ], function ($router) {\n require base_path('routes/web.php');\n });\n }", "public static function getRoutes()\n {\n $routes = new \\FreeFW\\Router\\RouteCollection();\n $paths = [];\n $paths[] = __DIR__ . '/../resource/routes/restful/routes.php';\n foreach ($paths as $onePath) {\n $apiRoutes = @include($onePath);\n if (is_array($apiRoutes)) {\n foreach ($apiRoutes as $routeId => $apiRoute) {\n $myRoute = new \\FreeFW\\Router\\Route();\n $myRoute\n ->setId($routeId)\n ->setMethod($apiRoute[\\FreeFW\\Router\\Route::ROUTE_METHOD])\n ->setUrl($apiRoute[\\FreeFW\\Router\\Route::ROUTE_URL])\n ->setController($apiRoute[\\FreeFW\\Router\\Route::ROUTE_CONTROLLER])\n ->setFunction($apiRoute[\\FreeFW\\Router\\Route::ROUTE_FUNCTION])\n ;\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_ROLE, $apiRoute)) {\n $myRoute->setRole($apiRoute[\\FreeFW\\Router\\Route::ROUTE_ROLE]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_AUTH, $apiRoute)) {\n $myRoute->setAuth($apiRoute[\\FreeFW\\Router\\Route::ROUTE_AUTH]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_INCLUDE, $apiRoute)) {\n $myRoute->setInclude($apiRoute[\\FreeFW\\Router\\Route::ROUTE_INCLUDE]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_MODEL, $apiRoute)) {\n $myRoute->setDefaultModel($apiRoute[\\FreeFW\\Router\\Route::ROUTE_MODEL]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_COLLECTION, $apiRoute)) {\n $myRoute->setCollection($apiRoute[\\FreeFW\\Router\\Route::ROUTE_COLLECTION]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_COMMENT, $apiRoute)) {\n $myRoute->setComment($apiRoute[\\FreeFW\\Router\\Route::ROUTE_COMMENT]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_PARAMETERS, $apiRoute)) {\n $myRoute->setParameters($apiRoute[\\FreeFW\\Router\\Route::ROUTE_PARAMETERS]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_RESULTS, $apiRoute)) {\n $myRoute->setResponses($apiRoute[\\FreeFW\\Router\\Route::ROUTE_RESULTS]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_SCOPE, $apiRoute)) {\n $myRoute->setScope($apiRoute[\\FreeFW\\Router\\Route::ROUTE_SCOPE]);\n }\n $routes->addRoute($myRoute);\n }\n }\n }\n return $routes;\n }", "public function register_routes() {\n $namespace = 'junglehunter/v1';\n register_rest_route(\n $namespace,\n '/all',\n array(\n 'methods' => 'GET',\n 'callback' => array($this, 'junglehunter_get_all')\n )\n );\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')->namespace($this->namespace)->group(base_path('routes/web.php'));\n }", "public function map()\n {\n $this->mapWebRoutes();\n }", "protected function mapWebRoutes()\n {\n /*Route::group([\n 'middleware' => 'web',\n 'namespace' => $this->namespace,\n ], function ($router) {\n require module_path('frontend', 'Routes/web.php');\n });*/\n\n /* 将web中的路由按模块分成多个子文件 */\n // 手机端访问\n $design_page = request()->get('page','');\n// $design_page = empty($design_page) ? str_contains($design_page, 'm_') : false;\n if (is_mobile() || (request()->getHost() == env('MOBILE_DOMAIN')) || $design_page) {\n foreach(glob(module_path('frontend', 'Routes/mobile/*.php'))as $file){\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group($file);\n }\n }\n\n // PC或app访问\n if (!is_mobile() || (request()->getHost() == env('FRONTEND_DOMAIN'))) {\n foreach(glob(module_path('frontend', 'Routes/pc/*.php'))as $file){\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group($file);\n }\n }\n// else { // PC或app访问\n// foreach(glob(module_path('frontend', 'Routes/pc/*.php'))as $file){\n// Route::middleware('web')\n// ->namespace($this->namespace)\n// ->group($file);\n// }\n// }\n\n\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('Modules/Post/routes/web.php'));\n }", "protected function registerWebRoutes()\n {\n if (config('firefly.web.enabled')) {\n Route::group(config('firefly.web'), function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->namespace('Energon7\\MenuBuilder\\Http\\Controllers')\n ->prefix('nova-vendor/menu-builder')\n ->group(__DIR__.'/../routes/api.php');\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "public function declare_routes(){\n\n $this->routes = \\Chocolatine\\get_configuration( 'routes' );\n $view_manager = \\Chocolatine\\get_manager('view');\n\n /**\n * Declare all route\n */\n foreach ( $this->routes as $key => $current_route) {\n\n $this->router->map(['GET', 'POST'], $current_route['route'] ,function ($request, $response, $args) {\n\n $router = \\Chocolatine\\get_service( 'Router' );\n return $router->controller( $request, $response, $args );\n\n });\n\n }\n\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->namespace(\"KosmosKosmos\\Rating\\Controllers\")\n ->prefix('nova-vendor/kosmoskosmos')\n ->group(__DIR__ . '/../routes/api.php');\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function mapWebRoutes()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/web.php'));\n }", "protected function routes()\n\t{\n\t\tif ($this->app->routesAreCached()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tRoute::middleware(['nova', Authorize::class])\n\t\t\t->prefix('nova-vendor/nova-permissions')\n\t\t\t->group(__DIR__ . '/../routes/api.php');\n\t}", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "function _generate_auto_routes()\n {\n $module_routes = array();\n $module_routes[0] = array();\n $module_routes[1] = array();\n $module_routes[2] = array();\n $module_routes[3] = array();\n\n $dir = APPPATH . 'controllers' . '/';\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle)))\n {\n if(is_file($dir . $file) && substr($file, -4) == '.php'){\n $file = str_replace('.php', '', $file);\n $file = strtolower($file);\n $module_routes[0][$file . '(/.*)?'] = $file . '/index$1';\n } elseif(is_dir($dir2 = $dir . $file . DS) && !preg_match('/[^a-z0-9\\/\\\\\\_\\-]/i', $dir2)) {\n if ($handle2 = opendir($dir2)) {\n while (false !== ($file2 = readdir($handle2))) {\n if(!preg_match('/[^a-z0-9]/i', $file2)){\n $module_routes[3][$file2 . '(/.*)?'] = strtolower($file) . '/' . strtolower($file2) . '/' . strtolower($file2) . '/index$1';\n }\n if(is_file($dir2 . $file2) && substr($file2, -4) == '.php'){\n $file2 = str_replace('.php', '', $file2);\n $file = strtolower($file);\n $file2 = strtolower($file2);\n $module_routes[1][$file . '/' . $file2 . '(/.*)?'] = $file . '/' . $file2 . '/index$1';\n } elseif(is_dir($dir3 = $dir2 . $file2 . DS) && !preg_match('/[^a-z0-9\\/\\\\\\_\\-]/i', $dir3)) {\n if ($handle3 = opendir($dir3)) {\n while (false !== ($file3 = readdir($handle3))) {\n if(is_file($dir3 . $file3) && substr($file3, -4) == '.php'){\n $file3 = str_replace('.php', '', $file3);\n $key = '';\n $val = $file . '/';\n if ($this->routes['front_controllers_folder'] != $file) {\n $key .= $file . '/';\n //$val = '';\n }\n\n if ($file2 == $file3) {\n $key .= $file3;\n }\n else\n {\n $key .= $file2 . '/' . $file3;\n }\n\n $val .= $file2 . '/' . $file3;\n\n $key = strtolower($key);\n $val = strtolower($val);\n\n $module_routes[2][$key . '(/.*)?'] = $val . '/index$1';\n }\n }\n closedir($handle3);\n }\n }\n }\n closedir($handle2);\n }\n }\n }\n }\n closedir($handle);\n\n $module_routes = array_merge($module_routes[3], $module_routes[2], $module_routes[1], $module_routes[0], $this->routes);\n krsort($module_routes);\n\n return $module_routes;\n }", "public function register_routes()\n {\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->prefix('nova-vendor/surveyor-nova')\n ->group(__DIR__.'/../routes/api.php');\n }", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n $this->mapFrontWebRoutes();\n $this->mapBackWebRoutes();\n //\n }", "public function route() {\r\n register_rest_route( 'api/v1', '/web-data-endpoint', array(\r\n 'methods' => 'GET',\r\n 'callback' => array( $this, 'callback' )\r\n ) );\r\n }", "public static function routes()\r\n {\r\n return [\r\n [\"uri\" => \"/\", \"action\" => \"get\", \"uses\" => \"IndexController@index\"],\r\n [\"uri\" => \"/\", \"action\" => \"post\", \"uses\" => \"IndexController@handle\"],\r\n [\"uri\" => \"/api\", \"action\" => \"get\", \"uses\" => \"APIController@handle\"],\r\n ];\r\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }", "public function map()\n {\n //panel\n $this->mapPanelRoutes();\n //auth\n $this->mapAuthRoutes();\n //almacen\n $this->mapInventoryRoutes();\n //contabilidad\n $this->mapAccountingRoutes();\n //Recursos Humanos\n $this->mapHumanResourceRoutes();\n //ventas\n $this->mapSaleRoutes();\n\n $this->mapApiRoutes();\n\n //\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::namespace('Day4\\NovaForms\\Http\\Controllers')\n ->prefix('day4/nova-forms')\n ->group(__DIR__.'/../routes/api.php');\n }", "public function register_routes() {\n\n\t\t// Get current user per the JWT token. Depends on JWT plugin.\n\t\tregister_rest_route(\n\t\t\t'wpcampus',\n\t\t\t'/auth/user/',\n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => [ $this, 'get_current_user' ],\n\t\t\t]\n\t\t);\n\t}", "protected function loadRoute()\n {\n $this->post('/task', 'task.controller:saveAction');\n\n // Url for update task\n $this->put('/task/{id}', 'task.controller:updateAction');\n\n // Url for see one task\n $this->get('/task/{id}', 'task.controller:getAction');\n\n // Url for delete task\n $this->delete('/task/{id}', 'task.controller:deleteAction');\n\n // Url for list of tasks\n $this->get('/task', 'task.controller:listAction');\n\n //Get Tag list\n $this->get('/tags', 'tag.controller:listAction');\n\n //Add tag to task\n $this->post('/addTag', 'tag.controller:setTagAction');\n\n //Add tag to tag list\n $this->post('/tag', 'tag.controller:saveAction');\n\n //Search by tag\n $this->get('/search/tag', 'tag.controller:searchAction'); \n\n // Url for delete tag in tag list\n $this->delete('/tag', 'tag.controller:deleteAction');\n \n // Url for auth github\n $this->post('/github', 'github.controller:authAction'); \n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n $this->mapACLRoutes(); \n //\n }", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}", "protected function mapWebRoutes(): void\n {\n Route::middleware('web')\n ->group(__DIR__ . '/../routes/web.php');\n }", "protected function defineRoutes()\n {\n $this->register(ImageServiceProvider::class);\n if (! $this->app->routesAreCached()) {\n $router = app('router');\n $router->group([\n 'namespace' => 'Socieboy\\Jupiter\\Http\\Controllers',\n 'middleware' => 'web',\n ], function ($router) {\n require __DIR__.'/../Http/routes.php';\n });\n }\n }", "public function actionGenerate()\n\t{\n\t\t$routes = $this->searchRoute('all');\n\t\tforeach ($routes as $route => $status) {\n\t\t\tif (!Route::findOne($route)) {\n\t\t\t\t$model = new Route();\n\t\t\t\t$model->name = $route;\n\t\t\t\t$pos = (strrpos($route, '/'));\n\t\t\t\t$model->type = substr($route, 1, $pos - 1);\n\t\t\t\t$model->alias = substr($route, $pos + 1, 64);\n\t\t\t\t$model->save();\n\t\t\t}\n\t\t}\n\t\tYii::$app->session->setFlash('success', 'Route success generate');\n\t\treturn $this->redirect(['index']);\n\t}", "private function registerWebRoutes(): void\n {\n $detect = app(Detect::class);\n $monitor = app(Monitor::class);\n\n $type = Settings::TYPE__ROUTE_WEB_FILE;\n if (!$detect->resourceEnabled($type)) {\n return;\n }\n\n $monitor->startTimer('register ' . $type);\n\n foreach ($detect->getRouteWebFiles() as $path) {\n Route::middleware($detect->routeWebMiddleware())\n ->group($detect->basePath($path));\n }\n $monitor->incRegCount($type, count($detect->getRouteWebFiles()));\n\n $monitor->stopTimer('register ' . $type);\n }", "public function map()\n {\n $this->mapApiRoutes();\n $this->mapWebRoutes();\n $this->mapAdminRoutes();\n //\n }", "public function getRoutes() {}", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }", "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n //\n }" ]
[ "0.7081164", "0.7013278", "0.67365664", "0.67251235", "0.6692198", "0.66615874", "0.65961164", "0.65693074", "0.65519387", "0.65519387", "0.65511", "0.65273106", "0.6515862", "0.6506938", "0.64824796", "0.64783186", "0.6474731", "0.6471895", "0.6435286", "0.6415499", "0.64043254", "0.6375234", "0.6367004", "0.6362093", "0.63603073", "0.6359394", "0.6354484", "0.6354484", "0.6354484", "0.6354484", "0.6354484", "0.6354484", "0.6354484", "0.6354484", "0.6354484", "0.6354484", "0.6340948", "0.63337237", "0.6311621", "0.6311621", "0.6311621", "0.6308471", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6307363", "0.6305148", "0.63046926", "0.62870926", "0.62814534", "0.6252868", "0.6246238", "0.6243492", "0.62373424", "0.6229538", "0.6216051", "0.621473", "0.6214682", "0.6201319", "0.6184986", "0.61793774", "0.614813", "0.6132765", "0.61251634", "0.611741", "0.61081845", "0.61063164", "0.61063164", "0.61063164", "0.61063164", "0.61063164", "0.61063164", "0.61063164" ]
0.0
-1
Get the subscription limit.
public function getLimit() { return $this->getParameter('limit'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->_limit;\n }", "public function getLimit() {}", "public function getLimit() {\n\t\treturn $this->limit;\n\t}", "public function getLimit ()\r\n\t{\r\n\t\treturn $this->limit;\r\n\t}", "public function get_limit();", "public function getLimit() {\n return $this->limit;\n }", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function Limit()\n {\n return $this->limit;\n }", "protected function getLimit()\n {\n return (int)$this->getSettingsValue('limit');\n }", "public function get_limit(){\r\n return $this->limit;\r\n }", "public function getLimit()\n {\n return isset($this->limit) ? $this->limit : 0.0;\n }", "public function getLimit()\n {\n return self::LIMIT;\n }", "public function getLimit() : int\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return null;\n }", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "public function limit(): int\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return null;\n }", "function getLimit(){\n\t\t\treturn $this->limite;\n\t\t}", "function getLimit() ;", "public function getLimit()\n {\n return $this->getRequest()->get('limit');\n }", "protected function getLimit()\n\t{\n\t\t$option_limit = $this->io->getOption('limit');\n\n\t\tif ( $option_limit !== null ) {\n\t\t\treturn $option_limit;\n\t\t}\n\n\t\treturn $this->getSetting(self::SETTING_LOG_LIMIT);\n\t}", "public function getUsagelimit()\n {\n return $this->usagelimit;\n }", "public function getMessageLimit() {\n if (isset($this->_quotausage['MESSAGE']['limit'])) {\n return $this->_quotausage['MESSAGE']['limit'];\n }\n return 0;\n }", "public function getLimit()\n {\n return $this->number_of_items_per_page;\n }", "public function getRateLimitLimit(): int\n {\n return $this->httpClient->getRateLimitLimit();\n }", "public function getLimit()\n {\n if (is_null($this->limit)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_LIMIT);\n if (is_null($data)) {\n return null;\n }\n $this->limit = (int) $data;\n }\n\n return $this->limit;\n }", "public function get_limit() {\n\t\t$job_listing_limit = $this->get_job_listing_limit();\n\t\tif ( $job_listing_limit ) {\n\t\t\treturn $job_listing_limit;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getPostDeliveryLimit(){\n\n return $this->client->makeRequest('PostDeliveryLimit', 'GET');\n }", "public function getLimit(): ?int\n {\n return $this->_limit;\n }", "public function getLimit()\n {\n return Mage::getStoreConfig(Mage_Reports_Block_Product_Viewed::XML_PATH_RECENTLY_VIEWED_COUNT);\n }", "public function getLimit(): ?int\n {\n return $this->limit;\n }", "public function getLimit(): ?int\n {\n return $this->limit;\n }", "public function getLimit(): ?int\n {\n return $this->limit;\n }", "public static function rateLimit(): self\n {\n return self::getInstance('RATE_LIMIT');\n }", "public function getLimits()\n {\n return $this->limits;\n }", "private function _getChannelLimit()\n {\n return Yii::$app->params['channelLimit'];\n }", "public function getRateLimit(){\n\t\treturn $this->rateLimit;\n\t}", "public function getTimeLimit(): int;", "public function getTimeLimit(): int;", "public function getLimitLength()\n\t\t{\n\t\t\tif($this->hasLimit())\n\t\t\t{\n\t\t\t\treturn $this->limit[1];\n\t\t\t}\n\t\t\tthrow new \\Exception('Retrieving non-existant limit length');\n\t\t}", "public function getSessionLimit()\n {\n // Get the security policy for this user.\n $profile = $this->getProfile();\n $policy = $profile->getSecurityPolicy();\n\n return $policy->getFieldValue(DSecurityPolicy::FIELD_SESSION_LIMIT);\n }", "public function getProductLimit() {\r\n\t\t$config = $this->getConfig();\r\n $limit = $this->getData(\"product_count\");\r\n if(!$limit)\r\n $limit = $config[\"limit\"];\r\n return $limit;\r\n }", "public function limit()\n {\n if ($response = $this->request('limit')) {\n if (isset($response->limit) && $response->limit == true) {\n return $response->limit;\n }\n }\n return false;\n }", "public function limit(): int\n {\n return $this->per_page;\n }", "public function getQueryLimit() {\n\t\treturn $this->queryLimit;\n\t}", "protected function initQueryLimit()\n {\n $url = $this->getBaseUrl(true) . 'accounts/self/capabilities?format=JSON';\n $response = $this->getConnector()->get($url);\n $response = $this->verifyResult($response, $url);\n\n $content = $this->transformJsonResponse($response->getContent());\n\n return $content['queryLimit']['max'];\n }", "public function getDefaultLimit()\n {\n return $this->defaultLimit;\n }", "public function getDefaultLimit()\n {\n return $this->default_limit;\n }", "public function getSizeLimit() {\n return $this->sizeLimit;\n }", "public static function limit($limit);", "public function getRateLimit()\n {\n return $this->xRateLimitRemaining;\n }", "function getApiLimit() {\n\t\tif ( is_null( $this->apiLimits ) ) {\n\t\t\treturn 'max';\n\t\t}\n\t\treturn $this->apiLimits;\n\t}", "public function getLimit(): ?int\n {\n if (count($this->limit) == 0) {\n return null;\n }\n return $this->limit['value'];\n }", "public function getStorageLimit() {\n if (isset($this->_quotausage['STORAGE']['limit'])) {\n return $this->_quotausage['STORAGE']['limit'];\n }\n return 0;\n }", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n $this->has_limit = true;\n\n return $this;\n }", "protected function _updateLimit()\n {\n return $this->_updateLimit;\n }", "public function getRechargeLimitCount()\n {\n return $this->count(self::_RECHARGE_LIMIT);\n }", "public function limit($limit);", "public function limit($limit);", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n\n return $this;\n }", "public function limit($limit)\n {\n return $this->set_limit($limit);\n }", "public function getLimit()\n {\n //a little different than normal gets...\n return array (\n $this->_count, $this->_offset,\n );\n }", "public function getLimitPerPage() \n {\n \n return $this->_limit_per_page;\n \n }", "public function getRechargeLimitCount()\n {\n return $this->count(self::RECHARGE_LIMIT);\n }", "private static function GetLimit() : int\n\t{\n\t\t// $detect = new \\Mobile_Detect();\n\t\t// if(self::IsMobileOrTablet())\n\t\t// \treturn self::GetMobileLimit();\n\t\t// else\n\t\treturn self::GetComputerLimit();\n\t}", "function quota_getUploadLimit($uploadlimit) {\n\tif (!zp_loggedin(MANAGE_ALL_ALBUM_RIGHTS)) {\n\t\t$uploadlimit = (quota_getUploadQuota(0)-quota_getCurrentUse(NULL))*1024;\n\t}\n\treturn $uploadlimit;\n}", "protected function get_limit()\n {\n $bytes = ini_get('memory_limit');\n\n return $this->formatBytes($bytes);\n }", "protected function getLimit() {\n if (isset($this->data['page'])) { // ...in the main table while pagination is used\n $l1 = ($this->data['page'] - 1) * $this->posts_per_page;\n $l2 = $this->posts_per_page;\n $limit = \"$l1, $l2\";\n }\n else $limit = \"0, \".$this->posts_per_page;\n return $limit;\n }", "public function limit($limit = null)\n {\n if(null === $limit)\n {\n return $this->property('limit');\n }\n return $this->property('limit', (int) $limit);\n }", "public function limit($limit = null)\n {\n if(null === $limit)\n {\n return $this->property('limit');\n }\n return $this->property('limit', (int) $limit);\n }", "public function limit($limit)\n {\n }", "public function getResourceLimits()\n {\n return $this->resource_limits;\n }", "public function limit(?int $limit): self;", "public function get( $limit = 10 );", "public function limit(?int $limit = null) : int;", "protected function setLimit($limit = null) {\n if (!$limit) {\n $limit = config('login-activity.number_of_getLatest_logs', 100);\n }\n\n return $limit;\n }", "protected function get_email_rate_limit()\n {\n }", "public static function getDefaultLimit()\n {\n return config('consts.DefaultLimit');\n }", "public function get_customer_vcam_limit($args){\n\t\treturn self::_Call('get_customer_vcam_limit',Array(\n\t\t\t$args\n\t\t));\n\t}", "public function setLimit($var)\n {\n GPBUtil::checkDouble($var);\n $this->limit = $var;\n\n return $this;\n }", "public function getRateLimitRemaining(): int\n {\n return $this->httpClient->getRateLimitRemaining();\n }", "public function setLimit(int $limit): self;", "public function get_job_listing_limit() {\n\t\treturn $this->get_product_meta( 'job_listing_limit' );\n\t}", "private function Limit($num) {\n $this->limit = $num;\n return $limit;\n }" ]
[ "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.7685298", "0.76822096", "0.7662637", "0.7659339", "0.7619435", "0.7586404", "0.7575164", "0.7575164", "0.7575164", "0.7575164", "0.7575164", "0.7469139", "0.74640673", "0.7460703", "0.7419788", "0.7413589", "0.7315938", "0.7189443", "0.7161991", "0.7159462", "0.71432227", "0.7097132", "0.7091868", "0.7053732", "0.7044479", "0.70225656", "0.7014031", "0.70114744", "0.69763047", "0.67205095", "0.669826", "0.6671562", "0.66632414", "0.6657827", "0.66479105", "0.66479105", "0.66479105", "0.65844953", "0.657493", "0.65723264", "0.6552065", "0.6515689", "0.6515689", "0.6495251", "0.64657974", "0.644887", "0.6427159", "0.6426145", "0.64139974", "0.639821", "0.6375074", "0.6368376", "0.6366348", "0.63633364", "0.6343119", "0.633435", "0.63325065", "0.63298947", "0.6315563", "0.62909484", "0.628558", "0.6285478", "0.6285478", "0.62828046", "0.6274514", "0.6251289", "0.62105715", "0.6207444", "0.61667466", "0.6166168", "0.61543816", "0.61541164", "0.6139422", "0.6139422", "0.6138074", "0.61359507", "0.6120894", "0.61055267", "0.6097854", "0.60575837", "0.6047157", "0.60433996", "0.6036961", "0.6032363", "0.602621", "0.60020286", "0.60016155", "0.59986204" ]
0.7127009
33
Set the subscription limit.
public function setLimit($value) { return $this->setParameter('limit', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_limit($limit);", "public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}", "public function set_limit($new_limit){\r\n $this->limit = $new_limit;\r\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n }", "public function setLimit($limit) {\n\t\t$this->limit = $limit;\n\t}", "public function setLimit(int $limit): self;", "public function setLimit($limit)\r\n {\r\n $this->limit = intval($limit);\r\n }", "public function setLimit(int $limit): void\n {\n $this->_limit = $limit;\n }", "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit(int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit($limit) {\n $this->limit = (int)$limit;\n }", "public function setLimit($x) { $this->limit = $x; }", "public function setLimit(?int $limit): void\n {\n $this->limit['value'] = $limit;\n }", "private function setLimit($limit)\n {\n $this->limit = (int)$limit;\n }", "public function limit($limit)\n\t{\n\t\t$this->limit = (int) $limit;\n\t}", "public function set_item_limit($limit = 0)\n {\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function limit(?int $limit): self;", "public function setLimit(int $limit) : self\n {\n $this->initialized['limit'] = true;\n $this->limit = $limit;\n return $this;\n }", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n\n return $this;\n }", "public function setLimit($limit) {\n\t\tif(!Validator::UnsignedNumber($limit)) throw new Exception(lang('error_98'));\n\t\t$this->_limit = $limit;\n\t}", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->limit = $var;\n $this->has_limit = true;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n \n $this->setTotalPages();\n }", "public function limit($limit)\n {\n }", "public function setLimit($limit) {\n $this->limit = $limit;\n return $this;\n }", "public function limit($limit) {\n $this->limit = (int) $limit;\n return $this;\n }", "public function setLimit($value)\n {\n\n $this->limit = $value;\n\n return $this;\n\n }", "public function limit($value) {\r\n $this->limit = (int)$value;\r\n return $this;\r\n }", "public function limit($limit = 10) {\n $this->limit = $limit;\n return $this;\n }", "public function setLimit($var)\n {\n GPBUtil::checkDouble($var);\n $this->limit = $var;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = (int) $limit;\n return $this;\n }", "public function setLimit($limit)\n {\n $this->_limit = $limit;\n return $this;\n }", "public function limit($limit)\r\n {\r\n $this->limit = $limit;\r\n return $this;\r\n }", "public function limit( $limit ) {\n\t\t$this->isDirty( true );\n\t\t$this->_limit = $limit;\n\t\treturn $this;\n\t}", "public static function limit($limit);", "public function setLimit($limit)\n {\n if ($limit < 1 || !is_int($limit)) {\n throw new \\InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249);\n }\n $this->limit = $limit;\n\n return $this;\n }", "public function limit($limit);", "public function limit($limit);", "public function setQueryLimit($limit) {\n\t\t$this->queryLimit = (integer) $limit;\n\t}", "public function setLimit($limit)\n\t{\n\t\t$this->limit = $limit;\n\t\treturn $this;\n\t}", "public function limit($limit)\n {\n $this->limit = (int) $limit;\n return $this;\n }", "public function setLimit($limit) {\n\t$this->parseQuery->setLimit($limit);\n }", "public function setLimit($limit)\n {\n $this->limit = (int) $limit;\n\n return $this;\n }", "public function setLimit(int $limit) : self\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function limit($value)\n\t{\n\t\t$this->limit = $value;\n\t\treturn $this;\n\t}", "public function limit($limit)\n {\n $this->limit = $limit;\n return $this;\n }", "public function limit( int $limit )\n {\n $this->limit = $limit;\n return $this;\n }", "public function setLimit($limit){\n $this->limit = $limit;\n if ($this->total_records!=0) {\n $this->total_pages = ceil($this->total_records / $this->limit);\n }else{\n\n }\n }", "protected function setLimit() {\r\n if( $this->sqlLimit ) {\r\n $this->sql .= ' LIMIT ' . $this->sqlLimit;\r\n }\r\n }", "public static function setQueryLimit($limit){\t\t\n\t\t//reset the queryCount\n\t\tself::$queryCount = 0;\n\t\t\n\t\tself::$queryLimit = $limit;\n }", "public function limit($limit)\n {\n $this->limit = (int) $limit;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n\n return $this;\n }", "public function setLimit($var)\n {\n GPBUtil::checkMessage($var, \\Votes\\LimitReq::class);\n $this->limit = $var;\n\n return $this;\n }", "public function setSizeLimit($value) {\n $this->sizeLimit = $value;\n return $this;\n }", "public function limit($limit)\t{\n\t\t$this->limit = array(\"LIMIT $limit\");\n\t\treturn $this;\n\t}", "public function limit($value)\n {\n $this->limit = $value;\n\n return $this;\n }", "public function limit(int $limit): self\n {\n $this->limit = $limit <= 100 ? $limit : 10;\n\n return $this;\n }", "public function limit(?int $limit): static\n\t{\n\t\t$this->limit = $limit;\n\t\treturn $this;\n\t}", "public function limit($value)\n {\n if (! is_null($value)) {\n $this->limit = (int) $value;\n }\n return $this;\n }", "public function limit($limit)\n {\n $this->_parts['limit'] = $limit;\n\n return $this;\n }", "public function setQueueLimit($strLimit)\n {\n if(!$this->isAllowed('moderator')) return $this->returnText(self::ERR_NO_MOD);\n if(trim($strLimit) == '') return $this->returnText('No queue limit provided');\n\n $iLimit = abs($strLimit);\n if($iLimit > 9999)\n return $this->returnText('Invalid queue limit provided, number must be less than 9999');\n else\n {\n $this->q->max_users = $iLimit;\n $this->q->save();\n return $this->returnText('Successfully set the queue limit to: '. ($iLimit == 0 ? 'unlimited (0)' : $iLimit));\n }\n }", "public function limit( $limit )\n\t{\n\t\tif ( $limit > 500 ) {\n\t\t\t$limit = 500;\n\t\t}\n\n\t\t$this->parameters['limit'] = $limit;\n\n\t\treturn $this;\n\t}", "public function setLimit(int $limit, callable|string $callback = null): self\n {\n $this->limit = [$limit, $callback];\n\n return $this;\n }", "private function processLimit(): void\n {\n if ($this->request->has(self::LIMIT) && null !== $this->request->get(self::LIMIT)) {\n $itemLimit = (int)$this->request->get(self::LIMIT);\n\n if ($itemLimit > 0) {\n $this->limit = $itemLimit;\n } elseif (0 === $itemLimit) {\n $this->limit = 0;\n }\n }\n }", "public function setLimit($limit)\n {\n if (is_integer($limit)) {\n $this->request->appendToParameter('options', 'num-' . $limit);\n }\n\n return $this;\n }", "public function setQuota($value) {\n $this->_quota = $value;\n }", "public function setLimit($limit)\n {\n if(Checker::isInt($limit, true, true, self::ERROR_INFO(__FUNCTION__)))\n {\n $this->limit = $limit;\n return true;\n }\n else return false;\n }", "public function setMaxLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_limit = $var;\n\n return $this;\n }", "protected function limit()\n {\n if (count($this->clients) > $this->limit)\n {\n $this->log->info(\"Limit connection exceeded!\");\n\n $this->conn->send('Limit connection exceeded!');\n\n $this->conn->close();\n }\n }", "public function limit($limit)\n {\n return $this->set_limit($limit);\n }", "public function limit(int $limit)\n {\n $this->options['limit'] = $limit;\n\n return $this;\n }" ]
[ "0.7482077", "0.735923", "0.7288998", "0.7288828", "0.7247278", "0.72467643", "0.7246248", "0.7243036", "0.71943617", "0.71943617", "0.7177133", "0.7158461", "0.7148062", "0.71408886", "0.70539623", "0.68898165", "0.68377405", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.67593884", "0.66884756", "0.65363336", "0.6525877", "0.6512575", "0.64827204", "0.6478762", "0.645488", "0.64542425", "0.64014053", "0.64009976", "0.6349477", "0.63238335", "0.63059103", "0.63032335", "0.62754136", "0.62613064", "0.6251876", "0.6229003", "0.6213749", "0.62122107", "0.62122107", "0.61926633", "0.6183969", "0.616623", "0.61543584", "0.61542183", "0.61324954", "0.61217624", "0.6106201", "0.6102799", "0.6072614", "0.6065377", "0.6064468", "0.60570395", "0.60489446", "0.60489446", "0.60489446", "0.60410494", "0.6037884", "0.603013", "0.59866774", "0.5977828", "0.596412", "0.5959104", "0.59586966", "0.5953837", "0.59345067", "0.59269446", "0.59109414", "0.5906639", "0.58847946", "0.58648556", "0.5864287", "0.58617264", "0.58553016", "0.5855263" ]
0.62827444
58
Get the subscription status.
public function getStatus() { return $this->getParameter('status'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSubscriptionStatus() {\n return $this->subscription_status;\n\n }", "public function getSubscriptionStatus(): string\n {\n return $this->subscriptionStatus;\n }", "public function status_subscription(){\n\t\t\treturn true;\n\t\t}", "function getGatewaySubscriptionStatus()\n\t\t{\n\t\t\tif (is_object($this->Gateway)) {\n\t\t\t\treturn $this->Gateway->getSubscriptionStatus( $this );\n\t\t\t}\n\t\t}", "public function getSubscriptionStatus(SubscriptionRequestEntity $requestEntity);", "function get_subscription_status($subc_id)\n {\n $merchant_id= $this->config->item('auth_merchant_id');\n $merchant_trans_key= $this->config->item('auth_transaction_key');\n\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(\"$merchant_id\");\n $merchantAuthentication->setTransactionKey(\"$merchant_trans_key\");\n // $refId = 'ref' . time();\n $request = new AnetAPI\\ARBGetSubscriptionStatusRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n // $request->setRefId($refId);\n $request->setSubscriptionId(\"$subc_id\");\n $controller = new AnetController\\ARBGetSubscriptionStatusController($request);\n //$response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n $response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\"))\n {\n return $response->getStatus();\n \n }\n else\n {\n\n return \"\";\n\n }\n }", "public function get_subscription_status( $subscription ) {\n\t\treturn is_array( $subscription ) && isset( $subscription['status'] ) ? $subscription['status'] : '';\n\t}", "public function subscriptionStatus($subscription_id)\n {\n $active = $this->fetchSubscriptionDetails($subscription_id);\n return $active->status;\n }", "public function getStatus()\n {\n return $this->_makeCall('status');\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::STATUS);\n }", "public function get_status() {\n return $this->status;\n }", "public function get_status() {\n return $this->_status;\n }", "function get_status() {\n return $this->status;\n }", "public function getStatus()\n\t{\n\t\treturn $this->_sStatus;\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 status() {\r\n\t\treturn self::request(self::HTTP_GET, 'status');\r\n\t}", "public function getStatus() {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->getData('status');\n }", "public function status()\n {\n return $this->_status;\n }", "public function _getStatus() {\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 {\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 }", "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->getIfSet('status');\n }", "public function getStatus()\r\n\t{\r\n\t\treturn $this->_status;\r\n\t}", "function getStatus() {\n\t\treturn $this->getData('status');\n\t}" ]
[ "0.8708604", "0.82055676", "0.74461526", "0.7387184", "0.7224202", "0.7202994", "0.71732104", "0.7020829", "0.6972461", "0.6831829", "0.6831829", "0.6831829", "0.6831829", "0.6802104", "0.6800041", "0.6787", "0.6757285", "0.6726304", "0.6717388", "0.6717388", "0.6717388", "0.6691141", "0.66750085", "0.6662256", "0.66552114", "0.66394806", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6634233", "0.6631883", "0.6626315", "0.6625626" ]
0.0
-1
Set the subscription status.
public function setStatus($value) { return $this->setParameter('status', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSubscriptionStatus($subscription_status) {\n\n $this->subscription_status = $subscription_status;\n\n }", "protected function setSubscriptionStatusData(Subscription $subscription): void\n {\n $this->configureStripeClient();\n $subscriptionData = $subscription->getSubscriptionData();\n $canceledAt = $subscriptionData['canceled_at'];\n $endedAt = $subscriptionData['ended_at'];\n $status = $subscriptionData['status'];\n\n switch ($status) {\n // Somebody didn't manage to provide/authenticate a payment method\n case 'incomplete_expired':\n $subscription->isExpired = true;\n $subscription->dateExpired = $endedAt ? DateTimeHelper::toDateTime($endedAt) : null;\n $subscription->isCanceled = false;\n $subscription->dateCanceled = null;\n $subscription->nextPaymentDate = null;\n break;\n // Definitely not suspended\n case 'active':\n $subscription->isSuspended = false;\n $subscription->dateSuspended = null;\n break;\n // Suspend this and make a guess at the suspension date\n case 'past_due':\n $timeLastInvoiceCreated = $subscriptionData['latest_invoice']['created'] ?? null;\n $dateSuspended = $timeLastInvoiceCreated ? DateTimeHelper::toDateTime($timeLastInvoiceCreated) : null;\n $subscription->dateSuspended = $subscription->isSuspended ? $subscription->dateSuspended : $dateSuspended;\n $subscription->isSuspended = true;\n break;\n case 'canceled':\n $subscription->isExpired = true;\n $subscription->dateExpired = $endedAt ? DateTimeHelper::toDateTime($endedAt) : null;\n }\n\n // Make sure we mark this as started, if appropriate\n $subscription->hasStarted = !in_array($status, ['incomplete', 'incomplete_expired']);\n\n // Update all the other tidbits\n $subscription->isCanceled = (bool)$canceledAt;\n $subscription->dateCanceled = $canceledAt ? DateTimeHelper::toDateTime($canceledAt) : null;\n $subscription->nextPaymentDate = DateTimeHelper::toDateTime($subscriptionData['current_period_end']);\n }", "public function set_status ($status) {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n \n $this->status = $status;\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( $a )\r\n\t{\r\n\t\t$this->_status = $a;\r\n\t}", "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}", "protected static function set_status()\n {\n }", "public function set_status( $status ) {\n\t\t$this->ryte_option[ self::STATUS ] = $status;\n\t}", "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}", "function setStatus($new_status)\n {\n $this->status = $new_status;\n }", "public function setStatus($status);", "public function setStatus($status);", "private function setStatus($status)\n {\n $this->status = $status;\n }", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "public function setStatus(Status $status);", "public function setStatus(string $status): void;", "public function set_status($status)\n {\n $this->status = $status;\n Session::instance()->set(\"hana_status\", $this->status);\n }", "public function status_subscription(){\n\t\t\treturn true;\n\t\t}", "public function setStatus($status)\n {\n $this->feedbackFields['status'] = $status;\n }", "function simplenews_subscription_activate($snids, $status) {\n foreach (simplenews_subscriber_load_multiple($snids) as $subscriber) {\n $subscriber->activated = $status;\n simplenews_subscriber_save($subscriber);\n }\n}", "public function syncStripeStatus()\n {\n $subscription = $this->asStripeSubscription();\n\n $this->stripe_status = $subscription->status;\n\n $this->save();\n }", "public function setStatus( int $status ) : void\n {\n $this->status = $status;\n }", "public function setStatus(int $status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n if (!is_null($status))\n $this->status = $status;\n }", "public static function set_subscription_mode($reactforumid, $status = 1) {\n global $DB;\n return $DB->set_field(\"reactforum\", \"forcesubscribe\", $status, array(\"id\" => $reactforumid));\n }", "public function setStatus(string $status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this['status'] = $status;\n }", "public function setStatus(string $status) : void;", "final public function setStatus(Int $status)\n\t{\n\t\t$this->_status = $status;\n\t}", "protected function setStatus($status)\n {\n $this->file->set('status', $status);\n }", "public function set_status($status) {\n if (!is_integer($status)) { return false; }\n $this->_status = $status;\n return true;\n }", "function set_status($status) {\n if (is_numeric($status)) {\n $status = get_record('helpdesk_status', 'id', $status);\n }\n if (!is_object($status)) {\n error('Status must be an object or id.');\n }\n $this->status = $status;\n return true;\n }", "public function setStatusCode($status);", "abstract public function setStatus($status);", "function setCapturedStatus($status)\r\n\t{\r\n\t\t\r\n\t}", "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($var)\n {\n GPBUtil::checkInt32($var);\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($var)\n {\n GPBUtil::checkString($var, True);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus(Choice $status)\n\t{\n\t\t$this->status=$status; \n\t\t$this->keyModified['status'] = 1; \n\n\t}", "public function getSubscriptionStatus() {\n return $this->subscription_status;\n\n }", "function subscribe() {\n\t\t\t\t\t\t //**Store the status to a global variable - debug purposes\n\t\t\t\t\t\t$GLOBALS['statusmsg'] = $GLOBALS['statusmsg'] . \"SUB-OK|\";\n\t\t\t\t}", "public function setStatus(bool $status);", "public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }", "function setStatus($status) {\n\t\treturn $this->setData('status', $status);\n\t}", "public function changeStatus()\n {\n }", "public function setResponseStatus($status) {}", "function setStatus($status) \n {\n return $this->instance->setStatus($status);\n }", "public function setStatus($value)\n {\n $this->setItemValue('status', ['id' => (int)$value]);\n }", "public function setSubscriptionId(?string $value): void {\n $this->getBackingStore()->set('subscriptionId', $value);\n }", "private function status()\n {\n $this->botman->hears('status', function(BotMan $bot) {\n\n $status = 'subscribed';\n $user = Subscriber::where('telegram_user_id', $bot->getUser()->getId())->first();\n\n if(is_null($user))\n {\n $status = 'unsubscribed';\n }\n\n $bot->reply('status: '. $status);\n });\n }", "private function setStatus($status)\n {\n $this->request->request(\n \"sites/{$this->site->id}/settings\",\n ['method' => 'put', 'form_params' => ['allow_cacheserver' => $status,],]\n );\n }", "public function setCurrentStatus($currentStatus)\n {\n $this->currentStatus = $currentStatus;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "public function setStatus(?OperationStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "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 }", "public function setStatus(?string $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function setStatus(?string $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function setStatus(TaskRunnerStatus $status)\n {\n $this->checkTaskRunnerStatusChangeAvailability($status);\n $this->getConfigService()->setTaskRunnerStatus($status->getGuid(), $status->getAliveSinceTimestamp());\n }", "function setStatus($cod_status){\n\n\t\t$this->status = $cod_status;\n\t\n\t}", "public function setStatus(?LongRunningOperationStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "function setStato($status)\n {\n $this->stato = $status;\n }", "public function setStatus($var)\n {\n GPBUtil::checkBool($var);\n $this->status = $var;\n\n return $this;\n }", "public function changeclientstatus() {\r\n\t\t$this->clients->changeclientstatus();\r\n\t}", "protected function setResponseStatus(ResponseStatus $value)\n {\n $this->responseStatus = $value;\n }", "function it_exchange_paypal_pro_addon_update_subscriber_status( $subscriber_id, $status ) {\n\t$transactions = it_exchange_paypal_pro_addon_get_transaction_id_by_subscriber_id( $subscriber_id );\n\tforeach( $transactions as $transaction ) { //really only one\n\t\t// If the subscription has been cancelled/suspended and fully refunded, they need to be deactivated\n\t\tif ( !in_array( $status, array( 'active', 'deactivated' ) ) ) {\n\t\t\tif ( $transaction->has_refunds() && 0 === it_exchange_get_transaction_total( $transaction, false ) )\n\t\t\t\t$status = 'deactivated';\n\n\t\t\tif ( $transaction->has_children() ) {\n\t\t\t\t//Get the last child and make sure it hasn't been fully refunded\n\t\t\t\t$args = array(\n\t\t\t\t\t'numberposts' => 1,\n\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t);\n\t\t\t\t$last_child_transaction = $transaction->get_children( $args );\n\t\t\t\tforeach( $last_child_transaction as $last_transaction ) { //really only one\n\t\t\t\t\t$last_transaction = it_exchange_get_transaction( $last_transaction );\n\t\t\t\t\tif ( $last_transaction->has_refunds() && 0 === it_exchange_get_transaction_total( $last_transaction, false ) )\n\t\t\t\t\t\t$status = 'deactivated';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdo_action( 'it_exchange_update_transaction_subscription_status', $transaction, $subscriber_id, $status );\n\t}\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 set_status($code)\n {\n }", "public function setActive()\n {\n $this->status = AutoEvent::STATUS_ACTIVE;\n $this->save();\n }", "public function set_status($code)\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 setOnline($status) {\n\t\t$this->data['var isOnline'] = $status ? 'true' : 'false';\n\t}", "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(?array $status): void\n {\n $this->status['value'] = $status;\n }", "protected function set_status($code)\n {\n }", "public static function status($status) {}", "private function changeStatusLicense() {\n if ($this->get_request_method() != \"POST\") {\n $error = array('status_code' => \"0\", 'message' => \"wrong method\", 'response_code' => \"406\");\n $this->response($this->json($error), 406);\n }\n\n $arr = array();\n if(@$_POST['reqparams']) {\n $post = $_POST['reqparams'];\n $LicenseID = $post['LicenseID'];\n $StatusID = $post['StatusID'];\n } else {\n $LicenseID = $_POST['LicenseID'];\n $StatusID = $_POST['StatusID'];\n }\n\n $sql = mysql_query(\"UPDATE `SCP_Licenses` SET `StatusID`='$StatusID' WHERE `LicenseID` = '$LicenseID'\", $this->db);\n\n if($sql) {\n $error = array('status_code' => \"1\", 'status' => \"success\", 'message' => \"Changed License Status Successfully\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n } else {\n $error = array('status_code' => \"0\", 'status' => \"error\", 'message' => \"validation error\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n }\n }", "public function update_status();", "public function change_subadmin_status()\n\t{\n\t\tif ($this->checkLogin('A') == '') \n\t\t{\n\t\t\tredirect('admin');\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$mode = $this->uri->segment(4, 0); \n\t\t\t$adminid = $this->uri->segment(5, 0);\n\t\t\t$status = ($mode == '0') ? 'Inactive' : 'Active';\n\t\t\t$newdata = array('status' => $status); \n\t\t\t$condition = array('id' => $adminid);\n\n\t\t\t$this->subadmin_model->update_details(SUBADMIN, $newdata, $condition);\n\t\t\t$this->setErrorMessage('success', 'Sub Admin Status Changed Successfully');\n\t\t\tredirect('admin/subadmin/display_sub_admin');\n\t\t}\n\t}", "public function setHttpStatus($status)\n {\n $this->httpStatus = $status;\n }", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n\r\n return $this;\r\n }", "public function testSetStatus()\n {\n $this->todo('stub');\n }", "public function setAzureSubscriptionId(?string $value): void {\n $this->getBackingStore()->set('azureSubscriptionId', $value);\n }", "public function setSubscription($subscription) {\n\t\tif (WCF::getUser()->userID && $this->subscribed != $subscription) {\n\t\t\tif (!$subscription) {\n\t\t\t\t// delete notification\n\t\t\t\t$sql = \"DELETE FROM \twbb\".WBB_N.\"_thread_subscription\n\t\t\t\t\tWHERE\t\tuserID = \".WCF::getUser()->userID.\"\n\t\t\t\t\t\t\tAND threadID = \".$this->threadID;\n\t\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// add new notification\n\t\t\t\t$sql = \"INSERT INTO \twbb\".WBB_N.\"_thread_subscription\n\t\t\t\t\t\t\t(userID, threadID, enableNotification)\n\t\t\t\t\tVALUES\t\t(\".WCF::getUser()->userID.\", \".$this->threadID.\", \".WCF::getUser()->enableEmailNotification.\")\";\n\t\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t\t}\n\t\t}\n\t}", "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 }", "public function check_and_update_license_status() {\n\n\t\tswitch ( $status = $this->client->get_status() ) {\n\n\t\t\tcase 'valid' :\n\t\t\tcase 'expired' :\n\t\t\t\t$this->set_license_status( $status );\n\t\t\t\tbreak;\n\t\t\tcase 'site_inactive' :\n\t\t\t\tif ( ! is_wp_error( $this->client->activate() ) ) {\n\t\t\t\t\t$this->set_license_status( 'valid' );\n\t\t\t\t} else {\n\t\t\t\t\t$this->set_license_status( $status );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->set_license_status( 'invalid' );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "public function setSessionStatus($sessionStatus)\n {\n $this->m_sessionStatus = (int) $sessionStatus;\n }", "public function setDocumentStatus(DocumentStatus $documentStatus): void\n {\n $this->documentStatus = $documentStatus;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\\sprintf(__METHOD__.\" set to '%s'\", \"DocumentStatus\"));\n }" ]
[ "0.6746909", "0.66943824", "0.66855437", "0.6602242", "0.65964264", "0.6588046", "0.6580513", "0.65559995", "0.65559995", "0.65559995", "0.65559995", "0.65474576", "0.6535473", "0.6503861", "0.6475686", "0.64527154", "0.6423227", "0.6414667", "0.6414667", "0.63991314", "0.6394409", "0.6295136", "0.62877107", "0.6286093", "0.6242643", "0.6235032", "0.62335587", "0.6223412", "0.6216448", "0.62096363", "0.6194798", "0.6151509", "0.61455506", "0.61331743", "0.61270386", "0.61254394", "0.6097447", "0.6092293", "0.6071828", "0.60606384", "0.6054996", "0.60366106", "0.60248494", "0.6008634", "0.6007754", "0.6007754", "0.59760916", "0.59648114", "0.59487814", "0.5946108", "0.5928023", "0.5917947", "0.58964556", "0.585291", "0.5801717", "0.5791897", "0.57845575", "0.5753447", "0.57470566", "0.57412344", "0.57357335", "0.57357335", "0.572923", "0.57189304", "0.57018244", "0.57018244", "0.5698667", "0.5696538", "0.5684157", "0.5679605", "0.56790257", "0.5677809", "0.5666213", "0.5659461", "0.56589746", "0.5645872", "0.5645587", "0.5643893", "0.5639392", "0.5634783", "0.56341636", "0.56341636", "0.56341636", "0.56221884", "0.56068015", "0.5605357", "0.5604775", "0.5603701", "0.55953085", "0.55694515", "0.55662733", "0.5563147", "0.5536883", "0.5536636", "0.5529022", "0.5529022", "0.5529022", "0.5529022", "0.55282617", "0.55256945", "0.5523634" ]
0.0
-1
getSiblings returns a collection of this node's siblings
public function getSiblings(): CollectionAbstractInterface { if ($this->getTree()->rootTest($this)) { /** @var CollectionType $collection */ $collection = $this->tree->makeCollection(); $collection->push($this); } else { /** @var NodeType $parent */ $parent = $this->getParent(); /** @var CollectionType $collection */ $collection = $parent->getChildren(); } return $collection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSiblings($includeNode = false);", "public function getSiblings($level = 1)\n {\n \t$parent = $this->getParent();\n \tif(is_null($parent))\n \t{\n\n \t\treturn array($this);\n \t}\n return array_unique($parent->getChildren());\n \n\n }", "public function siblings($self = true) {\n return $self ? $this->parent->children() : $this->parent->children()->not($this);\n }", "public function getNonDefaultSiblings()\n {\n return $this->non_default_siblings;\n }", "public function getSiblings(NodeInterface $node)\r\n {\r\n $params = compact('node');\r\n $event = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this, $params);\r\n if ($event->stopped()) {\r\n return $event->last();\r\n }\r\n\r\n $result = $this->mapper->getSiblings($node);\r\n\r\n $params['__RESULT__'] = $result;\r\n $this->getEventManager()->trigger(__FUNCTION__.'.post', $this, $params);\r\n\r\n return $result;\r\n }", "function getSiblings($name)\n\t\t{\n\t\t\t$name = trim(strtolower($name));\n\t\t\t$par = $this->getParents(trim($name));\n\t\t\tif (empty($par)) \n\t\t\t{\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\t\n\t\t\t$all_children = $this->getChildren($par['mother']);\n\t\t\tforeach ($all_children as $key => $value) \n\t\t\t{\n\t\t\t\tif($value[\"name\"] == $name)\n\t\t\t\t{\n\t\t\t\t\tunset($all_children[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $all_children;\n\t\t}", "public function getSiblings($unpublished = false) {\n\t\tif ($this->siblings === null) {\n\t\t\t$list = new Document\\Listing();\n\t\t\t$list->setUnpublished($unpublished);\n\t\t\t// string conversion because parentId could be 0\n\t\t\t$list->addConditionParam(\"parentId = ?\", (string)$this->getParentId());\n\t\t\t$list->addConditionParam(\"id != ?\", $this->getId());\n\t\t\t$list->setOrderKey(\"index\");\n\t\t\t$list->setOrder(\"asc\");\n\t\t\t$this->siblings = $list->load();\n\t\t}\n\t\treturn $this->siblings;\n\t}", "public function hasNextSiblings();", "public function siblings ($selector = null) { \r\n\t\t\r\n\t\t$list = new XDTNodeList();\r\n\t\t\r\n\t\tforeach ($this as $node) {\r\n\t\t\t\r\n\t\t\t$node = $this->initListObject($node);\r\n\t\t\t$list->merge($node->parent()->children());\r\n\t\t}\r\n\t\t\r\n\t\tif (!isset($selector)) return $list;\r\n\t\t\r\n\t\treturn $list->filter($selector);\r\n\t}", "public function hasSiblings();", "public function hasSiblings() {}", "public function getChildNodes()\n {\n return array_values($this->getChildNodesById());\n }", "public function getSiblings()\n\t{\n\t\t$folderFiles = $this->Parent->Files;\n\t\tforeach ($folderFiles as $key => $item) {\n\t\t\tif ($this->name == $item->name) {\n\t\t\t\t$prev = $key - 1;\n\t\t\t\t$current = $key + 1;\n\t\t\t\t$next = $key + 1;\n\t\t\t}\n\t\t}\n\t\tif ($next >= count($folderFiles)) {\n\t\t\t$next = 0;\n\t\t}\n\t\tif ($prev < 0) {\n\t\t\t$prev = count($folderFiles) - 1;\n\t\t}\n\n\t\t$result = new stdClass();\n\t\t$result->next = $folderFiles[$next];\n\t\t$result->previous = $folderFiles[$prev];\n\t\t$result->current = $current;\n\t\t$result->count = count($folderFiles);\n\n\t\treturn $result;\n\t}", "function & get_siblings($id, $add_sql = array())\r\n\t{\r\n\t\tif (!($sibling = $this->get_node($id)))\r\n\t\t{\r\n \tdebug :: write_error(NESE_ERROR_NOT_FOUND,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('id' => $id)\r\n \t);\n \treturn false;\r\n\t\t} \r\n\r\n\t\t$parent = $this->get_parent($sibling['id']);\r\n\t\treturn $this->get_children($parent['id'], $add_sql);\r\n\t}", "public function getSiblings(array $columns = ['*']);", "public function countSiblings();", "public function getNextSibling();", "public function sibling(){\n\t\treturn parent::sibling();\n\t}", "public function sibling(){\n\t\treturn parent::sibling();\n\t}", "public function getPrevSibling();", "public function getNextSiblings($node, $includeSelf = false)\n {\n return $this->getNextSiblingsQuery($node, $includeSelf)->toArray();\n }", "public function getChildNodes();", "public function getChildNodes() : array {\n return $this->childNodes;\n }", "public function getParents()\r\n\t{\r\n\t\treturn $this->parentNodes;\r\n\t}", "public function getChilds()\n {\n return $this->childs;\n }", "public function hasNextSibling();", "public function siblings($self = FALSE, $direction = 'ASC')\n {\n $object_id = \"siblings_$self-$direction\";\n if (! in_array($object_id, $this->_objects))\n {\n if ( !$this->loaded )\n $this->reload();\n\n $parent = $this->parent;\n\n $sql = \"SELECT * FROM $this->_table_name\n WHERE\n $this->left_column > $parent->left\n AND $this->right_column < $parent->right\n AND $this->scope_column = $this->scope\n AND $this->level_column = $this->level\n \";\n \n if ( ! $self)\n {\n $sql .= \"AND $this->primary_column <> $this->primary_key \\n\";\n }\n \n $sql .= \"ORDER BY $this->left_column $direction\";\n\n $result = $this->_db->query($sql);\n $this->_objects[$object_id] = $this->_db_object($result);\n }\n\n return $this->_objects[$object_id];\n }", "public function getChildNodes() {}", "public function getChildNodes() {}", "public function hasSiblings() {\n\t\tif(is_bool($this->hasSiblings)){\n\t\t\tif(($this->hasSiblings and empty($this->siblings)) or (!$this->hasSiblings and !empty($this->siblings))){\n\t\t\t\treturn $this->getResource()->hasSiblings();\n\t\t\t} else {\n\t\t\t\treturn $this->hasSiblings;\n\t\t\t}\n\t\t}\n\t\treturn $this->getResource()->hasSiblings();\n\t}", "public function selectSiblingElements ( $F = null ) {\n\n return $this->getStream()->selectSiblingElements($F);\n }", "function getChildNodes() ;", "public function getAllChildNode()\r\n {\r\n return $this->_childNodes;\r\n }", "public function children() {\n return $this->descendants(1);\n }", "public function countNextSiblings();", "public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}", "public function getChildren()\r\n\t{\r\n\t\treturn $this->childrenNodes;\r\n\t}", "public function getChilds() {\n return $this->__childs;\n }", "function get_siblings( $id, $type = 'entry_id')\n\t{\n\t\t$siblings = array();\n\t\t$this_node = $this->get_node($id, $type);\n\t\tif($this_node['parent'])\n\t\t{\n\t\t\tee()->db->order_by(\"lft\", \"asc\"); \n\t\t\t$siblings = ee()->db->get_where( \n\t\t\t\t$this->tree_table, \n\t\t\t\tarray('parent' => $this_node['parent'])\n\t\t\t)->result_array();\n\t\t}\n\t\treturn $siblings;\n\t}", "public function getPrevSiblings($node, $includeSelf = false)\n {\n return $this->getPrevSiblingsQuery($node, $includeSelf)->toArray();\n }", "public function getChildren()\n\t{\n\t\treturn $this->current()->getIterator();\n\t}", "public function countPrevSiblings();", "public function getElementsNodes()\n {\n if (null === $this->elementNodes) {\n $this->elementNodes = $this->fetchElementNodes();\n }\n\n return $this->elementNodes;\n }", "public function getChildren () {\n return $this->current ();\n }", "public function hasPrevSiblings();", "public function getNextSiblings(array $columns = ['*']);", "public function getChildNodesById()\n {\n if (! $this->_allChildrenKnown) {\n $this->loadChildNodes();\n }\n return $this->_childNodesById;\n }", "public function nextSibling()\n {\n return $this->adjacentSibling(1);\n }", "public function getSubNodeNames();", "public function getNodes();", "public function getPrevSiblings(array $columns = ['*']);", "public function testGetAllNodesBetweenSiblings(): void\n {\n $html = new ElementFinder('\n <html>\n <h2>Title1</h2>\n <p>Text 1</p>\n <h2>Title2</h2>\n <p>Text 2</p>\n <h2>Title3</h2>\n <p>Text 3</p>\n <h2>Title4</h2>\n <p>Text 4</p>\n <h2>Title5</h2>\n </html>\n ');\n $ns1 = '//*/h2[1]/following-sibling::p';\n $ns2 = '//*/h2[count(//h2)]/preceding-sibling::p';\n $result = $html->value($ns1 . '[count(.|' . $ns2 . ') = count(' . $ns2 . ')]')->all();\n\n self::assertCount(4, $result);\n self::assertEquals($result[0], 'Text 1');\n self::assertEquals($result[3], 'Text 4');\n }", "public function getNodes()\n {\n return $this->nodes;\n }", "public function getNodes()\n {\n return $this->nodes;\n }", "public function getNodes()\n\t{\n\t\treturn $this->nodes;\n\t}", "public function getDescendants();", "public function addSiblings(array $siblings, $from = null);", "public function getNextSibling()\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->leftAttribute).'='.($owner->{$this->rightAttribute}+1));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner->find();\n\t}", "public function getNextSiblingsQuery($node, $includeSelf = false)\n {\n return $this->getNextSiblingsQueryBuilder($node, $includeSelf)->getQuery();\n }", "public function getParents()\n {\n return $this->parents;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "protected function getShiftingNodes()\n {\n $limits = $this->getShiftingIndexesLimits();\n return $this->getNodesBetween($limits['min'], $limits['max']);\n }", "public function children()\r\n\t{\r\n\t\treturn $this->children;\r\n\t}", "public function grandChildren()\n {\n return $this->children()->children();\n }", "public function getChildren(): array {\n return iterator_to_array(clone $this->children);\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->_children;\n }", "public function getChildren() \n {\n return $this->children;\n }", "public function get_child_nodes_recursive() {\n\t\t$nodes = array();\n\n\t\tforeach ( $this->child_nodes as $node ) {\n\t\t\t$nodes[ $node->get_code() ] = $node;\n\n\t\t\t$nodes = array_merge( $nodes, $node->get_child_nodes_recursive() );\n\t\t}\n\n\t\treturn $nodes;\n\t}", "public function get_children();", "public function getChildrenForQUISite()\n {\n $Project = $this->getProject();\n\n // start\n try {\n $startId = $this->getAttribute('startId');\n\n if (Utils::isSiteLink($startId)) {\n $Site = Utils::getSiteByLink($startId);\n } else {\n $Site = $Project->get((int)$startId);\n }\n } catch (QUI\\Exception $Exception) {\n QUI\\System\\Log::addWarning($Exception->getMessage());\n\n return [];\n }\n\n return $this->getChildren($Site);\n }", "public function getChildren() {\n\t\treturn $this->children;\n\t}", "public function getChildren() {\n\t\treturn $this->children;\n\t}", "public function testGetSibling_DifferentConditions()\n\t{\n\t\t$this->object->AddSibling($this->sibling);\n\t\t$this->object->AddSibling($this->sibling2);\n\t\t$this->object->Save();\n\t\t$siblingList = $this->object->GetSiblingList(array(array(\"attribute\", \"=\", \"sibling att\")));\n\t\t$this->assertEquals(1, sizeof($siblingList));\n\t\t$siblingList = $this->object->GetSiblingList(array(array(\"attribute\", \"=\", \"sibling att2\")));\n\t\t$this->assertEquals(1, sizeof($siblingList));\n\t}", "public function get_children() {\n\t\treturn $this->children;\n\t}", "public function grandChildren() {\n return $this->children()->children();\n }", "public function getNodes(){\n\t\treturn $this->nodes;\n\t}", "public function getEleves()\n {\n return $this->eleves;\n }", "public function findChildren()\n {\n return self::where('code_parrent',$this->id)->get();\n }", "public function getLineage(): array\n {\n $lineage = [$this];\n\n $element = $this;\n while ($element->hasParent()) {\n array_unshift($lineage, $element->getParent());\n $element = $element->getParent();\n }\n\n return $lineage;\n }", "public function iterateChildren();", "public function neighbors()\n {\n $parent = $this->parent;\n $exclude = $this->term_id;\n\n $query = static::where('term_id', '!=', $exclude);\n\n return $parent ? $query->where('parent', $parent) : $query->whereNull('parent');\n }", "public function setNonDefaultSiblings($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::BYTES);\n $this->non_default_siblings = $arr;\n\n return $this;\n }", "public function children()\n {\n $this->buildTree();\n return $this->childrenInternal();\n }", "public function getIterator()\n {\n $elements = new NodeList();\n if ($this->node->hasChildNodes()) {\n foreach ($this->node->childNodes as $node) {\n $elements[] = new Element($node);\n }\n }\n\n return $elements;\n }", "public function getChildren() {\n $childNodes = $this->getNode()->getChildren();\n $children = array();\n foreach ($childNodes as $childNode) {\n $child = $childNode->getPage($this->getLang());\n if ($child) {\n $children[] = $child;\n }\n }\n return $children;\n }", "public function getChildren() {\n\t\treturn $this->_children;\n\t}", "public function step_sibling(){\n\t\treturn parent::step_sibling();\n\t}", "public function step_sibling(){\n\t\treturn parent::step_sibling();\n\t}", "function &getLeftSibling()\n\t{\n\t\tif (!is_object($this->_item)) {\n\t\t\t$this->getCategory();\n\t\t}\n\n\t\treturn $this->_leftsibling;\n\t}", "function &getLeftSibling()\n\t{\n\t\tif (!is_object($this->_item))\n\t\t{\n\t\t\t$this->getCategory();\n\t\t}\n\n\t\treturn $this->_leftsibling;\n\t}" ]
[ "0.76249135", "0.744986", "0.72541404", "0.70989203", "0.701556", "0.68783224", "0.6876601", "0.6756548", "0.6668931", "0.6590744", "0.6581523", "0.65605664", "0.646825", "0.64154106", "0.639538", "0.63541013", "0.6270781", "0.6246842", "0.6246842", "0.613654", "0.60823673", "0.6076989", "0.6007464", "0.59401417", "0.59367186", "0.5918686", "0.5902895", "0.59025776", "0.5902465", "0.59008765", "0.5889494", "0.58653855", "0.584082", "0.5833821", "0.58158976", "0.5767565", "0.57371604", "0.57248706", "0.5700279", "0.56506425", "0.56135345", "0.5576573", "0.55547273", "0.55322146", "0.55292434", "0.5519697", "0.5509871", "0.549623", "0.54484224", "0.5443574", "0.5423626", "0.54146093", "0.5412194", "0.5412194", "0.5394111", "0.5376045", "0.53619856", "0.53431785", "0.5334032", "0.53244865", "0.53073865", "0.53073865", "0.53073865", "0.53073865", "0.53073865", "0.53073865", "0.53073865", "0.53073865", "0.5286577", "0.5286577", "0.52812123", "0.5280138", "0.52787334", "0.52693945", "0.5255577", "0.5251061", "0.5248105", "0.5243424", "0.52287763", "0.5227977", "0.5227342", "0.5227342", "0.5223567", "0.5214994", "0.5207176", "0.52050006", "0.5201688", "0.51811016", "0.5178513", "0.5170146", "0.51678884", "0.51664203", "0.5149049", "0.5146014", "0.51453483", "0.5141554", "0.5129646", "0.5129646", "0.51249695", "0.5123338" ]
0.5888714
31
Settings for UploadFields : Main Image
function getCMSFields() { $f = new FieldList(); $image_field = new UploadField('SlideImage', _t('Content.SLIDEIMAGE','Slide image')); $image_field->getValidator()->allowedExtensions = array('jpg', 'gif', 'png'); $image_field->setFolderName('Uploads/sliderimages'); // DropDown to select link from SiteTree $treedropdownfield = new TreeDropdownField('ButtonLinkLocID', 'Button link location', 'SiteTree'); // Create Tabs $t = new TabSet( 'Root', new Tab( 'Main', new TextField("Heading", _t('Content.HEADING','Heading of Slide')), new TextField("Subtitle", _t('Content.SUBTITLE','Subtitle of Slide')), new HTMLEditorField("SlideContent", _t('Content.CONTENT','HTML-content to slide')), new TextField("ButtonText", _t('Content.BUTTONTEXT','Button text')), $treedropdownfield, new DropdownField('SlideTxtDisplay', _t('Content.SLIDETXTDISPLAY','Enable Texts over slide'),singleton('JumbotronSlideshowSlide')->dbObject('SlideTxtDisplay')->enumValues()), new CheckboxField('Published', _t('Content.PUBLISHED','Is item published?')) ), new Tab( 'Image', $image_field ), new Tab( 'FX', new DropdownField('SlideEffect', _t('Content.SLIDEEFFECT','SlideEffect'),singleton('JumbotronSlideshowSlide')->dbObject('SlideEffect')->enumValues()) ) ); $f->push($t); return $f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'carousel_upload';\n $data['ret_Url'] = 'carousel_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }", "protected function getFileFieldSettings() { ?>\n\t\t<div class=\"form-group\" v-if=\"['job_logo', 'job_cover', 'job_gallery'].indexOf(field.slug) <= -1\">\n\t\t\t<label>Allowed file types</label>\n\t\t\t<select multiple=\"multiple\" v-model=\"field.allowed_mime_types_arr\" @change=\"editFieldMimeTypes($event, field)\">\n\t\t\t\t<?php foreach ( (array) get_allowed_mime_types() as $extension => $mime ): ?>\n\t\t\t\t\t<option value=\"<?php echo \"{$extension} => {$mime}\" ?>\"><?php echo $mime ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</select>\n\t\t\t<br><br>\n\t\t\t<label><input type=\"checkbox\" v-model=\"field.multiple\" class=\"form-checkbox\"> Allow multiple files?</label>\n\t\t</div>\n\t\t<div class=\"form-group\" v-show=\"field.multiple\">\n\t\t\t<label>Maximum number of uploads allowed</label>\n\t\t\t<input type=\"number\" v-model=\"field.file_limit\" style=\"width: 100px; margin: 0;\">\n\t\t</div>\n\t<?php }", "function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'coupon_upload';\n $data['ret_Url'] = 'coupon_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }", "function Trigger_ImageUpload1(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo2\");\r\r\n $uploadObj->setDbFieldName(\"photo2\");\r\r\n $uploadObj->setFolder(\"../assets/images/magasins/\");\r\r\n $uploadObj->setMaxSize(1000);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "public function defaultMediaSetting() {\n\t\tupdate_option( 'image_default_align', 'center' );\n\t\tupdate_option( 'image_default_link_type', 'none' );\n\t\tupdate_option( 'image_default_size', 'full' );\n\t}", "protected function configureFormFields(FormMapper $formMapper)\n {\n $image = $this->getSubject();\n $fileFieldOptions = array('required' => true);\n if ($image && ($webPath = $image->getWebPath())) {\n $fileFieldOptions['help'] = '\n <div style=\"width: 192px; height: 192px; overflow: hidden; position: relative;\" id=\"bestuursImageContainer\">\n <img src=\"'.$image->getWebPath().'\" style=\"position: relative; left: 0px; top: 0px;\" id=\"bestuursImage\" />\n <img src=\"/bundles/sit/images/bestuur_overlay.png\" style=\"position: absolute; left: 0px; top: 0px; cursor: move\" id=\"overlayImage\" />\n </div>\n \n <script type=\"text/javascript\">\n var xMousePos = 0;\n var yMousePos = 0;\n var lastScrolledLeft = 0;\n var lastScrolledTop = 0;\n \n function adjustEdges() {\n if(parseInt($(\"#bestuursImage\").css(\"left\".replace(\"px\",\"\"))) > 0) {\n $(\"#bestuursImage\").css(\"left\", \"0px\");\n }\n if(parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))) > 0) {\n $(\"#bestuursImage\").css(\"top\", \"0px\");\n }\n if($(\"#bestuursImage\").height() - parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))) * -1 < 192) {\n $(\"#bestuursImage\").css(\"top\", \"-\" +($(\"#bestuursImage\").height() - 192)+\"px\");\n }\n if($(\"#bestuursImage\").width() - parseInt($(\"#bestuursImage\").css(\"left\".replace(\"px\",\"\"))) * -1 < 192) {\n $(\"#bestuursImage\").css(\"left\", \"-\" +($(\"#bestuursImage\").width() - 192)+\"px\");\n }\n }\n \n $(document).ready(function() {\n if($(\".hidden_width\").val() != 0)\n $(\"#bestuursImage\" ).css(\"width\", $(\".hidden_width\").val() + \"px\");\n $(\"#bestuursImage\" ).css(\"left\", $(\".hidden_left\").val() + \"px\");\n $(\"#bestuursImage\" ).css(\"top\", $(\".hidden_top\").val() + \"px\");\n $(\"#bestuursImage\" ).draggable({\n cursor: \"move\",\n stop: function( event, ui ){\n adjustEdges();\n \n $(\".hidden_width\").val(parseInt($(\"#bestuursImage\").css(\"width\".replace(\"px\",\"\"))));\n $(\".hidden_left\").val(parseInt($(\"#bestuursImage\").css(\"left\".replace(\"px\",\"\"))));\n $(\".hidden_top\").val(parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))));\n }\n });\n });\n \n $(\\'#overlayImage\\').mousedown(function(ev) {\n $(\\'#bestuursImage\\').trigger(ev);\n });\n \n $(document).bind(\\'mousewheel\\', function(e){\n \n var parentOffset = $(\"#bestuursImageContainer\").parent().offset(); \n var relX = xMousePos - parentOffset.left;\n var relY = yMousePos - parentOffset.top;\n \n if(relX < 0 || relX < 0 || relX < $(\"#bestuursImageContainer\").width() || relY < $(\"#bestuursImageContainer\").height()) {\n if(e.originalEvent.wheelDelta /120 > 0) { //Scroll up\n if($(\"#bestuursImage\").width() + 20 >= 192) {\n var orgHeight = $(\"#bestuursImage\").height();\n $(\"#bestuursImage\").css(\"width\", $(\"#bestuursImage\").width() + 20);\n $(\"#bestuursImage\").css(\"left\", (parseInt($(\"#bestuursImage\").css(\"left\").replace(\"px\",\"\")) - 10) + \"px\");\n $(\"#bestuursImage\").css(\"top\", (parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))) + (orgHeight - $(\"#bestuursImage\").height()) / 2));\n }\n //Terugzetten als het te klein is geworden\n if($(\"#bestuursImage\").height() < 192){\n var orgHeight = $(\"#bestuursImage\").height();\n $(\"#bestuursImage\").css(\"width\", $(\"#bestuursImage\").width() - 20);\n $(\"#bestuursImage\").css(\"left\", (parseInt($(\"#bestuursImage\").css(\"left\").replace(\"px\",\"\")) + 10) + \"px\");\n $(\"#bestuursImage\").css(\"top\", (parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))) + (orgHeight - $(\"#bestuursImage\").height()) / 2));\n } \n }else{\n if($(\"#bestuursImage\").width() - 20 >= 192) {\n var orgHeight = $(\"#bestuursImage\").height();\n $(\"#bestuursImage\").css(\"width\", $(\"#bestuursImage\").width() - 20);\n $(\"#bestuursImage\").css(\"left\", (parseInt($(\"#bestuursImage\").css(\"left\").replace(\"px\",\"\")) + 10) + \"px\");\n $(\"#bestuursImage\").css(\"top\", (parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))) + (orgHeight - $(\"#bestuursImage\").height()) / 2));\n }\n //Terugzetten als het te klein is geworden\n if($(\"#bestuursImage\").height() < 192){\n var orgHeight = $(\"#bestuursImage\").height();\n $(\"#bestuursImage\").css(\"width\", $(\"#bestuursImage\").width() + 20);\n $(\"#bestuursImage\").css(\"left\", (parseInt($(\"#bestuursImage\").css(\"left\").replace(\"px\",\"\")) - 10) + \"px\");\n $(\"#bestuursImage\").css(\"top\", (parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))) + (orgHeight - $(\"#bestuursImage\").height()) / 2));\n } \n }\n adjustEdges();\n \n $(\".hidden_width\").val(parseInt($(\"#bestuursImage\").css(\"width\".replace(\"px\",\"\"))));\n $(\".hidden_left\").val(parseInt($(\"#bestuursImage\").css(\"left\".replace(\"px\",\"\"))));\n $(\".hidden_top\").val(parseInt($(\"#bestuursImage\").css(\"top\".replace(\"px\",\"\"))));\n }\n \n });\n \n $(document).on(\\'scroll\\', function(e) {\n if(lastScrolledLeft != $(document).scrollLeft()){\n xMousePos -= lastScrolledLeft;\n lastScrolledLeft = $(document).scrollLeft();\n xMousePos += lastScrolledLeft;\n }\n if(lastScrolledTop != $(document).scrollTop()){\n yMousePos -= lastScrolledTop;\n lastScrolledTop = $(document).scrollTop();\n yMousePos += lastScrolledTop;\n }\n });\n \n $(document).mousemove(function(event) {\n captureMousePosition(event);\n });\n \n function captureMousePosition(event){\n xMousePos = event.pageX;\n yMousePos = event.pageY;\n }\n \n </script>';\n $fileFieldOptions['required'] = false;\n }\n if($this->isGranted('FIELD_NAAM'))\n $formMapper->add('naam');\n if($this->isGranted('FIELD_FUNCTIE'))\n $formMapper->add('functie');\n if($this->isGranted('FIELD_POSITIE'))\n $formMapper->add('positie');\n if($this->isGranted('FIELD_FBLINK'))\n $formMapper->add('fblink', null, array('label' => 'Facebook URL'));\n if($this->isGranted('FIELD_INLINK'))\n $formMapper->add('inlink', null, array('label' => 'Linkedin URL'));\n if($this->isGranted('FIELD_FILE'))\n $formMapper->add('file', 'file', $fileFieldOptions);\n\n $formMapper->add('l', 'hidden', array('attr' => [\"class\" => \"hidden_left\"]));\n $formMapper->add('t', 'hidden', array('attr' => [\"class\" => \"hidden_top\"]));\n $formMapper->add('w', 'hidden', array('attr' => [\"class\" => \"hidden_width\"]));\n\n }", "function Trigger_ImageUpload2(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo3\");\r\r\n $uploadObj->setDbFieldName(\"photo3\");\r\r\n $uploadObj->setFolder(\"../assets/images/magasins/\");\r\r\n $uploadObj->setMaxSize(1000);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "function x_control_image( $settings = array() ) {\n\n // Setup\n // -----\n\n $t_pre = ( isset( $settings['t_pre'] ) ) ? $settings['t_pre'] . ' ' : '';\n $k_pre = ( isset( $settings['k_pre'] ) ) ? $settings['k_pre'] . '_' : '';\n $group = ( isset( $settings['group'] ) ) ? $settings['group'] : 'general';\n $options = ( isset( $settings['options'] ) ) ? $settings['options'] : array();\n $condition = ( isset( $settings['condition'] ) ) ? $settings['condition'] : array();\n $is_retina = ( isset( $settings['is_retina'] ) ) ? true : false;\n $width = ( isset( $settings['width'] ) ) ? true : false;\n $height = ( isset( $settings['height'] ) ) ? true : false;\n $has_link = ( isset( $settings['has_link'] ) ) ? true : false;\n $has_info = ( isset( $settings['has_info'] ) ) ? true : false;\n $alt_text = ( isset( $settings['alt_text'] ) ) ? true : false;\n\n\n // Data\n // ----\n\n $data = array(\n 'type' => 'image',\n 'title' => __( $t_pre . 'Image', '__x__' ),\n 'group' => $group,\n 'options' => $options,\n 'conditions' => x_module_conditions( $condition ),\n );\n\n\n // Keys\n // ----\n\n $keys = array(\n 'img_source' => $k_pre . 'image_src',\n );\n\n if ( $is_retina === true ) {\n $keys['is_retina'] = $k_pre . 'image_retina';\n }\n\n if ( $width === true ) {\n $keys['width'] = $k_pre . 'image_width';\n }\n\n if ( $height === true ) {\n $keys['height'] = $k_pre . 'image_height';\n }\n\n if ( $has_link === true ) {\n $keys['has_link'] = $k_pre . 'image_link';\n }\n\n if ( $has_info === true ) {\n $keys['has_info'] = $k_pre . 'image_info';\n }\n\n if ( $alt_text === true ) {\n $keys['alt_text'] = $k_pre . 'image_alt';\n }\n\n $data['keys'] = $keys;\n\n\n // Returned Value\n // --------------\n\n $control = array( $data );\n\n return $control;\n\n}", "function Trigger_ImageUpload3(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"logo\");\r\r\n $uploadObj->setDbFieldName(\"logo\");\r\r\n $uploadObj->setFolder(\"assets/images/magasins/\");\r\r\n $uploadObj->setResize(\"true\", 400, 400);\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'user_upload';\n $data['ret_Url'] = 'user_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }", "public function SetimageMainAction() {\n $id = $this->getRequest()->request->get('id');\n $image_id = $this->getRequest()->request->get('image_id');\n $em = $this->getDoctrine()->getManager();\n $em->getRepository('MediaBundle:Image')->setMainImage('CMSBundle:Publication', $id, $image_id);\n }", "protected function configureFormFields(FormMapper $formMapper)\n {\n // get the current Image instance\n $image = $this->getSubject();\n\n // use $fileFieldOptions so we can add other options to the field\n $fileFieldOptions = array('required' => false);\n if ($image && ($webPath = $image->getThumbWebPath())) {\n // get the container so the full path to the image can be set\n $container = $this->getConfigurationPool()->getContainer();\n $fullPath = $container->get('request')->getBasePath().'/'.$webPath;\n\n // add a 'help' option containing the preview's img tag\n \t$fileFieldOptions['help'] = '<img src=\"'.$fullPath.'\" class=\"admin-preview\" />';\n\t\t\t$fileFieldOptions['label'] = 'Иконка';\n\t\t}\n\t\t\t\t\n\t\t\n\t\t$videoFieldOptions = array('required' => false);\n if ($image && ($webPath = $image->getVideoWebPath())) {\n // get the container so the full path to the image can be set\n $container = $this->getConfigurationPool()->getContainer();\n $fullPath = $container->get('request')->getBasePath().'/'.$webPath;\n\n // add a 'help' option containing the preview's img tag\n \t$videoFieldOptions['help'] = '<video id=\"sampleMovie\" width=\"640\" height=\"360\" preload controls><source src=\"'.$fullPath.'\" /></video>';\n\t\t\t$videoFieldOptions['label'] = 'Видео';\n\t\t}\t\t\n\t\t\n\t\t\t\t\n $formMapper\n ->add('name_rus', 'text', array('label' => 'Имя книги (RU)'))\n ->add('name_eng', 'text', array('label' => 'Имя книги (ENG)'))\t\t\t\t\n ->add('description_rus', 'textarea', array('label' => 'Описание книги (RU)'))\n ->add('description_eng', 'textarea', array('label' => 'Описание книги (ENG)'))\t\t\t\t\n\t\t\t->add('education', 'choice', array(\n\t\t 'choices' => array(\n\t\t '0' => 'Нет',\n\t\t '1' => 'Да',\n\t\t ),\n\t\t 'empty_value' => false,// unset this and empty would work also\n\t\t 'required' => false,\n\t\t\t\t\t'label' => 'Обучающая'\t\t\t\t\t\n\t\t ))\t\t\t\t\n ->add('itunesurl_rus', 'text', array('label' => 'Ссылка в AppStore (RU)'))\t\t\t\t\n ->add('itunesurl_eng', 'text', array('label' => 'Ссылка в AppStore (ENG)'))\t\t\t\t\t\t\t\t\t\t\n ->add('scheme')\n\t\t\t->add('thumb', 'file', $fileFieldOptions)\n\t\t\t->add('video', 'file', $videoFieldOptions)\n\t\t\t\t\n ;\n }", "function Trigger_ImageUpload(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo1\");\r\r\n $uploadObj->setDbFieldName(\"photo1\");\r\r\n $uploadObj->setFolder(\"../assets/images/magasins/\");\r\r\n $uploadObj->setMaxSize(1000);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "public function testFileImageFormatterSettings() {\n $assert_session = $this->assertSession();\n $account = $this->drupalCreateUser([\n 'administer file display'\n ]);\n\n $this->drupalLogin($account);\n $this->drupalGet('admin/structure/file-types/manage/image/edit/display');\n $assert_session->pageTextContains('Field used for the image title attribute: field_image_title_text');\n $assert_session->pageTextContains('Field used for the image title attribute: field_image_title_text');\n\n $this->drupalPostForm(NULL, [], 'uri_settings_edit');\n $assert_session->assertWaitOnAjaxRequest();\n $assert_session->responseContains('fields[uri][settings_edit_form][settings][title]');\n $assert_session->responseContains('fields[uri][settings_edit_form][settings][alt]');\n\n $edit = [\n 'fields[uri][settings_edit_form][settings][title]' => '_none',\n 'fields[uri][settings_edit_form][settings][alt]' => '_none',\n ];\n $this->drupalPostForm(NULL, $edit, 'Update');\n $assert_session->assertWaitOnAjaxRequest();\n $this->drupalPostForm(NULL, [], 'Save');\n $assert_session->assertWaitOnAjaxRequest();\n $assert_session->pageTextContains('Title attribute is hidden.');\n $assert_session->pageTextContains('Alt attribute is hidden.');\n\n $this->drupalLogin($this->drupalCreateUser(['create files']));\n $test_file = $this->getTestFiles('image');\n $this->drupalGet('file/add');\n $page = $this->getSession()->getPage();\n $page->attachFileToField('files[upload]', $this->container->get('file_system')->realpath($test_file[0]->uri));\n $assert_session->assertWaitOnAjaxRequest();\n $this->drupalPostForm(NULL, [], 'Next');\n $assert_session->assertWaitOnAjaxRequest();\n $assert_session->pageTextContains('Destination');\n $this->drupalPostForm(NULL, [], 'Next');\n $edit = [\n 'field_image_alt_text[0][value]' => 'Alt text',\n 'field_image_title_text[0][value]' => 'Title text',\n ];\n $this->drupalPostForm(NULL, $edit, 'Save');\n $assert_session->responseNotContains('alt=\"Alt text\"', 'Alt attribute is hidden.');\n $assert_session->responseNotContains('title=\"Title text\"', 'Title attribute is hidden.');\n }", "function __construct(){\n \n $this->placeholder_photo = \"usr.jpg\"; \n $this->upload_dir = \"images\"; \n $this->placeholder_photo_url = \"http://placehold.it/400X400?text=image\"; \n }", "function type_url_form_image()\n {\n }", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "static public function configureFileField() {}", "function default_image_options() {\n update_option('image_default_align', 'center' );\n update_option('image_default_size', 'medium' );\n}", "function _field_image_upload ($val) {\n\n $name = $this->fname;\n $path = '';\n $max = (!empty($this->attribs['displaysize']))? $this->attribs['displaysize'] : 64;\n\n if (isset($this->attribs['ws_path'])) {\n $path = $this->attribs['ws_path'];\n }\n elseif (defined('SITE_MEDIA_URLPATH')) {\n $path = SITE_MEDIA_URLPATH;\n }\n\n $res = '<div class=\"fieldImageW\">';\n\n if (!empty($val)) {\n $val = preg_replace('/^\\//', '', $val); // rid of a pesky leading slash now\n $url = \"$path/\" . urlencode($val);\n\n if (preg_match('/\\.swf$/', $val)) { // its a F'en Flash - just pop a new friggin windowz\n $res .= \"<span class='ffimg'><a href=\\\"$url\\\" target=\\\"flashWin\\\"><img src=\\\"/gfx/icons/flash.gif\\\"></a></span>\";\n }\n else {\n $size = '';\n $tw = $max;\n $th = $max;\n if (list($w, $h) = @getimagesize(UPLOAD_SAVE_PATH . '/' . $val)) {\n if ($w > $h) {\n $th = floor($h * ($tw / $w));\n }\n else {\n $tw = floor($w * ($th / $h));\n }\n $size = sprintf(\" [%dx%d]\", $w, $h);\n }\n $res .= sprintf('<img src=\"%s\" width=\"%d\" height=\"%d\" title=\"%s%s\">', \n $url, \n $tw,\n $th,\n htmlspecialchars($val),\n $size);\n }\n }\n\n $res .= $this->_field_file($val);\n $res .= \"</div>\";\n return $res;\n }", "function media_upload_image()\n {\n }", "function image_attachment_fields_to_edit($form_fields, $post)\n {\n }", "function dblions_desc_img() {\n\t$img = esc_attr( get_option( 'desc_img' ) );\n\tcreate_input_field( array(\n\t\t\t'upload-btn', '', 'button', 'Upload Picture', \n\t\t\t'', 'button button-secondary'\n\t\t) );\n\tcreate_input_field( array(\n\t\t\t'desc-img', 'desc_img', \n\t\t\t'hidden', $img, '', ''\n\t\t) );\n}", "public function it_shows_file_input_type_on_image()\n {\n // configure\n $inputs = [\n [\n 'type' => 'image',\n 'name' => 'logo',\n 'label' => 'Upload Logo'\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('type=\"file\"', false);\n }", "public function renderUploadForm() {}", "public function step_2_manage_upload()\n {\n }", "public function action_editImage() \n {\n $fieldid = $_POST[\"fieldid\"];\n $field = Wi3::inst()->model->factory(\"site_field\")->set(\"id\", $fieldid)->load();\n \n // Update e-mailaddress\n $email = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"emailaddress\")->load();\n // If data does not exist, create it\n if (!$email->loaded())\n {\n $email->create();\n }\n // Update data field with image-id\n $emailaddress = $_POST[\"emailaddress\"];\n $email->data = $emailaddress;\n $email->update();\n \n echo Kohana::debug($email); exit;\n \n // Update folder\n $data = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"folder\")->load();\n // If data does not exist, create it\n if (!$data->loaded())\n {\n $data->create();\n }\n // Update data field with image-id\n $fileid = $_POST[\"image\"];\n $data->data = $fileid;\n $data->update();\n \n //$file = Wi3::inst()->model->factory(\"site_file\")->set(\"id\", $fileid)->load();\n \n echo json_encode(\n Array(\n \"scriptsbefore\" => Array(\n \"0\" => \"$('[type=field][fieldid=\" . $fieldid . \"] [type=fieldcontent]').html('\" . $field->render() . \"');\"\n )\n )\n );\n }", "public function __construct() {\n $this->shopTypeOriginalImageUploadPath = Config::get('constant.SHOP_TYPE_ORIGINAL_IMAGE_UPLOAD_PATH');\n $this->shopTypeThumbImageUploadPath = Config::get('constant.SHOP_TYPE_THUMB_IMAGE_UPLOAD_PATH');\n $this->shopTypeThumbImageHeight = Config::get('constant.SHOP_TYPE_THUMB_IMAGE_HEIGHT');\n $this->shopTypeThumbImageWidth = Config::get('constant.SHOP_TYPE_THUMB_IMAGE_WIDTH');\n }", "public function init()\n {\n $this->nameSingular = __('Image', 'modularity');\n $this->namePlural = __('Images', 'modularity');\n $this->description = __('Outputs an image', 'modularity');\n\n add_action('acf/load_field/name=mod_image_size', array($this, 'appendImageSizes'));\n }", "function set_submit_multipart()\n\t{\n\t\t$this->_submit_type = \"multipart/form-data\";\n\t}", "function admin_cropImage()\r\n {\r\n // setting the layout for admin\r\n $this->layout = 'admin';\r\n \r\n // Setting the page title\r\n $this->set(\"title_for_layout\",\"Image Crop\");\r\n \r\n }", "function post_param_image($name = 'image', $upload_to = null, $theme_image_type = null, $required = true, $is_edit = false, &$filename = null, &$thumb_url = null)\n{\n require_code('uploads');\n\n $thumb_specify_name = $name . '__thumb__url';\n $test = post_param_string($thumb_specify_name, '');\n if ($test == '') {\n $thumb_specify_name = $name . '__thumb__filedump';\n }\n\n // Upload\n // ------\n\n if (is_null($upload_to)) {\n $upload_to = 'themes/default/images_custom/' . $theme_image_type;\n @mkdir(get_custom_file_base() . '/' . $upload_to, 0777);\n if (file_exists(get_custom_file_base() . '/' . $upload_to)) {\n fix_permissions(get_custom_file_base() . '/' . $upload_to);\n } else {\n $upload_to = 'themes/default/images_custom';\n }\n }\n\n $field_file = $name . '__upload';\n $thumb_attach_name = $name . '__thumb__upload';\n if ((is_plupload()) || (((array_key_exists($field_file, $_FILES)) && (is_uploaded_file($_FILES[$field_file]['tmp_name']))))) {\n $urls = get_url('', $field_file, $upload_to, 0, CMS_UPLOAD_IMAGE, $thumb_url !== null, $thumb_specify_name, $thumb_attach_name);\n\n if ((substr($urls[0], 0, 8) != 'uploads/') && (is_null(http_download_file($urls[0], 0, false))) && (!is_null($GLOBALS['HTTP_MESSAGE_B']))) {\n attach_message($GLOBALS['HTTP_MESSAGE_B'], 'warn');\n }\n\n if ($thumb_url !== null) {\n $thumb_url = $urls[1];\n }\n $filename = $urls[2];\n\n return cms_rawurlrecode($urls[0]);\n }\n\n // URL\n // ---\n\n $field_url = $name . '__url';\n $url = post_param_string($field_url, '');\n if ($url != '') {\n // We should use compliant encoding\n require_code('urls_simplifier');\n $coder_ob = new HarmlessURLCoder(); // TODO: This should move into post_param_string in v11, filter based\n $url = $coder_ob->encode($url);\n\n $filename = urldecode(preg_replace('#\\?.*#', '', basename($url)));\n\n // Get thumbnail\n $urls = get_url($field_url, '', $upload_to, 0, CMS_UPLOAD_IMAGE, $thumb_url !== null, $thumb_specify_name, $thumb_attach_name);\n if ($thumb_url !== null) {\n $thumb_url = $urls[1];\n }\n\n return cms_rawurlrecode($url);\n }\n\n // Filedump\n // --------\n\n if (addon_installed('filedump')) {\n $field_filedump = $name . '__filedump';\n $url = post_param_string($field_filedump, '');\n if ($url != '') {\n $filename = urldecode(basename($url));\n\n // Get thumbnail\n $urls = get_url($field_filedump, '', $upload_to, 0, CMS_UPLOAD_IMAGE, $thumb_url !== null, $thumb_specify_name, $thumb_attach_name);\n if ($thumb_url !== null) {\n $thumb_url = $urls[1];\n }\n\n return cms_rawurlrecode($url);\n }\n }\n\n // Theme image\n // -----------\n\n $field_choose = $name . '__theme_image';\n $theme_img_code = post_param_string($field_choose, '');\n if ($theme_img_code != '') {\n $url = find_theme_image($theme_img_code, false, true);\n\n $filename = urldecode(preg_replace('#\\?.*#', '', basename($url)));\n\n // Get thumbnail\n $_POST[$field_url] = get_magic_quotes_gpc() ? addslashes($url) : $url; // FUDGE\n $urls = get_url($field_url, '', $upload_to, 0, CMS_UPLOAD_IMAGE, $thumb_url !== null, $thumb_specify_name, $thumb_attach_name);\n if ($thumb_url !== null) {\n $thumb_url = $urls[1];\n }\n\n return cms_rawurlrecode($url);\n }\n\n // ---\n\n if (!$required) {\n if (($is_edit) && (post_param_integer($field_file . '_unlink', 0) != 1)) {\n return null;\n }\n\n return '';\n }\n\n warn_exit(do_lang_tempcode('IMPROPERLY_FILLED_IN_UPLOAD'));\n}", "function austeve_image_gallery_admin_init(){\n\tregister_setting( 'austeve_image_gallery_options', 'austeve_image_gallery_options', 'austeve_image_gallery_options_validate' );\n\tadd_settings_section('austeve_image_gallery_main', 'Main Settings', 'austeve_image_gallery_section_text', 'austeve_image_gallery');\n\tadd_settings_field('austeve_image_gallery_num_sidebars', 'Number of sidebars [1-9]:', 'austeve_image_gallery_setting_num_sidebars', 'austeve_image_gallery', 'austeve_image_gallery_main');\n\tadd_settings_field('austeve_image_gallery_preview_format', 'Gallery preview format:', 'austeve_image_gallery_setting_preview_format', 'austeve_image_gallery', 'austeve_image_gallery_main');\n\tadd_settings_field('austeve_image_gallery_container', 'Container:', 'austeve_image_gallery_setting_container', 'austeve_image_gallery', 'austeve_image_gallery_main');\n\tadd_settings_field('austeve_image_gallery_classes', 'Additional classes:', 'austeve_image_gallery_setting_classes', 'austeve_image_gallery', 'austeve_image_gallery_main');\n}", "public function shortcodeUploadImage()\n {\n if ($this->settings->has('formerror')) {\n $form = $this->model->getSubmittedForm();\n } else {\n $form = $this->model->getNewForm();\n }\n\n return $this->view->fetch('upload.html.twig', ['form' => $form->createView()]);\n }", "function _photo_gallery_content_default_fields() {\n $fields = array();\n\n // Exported field: field_gallery\n $fields[] = array(\n 'field_name' => 'field_gallery',\n 'type_name' => 'photo',\n 'display_settings' => array(\n 'weight' => '-1',\n 'parent' => '',\n 'label' => array(\n 'format' => 'hidden',\n ),\n 'teaser' => array(\n 'format' => 'hidden',\n 'exclude' => 1,\n ),\n 'full' => array(\n 'format' => 'hidden',\n 'exclude' => 1,\n ),\n '4' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'token' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'nodereference',\n 'required' => '1',\n 'multiple' => '0',\n 'module' => 'nodereference',\n 'active' => '1',\n 'referenceable_types' => array(\n 'gallery' => 'gallery',\n 'front' => 0,\n 'lyrics' => 0,\n 'page' => 0,\n 'photo' => 0,\n 'story' => 0,\n 'image' => 0,\n ),\n 'advanced_view' => '--',\n 'advanced_view_args' => '',\n 'widget' => array(\n 'node_link' => array(\n 'teaser' => 0,\n 'full' => 1,\n 'title' => 'Add Photo',\n 'hover_title' => '',\n 'destination' => 'node',\n ),\n 'fallback' => 'select',\n 'edit_fallback' => NULL,\n 'label' => 'gallery',\n 'weight' => '-1',\n 'description' => '',\n 'type' => 'nodereference_url',\n 'module' => 'nodereference_url',\n ),\n );\n\n // Exported field: field_image\n $fields[] = array(\n 'field_name' => 'field_image',\n 'type_name' => 'photo',\n 'display_settings' => array(\n 'weight' => 0,\n 'parent' => '',\n 'label' => array(\n 'format' => 'hidden',\n ),\n 'teaser' => array(\n 'format' => 'hidden',\n 'exclude' => 1,\n ),\n 'full' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n 'token' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'filefield',\n 'required' => '0',\n 'multiple' => '0',\n 'module' => 'filefield',\n 'active' => '1',\n 'list_field' => '0',\n 'list_default' => 1,\n 'description_field' => '0',\n 'widget' => array(\n 'file_extensions' => 'png gif jpg jpeg',\n 'file_path' => 'gallery',\n 'progress_indicator' => 'bar',\n 'max_filesize_per_file' => '',\n 'max_filesize_per_node' => '',\n 'max_resolution' => '0',\n 'min_resolution' => '0',\n 'alt' => 'Texcentrics',\n 'custom_alt' => 1,\n 'title' => 'Texcentrics Photo',\n 'custom_title' => 1,\n 'title_type' => 'textfield',\n 'default_image' => NULL,\n 'use_default_image' => 0,\n 'label' => 'image',\n 'weight' => 0,\n 'description' => '',\n 'type' => 'imagefield_widget',\n 'module' => 'imagefield',\n ),\n );\n\n // Translatables\n array(\n t('gallery'),\n t('image'),\n );\n\n return $fields;\n}", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "public function storeProjectMainImage($project){\n if(request()->has('image')){\n $project->update(['image'=>request()->image->store('uploads', 'public')]);\n $image = Image::make(public_path('storage/'. $project->image))->fit(700,700);\n $image->save();\n }\n }", "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto1\");\n $uploadObj->setDbFieldName(\"foto1\");\n $uploadObj->setFolder(\"uploads/fotos/\");\n $uploadObj->setResize(\"true\", 100, 100);\n $uploadObj->setMaxSize(1000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "public function preUpload()\n {\n if (null === $this->file) {\n return;\n }\n // stocke l'extension\n $this->url = $this->file->guessExtension();\n // génère alt de <img>\n $this->alt = $this->file->getClientOriginalName();\n }", "function _setUploadForm()\r\n {\r\n global $_ARRAYLANG, $_CONFIG;\r\n\r\n\r\n //data we want to remember for handling the uploaded files\r\n\t\t$data = array();\r\n if (array_key_exists($this->_mediaType, $this->mediaTypePaths)) {\r\n $data['path'] = $this->mediaTypePaths[$this->_mediaType][0].$this->_path;\r\n $data['webPath'] = $this->mediaTypePaths[$this->_mediaType][1].$this->_path;\r\n } else {\r\n $data['path'] = ASCMS_CONTENT_IMAGE_PATH.$this->_path;\r\n $data['webPath'] = ASCMS_CONTENT_IMAGE_WEB_PATH.$this->_path;\r\n }\r\n\r\n $comboUp = \\Cx\\Core_Modules\\Upload\\Controller\\UploadFactory::getInstance()->newUploader('exposedCombo');\r\n $comboUp->setFinishedCallback(array(ASCMS_CORE_MODULE_PATH.'/FileBrowser/Controller/FileBrowser.class.php','\\Cx\\Core_Modules\\FileBrowser\\Controller\\FileBrowser','uploadFinished'));\r\n $comboUp->setData($data);\r\n //set instance name to combo_uploader so we are able to catch the instance with js\r\n $comboUp->setJsInstanceName('exposed_combo_uploader');\r\n\r\n $this->_objTpl->setVariable(array(\r\n 'COMBO_UPLOADER_CODE' => $comboUp->getXHtml(true),\r\n ));\r\n //end of uploader button handling\r\n //check if a finished upload caused reloading of the page.\r\n //if yes, we know the added files and want to highlight them\r\n if (!empty($_GET['highlightUploadId'])) {\r\n $key = 'filebrowser_upload_files_'.intval($_GET['highlightUploadId']);\r\n if (isset($_SESSION[$key])) {\r\n $sessionHighlightCandidates = $_SESSION[$key]; //an array with the filenames, set in FileBrowser::uploadFinished\r\n }\r\n //clean up session; we do only highlight once\r\n unset($_SESSION[$key]);\r\n\r\n if(is_array($sessionHighlightCandidates)) //make sure we don't cause any unexpected behaviour if we lost the session data\r\n $this->highlightedFiles = $sessionHighlightCandidates;\r\n }\r\n\r\n $objFWSystem = new \\FWSystem();\r\n \r\n // cannot upload or mkdir in webpages view\r\n if ($this->_mediaType == \"webpages\") {\r\n return;\r\n }\r\n $this->_objTpl->addBlockfile('FILEBROWSER_UPLOAD', 'fileBrowser_upload', 'module_fileBrowser_upload.html');\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_UPLOAD_TYPE' => $this->_mediaType,\r\n 'FILEBROWSER_UPLOAD_PATH' => $this->_path,\r\n 'FILEBROWSER_MAX_FILE_SIZE' => $objFWSystem->getMaxUploadFileSize(),\r\n 'TXT_CREATE_DIRECTORY' => $_ARRAYLANG['TXT_FILEBROWSER_CREATE_DIRECTORY'],\r\n 'TXT_UPLOAD_FILE' => $_ARRAYLANG['TXT_FILEBROWSER_UPLOAD_FILE'],\r\n 'JAVASCRIPT' \t=> \\JS::getCode(),\r\n ));\r\n\r\n $this->_objTpl->parse('fileBrowser_upload');\r\n }", "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto_img\");\n $uploadObj->setDbFieldName(\"foto_img\");\n $uploadObj->setFolder(\"../dados/fotos/\");\n $uploadObj->setResize(\"true\", 640, 0);\n $uploadObj->setMaxSize(2048);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"custom\");\n $uploadObj->setRenameRule(\"foto{foto_id}_{rs_upload.arquivo}.{KT_ext}\");\n return $uploadObj->Execute();\n}", "private function build_file_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true, $_is_pricing_rule = \"no\") {\r\n /*\r\n * Show as value option not available for FILE field\r\n * since file field not supported for Admin Field */\r\n \r\n $_index .= (isset($_meta[\"multi_file\"]) && $_meta[\"multi_file\"] == \"yes\") ? \"[]\" : \"\";\r\n $accept = (isset($_meta[\"filetypes\"]) && ! empty($_meta[\"filetypes\"])) ? ('accept=\"' . esc_attr(trim($_meta[\"filetypes\"])) . '\"') : '';\r\n $multifile = (isset($_meta[\"multi_file\"]) && $_meta[\"multi_file\"] == \"yes\") ? 'multiple=\"multiple\"' : '';\r\n $maxsize = (isset($_meta[\"max_file_size\"]) && ! empty($_meta[\"max_file_size\"])) ? ('max-size=\"' . esc_attr(trim($_meta[\"max_file_size\"])) . '\"') : '';\r\n $preview = (isset($_meta[\"img_is_prev\"]) && $_meta[\"img_is_prev\"] == \"yes\") ? \"yes\" : \"no\";\r\n $preview_width = (isset($_meta[\"img_is_prev_width\"]) && $_meta[\"img_is_prev_width\"] != \"\") ? $_meta[\"img_is_prev_width\"] : \"65px\";\r\n $has_field_rules = isset( $_meta[\"field_rules\"] ) && is_array( $_meta[\"field_rules\"] ) && count( $_meta[\"field_rules\"] ) != 0 ? \"yes\" : \"no\";\r\n /* Construct the field */\r\n $html = '<input type=\"file\" data-has_field_rules=\"'.$has_field_rules.'\" data-has_pricing_rules=\"'.$_is_pricing_rule.'\" ' . $maxsize . ' data-fkey=\"'. $_meta[\"key\"] .'\" class=\"' . $_ptype . '-field ' . $_class . '\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\" ' . $accept . ' ' . $multifile . ' data-field-type=\"'. $_meta[\"type\"] .'\" ' . $_ptype . '-pattern=\"mandatory\" ' . $_ptype . '-mandatory=\"' . $_meta[\"required\"] . '\" ' . $_cloneable . ' ' . $_readonly . ' data-preview=\"'. $preview .'\" data-preview-width=\"'. $preview_width .'\" />';\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "public function image($arrData)\n {\n \\JS::registerCSS(substr(ASCMS_CORE_MODULE_FOLDER . '/MediaBrowser/View/Style/mediabrowser.css', 1));\n global $objDatabase, $objTemplate, $_ARRAYLANG;\n\n $this->strPageTitle = $_ARRAYLANG['TXT_SETTINGS_IMAGE'];\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_image', 'settings_image.html');\n \n \\ContrexxJavascript::getInstance()->setVariable(array(\n 'publicTempPath' => Cx::instanciate()->getWebsitePublicTempWebPath(),\n ), 'config/image');\n\n // Saves the settings\n if (isset($arrData['submit'])) {\n $arrSettings['image_cut_width'] = contrexx_input2db(intval($arrData['image_cut_width']));\n $arrSettings['image_cut_height'] = contrexx_input2db(intval($arrData['image_cut_height']));\n //$arrSettings['image_scale_width'] = contrexx_input2db(intval($arrData['image_scale_width']));\n //$arrSettings['image_scale_height'] = contrexx_input2db(intval($arrData['image_scale_height']));\n $arrSettings['image_compression'] = contrexx_input2db(intval($arrData['image_compression']));\n\n foreach ($arrSettings as $name => $value) {\n $query = '\n UPDATE `'.DBPREFIX.'settings_image`\n SET `value` = \"'.$value.'\"\n WHERE `name` = \"'.$name.'\"\n ';\n $objResult = $objDatabase->Execute($query);\n if ($objResult === false) {\n throw new \\Exception('Could not update the settings');\n }\n }\n\n $this->strOkMessage = $_ARRAYLANG['TXT_SETTINGS_UPDATED'];\n }\n\n /**\n * @var $cx \\Cx\\Core\\Core\\Controller\\Cx\n */\n $cx = \\Env::get('cx');\n $pdo = $cx->getDb()->getPdoConnection();\n $sth = $pdo->query('SELECT id, name, size FROM `' . DBPREFIX . 'settings_thumbnail`');\n $thumbnails = $sth->fetchAll();\n\n $newThumbnailTemplate\n = new \\Cx\\Core\\Html\\Sigma($cx->getCodeBasePath());\n $newThumbnailTemplate->loadTemplateFile($cx->getCodeBaseCorePath() .'/Config/View/Template/Backend/settings_image_edit.html');\n $newThumbnailTemplate->removeUnknownVariables = false;\n $newThumbnailTemplate->setVariable(\n array(\n 'TXT_IMAGE_TITLE' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_TITLE'],\n 'TXT_IMAGE_CSRF' => \\Cx\\Core\\Csrf\\Controller\\Csrf::param(),\n 'TXT_IMAGE_THUMBNAILS_DELETE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_DELETE'],\n 'TXT_IMAGE_CUT_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_WIDTH'],\n 'TXT_IMAGE_CUT_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_HEIGHT'],\n 'TXT_IMAGE_THUMBNAILS' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS'],\n //'TXT_IMAGE_SCALE_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_WIDTH'],\n //'TXT_IMAGE_SCALE_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_HEIGHT'],\n 'TXT_IMAGE_COMPRESSION' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_COMPRESSION'],\n 'TXT_SAVE' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_IMAGE_THUMBNAILS_ID' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_ID'],\n 'TXT_IMAGE_THUMBNAILS_NAME' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NAME'],\n 'TXT_IMAGE_THUMBNAILS_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_SIZE'],\n 'TXT_SETTINGS_FUNCTIONS' => $_ARRAYLANG['TXT_SETTINGS_FUNCTIONS'],\n 'TXT_IMAGE_THUMBNAILS_RELOAD' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_RELOAD'],\n 'TXT_IMAGE_THUMBNAILS_NEW' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NEW'],\n\n 'TXT_IMAGE_THUMBNAILS_MAX_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAX_SIZE'],\n 'SETTINGS_IMAGE_CUT_WIDTH' => !empty($arrSettings['image_cut_width']) ? $arrSettings['image_cut_width']\n : 0,\n 'SETTINGS_IMAGE_CUT_HEIGHT' => !empty($arrSettings['image_cut_height'])\n ? $arrSettings['image_cut_height'] : 0,\n //'SETTINGS_IMAGE_SCALE_WIDTH' => !empty($arrSettings['image_scale_width']) ? $arrSettings['image_scale_width'] : 0,\n //'SETTINGS_IMAGE_SCALE_HEIGHT' => !empty($arrSettings['image_scale_height']) ? $arrSettings['image_scale_height'] : 0,\n )\n );\n\n $objTemplate->setVariable(\n 'CONFIG_THUMBNAIL_NEW_TEMPLATE',\n implode(' ', explode(\"\\n\", str_replace(\"'\", \"\\\"\", $newThumbnailTemplate->get())))\n );\n\n foreach ($thumbnails as $thumbnail) {\n $objTemplate->setVariable(\n array(\n 'IMAGE_THUMBNAIL_ID' => $thumbnail['id'],\n 'IMAGE_THUMBNAIL_NAME' => $thumbnail['name'],\n 'IMAGE_THUMBNAIL_SIZE' => $thumbnail['size'],\n 'TXT_IMAGE_THUMBNAILS_MAXIMUM' => sprintf($_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAXIMUM'], $thumbnail['size'].'px'),\n )\n );\n\n $objTemplate->parse('settings_image_thumbnails_list');\n }\n\n\n // Gets the settings\n $query = '\n SELECT `name`, `value`\n FROM `'.DBPREFIX.'settings_image`\n ';\n $objResult = $objDatabase->Execute($query);\n if ($objResult !== false) {\n $arrSettings = array();\n while (!$objResult->EOF) {\n // Creates the settings array\n $arrSettings[$objResult->fields['name']] = $objResult->fields['value'];\n $objResult->MoveNext();\n }\n } else {\n throw new \\Exception('Could not query the settings.');\n }\n\n // Defines the compression values\n $arrCompressionOptions = array();\n\n for ($i = 1; $i <= 20 ; $i++) {\n $arrCompressionOptions[] = $i * 5;\n }\n\n // Parses the compression options\n $imageCompression = !empty($arrSettings['image_compression']) ? intval($arrSettings['image_compression']) : 95;\n foreach ($arrCompressionOptions as $compression) {\n $objTemplate->setVariable(array(\n 'IMAGE_COMPRESSION_VALUE' => $compression,\n 'IMAGE_COMPRESSION_NAME' => $compression,\n 'OPTION_SELECTED' => $compression == $imageCompression ? 'selected=\"selected\"' : '',\n ));\n $objTemplate->parse('settings_image_compression_options');\n }\n\n // Parses the settings\n $objTemplate->setVariable(\n array(\n 'TXT_IMAGE_TITLE' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_TITLE'],\n 'TXT_IMAGE_CSRF' => \\Cx\\Core\\Csrf\\Controller\\Csrf::param(),\n 'TXT_IMAGE_THUMBNAILS_DELETE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_DELETE'],\n 'TXT_IMAGE_CUT_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_WIDTH'],\n 'TXT_IMAGE_CUT_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_HEIGHT'],\n 'TXT_IMAGE_THUMBNAILS' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS'],\n //'TXT_IMAGE_SCALE_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_WIDTH'],\n //'TXT_IMAGE_SCALE_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_HEIGHT'],\n 'TXT_IMAGE_COMPRESSION' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_COMPRESSION'],\n 'TXT_SAVE' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_IMAGE_THUMBNAILS_ID' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_ID'],\n 'TXT_IMAGE_THUMBNAILS_NAME' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NAME'],\n 'TXT_IMAGE_THUMBNAILS_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_SIZE'],\n 'TXT_SETTINGS_FUNCTIONS' => $_ARRAYLANG['TXT_SETTINGS_FUNCTIONS'],\n 'TXT_IMAGE_THUMBNAILS_RELOAD' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_RELOAD'],\n 'TXT_IMAGE_THUMBNAILS_NEW' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NEW'],\n\n 'TXT_IMAGE_THUMBNAILS_MAX_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAX_SIZE'],\n 'SETTINGS_IMAGE_CUT_WIDTH' => !empty($arrSettings['image_cut_width']) ? $arrSettings['image_cut_width']\n : 0,\n 'SETTINGS_IMAGE_CUT_HEIGHT' => !empty($arrSettings['image_cut_height'])\n ? $arrSettings['image_cut_height'] : 0,\n //'SETTINGS_IMAGE_SCALE_WIDTH' => !empty($arrSettings['image_scale_width']) ? $arrSettings['image_scale_width'] : 0,\n //'SETTINGS_IMAGE_SCALE_HEIGHT' => !empty($arrSettings['image_scale_height']) ? $arrSettings['image_scale_height'] : 0,\n )\n );\n $objTemplate->parse('settings_image');\n\n \\Cx\\Core\\Csrf\\Controller\\Csrf::add_placeholder($objTemplate);\n\n return true;\n }", "public function render_image_field($args) {\n include( dirname( __FILE__ ) . '/views/media-image.php' );\n }", "function wp_plupload_default_settings()\n {\n }", "public function getImageFields()\n {\n return [\n 'training_resource_thumbnail' => '/'\n ];\n }", "public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}", "function form($instance) {\n $defaults = array( 'user_image' => '', 'url' =>'', 'label' =>'', 'desc' =>'', 'twitter_url' =>'', 'facebook_url' =>'', 'insta_url' =>'', 'pint_url' =>'', 'mail_url' =>'');\n $instance = wp_parse_args( (array) $instance, $defaults );\n\n?>\n<div>\n <p><label for=\"<?php echo $this->get_field_id( 'user_image' ); ?>\"><?php _e('User image', 'tcd-w'); ?></label><br /><?php _e('Recommend image size. Width:400px Height:400px.', 'tcd-w'); ?></p>\n <div class=\"widget_media_upload cf cf_media_field hide-if-no-js <?php echo $this->get_field_id('user_image'); ?>\">\n <input type=\"hidden\" value=\"<?php echo $instance['user_image']; ?>\" id=\"<?php echo $this->get_field_id('user_image'); ?>\" name=\"<?php echo $this->get_field_name('user_image'); ?>\" class=\"cf_media_id\">\n <div class=\"preview_field\"><?php if($instance['user_image']){ echo wp_get_attachment_image($instance['user_image'], 'size1'); }; ?></div>\n <div class=\"buttton_area\">\n <input type=\"button\" value=\"<?php _e('Select Image', 'tcd-w'); ?>\" class=\"cfmf-select-img button\">\n <input type=\"button\" value=\"<?php _e('Remove Image', 'tcd-w'); ?>\" class=\"cfmf-delete-img button <?php if(!$instance['user_image']){ echo 'hidden'; }; ?>\">\n </div>\n </div>\n</div>\n<p>\n <label for=\"<?php echo $this->get_field_id('desc'); ?>\"><?php _e('User description', 'tcd-w'); ?></label>\n <textarea class=\"widefat\" id=\"<?php echo $this->get_field_id('desc'); ?>\" name=\"<?php echo $this->get_field_name('desc'); ?>\"><?php echo $instance['desc']; ?></textarea>\n</p>\n<p>\n <label for=\"<?php echo $this->get_field_id('url'); ?>\"><?php _e('Button link url', 'tcd-w'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('url'); ?>\" name=\"<?php echo $this->get_field_name('url'); ?>'\" type=\"text\" value=\"<?php echo esc_url($instance['url']); ?>\" />\n</p>\n<p>\n <label for=\"<?php echo $this->get_field_id('name'); ?>\"><?php _e('Button link label', 'tcd-w'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('label'); ?>\" name=\"<?php echo $this->get_field_name('label'); ?>'\" type=\"text\" value=\"<?php echo $instance['label']; ?>\" />\n</p>\n<ul>\n <li>\n <label for=\"<?php echo $this->get_field_id('twitter_url'); ?>\"><?php _e('Your Twitter URL', 'tcd-w'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('twitter_url'); ?>\" name=\"<?php echo $this->get_field_name('twitter_url'); ?>'\" type=\"text\" value=\"<?php echo esc_url($instance['twitter_url']); ?>\" />\n </li>\n <li>\n <label for=\"<?php echo $this->get_field_id('facebook_url'); ?>\"><?php _e('Your Facebook URL', 'tcd-w'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('facebook_url'); ?>\" name=\"<?php echo $this->get_field_name('facebook_url'); ?>'\" type=\"text\" value=\"<?php echo esc_url($instance['facebook_url']); ?>\" />\n </li>\n <li>\n <label for=\"<?php echo $this->get_field_id('insta_url'); ?>\"><?php _e('Your Instagram URL', 'tcd-w'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('insta_url'); ?>\" name=\"<?php echo $this->get_field_name('insta_url'); ?>'\" type=\"text\" value=\"<?php echo esc_url($instance['insta_url']); ?>\" />\n </li>\n <li>\n <label for=\"<?php echo $this->get_field_id('pint_url'); ?>\"><?php _e('Your Pinterest URL', 'tcd-w'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('pint_url'); ?>\" name=\"<?php echo $this->get_field_name('pint_url'); ?>'\" type=\"text\" value=\"<?php echo esc_url($instance['pint_url']); ?>\" />\n </li>\n <li>\n <label for=\"<?php echo $this->get_field_id('mail_url'); ?>\"><?php _e('Your Contact page URL (You can use mailto:)', 'tcd-w'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('mail_url'); ?>\" name=\"<?php echo $this->get_field_name('mail_url'); ?>'\" type=\"text\" value=\"<?php echo esc_url($instance['mail_url']); ?>\" />\n </li>\n</ul>\n<?php\n\n }", "function m_uploadImage()\n\t{\n\t\t$fileUpload = new FileUpload();\n\t\t$name=$this->request['img'];\n\t\tif($this->libFunc->checkImageUpload(\"image\"))\n\t\t{\n\t\t\t\t$fileUpload->source = $_FILES[\"image\"][\"tmp_name\"];\n\t\t\t\t$fileUpload->target = $this->imagePath.\"giftwrap/\".$_FILES[\"image\"][\"name\"];\n\t\t\t\t$newName1 = $fileUpload->upload();\n\t\t\t\t$this->obDb->query=\"UPDATE \".GIFTWRAPS.\" set\n\t\t\t\t $name='$newName1' where iGiftwrapid_PK='\".$this->request['id'].\"'\";\n\t\t\t\t$this->obDb->updateQuery();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"sales/adminindex.php?action=promotions.giftwrap.uploadForm&msg=2&img=\".$this->request['img'].\"&id=\".$this->request['id']);\n\t\t}\n\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"sales/adminindex.php?action=promotions.giftwrap.uploadForm&msg=1&img=\".$this->request['img'].\"&id=\".$this->request['id']);\n\t}", "function site_settings_update()\n\t{\n\t\t \n\t\t$config['upload_path'] = $this->config->item('admin_upload_url'); /* NB! create this dir! */ \n\t\t$config['allowed_types'] = 'gif|jpg|png|bmp|jpeg'; \n\t\t$config['max_size'] = '0'; \n\t\t$config['max_width'] = '0'; \n\t\t$config['max_height'] = '0'; \n\t\t\n\t\t$this->load->library('upload', $config); \n\t\tif ( ! $this->upload->do_upload('image_upload'))\n\t\t{\n\t\t\t$error = array('error' => $this->upload->display_errors());\n\t\t}\n\t\t$filename\t\t\t\t\t=\t$this->upload->data();\n\t\t$error = array('error' => $this->upload->display_errors());\t\t\t\t\n\t\t$source_image\t\t\t\t= \t$config['upload_path'].$filename['file_name'];\n\t\t\n\t\t$config2['image_library'] \t= \t'gd2';\n\t\t$config2['source_image'] \t= \t$source_image;\n\t\t$config2['new_image'] \t\t= \t$this->config->item('admin_login_logo_url');\n\t\t$config2['maintain_ratio'] \t= \tFALSE;\n\t\t$config2['width'] \t\t\t= \t275;\n\t\t$config2['height']\t\t\t=\t103;\n\t\t\n\t\t\n\t\t$config3['image_library'] \t= \t'gd2';\n\t\t$config3['source_image'] \t= \t$source_image;\n\t\t$config3['new_image'] \t\t= \t$this->config->item('admin_site_logo_url');\n\t\t$config3['maintain_ratio'] \t= \tFALSE;\n\t\t$config3['width'] \t\t\t= \t187;\n\t\t$config3['height']\t\t\t=\t54;\n\t\t\n\t\t$this->upload->initialize($config);\n\t\t$this->image_lib->initialize($config2);\n\t\t$this->image_lib->resize();\n\t\t$this->image_lib->clear();\n\t\tunset($config2);\n\t\t$this->image_lib->initialize($config3);\n\t\t$this->image_lib->resize();\n\t\t\n\t\t $site_title\t=\ttext_db($this->input->post(\"site_title\"));\n\t\t $tagline\t\t= text_db($this->input->post(\"tagline\"));\n\t\t $time_zone\t\t=\ttext_db($this->input->post(\"time_zone\"));\n\t\t $site_url\t\t=\ttext_db($this->input->post(\"site_url\"));\n\t\t $image_upload\t=\ttext_db($filename['file_name']);\n\t\t $email\t\t\t=\ttext_db($this->input->post(\"email\"));\n\t\t $address\t\t=\ttext_db($this->input->post(\"address\"));\n\t\t $city\t\t\t=\ttext_db($this->input->post(\"city\"));\n\t\t $state\t\t\t=\ttext_db($this->input->post(\"state\"));\n\t\t $country\t\t=\ttext_db($this->input->post(\"country\"));\n\t\t\t\t\t\t \n\t\t$this->form_validation->set_rules('site_title', 'site title', 'required');\n\t\t//$this->form_validation->set_rules('tagline', 'tag line', 'required');\n\t\t//$this->form_validation->set_rules('time_zone', 'time zone', 'required');\n\t\t//$this->form_validation->set_rules('site_url', 'site url', 'required');\n\t\t$this->form_validation->set_rules('email', 'email', 'required');\n\t\t$this->form_validation->set_rules('address', 'address', 'required');\n\t\t$this->form_validation->set_rules('city', 'city', 'required');\n\t\t$this->form_validation->set_rules('state', 'state', 'required');\n\t\t$this->form_validation->set_rules('country', 'country', 'required');\n\t\n\tif($this->form_validation->run() == FALSE)\n\t{\n\t\t \n\t\t//$this->session->set_userdata('notification_message', $this->lang->line(\"label_fill_device_capability\").'');\n\t\t$this->index();\n\t\t//redirect(\"admin/site_settings\");\n\t\t\n\t\t\n\t}\n\telse\n\t{\t \n\t\t$inputData = array(\n\t\t\t\t\t\t\"site_title\"\t\t=>\t$site_title,\n\t\t\t\t\t\t\"tagline\"\t\t=> $tagline,\n\t\t\t\t\t\t//\"time_zone\"\t\t=>\t$time_zone,\n\t\t\t\t\t\t\"site_url\"\t\t=>\t$site_url,\n\t\t\t\t\t\t\"image_upload\"\t\t=>\t$image_upload,\n\t\t\t\t\t\t\"email\"\t\t\t=>\t$email,\n\t\t\t\t\t\t\"address\"\t\t=>\t$address,\n\t\t\t\t\t\t\"city\"\t\t\t=>\t$city,\n\t\t\t\t\t\t\"state\"\t\t\t=>\t$state,\n\t\t\t\t\t\t\"country\"\t\t=>\t$country\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t );\n\n\t\n\t\t$this->mod_site_settings->site_settings_update($inputData);\n\t\t$this->session->set_flashdata('message', $this->lang->line(\"lang_site_settings_updated_successfully\"));\n\t\tredirect(\"admin/site_settings\");\n\t }\t\t\n\t\t\t\n \n }", "function Trigger_FileUpload(&$tNG) {\n $uploadObj = new tNG_FileUpload($tNG);\n $uploadObj->setFormFieldName(\"taptinquangcao\");\n $uploadObj->setDbFieldName(\"taptinquangcao\");\n $uploadObj->setFolder(\"../images/quangcao/\");\n $uploadObj->setMaxSize(5000);\n $uploadObj->setAllowedExtensions(\"jpg, gif, png, swf\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"detran_img\");\n $uploadObj->setDbFieldName(\"detran_img\");\n $uploadObj->setFolder(\"../dados/detran/\");\n $uploadObj->setResize(\"true\", 300, 0);\n $uploadObj->setMaxSize(1024);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png, JPG\");\n $uploadObj->setRename(\"custom\");\n $uploadObj->setRenameRule(\"detran{rs_upload.arquivo}.{KT_ext}\");\n return $uploadObj->Execute();\n}", "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"usr_foto\");\n $uploadObj->setDbFieldName(\"usr_foto\");\n $uploadObj->setFolder(\"../dados/\");\n $uploadObj->setResize(\"false\", 150, 150);\n $uploadObj->setMaxSize(2048);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"custom\");\n $uploadObj->setRenameRule(\"usr{usr_id}_{rs_upload.arquivo}.{KT_ext}\");\n return $uploadObj->Execute();\n}", "function image_attachment_fields_to_save($post, $attachment)\n {\n }", "function Utilities_Image(){\n\t\t// $this->$imageAsset = $img;\t\t\n\t}", "public function uploadImage()\r\n {\r\n /*\r\n * Response codes\r\n * 000 - Нет ошибок\r\n * 001 - Нет данных\r\n * 002 - Ошибка получения параметров файла\r\n * 003 - Ошибка получения пути файла\r\n * 004 - Ошибка перемещения файла\r\n * 005 - Требования не соблюдены\r\n * 006 - Нет папки салона\r\n */\r\n if (isset($_POST) &&\r\n isset($_FILES) &&\r\n array_key_exists('upload', $_FILES) &&\r\n count($_FILES['upload']) > 0 &&\r\n array_key_exists('slug', $_POST) &&\r\n array_key_exists('img_name', $_POST) &&\r\n array_key_exists('type', $_POST)\r\n ) {\r\n $type = $_POST['type'];\r\n if ($this->authentication->has_permission($type . '_upload')) {\r\n $img_name = $_POST['img_name'];\r\n $tmpFilePath = $_FILES['upload']['tmp_name'][0];\r\n $tmpFileType = $_FILES['upload']['type'][0];\r\n $tmpFileExtension = pathinfo($_FILES['upload']['name'][0], PATHINFO_EXTENSION);\r\n $tmpFileSize = $_FILES['upload']['size'][0];\r\n $tmpImageInfo = getimagesize($_FILES['upload']['tmp_name'][0]);\r\n if (array_key_exists('img_slug', $_POST)) {\r\n $fileParams = $this->FieldsModel->getFile($_POST['img_slug'], $_POST['img_slug']);\r\n } else {\r\n $fileParams = $this->FieldsModel->getFile($type, $img_name);\r\n }\r\n if ($fileParams) {\r\n if (\r\n $tmpFileType != $fileParams['mime'] ||\r\n $tmpImageInfo['mime'] != $fileParams['mime'] ||\r\n $tmpFileExtension != $fileParams['ext'] ||\r\n $tmpFileSize > $fileParams['max_size'] ||\r\n $tmpImageInfo[0] > $fileParams['max_width'] ||\r\n $tmpImageInfo[0] < $fileParams['min_width'] ||\r\n $tmpImageInfo[1] > $fileParams['max_height'] ||\r\n $tmpImageInfo[1] < $fileParams['min_height']\r\n ) {\r\n if ($tmpFileExtension === 'svg') {\r\n //Do nothing\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не удовлетворяет требованиям.', 'code' => '005', 'fileparams' => $fileParams));\r\n return;\r\n }\r\n }\r\n // Make sure we have a file path\r\n if ($tmpFilePath != '') {\r\n // Setup new file path\r\n if (!file_exists('./media/' . $_POST['type'] . '/' . $_POST['slug'] . '/')) {\r\n mkdir('./media/' . $_POST['type'] . '/' . $_POST['slug']);\r\n //echo json_encode(array('status' => 'fail', 'message' => 'Салон не сконфигурирован. Обратитесь к поставщику услуг.', 'code' => '006'));\r\n //return;\r\n }\r\n $newFilePath = './media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n // Upload the file into the temp dir\r\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\r\n // Create path to update image in frontend\r\n $path = base_url() . 'media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n echo json_encode(array('status' => 'ok', 'message' => 'Изображение загружено.', 'code' => '000', 'path' => $path));\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '004'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '003'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '002'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, у вас нет прав!', 'code' => '999'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '001'));\r\n }\r\n }", "public function __construct() {\n $this->customerOriginalImageUploadPath = Config::get('constant.CUSTOMER_ORIGINAL_IMAGE_UPLOAD_PATH');\n $this->customerThumbImageUploadPath = Config::get('constant.CUSTOMER_THUMB_IMAGE_UPLOAD_PATH');\n $this->customerThumbImageHeight = Config::get('constant.CUSTOMER_THUMB_IMAGE_HEIGHT');\n $this->customerThumbImageWidth = Config::get('constant.CUSTOMER_THUMB_IMAGE_WIDTH');\n\n $this->customerProofFrontOriginalImageUploadPath = Config::get('constant.CUSTOMER_PROOF_FRONT_ORIGINAL_IMAGE_UPLOAD_PATH');\n $this->customerProofFrontThumbImageUploadPath = Config::get('constant.CUSTOMER_PROOF_FRONT_THUMB_IMAGE_UPLOAD_PATH');\n $this->customerProofFrontThumbImageHeight = Config::get('constant.CUSTOMER_PROOF_FRONT_THUMB_IMAGE_HEIGHT');\n $this->customerProofFrontThumbImageWidth = Config::get('constant.CUSTOMER_PROOF_FRONT_THUMB_IMAGE_WIDTH');\n\n $this->customerProofBackOriginalImageUploadPath = Config::get('constant.CUSTOMER_PROOF_BACK_ORIGINAL_IMAGE_UPLOAD_PATH');\n $this->customerProofBackThumbImageUploadPath = Config::get('constant.CUSTOMER_PROOF_BACK_THUMB_IMAGE_UPLOAD_PATH');\n $this->customerProofBackThumbImageHeight = Config::get('constant.CUSTOMER_PROOF_BACK_THUMB_IMAGE_HEIGHT');\n $this->customerProofBackThumbImageWidth = Config::get('constant.CUSTOMER_PROOF_BACK_THUMB_IMAGE_WIDTH');\n }", "function add_image_attachment_fields_to_edit( $form_fields, $post ) {\n\n\t// Add a size\n\t$form_fields['size_width'] = array(\n\t\t\"label\" => __(\"Bredde (cm)\"),\n \"input\" => \"html\",\n\t\t\"html\" => \"<input type='number' name='attachments[{$post->ID}][size_width]' id='attachments[{$post->ID}][size_width]' min='0' value='\".get_post_meta($post->ID, '_size_width', true).\"'>\", // this is default if \"input\" is omitted\n\t);\n\n // Add a size\n $form_fields['size_height'] = array(\n \"label\" => __(\"Højde (cm)\"),\n \"input\" => \"html\",\n \"html\" => \"<input type='number' name='attachments[{$post->ID}][size_height]' id='attachments[{$post->ID}][size_height]' min='0' value='\".get_post_meta($post->ID, '_size_height', true).\"'>\",\n );\n\n\treturn $form_fields;\n}", "public function setUpImageUploadConfig()\n {\n $filename = $this->getRandomString(20);\n $config['upload_path'] = \"./uploads/\";\n $config['allowed_types'] = 'gif|jpg|png';\n $config['max_size'] = 200000;\n $config['file_name'] = $filename;\n $this->load->library('upload', $config);\n\n return $filename;\n }", "public function uploadImage()\n {\n if (null === $this->fileimage) {\n return;\n }\n\n $upload = new Upload();\n $this->image = $upload->createName(\n $this->fileimage->getClientOriginalName(),\n $this->getUploadRootDir().'/',\n array('tmp/','miniature/')\n );\n\n $imagine = new Imagine();\n\n /* Tmp */\n $size = new Box(1920,1080);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'inset')\n ->save($this->getUploadRootDir().'tmp/'.$this->image);\n\n /* Miniature */\n $size = new Box(300,300);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'outbound')\n ->save($this->getUploadRootDir().'miniature/'.$this->image);\n\n }", "function exif_admin_settings_form() {\n $forms = array();\n /*$forms['exif_granularity'] = array(\n '#type'\t=>\t'select',\n '#title'=>\tt('Granularity'),\n '#options'=> array(0=>t('Default'),1=>('Day')),\n '#default_value'=>variable_get('exif_granularity',0),\n '#description'=>t('If a timestamp is select (for example the date the picture was taken), you can specify here how granular the timestamp should be. If you select default it will just take whatever is available in the picture. If you select Day, the Date saved will look something like 13-12-2008. This can be useful if you want to use some kind of grouping on the data.'),\n );*/\n\n $all_nodetypes = node_type_get_types();\n $all_nt = array();\n foreach ($all_nodetypes as $item) {\n $all_nt[$item->type] = $item->name;\n }\n $forms['exif_nodetypes'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Nodetypes'),\n '#options' => $all_nt,\n '#default_value' => variable_get('exif_nodetypes', array()),\n '#description' => t('Select nodetypes which should be checked for itpc & exif data. In case the nodetypes contains more than one image field, the module will use the first one.'),\n );\n\n if (module_exists(\"media\")) {\n $all_mt = array();\n // Setup media types\n $types = media_type_get_types();\n foreach ($types as $key) {\n $all_mt[$key->name] = $key->name;\n }\n $forms['exif_mediatypes'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Mediatypes'),\n '#options' => $all_mt,\n '#default_value' => variable_get('exif_mediatypes', array()),\n '#description' => t('Select mediatypes which should be checked for itpc & exif data.'),\n );\n }\n\n\n $forms['exif_update'] = array(\n '#type' => 'checkbox',\n '#title' => t('Refresh on node update'),\n '#default_value' => variable_get('exif_update', TRUE),\n '#description' => t('If you enable this option, Exif data is being updated when the node is being updated.'),\n );\n\n $forms['exif_empty_values'] = array(\n '#type' => 'checkbox',\n '#title' => t('Write empty image data?'),\n '#default_value' => variable_get('exif_empty_values', TRUE),\n '#description' => t(\"If checked all values will be written. So for example if you want to read the creation date from EXIF, but it's not available, it will just write an empty string. If unchecked, empty strings will not be written. This might be the desired behavior, if you have a default value for the CCK field.\"),\n );\n\n $all_vocabularies = taxonomy_get_vocabularies();\n $all_vocs = array();\n $all_vocs[0] = 'None';\n foreach($all_vocabularies as $item){\n $all_vocs[$item->vid] = $item->name;\n }\n $forms['exif_vocabulary'] = array(\n\t\t'#type'\t=>\t'select',\n\t\t'#title'=>\tt('Vocabulary'),\n\t\t'#options'=> $all_vocs,\n\t\t'#default_value'=>variable_get('exif_vocabulary',array()),\n\t\t'#description'=> t('Select vocabulary which should be used for itpc & exif data.'),\n );\n //TODO: add a button to create a vocabulary \"images'metadata\" (exif,iptc and xmp data contains in jpef file)\n //TODO : add a button to create an Photo node with default exif field (title,model,keywords) and default behavior but 'promoted to front'\n //TODO : Check if the media module is install to add automatically the image type active and add active default exif field (title,model,keywords).\n return system_settings_form($forms);\n}", "function set_valid_image_data() {\n $base_image = $this->get_config('base_image', false);\n if ($base_image !== false) {\n // Definitely configured\n if ($base_image == '0') {\n // Configured to text-only\n $this->image_name = $base_image;\n } else {\n $imagesize = serendipity_getimagesize(dirname(__FILE__) . \"/img/\" . $base_image);\n if ($imagesize['noimage']) {\n // Leave as default\n } else {\n // Set to valid image name\n $this->image_name = $base_image;\n }\n }\n }\n // Is the (possibly default) image valid?\n if ($this->image_name) {\n $imagesize = serendipity_getimagesize(dirname(__FILE__) . \"/img/\" . $this->image_name);\n if (isset($imagesize['noimage']) && $imagesize['noimage']) {\n // No valid image; use text-only\n $this->image_name = '0';\n } else {\n // Valid graphical image; set the dimensions, too\n $this->image_width = $imagesize[0];\n $this->image_height = $imagesize[1];\n }\n }\n }", "private function build_image_field($_meta) {\r\n global $content_width, $_wp_additional_image_sizes;\r\n $html = '';\r\n $has_image = false;\r\n $thumbnail_html = \"\";\r\n $content_width = 64;\r\n $old_content_width = $content_width;\r\n $image_wrapper_class = \"wccaf-image-field-wrapper\";\r\n \r\n $location_class = str_replace(\".php\", \"\", $_meta[\"location\"]);\r\n \r\n $_meta[\"upload_btn_label\"] = (isset($_meta[\"upload_btn_label\"]) && ! empty($_meta[\"upload_btn_label\"])) ? $_meta[\"upload_btn_label\"] : \"Upload\";\r\n $_meta[\"media_browser_title\"] = (isset($_meta[\"media_browser_title\"]) && ! empty($_meta[\"media_browser_title\"])) ? $_meta[\"media_browser_title\"] : \"Choose an Image\";\r\n $_meta[\"upload_probe_text\"] = (isset($_meta[\"upload_probe_text\"]) && ! empty($_meta[\"upload_probe_text\"])) ? $_meta[\"upload_probe_text\"] : \"You haven't set an image yet\";\r\n \r\n if (isset($_meta[\"value\"]) && ! empty($_meta[\"value\"])) {\r\n if (! isset($_wp_additional_image_sizes['thumbnail'])) {\r\n $thumbnail_html = wp_get_attachment_image($_meta[\"value\"], array(\r\n $content_width,\r\n $content_width\r\n ));\r\n } else {\r\n $thumbnail_html = wp_get_attachment_image($_meta[\"value\"], 'thumbnail');\r\n }\r\n if (! empty($thumbnail_html)) {\r\n $has_image = true;\r\n $image_wrapper_class = \"wccaf-image-field-wrapper has_image\";\r\n }\r\n $content_width = $old_content_width;\r\n }\r\n \r\n if ($_meta[\"location\"] != \"product_cat_add_form_fields\" && $_meta[\"location\"] != \"product_cat_edit_form_fields\") {\r\n $html = '<div class=\"form-field ' . esc_attr($_meta['key']) . \"_field \" . $image_wrapper_class . ' ' . $location_class . '\">';\r\n $html .= '<label>' . esc_html($_meta['label']) . '</label>';\r\n } else if ($_meta[\"location\"] == \"product_cat_add_form_fields\") {\r\n $html .= '<div class=\"form-field ' . $location_class . ' ' . esc_attr($_meta['key']) . \"_field \" . $image_wrapper_class . '\">';\r\n $html .= '<label class=\"wcff-admin-field-label\" for=\"' . esc_attr($_meta['key']) . '\">' . wp_kses_post($_meta['label']) . ((isset($_meta[\"required\"]) && $_meta[\"required\"] == \"yes\") ? ' <span>*</span>' : '') . '</label>';\r\n } else {\r\n $html .= '<tr class=\"form-field ' . esc_attr($_meta['key']) . \"_field \" . $image_wrapper_class . ' ' . $location_class . '\">';\r\n $html .= '<th scope=\"row\" valign=\"top\"><label class=\"wcff-admin-field-label\" for=\"' . esc_attr($_meta['key']) . '\">' . wp_kses_post($_meta['label']) . ((isset($_meta[\"required\"]) && $_meta[\"required\"] == \"yes\") ? ' <span>*</span>' : '') . '</label></th>';\r\n $html .= '<td>';\r\n }\r\n \r\n /* Image preview section start */\r\n \r\n if (! empty($thumbnail_html)) {\r\n $html .= $thumbnail_html;\r\n } else {\r\n $html .= '<img src=\"\" style=\"width:' . esc_attr($content_width) . 'px;height:auto;border:0;display:none;\" />';\r\n }\r\n $html .= '<a href=\"#\" class=\"wccaf-image-remove-btn\"></a>';\r\n $html .= '<input type=\"hidden\" id=\"' . esc_attr($_meta[\"key\"]) . '\" name=\"' . esc_attr($_meta[\"key\"]) . '\" value=\"\" />';\r\n \r\n /* Image preview section end */\r\n /* Upload section start */\r\n \r\n $html .= '<p class=\"wccaf-img-field-btn-wrapper\" style=\"display: ' . ($has_image ? \"none\" : \"block\") . '\">';\r\n $html .= '<span>' . esc_html($_meta[\"upload_probe_text\"]) . '</span>';\r\n $html .= '<input type=\"button\" class=\"button wcff_upload_image_button\" data-uploader_title=\"' . esc_attr($_meta[\"media_browser_title\"]) . '\" value=\"' . esc_attr($_meta[\"upload_btn_label\"]) . '\" />';\r\n $html .= '</p>';\r\n \r\n /* Upload section end */\r\n \r\n if ($_meta[\"location\"] != \"product_cat_add_form_fields\" && $_meta[\"location\"] != \"product_cat_edit_form_fields\") {\r\n $html .= '</div>';\r\n } else if ($_meta[\"location\"] == \"product_cat_add_form_fields\") {\r\n $html .= '</div>';\r\n } else {\r\n $html .= '</td>';\r\n $html .= '</tr>';\r\n }\r\n return $html;\r\n }", "public function setup(){\n $this -> widgetSchema['crop'] = new teWidgetFormInputJcrop();\n $this -> widgetSchema['file'] = new sfWidgetFormInputHidden();\n }", "function _webform_edit_file($currfield) {\r\n $edit_fields = array();\r\n $edit_fields['#theme'] = 'webform_edit_file';\r\n $edit_fields['extra']['filtering'] = array(\r\n '#type' => 'fieldset',\r\n '#collapsible' => TRUE,\r\n '#collapsed' => FALSE,\r\n '#title' => t('Upload Filtering'),\r\n '#description' => t('Select the types of uploads you would like to allow.'),\r\n '#element_validate' => array('_webform_edit_file_filtering_validate'),\r\n );\r\n\r\n // Find the list of all currently valid extensions.\r\n $current_types = isset($currfield['extra']['filtering']['types']) ? $currfield['extra']['filtering']['types'] : array();\r\n\r\n $types = array('gif', 'jpg', 'png');\r\n $edit_fields['extra']['filtering']['types']['webimages'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Web Images'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('bmp', 'eps', 'tif', 'pict', 'psd');\r\n $edit_fields['extra']['filtering']['types']['desktopimages'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Desktop Images'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('txt', 'rtf', 'html', 'odf', 'pdf', 'doc', 'ppt', 'xls', 'xml');\r\n $edit_fields['extra']['filtering']['types']['documents'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Documents'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('avi', 'mov', 'mp3', 'ogg', 'wav');\r\n $edit_fields['extra']['filtering']['types']['media'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Media'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('bz2', 'dmg', 'gz', 'jar', 'rar', 'sit', 'tar', 'zip');\r\n $edit_fields['extra']['filtering']['types']['archives'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Archives'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $edit_fields['extra']['filtering']['addextensions'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Additional Extensions'),\r\n '#default_value' => $currfield['extra']['filtering']['addextensions'],\r\n '#description' => t('Enter a list of additional file extensions for this upload field, seperated by commas.<br /> Entered extensions will be appended to checked items above.'),\r\n '#size' => 60,\r\n '#weight' => 3,\r\n '#default_value' => $currfield['extra']['filtering']['addextensions'],\r\n );\r\n\r\n $edit_fields['extra']['filtering']['size'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Max Upload Size'),\r\n '#default_value' => $currfield['extra']['filtering']['size'],\r\n '#description' => t('Enter the max file size a user may upload (in KB).'),\r\n '#size' => 10,\r\n '#weight' => 3,\r\n '#default_value' => $currfield['extra']['filtering']['size'],\r\n );\r\n $edit_fields['extra']['savelocation'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Upload Directory'),\r\n '#default_value' => $currfield['extra']['savelocation'],\r\n '#description' => '<div style=\"display: block\">'. t('Webform uploads are always saved in the site files directory. You may optionally specify a subfolder to store your files.') .'</div>',\r\n '#weight' => 3,\r\n '#element_validate' => array('_webform_edit_file_check_directory', '_webform_edit_file_validate'),\r\n '#after_build' => array('_webform_edit_file_check_directory'),\r\n );\r\n $edit_fields['extra']['width'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Width'),\r\n '#default_value' => $currfield['extra']['width'],\r\n '#description' => t('Width of the file field.') .' '. t('Leaving blank will use the default size.'),\r\n '#size' => 5,\r\n '#maxlength' => 10,\r\n '#weight' => 4,\r\n );\r\n return $edit_fields;\r\n}", "function OnPostForm()\n {\n $this->SaveFile(\"siteCoatUser\", Array(\"extensions\" => \"gif,jpg,jpeg,png\", \"max_height\" => 139, \"max_width\" => 139, \"make_preview\" => \"N\"));\n }", "protected function configureFormFields(FormMapper $formMapper)\n {\n $file_options = array(\n 'required' => ($this->getSubject()->getId() === null),\n 'constraints' => array(\n new FeaturedImageConstraint(),\n ), );\n if ($this->getSubject()->getId() != null) {\n $file_options['help'] = '<img src=\"../'.$this->getFeaturedImageUrl($this->getSubject()).'\">';\n }\n\n $formMapper\n ->add('file', 'file', $file_options)\n ->add('url', 'url')\n ->add('flavor')\n ->add('priority')\n ->add('for_ios', null, array('label' => 'iOS only', 'required' => false, 'help' => 'Toggle for iOS featured url api call.'))\n ->add('active', null, array('required' => false))\n ;\n }", "public function custom_admin_init_action() {\n\t\t$args = array(\n\t\t\t'class' => 'widefat'\n\t\t);\n\n\t\t$this->add_settings_field( 'upload_description', __( 'Upload Description', $this->textdomain ), 'admin_setting_field_input', 'default', $args );\n\t}", "private function setPostImg() {\n\n // Files needed features\n $fileName = $_FILES['postImg']['name'];\n $tmp_name = $_FILES['postImg']['tmp_name'];\n $fileSize = $_FILES['postImg']['size'];\n $fileError = $_FILES['postImg']['error'];\n $fileType = $_FILES['postImg']['type'];\n\n // Seperating & detecting the Extentions\n $fileExt = explode('.', $fileName);\n // Get the last piece of an array\n $fileActualExt = strtolower(end($fileExt));\n // Extenstions which can be upload\n $allowedExt = array('jpg', 'jpeg', 'png');\n\n if (in_array($fileActualExt, $allowedExt)) {\n if ($fileError == 0 && $fileSize < $this->imgSize) {\n // Create new name \n $fileNewName = uniqid('', true) . \".\" . $fileActualExt;\n $fileDestination = '../assest/img/postUploadImgs/' . $fileNewName;\n $moved = move_uploaded_file($tmp_name, $fileDestination);\n\n // If successfully image was moved\n if ($moved) {\n return $fileNewName;\n } else {\n return false;\n }\n \n } else {\n // Making an alert pop up \n flash('imgSize', 'Image size should not be more than 30mb');\n return false;\n }\n }\n }", "public function ImageType($file_type){\r\n $this->file_type=$file_type;\r\n }", "public function uploadAction() {\r\n\r\n //GET NAVIGATION\r\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\r\n ->getNavigation('advancedslideshow_admin_main', array(), 'advancedslideshow_admin_main_manage_slideshows');\r\n\r\n //GET SLIDESHOW SUBJECT AND SLIDESHOW ID\r\n $advancedslideshow = Engine_Api::_()->core()->getSubject();\r\n $this->view->advancedslideshow_id = $advancedslideshow_id = $advancedslideshow->advancedslideshow_id;\r\n $settings = Engine_Api::_()->getApi('settings', 'core');\r\n $getSlideUpload = $settings->getSetting('siteslideshow.slide.upload', null);\r\n\r\n if (isset($_GET['ul']) || isset($_FILES['Filedata']))\r\n return $this->_forward('upload-image', null, null, array('format' => 'json', 'advancedslideshow_id' => $advancedslideshow_id));\r\n\r\n $this->view->form = $form = new Advancedslideshow_Form_Admin_Image_Upload();\r\n $form->file->setAttrib('data', array('advancedslideshow_id' => $advancedslideshow_id));\r\n $status = $this->getUploadedImage();\r\n\r\n if ((!$this->getRequest()->isPost()) || empty($getSlideUpload)) {\r\n return;\r\n }\r\n\r\n if ((!$form->isValid($this->getRequest()->getPost())) || empty($getSlideUpload)) {\r\n return;\r\n }\r\n\r\n $db = Engine_Api::_()->getItemTable('advancedslideshow_image')->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $values = $form->getValues();\r\n $params = array(\r\n 'advancedslideshow_id' => $advancedslideshow_id,\r\n 'user_id' => Engine_Api::_()->user()->getViewer()->getIdentity(),\r\n );\r\n\r\n $settings->setSetting('siteslideshow.slide.upload', $status);\r\n $settings->setSetting('siteslideshow.manage', $status);\r\n $settings->setSetting('siteslideshow.slide.info', $status);\r\n\r\n foreach ($values['file'] as $image_id) {\r\n $image = Engine_Api::_()->getItem(\"advancedslideshow_image\", $image_id);\r\n if (!($image instanceof Core_Model_Item_Abstract) || !$image->getIdentity())\r\n continue;\r\n\r\n $image->save();\r\n\r\n if ($advancedslideshow->image_id == 0) {\r\n $advancedslideshow->image_id = $image->file_id;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //REDIRECT\r\n $this->_redirect(\"admin/advancedslideshow/slides/manage/advancedslideshow_id/\" . $advancedslideshow_id);\r\n }", "function classiera_insert_userIMG($file_handler){\r\n\tif ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false();\r\n\trequire_once(ABSPATH . \"wp-admin\" . '/includes/image.php');\r\n\trequire_once(ABSPATH . \"wp-admin\" . '/includes/file.php');\r\n\trequire_once(ABSPATH . \"wp-admin\" . '/includes/media.php');\r\n\t$attach_id = media_handle_upload($file_handler, $post_id = null);\r\n\t$profileURL = wp_get_attachment_image_src($attach_id);\r\n return $profileURL;\r\n}", "protected function getImageConfiguration() {}", "private function set_upload_options() {\n $config = array();\n $config ['upload_path'] = './uploadedImage';\n $config ['allowed_types'] = 'gif|jpg|png|bmp';\n\n return $config;\n }", "function beforeFilter(){\n\t\tparent::beforeFilter();\n\t\t\n\t\t$this->Uploader->enableUpload = true;\n\t\t$this->Uploader->maxFileSize = '75M'; // 75 Megabytes\n\t\t//debug($plural_model);\n\t\t$this->Uploader->uploadDir = \"media/transfer/img/temp/\";\n\t\t//$this->Uploader->tempDir = \"media/transfer/img/temp_transfer/\";\n\t\t\n\t\t//$this->Uploader->mime('image', 'gif', 'image/gif');\n\t\t//$this->Uploader->maxNameLength = 50;\n\t}", "function form_upload_picture() {\n $user = $this->ion_auth->user()->row();\n $this->load->view('portofolio/form_update_foto', $user);\n }", "function construct_single_image(){\n\t\t\t\n\t\t\tvc_add_param( 'vc_single_image', \n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'heading' => __(\"Add Photo Stack Effect\", \"CURLYTHEME\"),\n\t\t\t\t\t'param_name' => 'photo_frame',\n\t\t\t\t\t'weight'\t=> 1\n\t\t\t\t) \n\t\t\t);\n\t\t\t\n\t\t\tvc_add_param( 'vc_single_image', \n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'heading' => __(\"Add Zoomify Effect\", \"CURLYTHEME\"),\n\t\t\t\t\t'param_name' => 'zoomify',\n\t\t\t\t\t'weight'\t=> 2\n\t\t\t\t) \n\t\t\t);\n\t\t\t\n\t\t}", "private function fileFields()\n {\n $disk = 'public';\n\n if ($this->jsonData['disk']) {\n $disk = $this->jsonData['disk'];\n }\n\n $newData = [\n 'type' => $this->jsonData['type'],\n 'component' => 'file-field',\n 'vue' => $this->getCorrectVueComponent('form-file-field'),\n 'deletable' => true,\n 'downloadable' => false,\n 'deletable' => false,\n 'previewUrl' => null,\n 'thumbnailUrl' => null,\n 'disk' => $disk,\n 'textAlign' => 'center',\n ];\n\n $this->data = array_merge($this->data, $newData);\n }", "function set_main_image($post_id, $file_id)\n {\n $data = $this->Post_model->set_main_image($post_id, $file_id);\n //Salida JSON\n $this->output->set_content_type('application/json')->set_output(json_encode($data));\n }", "function wck_get_entry_field_upload($id){\r\n\t\tif( !empty ( $id ) && is_numeric( $id ) ){\t\t\t\t\r\n\t\t\t$file_src = wp_get_attachment_url($id);\r\n\t\t\t$thumbnail = wp_get_attachment_image( $id, array( 80, 60 ), true );\r\n\t\t\t$file_name = get_the_title( $id );\r\n\t\t\t\r\n\t\t\tif ( preg_match( '/^.*?\\.(\\w+)$/', get_attached_file( $id ), $matches ) )\r\n\t\t\t\t$file_type = esc_html( strtoupper( $matches[1] ) );\r\n\t\t\telse\r\n\t\t\t\t$file_type = strtoupper( str_replace( 'image/', '', get_post_mime_type( $id ) ) );\r\n\t\t\t\r\n\t\t\treturn $display_value = '<div class=\"upload-field-details\">'. $thumbnail .'<p><span class=\"file-name\">'. $file_name .'</span><span class=\"file-type\">'. $file_type . '</span></p></div>';\t\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "function upload_image($parent_id){\n\t\tif(!is_numeric($parent_id)){\n\t\t\tredirect('site_security/not_allowed');\n\t\t}\n\t\t$this->load->library('session');\n // security form\n\t\t$this->load->module('site_security');\n\t\t$this->site_security->_make_sure_is_admin();\n // get id\n\n\t\t$data['parent_id'] = $parent_id;\n\t\t$data['flash'] = $this->session->flashdata('item');\n\n\t // submit handler\n\n\t\t$data['headline'] = 'upload image';\n //$data['stor_items'] = 'stor_items';\n\t\t$data['view_file'] = 'upload_image';\n\t\t$this->load->module('templates');\n\t\t$this->templates->admin($data);\n\t}", "function get_image_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T721ZN1cd48f3',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_Content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f2',\n\t\t\t'label' => 'Attach image',\n\t\t\t'name' => 'image',\n\t\t\t'type' => 'image',\n\t\t\t'required' => 0,\n\t\t\t'return_format' => 'id',\n\t\t\t'preview_size' => 'rpwe-thumbnail',\n\t\t\t'library' => 'all',\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T721zN1cd48f3',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T7MtzN1cd48f3',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f3',\n\t\t\t'label' => 'Shape',\n\t\t\t'name' => 'shape',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'choices' => array (\n\t\t\t\t'auto' => 'Auto',\n\t\t\t\t'circle' => 'Circle',\n\t\t\t\t'square' => 'Square'\n\t\t\t),\n\t\t\t'default_value' => 'auto',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f4',\n\t\t\t'label' => 'Url',\n\t\t\t'name' => 'url',\n\t\t\t'type' => 'text',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'placeholder' => 'http://example.com',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f5',\n\t\t\t'label' => 'New window',\n\t\t\t'name' => 'target',\n\t\t\t'type' => 'true_false',\n\t\t\t'required' => '',\n\t\t\t'message' => 'Yes, open there',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25'\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f6',\n\t\t\t'label' => 'Size',\n\t\t\t'name' => 'size',\n\t\t\t'type' => 'number',\n\t\t\t'required' => '',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'default_value' => '100',\n\t\t\t'placeholder' => '100',\n\t\t\t'append' => '%',\n\t\t\t'min' => '1',\n\t\t\t'max' => '100'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGW71cd481w',\n\t\t\t'label' => 'Width',\n\t\t\t'name' => 'width',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'choices' => array (\n\t\t\t\t'auto' => 'Auto',\n\t\t\t\t'full' => 'Full'\n\t\t\t),\n\t\t\t'default_value' => 'auto',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t),\n\t);\n}", "function beran_logo_upload( $wp_customize ) {\n $wp_customize->add_section( 'beran_logo_section' , array(\n 'title' => __( 'Logo Image', 'beran_logo_upload' ),\n 'priority' => 30,\n 'description' => 'Upload a logo',\n ) );\n\n $wp_customize->add_setting( 'beran_logo_upload' );\n\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'beran_logo_upload', array(\n 'label' => __( 'Logo Image', 'beran_logo_upload' ),\n 'section' => 'beran_logo_section',\n 'settings' => 'beran_logo_upload',\n ) ) );\n}", "public function getCMSFields(){\n\t\t\t$fields = parent::getCMSFields();\n\t\t\t$fields->addFieldToTab('Root.Images', new UploadField('Photo'));\n\n\t\t\treturn $fields;\n\t\t}", "public function Uploadpicture()\r\n\t\t{\r\n\t\t}", "private function set_upload_options() { \r\n \r\n $config = array();\r\n $config['upload_path'] = 'assets/uploads/img';\r\n $config['allowed_types'] = 'gif|jpg|png';\r\n $config['max_size'] = '5000';\r\n $config['overwrite'] = FALSE;\r\n \r\n return $config;\r\n }", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n\n $fields->addFIeldTOTab('Root.Main',new TextField('Title','Image Title'));\n $fields->addFIeldTOTab('Root.Main',new TextareaField('Description','Photo Description (Max 500 Charachters)'));\n $fields->addFIeldTOTab('Root.Main',new UploadField('Image','Photo'));\n\n return $fields;\n }", "function CloudImages()\n {\n \\Cloudinary::config(array(\n \"cloud_name\" => $this->cloudName,\n \"api_key\" => $this->apiKey,\n \"api_secret\" => $this->apiSecret\n ));\n }", "public function getFormId() { \n return 'imageUploader'; //an unique id of your form\n \n }", "public function element_config()\n\t{\n\t\t$this->config['shortcode'] = 'pb_image';\n\t\t$this->config['name'] = JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE');\n\t\t$this->config['cat'] = JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_MEDIA');\n\t\t$this->config['icon'] = 'icon-image';\n\t\t$this->config['description'] = JText::_(\"JSN_PAGEBUILDER_ELEMENT_IMAGE_DES\");\n\t}", "function media_upload_form_handler()\n {\n }", "function setup() {\n\tadd_filter( 'intermediate_image_sizes_advanced', __NAMESPACE__ . '\\\\disable_upload_sizes', 10, 2 );\n\tadd_filter( 'post_thumbnail_size', __NAMESPACE__ . '\\\\force_full_size_gifs', 10, 1 );\n}", "private function buildImagesFields()\n {\n $groupName = Translate::getAdminTranslation(\"Images\", \"AdminProducts\");\n\n //====================================================================//\n // PRODUCT IMAGES\n //====================================================================//\n\n //====================================================================//\n // Product Images List\n $this->fieldsFactory()->create(SPL_T_IMG)\n ->Identifier(\"image\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Images\", \"AdminProducts\"))\n ->Group($groupName)\n ->MicroData(\"http://schema.org/Product\", \"image\");\n\n //====================================================================//\n // Product Images => Position\n $this->fieldsFactory()->create(SPL_T_INT)\n ->Identifier(\"position\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Position\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"positionImage\")\n ->Group($groupName)\n ->isNotTested();\n\n //====================================================================//\n // Product Images => Is Cover\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->Identifier(\"cover\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Cover\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"isCover\")\n ->Group($groupName)\n ->isNotTested();\n\n //====================================================================//\n // Product Images => Is Visible Image\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->Identifier(\"visible\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Visible\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"isVisibleImage\")\n ->Group($groupName)\n ->isNotTested();\n }", "function showUploadPhoto() {\n\t\t$this->setCacheLevelNone();\n\t\t$event = $this->getModel()->getEvent();\n\t\t$source = $this->getModel()->getSource();\n\t\t\n\t\tif ( $event->getID() == $source->getEventID() ) {\n\t\t\t$this->getEngine()->assign('event', utilityOutputWrapper::wrap($event));\n\t\t\t$this->getEngine()->assign('source', utilityOutputWrapper::wrap($source));\n\n\t\t\t$this->addJavascriptResource(new mvcViewJavascript('multifile', mvcViewJavascript::TYPE_FILE, '/libraries/mofilm/jquery.MultiFile.js'));\n\t\t\t$this->addJavascriptResource(new mvcViewJavascript('photoupload', mvcViewJavascript::TYPE_FILE, '/libraries/mofilm/mofilmphotoupload.js'));\n\t\t\t$this->addJavascriptResource(new mvcViewJavascript('blockui', mvcViewJavascript::TYPE_FILE, '/libraries/mofilm/jquery.blockUI.js'));\n\t\t\t$this->getEngine()->assign('error', FALSE);\n\t\t} else {\n\t\t\t$this->getEngine()->assign('error', TRUE);\n\t\t}\n\t\t\n\t\t$this->render($this->getTpl('uploadPhoto', '/account'));\n\t}", "function _webform_defaults_file() {\r\n return array(\r\n 'name' => '',\r\n 'form_key' => NULL,\r\n 'email' => 1,\r\n 'mandatory' => 0,\r\n 'pid' => 0,\r\n 'weight' => 0,\r\n 'extra' => array(\r\n 'filtering' => array(\r\n 'types' => array('gif', 'jpg', 'png'),\r\n 'addextensions' => '',\r\n 'size' => 800,\r\n ),\r\n 'savelocation' => '',\r\n 'width' => '',\r\n 'description' => '',\r\n 'attributes' => array(),\r\n ),\r\n );\r\n}", "public function preUploadImage()\n {\n if (null !== $this->getImageFile()) {\n // do whatever you want to generate a unique name\n $filename = sha1(uniqid(mt_rand(), true));\n $this->image = $filename . '.' . $this->getImageFile()->guessExtension();\n }\n }", "public function init(){\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->_html .= '<input type=\"file\" ';\n\t\t\n\t\tif(isset($this->_options['id'])){\n\t\t\t$this->_html .= 'id=\"'.$this->_options['id'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['class'])){\n\t\t\t$this->_html .= 'class=\"'.$this->_options['class'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['name'])){\n\t\t\t$this->_html .= 'name=\"'.$this->_options['name'].'\" ';\n\t\t}\n \n if(isset($this->_options['placeholder'])){\n\t\t\t$this->_html .= 'placeholder=\"'.$this->_options['placeholder'].'\" ';\n\t\t}\n\t\t\n\t\t$this->_html .= ' />';\n\t\tif(isset($this->_options['max']) && $this->_options['max'] == true){\n if(isset($this->_options['max_value'])){\n $this->_html .= '<input type=\"hidden\" name=\"MAX\" value=\"'.$this->_options['max_value'].'\" />';\n }else{\n $this->_html .= '<input type=\"hidden\" name=\"MAX\" value=\"10240\" />';\n }\n }else{\n $this->_html .= '<input type=\"hidden\" name=\"MAX\" value=\"10240\" />';\n }\n \n if(isset($this->_options['action'])){\n $this->_html .= '<input type=\"hidden\" name=\"action\" value=\"'.$this->_options['action'].'\" />';\n }else{\n $this->_html .= '<input type=\"hidden\" name=\"action\" value=\"wp_handle_upload\" />';\n }\n\t}", "public function initializeUpdateAction() {\n\t\t$this->setTypeConverterConfigurationForImageUpload('example');\n\t}", "static function dt_edit_image2($title,$name,$value,$width = 0,$height = 0,$comment='',$use_dropzone = 0,$list_other_images = array(),$class_col1='col-md-2',$class_col2='col-md-10'){\n\t\tif(!$use_dropzone){\n\t\t\t$html = '<tr><td valign=\"top\" class=\"key\" valign=\"top\">'.$title.'</td><td class=\"value\">';\n\t\t\tif($value){\n\t\t\t\t\t$html_w = $width?' width=\"'.$width.'\" ':'';\n\t\t\t\t\t$html_h = $height?' height=\"'.$height.'\" ':'';\n\t\t\t\t\t$html .= '<img src=\"'.$value.'\" '.$html_w.' '.$html_h.' /><br/>';\n\t\t\t}\n\t\t\t$html .= '<input type=\"file\" name=\"'.$name.'\" id=\"'.$name.'\" />';\n\t\t\tif($comment)\n\t\t\t\t$html .= '<p class=\"help-block\">'.$comment.'</p>';\n\t\t\t$html .= '</td></tr>';\n\t\t}else{\n\t\t\t$id = FSInput::get('id');\n\t\t\t$module = FSInput::get('module');\n\t\t\t$view = FSInput::get('view');\n\t\t\tif($id)\n\t\t\t\t$uploadConfig = base64_encode('edit|'.$id);\t\t\n\t\t\telse\n\t\t\t\t$uploadConfig = base64_encode('add|'.session_id());\n\n\t\t\t$list_other_images = TemplateHelper::get_other_images($module ,$uploadConfig);\n\t\t\t$colors = TemplateHelper::get_colors($id);\n\n\t\t\t$arr_sku_map = array(); \n\t\t\t$i= 1;\n\t\t\tforeach ($list_other_images as $item) {\n\t\t\t\t$arr_sku_map['Data'][$i]['AttachmentID']=$item->id;\n\t\t\t\t$arr_sku_map['Data'][$i]['FileName']=$item->title;\n\t\t\t\t$arr_sku_map['Data'][$i]['Path'] = URL_ROOT.str_replace('/original/','/original/', $item->image) ;\n\t\t\t\t$arr_sku_map['Data'][$i]['ColorId'] = $item->color_id;\n\t\t\t\t$i++;\n\t\t\t}\n if(!count($arr_sku_map)){\n $arr_sku_map['Data'][0]['AttachmentID']= 0;\n\t\t\t\t$arr_sku_map['Data'][0]['FileName']= '0';\n\t\t\t\t$arr_sku_map['Data'][0]['Path'] = '0';\n\t\t\t\t$arr_sku_map['Data'][0]['ColorId'] = '0';\n }\n\t\t\t$skuConfig = json_encode($arr_sku_map);\n\t\t\t$html = '\n\t\t <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"'. URL_ROOT.'libraries/jquery/dropzone/dist/min/dropzone.min.css\" />\n\t\t\t<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"libraries/dropzone/dropzone.css\" />\n\n\t\t\t<script type=\"text/javascript\" src=\"'. URL_ROOT.'libraries/jquery/dropzone/dist/min/dropzone.min.js\"></script>\n\n\t\t\t <script>\n\t\t\t $(document).ready(function() {\n\t\t\t \tvar data ='.$skuConfig.';\n\t\t\t\tvar previewNode = document.querySelector(\"#template\");\n\t\t\t\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\tpreviewNode.id = \"\";\n\t\t\t\tvar previewTemplate = previewNode.parentNode.innerHTML;\n\t\t\t\tpreviewNode.parentNode.removeChild(previewNode);\n\t\t\t\tvar myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone\n\t\t\t\t url: \"index2.php?module='.$module.'&view='. $view.'&raw=1&task=upload_other_images&data=\"+uploadConfig,\n\t\t\t\t thumbnailWidth: 100,\n\t\t\t\t thumbnailHeight: 100,\n\t\t\t\t parallelUploads: 20,\n\t\t\t\t previewTemplate: previewTemplate,\n\t\t\t\t autoQueue: true, \n\t\t\t\t previewsContainer: \"#previews\", \n\t\t\t\t clickable: \".fileinput-button\", \n\t\t\t\t removedfile: function(file) {\n\t\t\t\t \t\tconsole.log(file);\n\t\t\t\t\t \tvar reocord_id = $(\"#id_mage\").val();\n\t\t\t\t\t $.ajax({\n\t\t\t\t\t type: \"POST\",\n\t\t\t\t\t url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=delete_other_image\",\n\t\t\t\t\t data: { \"name\": file.name,\"reocord_id\":reocord_id,\"id\":file.size}\n\t\t\t\t\t });\n\t\t\t\t\tvar _ref;\n\t\t\t\t\treturn (_ref = file.previewElement) != null ? _ref.parentNode.removeChild(file.previewElement) : void 0; \n\t\t\t\t },\n success: function(file, response){\n //alert(response);\n file.previewElement.id = \"sort_\"+response;\n }, \n\t\t\t\t init: function () {\n\t\t\t\t var thisDropzone = this; \n if (data.Data != \"\") {\n $.each(data.Data, function (index, item) {\n var mockFile = {\n name: item.FileName,\n title: item.title,\n size: item.AttachmentID\n };\n thisDropzone.emit(\"addedfile\", mockFile);\n thisDropzone.emit(\"thumbnail\", mockFile, item.Path);\n \n //On the created element added the id property \n \t\t\t\t\t\t\t$(mockFile.previewElement).prop(\"id\", \"sort_\"+item.AttachmentID);\n $(mockFile.previewTemplate).find(\".title_dropzon\").val(item.FileName);\n \n \t\t\t\t\t\t\t//$(mockFile.previewTemplate).find(\".dz-color\").val(item.ColorId);\n \t\t\t\t\t\t\t//select_index = $(\"#sort_\"+item.AttachmentID+\" .dz-color option:selected\").index();\n\n \t\t\t\t\t\t\t//color_code = $(\"#sort_\"+item.AttachmentID+\" .dz-color\")[0].options[select_index].style.backgroundColor;\n \t\t\t\t\t\t\t//console.log($(\"#sort_\"+item.AttachmentID+\" .dz-color\"));\n \t\t\t\t\t\t\t//$(\"#sort_\"+item.AttachmentID+\" .dz-color\").css(\"background-color\", color_code);\n\n });\n }\n\t \t }\n\t\t\t\t});\n\n\t\t\t\t$(function() {\n\t\t\t\t\t$(\"#previews\").sortable({\n\t\t\t\t\t\tupdate : function () {\n\t\t\t\t\t\t\tserial = $(\"#previews\").sortable(\"serialize\");\n\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\turl: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=sort_other_images\",\n\t\t\t\t\t\t\t\ttype: \"post\",\n\t\t\t\t\t\t\t\tdata: serial,\n\t\t\t\t\t\t\t\terror: function(){\n\t\t\t\t\t\t\t\t\talert(\"Lỗi load dữ liệu\");\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}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t});\n\n\t\t\t });\n\t\t\t\t//function change_color(element){\n\t\t\t\t//\tvalue = $(element).val();\n\t\t\t\t//\tparent_id = $(element).parent().attr(\"id\");\n\t\t\t\t//\tid = parent_id.replace(\"sort_\", \"\");\n\t\t\t\t//\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\t//\t $.ajax({\n\t\t\t\t// type: \"POST\",\n\t\t\t\t// url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=change_attr_image\",\n\t\t\t\t// data: { \"field\": \"color\",\"data\":uploadConfig,\"id\":id,\"value\":value}\n\t\t\t\t// });\n\t\t\t\t//\t element.style.backgroundColor=element.options[element.selectedIndex].style.backgroundColor;\n\t\t\t\t//}\n \n function change_tile(element){\n\t\t\t\t\tvalue = $(element).val();\n\t\t\t\t\tparent_id = $(element).parent().attr(\"id\");\n id = parent_id.replace(\"sort_\", \"\");\n\t\t\t\t\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\t\t $.ajax({\n\t\t\t\t type: \"POST\",\n\t\t\t\t url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=change_title_attr_image\",\n\t\t\t\t data: {\"data\":uploadConfig,\"id\":id,\"value\":value}\n\t\t\t\t });\n\t\t\t\t}\n\t\t\t </script>\n\t\t\t';\n\t\t\t$html .= '<div class=\"dropzone files\" id=\"previews\">';\n\t\t\t\t$html .= '<div id=\"template\" class=\"dz-preview dz-image-preview\">';\n\t\t\t\t\t$html .= '<div class=\"dz-details\">';\n\t\t\t\t\t $html .= '<img data-dz-thumbnail />';\n\t\t\t\t\t$html .= '</div>';\n\t\t\t\t\t$html .= '<div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress=\"\"></span></div>';\n\t\t\t\t \t$html .= '<a class=\"dz-remove\" data-dz-remove id=\"\">Remove</a>';\n $html .= '<input type=\"text\" onchange=\"javascript: change_tile(this);\" class=\"form-control title_dropzon\" placeholder=\"Title\" style=\"width:100px;border-radius: 0px;margin-top: 2px;\">'; \n\t\t\t\t \t//$html .= '<select class=\"dz-color\" onchange=\"javascript: change_color(this);\">';\n\t\t\t\t \t//$html .= '<option value=\"0\" style=\"\">Chọn màu</option>';\n\t\t\t\t \t//if(@$colors ){\n\t\t\t\t\t//\tforeach($colors as $item){\n\t\t\t\t\t//\t\t$html .= '<option value=\"'.$item -> id.'\" style=\"background-color: #'.$item -> color_code.'\">'. $item -> color_name.'</option>';\n\t\t\t\t\t//\t}\n\t\t\t\t\t//}\n\t\t\t\t\t//$html .= '</select>';\n\t\t\t\t$html .= '</div>';\n\t\t\t\t\n\t\t\t$html .= '</div>';\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$uploadConfig.'\" id=\"uploadConfig\" />';\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$id.'\" id=\"id_mage\" />';\n\t\t\t $html .= '<span class=\"post_images fileinput-button\">Thêm ảnh/video</span>';\n\n\t\t}\n\t\techo $html;\n\t}", "public function action_image()\n\t{\n\t\t//Image::load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')->preset('mypreset', DOCROOT.'/files/04_2021/ea7e8ed4bc9d6f7c03f5f374e30b183b.png');\n\t\t$image = Image::forge();\n\n\t\t// Or with optional config\n\t\t$image = Image::forge(array(\n\t\t\t\t'quality' => 80\n\t\t));\n\t\t$image->load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->rounded(100)\n\t\t\t\t\t->output();\n\t\t// Upload an image and pass it directly into the Image::load method.\n\t\tUpload::process(array(\n\t\t\t'path' => DOCROOT.DS.'files'\n\t\t));\n\n\t\tif (Upload::is_valid())\n\t\t{\n\t\t\t$data = Upload::get_files(0);\n\n\t\t\t// Using the file upload data, we can force the image's extension\n\t\t\t// via $force_extension\n\t\t\tImage::load($data['file'], false, $data['extension'])\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->save('image');\n\t\t} \n\t}", "public function uploadImage($event)\n {\n if (!array_key_exists($this->attribute, $event->sender->attributes)) {\n throw new InvalidConfigException(Yii::t('wavecms/main', 'Attribute {attribute} not found in model {model}', ['attribute' => $this->attribute, 'model' => $event->sender->className()]));\n }\n\n $oldFile = $event->sender->getOldAttribute($this->attribute);\n\n $uploadedFile = UploadedFile::getInstance($event->sender, $this->attribute);\n\n if (null !== $uploadedFile && $uploadedFile->size !== 0) {\n\n $folder = $this->getWebrootFolder();\n\n if ($oldFile) {\n $this->unlinkFiles($oldFile);\n }\n\n $baseName = $uploadedFile->baseName;\n $fileName = $baseName . '.' . $uploadedFile->extension;\n\n while (@file_exists($folder . '/' . $fileName)) {\n $baseName .= '_';\n $fileName = $baseName . '.' . $uploadedFile->extension;\n }\n\n FileHelper::createDirectory($folder, 0777);\n $uploadedFile->saveAs($folder . '/' . $fileName);\n\n FileHelper::createDirectory($folder . '/' . $this->thumbFolder, 0777);\n Image::thumbnail($folder . '/' . $fileName, $this->thumbWidth, $this->thumbHeight)\n ->save($folder . '/' . $this->thumbFolder . '/' . $fileName, ['quality' => $this->quality]);\n\n if (is_array($this->sizes)) {\n $i = 0;\n foreach ($this->sizes as $size) {\n $manipulatorInterface = ManipulatorInterface::THUMBNAIL_OUTBOUND;\n\n if (isset($size[2]) && in_array($size[2], [ManipulatorInterface::THUMBNAIL_OUTBOUND, ManipulatorInterface::THUMBNAIL_INSET], true)) {\n $manipulatorInterface = $size[2];\n }\n\n FileHelper::createDirectory($folder . '/' . $i, 0777);\n Image::thumbnail($folder . '/' . $fileName, $size[0], $size[1], $manipulatorInterface)\n ->save($folder . '/' . $i . '/' . $fileName, ['quality' => $this->quality]);\n $i++;\n }\n }\n\n $event->sender->{$this->attribute} = $fileName;\n } else {\n if (Yii::$app->request->post($this->attribute . '_image_delete')) {\n $this->unlinkFiles($oldFile);\n $event->sender->{$this->attribute} = null;\n } else {\n $event->sender->{$this->attribute} = $oldFile;\n }\n }\n }" ]
[ "0.6592604", "0.65460974", "0.64392287", "0.64333475", "0.64064604", "0.6393257", "0.63896954", "0.63801354", "0.63511944", "0.6338962", "0.6337418", "0.6318217", "0.63078433", "0.6302878", "0.6300249", "0.6278918", "0.6267141", "0.62612396", "0.6245401", "0.6235743", "0.6217614", "0.62120026", "0.62061924", "0.61974436", "0.6193382", "0.61700904", "0.6125211", "0.60936105", "0.6091876", "0.6087129", "0.60862774", "0.60768044", "0.60480106", "0.6041638", "0.60334", "0.60206467", "0.6011933", "0.60104364", "0.60098", "0.6009027", "0.6002942", "0.5960216", "0.59581345", "0.595186", "0.59500813", "0.5945223", "0.5942345", "0.5936477", "0.5933131", "0.5930839", "0.59283954", "0.59199923", "0.5912919", "0.5909129", "0.590585", "0.58967257", "0.58939344", "0.58928806", "0.5877908", "0.5868647", "0.58651704", "0.5843005", "0.5836714", "0.58348876", "0.5828645", "0.5826558", "0.5823551", "0.5812748", "0.5804945", "0.58019567", "0.5786386", "0.5778635", "0.5775675", "0.5772032", "0.57701045", "0.57634246", "0.5743901", "0.57353115", "0.5734323", "0.5728313", "0.57233167", "0.5722786", "0.57223743", "0.5717933", "0.5717824", "0.5715209", "0.5713628", "0.5711618", "0.57088387", "0.5705157", "0.5703079", "0.5693014", "0.5687936", "0.5684626", "0.5682059", "0.56813854", "0.5678745", "0.567722", "0.5672111", "0.56718135", "0.56714576" ]
0.0
-1
The config array already contains our servers configuration data parsed into an array for us to work on, now we need to process and build a new array of categorised data that we can use to produce a consistent view file for the world login pages to use. Categories we want: 1. General Settings CountUpgrades = If Upgrades are counted as building slots. NoSubsidies=1 ElectionsOn=1 SendingMoney=0 AlliesPageOn=1 TranscendingOn=1 RandomSeasons=1 RelayEconomy=0 MagnaAtApprentice=1 MaxInvestors=100 NoTradeCenter=1 2. Tycoon Upgrade Levels Apprentice.facLimit=50 Entrepreneur.facLimit=100 Tycoon.facLimit=200 Master.facLimit=350 Paradigm.facLimit=500 Legend.facLimit=501 3. Boosts ResInhabBoost=5 ConstBoost=3 CommerceBoost=1 4. Upgrade Levels CountUpgrades = If Upgrades are counted as building slots. MaxServiceUpgrades MaxOfficeUpgrades ResMaxUpgrade MaxRCenterUpgrade=50 5. Misc Settings Tutorial=0 RemoveVisitors=1 RepairRoads=0 VoteLevel=1 FightFacColonies=yes LifeAfterLegend = ? ServiceBuysBatched=1 RemoveVisitors=1 RoadZone=11 MinTaxesPer=20 MinCivicsWage=150 MaxSubPop=500 MixedPlanet=1 MixedDesire=1000 ServiceBuysBatched=1 6. Building Separation MinCommerceSep=2 MinOfficeSep=1 7. Thread Speeds / Priorities SimSpeed=3 DASpeed=4 CacheSpeed=4 IntSpeed=0 Trans=0
public static function processConfig($configArray) { $baseCategories = [ 'general_settings' => [ 'display_name' => 'General Settings', 'display' => 'block', 'settings' => [ 'CountUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Count Upgrades', 'tool_tip' => 'Count upgrades as building slots', 'description' => 'Count upgrades as building slots', ], 'NoSubsidies' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Town Subsidies', 'tool_tip' => 'Town subsidies at low population', 'description' => 'Town subsidies at low population', ], 'ElectionsOn' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Elections', 'tool_tip' => 'Elections enabled or not', 'description' => 'Election of Mayor and Presidents enabled', ], 'SendingMoney' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Money Transfers', 'tool_tip' => 'Allow money transfers between players', 'description' => 'Allow money transfers between players', ], 'AlliesPageOn' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Allies', 'tool_tip' => 'Allow player alliances', 'description' => 'Allow player alliances', ], 'TranscendingOn' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Transcendence', 'tool_tip' => 'Allow nobility gain through transcendence', 'description' => 'Allow nobility gain through transcendence', ], 'RandomSeasons' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Random Seasons', 'tool_tip' => 'Random game seasons in suppose to spring, summer, autumn, winter cycle', 'description' => 'Random game seasons in suppose to spring, summer, autumn, winter cycle', ], 'RelayEconomy' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Recession Code', 'tool_tip' => 'Whether recession code is active in simulation', 'description' => 'Whether recession code is active in simulation', ], 'MagnaAtApprentice' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Apprentice Magna', 'tool_tip' => 'If apprentices with enough nobility can create magna companies', 'description' => 'If apprentices with enough nobility can create magna companies', ], 'MaxInvestors' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Max World Players', 'tool_tip' => 'Maximum player allowed to join this world', 'description' => 'Maximum player allowed to join this world', ], 'NoTradeCenter' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'No Trade Centre', 'tool_tip' => 'Prevent trade centre sales', 'description' => 'Prevent trade centre sales', ], ], ], 'tycoon_upgrade_levels' => [ 'display_name' => 'Tycoon Building Slots', 'display' => 'block', 'settings' => [ 'Apprentice.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Apprentice', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Entrepreneur.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Entrepreneur', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Tycoon.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Tycoon', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Master.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Master', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Paradigm.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Paradigm', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Legend.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Legend', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], ], ], 'building_upgrade_levels' => [ 'display_name' => 'Building Max Upgrades', 'display' => 'block', 'settings' => [ 'CountUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Count Upgrades', 'tool_tip' => 'Count building upgrades as a building slot', 'description' => 'Count building upgrades as a building slot', ], 'MaxServiceUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Service Maximum', 'tool_tip' => 'Maximum upgrade level for services', 'description' => 'Maximum upgrade level for services', ], 'MaxOfficeUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Office Maximum', 'tool_tip' => 'Maximum upgrade level for offices', 'description' => 'Maximum upgrade level for offices', ], 'ResMaxUpgrade' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Residential Maximum', 'tool_tip' => 'Maximum upgrade level for residencies', 'description' => 'Maximum upgrade level for residencies', ], 'MaxRCenterUpgrade' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Research Centre Maximum', 'tool_tip' => 'Maximum upgrade level for research centres', 'description' => 'Maximum upgrade level for research centres', ], ], ], 'misc_settings' => [ 'display_name' => 'Misc Settings', 'display' => 'block', 'settings' => [ 'Tutorial' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Tutorial Mode', 'tool_tip' => 'If enabled players are guided by a tutorial', 'description' => 'If enabled players are guided by a tutorial', ], 'RemoveVisitors' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Remove Visitors', 'tool_tip' => 'Prevent visitor access to the world', 'description' => 'Prevent visitor access to the world', ], 'RepairRoads' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Repair Roads', 'tool_tip' => 'Automatically repair roads', 'description' => 'Automatically repair roads', ], 'VoteLevel' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Vote Level', 'tool_tip' => 'Votes required for office', 'description' => 'Votes required for office', ], 'FightFacColonies' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Fighting faction colonies', 'tool_tip' => 'Fighting faction colonies', 'description' => 'Fighting faction colonies', ], 'LifeAfterLegend' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Life after Legend', 'tool_tip' => 'Whether Tycoon can continue level after legend', 'description' => 'Whether Tycoon can continue level after legend', ], 'ServiceBuysBatched' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Services Buy Batched', 'tool_tip' => 'Services buy supplies in batches', 'description' => 'Services buy supplies in batches', ], 'RoadZone' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Road Zone', 'tool_tip' => 'The zone that roads belong to', 'description' => 'The zone that roads belong to', ], 'MinTaxesPer' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Minimum Taxes', 'tool_tip' => 'Minimum tax level', 'description' => 'Minimum tax level', ], 'MinCivicsWage' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Minimum Civic Wages', 'tool_tip' => 'This is the minimum wage level a Tycoon can set for civic wages', 'description' => 'This is the minimum wage level a Tycoon can set for civic wages', ], 'MaxSubPop' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Maximum Subsidy Population', 'tool_tip' => 'The level of population after which subsidies will no longer be paid', 'description' => 'The level of population after which subsidies will no longer be paid', ], 'MixedPlanet' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Mixed Planet', 'tool_tip' => 'An as yet unknown setting', 'description' => 'An as yet unknown setting', ], 'MixedDesire' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Mixed Desire', 'tool_tip' => 'An as yet unknown setting', 'description' => 'An as yet unknown setting', ], ], ], 'boosts' => [ 'display_name' => 'Simulation Boosts', 'display' => 'block', 'settings' => [ 'ResInhabBoost' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Residential Boost', 'tool_tip' => 'Residential Boost', 'description' => 'Residential Boost', ], 'ConstBoost' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Construction Boost', 'tool_tip' => 'Construction Boost', 'description' => 'Construction Boost', ], 'CommerceBoost' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Commerce Boost', 'tool_tip' => 'Commerce Boost', 'description' => 'Commerce Boost', ], ], ], 'building_separation' => [ 'display_name' => 'Building Separation', 'display' => 'block', 'settings' => [ 'MinCommerceSep' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Commerce', 'tool_tip' => 'How far apart commerce buildings of the same class must be', 'description' => 'How far apart commerce buildings of the same class must be', ], 'MinOfficeSep' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Office', 'tool_tip' => 'How far apart office buildings of the same class must be', 'description' => 'How far apart office buildings of the same class must be', ], ], ], 'thread_speeds' => [ 'display_name' => 'Thread Speeds', 'display' => 'none', 'settings' => [ 'SimSpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Model Server', 'tool_tip' => 'Simulation Speed', 'description' => 'Simulation Speed', ], 'DASpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Direct Access', 'tool_tip' => 'Speed of something', 'description' => 'Speed of something', ], 'CacheSpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Cache Server', 'tool_tip' => 'Cache server speed', 'description' => 'Cache server speed', ], 'IntSpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Interface Server', 'tool_tip' => 'Interface Server speed', 'description' => 'Interface Server speed', ], 'Trans' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Transcendence', 'tool_tip' => 'Speed of transcendence', 'description' => 'Speed of transcendence', ], ], ], ]; foreach ($baseCategories as $categoryKey => &$category) { foreach ($category['settings'] as $settingName => &$setting) { $setting['setting'] = $configArray[$settingName] ?? $setting['default']; } } return self::makeTables($baseCategories); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function config_choose()\n {\n // Find all categories\n $hooks = find_all_hooks('systems', 'config');\n $categories = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if ((is_null($GLOBALS['CURRENT_SHARE_USER'])) || ($option['shared_hosting_restricted'] == 0)) {\n if (!is_null($ob->get_default())) {\n $category = $option['category'];\n if (!isset($categories[$category])) {\n $categories[$category] = 0;\n }\n $categories[$category]++;\n }\n }\n }\n\n // Show all categories\n $categories_tpl = new Tempcode();\n ksort($categories);\n foreach ($categories as $category => $option_count) {\n // Some are skipped\n if (get_forum_type() != 'cns') {\n if ($category == 'USERS') {\n continue;\n }\n if ($category == 'FORUMS') {\n continue;\n }\n }\n if (has_no_forum()) {\n if ($category == 'FORUMS') {\n continue;\n }\n }\n\n // Put together details...\n\n $url = build_url(array('page' => '_SELF', 'type' => 'category', 'id' => $category), '_SELF');\n\n $_category_name = do_lang('CONFIG_CATEGORY_' . $category, null, null, null, null, false);\n if (is_null($_category_name)) {\n attach_message(do_lang_tempcode('CAT_NOT_FOUND', escape_html($category), 'OPTION_CATEGORY'), 'warn');\n\n $category_name = make_string_tempcode($category);\n } else {\n $category_name = do_lang_tempcode('CONFIG_CATEGORY_' . $category);\n }\n\n $description = do_lang_tempcode('CONFIG_CATEGORY_DESCRIPTION__' . $category);\n\n $count = do_lang_tempcode('CATEGORY_SUBORDINATE_2', escape_html(integer_format($option_count)));\n\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '6ba2b09432d06e7502c71e7aac2d3527',\n 'COUNT' => $count,\n 'NAME' => $category_name,\n 'TITLE' => '',\n 'DESCRIPTION' => $description,\n 'URL' => $url,\n )));\n }\n\n $categories_tpl->attach(do_template('COMCODE_SUBTITLE', array(\n '_GUID' => '7fde99ae81367fb7405e94b6731a7d9x',\n 'TITLE' => do_lang('DEEPER_CONFIGURATION'),\n 'LEVEL' => '2',\n )));\n\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '6fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'base'), '_SELF'),\n 'NAME' => do_lang_tempcode('BASE_CONFIGURATION'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_BASE_CONFIGURATION'),\n )));\n\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '7fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'xml_fields'), '_SELF'),\n 'NAME' => do_lang_tempcode('FIELD_FILTERS'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_FIELD_FILTERS'),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '8fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'xml_breadcrumbs'), '_SELF'),\n 'NAME' => do_lang_tempcode('BREADCRUMB_OVERRIDES'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_BREADCRUMB_OVERRIDES'),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '9fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'upgrader'), '_SELF'),\n 'NAME' => do_lang_tempcode('FU_UPGRADER_TITLE'),\n 'DESCRIPTION' => do_lang_tempcode('FU_UPGRADER_INTRO'),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '0fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'backend'), '_SELF'),\n 'NAME' => do_lang_tempcode('_FEEDS'),\n 'DESCRIPTION' => comcode_to_tempcode(do_lang('OPML_INDEX_DESCRIPTION')),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '1fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'code_editor'), '_SELF'),\n 'NAME' => do_lang_tempcode('CODE_EDITOR'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_CODE_EDITOR'),\n )));\n\n // Wrapper\n return do_template('INDEX_SCREEN_FANCIER_SCREEN', array(\n '_GUID' => 'c8fdb2b481625d58b0b228c897fda72f',\n 'TITLE' => $this->title,\n 'PRE' => paragraph(do_lang_tempcode('CHOOSE_A_CONFIG_CATEGORY')),\n 'CONTENT' => $categories_tpl,\n 'POST' => '',\n ));\n }", "function serendipity_updateConfiguration() {\n global $serendipity, $umask;\n\n // Save all basic config variables to the database\n $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);\n\n if (isset($_POST['sqlitedbName']) && !empty($_POST['sqlitedbName'])) {\n $_POST['dbName'] = $_POST['sqlitedbName'];\n }\n\n // Password can be hidden in re-configuring, but we need to store old password\n if (empty($_POST['dbPass']) && !empty($serendipity['dbPass'])) {\n $_POST['dbPass'] = $serendipity['dbPass'];\n }\n\n foreach($config as $category) {\n foreach ( $category['items'] as $item ) {\n\n /* Don't save trash */\n if ( !serendipity_checkConfigItemFlags($item, 'configuration') ) {\n continue;\n }\n\n if (!isset($item['userlevel'])) {\n $item['userlevel'] = USERLEVEL_ADMIN;\n }\n\n // Check permission set. Changes to blogConfiguration or siteConfiguration items\n // always required authorid = 0, so that it be not specific to a userlogin\n if ( ($serendipity['serendipityUserlevel'] ?? 0) >= $item['userlevel'] || IS_installed === false ) {\n $authorid = 0;\n } elseif ($item['permission'] == 'blogConfiguration' && serendipity_checkPermission('blogConfiguration')) {\n $authorid = 0;\n } elseif ($item['permission'] == 'siteConfiguration' && serendipity_checkPermission('siteConfiguration')) {\n $authorid = 0;\n } else {\n $authorid = $serendipity['authorid'];\n }\n\n if (is_array($_POST[$item['var']])) {\n // Arrays not allowed. Use first index value.\n $_POST[$item['var']] = array_key_first($_POST[$item['var']]);\n\n // If it still is an array, munge it all together.\n if (is_array($_POST[$item['var']])) {\n $_POST[$item['var']] = @implode(',', $_POST[$item['var']]);\n }\n }\n\n serendipity_set_config_var($item['var'], $_POST[$item['var']], $authorid);\n }\n }\n\n if (IS_installed === false || serendipity_checkPermission('siteConfiguration')) {\n return serendipity_updateLocalConfig($_POST['dbName'],\n $_POST['dbPrefix'],\n $_POST['dbHost'],\n $_POST['dbUser'],\n $_POST['dbPass'],\n $_POST['dbType'],\n $_POST['dbPersistent']);\n } else {\n return true;\n }\n}", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\t\t\t\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Specials products';\r\n }\r\n $response = Configuration::updateValue('FIELD_SPECIALPLS_NBR', 6);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_VERTICAL', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MAXITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MEDIUMITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLLDELAY', 4000);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_NAVIGATION', 0);\r\n\r\n return $response;\r\n }", "private function categoriesGet()\n {\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n//var_dump(__METHOD__, __LINE__, array_keys( $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'points.' ]));\n // RETURN : method is called twice at least\n if ( $this->arrCategories != null )\n {\n return $this->arrCategories;\n }\n // RETURN : method is called twice at least\n // Local array for category labels\n $catLabels = null;\n // Local array for category icons\n $catIcons = null;\n // #54548, 131221, dwildt, 2+\n // Local array for category label css classes\n $catCss = null;\n\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n // Get the field name of the field with the category label\n $fieldForLabel = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'category' ];\n // Get the field name of the field with the category icon\n $fieldForIcon = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n // Get the field name of the field with the category label\n $fieldForLabel = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryTitle' ];\n // #54548, 131221, dwildt, 4+\n // Get the field name of the field with the category label class for a marker category\n $fieldForCssMarker = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryCssMarker' ];\n // Get the field name of the field with the category label class for a path category\n $fieldForCssPath = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryCssPath' ];\n // Get the field name of the field with the category icon\n $fieldForIcon = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Get categories from the rows\n $categoryLabels = array();\n\n // FOREACH row\n foreach ( $this->pObj->rows as $row )\n {\n // RETURN : field for category label is missing\n // 130530, dwildt\n switch ( true )\n {\n case(!$fieldForLabel ):\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'table.field with the category is empty';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n $prompt = 'Please use the TypoScript Constant Editor and maintain map.marker.field.category ';\n t3lib_div :: devLog( '[HELP/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 1 );\n }\n // DRS\n //var_dump(__METHOD__, __LINE__, $fieldForLabel);\n $this->arrCategories = array();\n return $this->arrCategories;\n // #47602, 130911, dwildt, 1+\n case(!array_key_exists( $fieldForLabel, $row ) ):\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'current rows doesn\\'t contain the field \"' . $fieldForLabel . '\"';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n //var_dump(__METHOD__, __LINE__, $fieldForLabel, array_keys($row), $this->categoriesGetWoLatLon( $row ) );\n // #i0196, 151022, dwildt, 6+\n if ( $this->categoriesGetWoLatLon( $row ) )\n {\n $this->arrCategories = array();\n return $this->arrCategories;\n }\n $row[ $fieldForLabel ] = '';\n break;\n // #i0196, 151022, dwildt, 6+/2-\n //$this->arrCategories = array();\n //return $this->arrCategories;\n // #i0076, 140721, dwildt, +\n case($this->categoriesGetWoLatLon( $row ) ):\n continue 2;\n default:\n // follow the workflow\n }\n // RETURN : field for category label is missing\n // 4.1.7, dwildt, 1-\n //$categoryLabels = array_merge( $categoryLabels, explode( $this->catDevider, $row[ $fieldForLabel ] ) );\n // 4.1.7, dwildt, 10+\n//var_dump( __METHOD__, __LINE__, $this->catDevider, $fieldForLabel, $row[ $fieldForLabel ]);\n//die();\n $catLabelsOfCurrRow = explode( $this->catDevider, $row[ $fieldForLabel ] );\n foreach ( $catLabelsOfCurrRow as $labelKey => $labelValue )\n {\n // #47602, 130911, dwildt, 4+\n if ( empty( $labelValue ) )\n {\n $labelValue = $this->pObj->pi_getLL( 'phrase_noMapCat' );\n // #i0062, 140714, 1+\n $this->arrWoCategories[ 'rows' ][] = $row[ $this->pObj->arrLocalTable[ 'uid' ] ];\n }\n $categoryLabels[] = $labelValue;\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $catIconsOfCurrRow = explode( $this->catDevider, $row[ $fieldForIcon ] );\n $categoryIcons[ $labelValue ] = $catIconsOfCurrRow[ $labelKey ];\n }\n // #54548, 131221, dwildt, 13+\n switch ( true )\n {\n case( isset( $row[ $fieldForCssMarker ] ) ):\n $catCssOfCurrRow = explode( $this->catDevider, $row[ $fieldForCssMarker ] );\n $categoryCss[ $labelValue ] = $catCssOfCurrRow[ $labelKey ];\n break;\n case( isset( $row[ $fieldForCssPath ] ) ):\n $catCssOfCurrRow = explode( $this->catDevider, $row[ $fieldForCssPath ] );\n $categoryCss[ $labelValue ] = $catCssOfCurrRow[ $labelKey ];\n break;\n default;\n break;\n }\n }\n // 4.1.7, dwildt, 10+\n }\n // FOREACH row\n // Get categories from the rows\n // #i0120, 150101, dwildt: 4+\n if ( $this->categoriesEmpty( $categoryLabels ) )\n {\n return false;\n }\n // Remove non unique category labels\n $categoryLabels = array_unique( $categoryLabels );\n//var_dump (__METHOD__, __LINE__, $categoryLabels);\n//var_dump(__METHOD__, __LINE__);\n // Order the category labels\n $orderBy = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'orderBy' ];\n switch ( $orderBy )\n {\n case( 'SORT_REGULAR' ):\n sort( $categoryLabels, SORT_REGULAR );\n break;\n case( 'SORT_NUMERIC' ):\n sort( $categoryLabels, SORT_NUMERIC );\n break;\n case( 'SORT_STRING' ):\n sort( $categoryLabels, SORT_STRING );\n break;\n case( 'SORT_LOCALE_STRING' ):\n sort( $categoryLabels, SORT_LOCALE_STRING );\n break;\n default:\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'configuration.categories.orderBy has an unproper value: \"' . $orderBy . '\"';\n t3lib_div :: devLog( '[ERROR/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 3 );\n $prompt = 'categories will ordered by SORT_REGULAR!';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n }\n sort( $categoryLabels, SORT_REGULAR );\n break;\n }\n // Order the category labels\n // Set the keys: keys should correspond with keys of the item colours\n $maxItem = count( $categoryLabels );\n $counter = 0;\n//var_dump(__METHOD__, __LINE__);\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n foreach ( array_keys( $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'points.' ] ) as $catKey )\n {\n if ( substr( $catKey, -1 ) == '.' )\n {\n continue;\n }\n $catLabels[ $catKey ] = $categoryLabels[ $counter ];\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $catIcons[ $catKey ] = $categoryIcons[ $categoryLabels[ $counter ] ];\n }\n\n // #i0062, 140714, 4+\n if ( $catLabels[ $catKey ] == $this->pObj->pi_getLL( 'phrase_noMapCat' ) )\n {\n $this->arrWoCategories[ 'iconKey' ] = $catKey;\n }\n // #54548, 131221, dwildt, 9+\n switch ( true )\n {\n case( isset( $row[ $fieldForCssMarker ] ) ):\n case( isset( $row[ $fieldForCssPath ] ) ):\n $catCss[ $catKey ] = $categoryCss[ $categoryLabels[ $counter ] ];\n break;\n default;\n break;\n }\n $counter++;\n if ( $counter >= $maxItem )\n {\n break;\n }\n }\n // Set the keys: keys should correspond with keys of the item colours\n\n $this->arrCategories[ 'labels' ] = $catLabels;\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $this->arrCategories[ 'icons' ] = $catIcons;\n }\n // #54548, 131221, dwildt, 8+\n if ( !empty( $catCss ) )\n {\n $this->arrCategories[ 'cssClass' ] = $catCss;\n }\n//var_dump(__METHOD__, __LINE__);\n\n return $this->arrCategories;\n }", "function virtualname_getConfigArray(){\n //INIT MODULE\n global $vname_admin, $vname_domains, $vname_nameservers, $vname_contacts, $vname_install;\n virtualname_init();\n //CHECK INSTALLATION\n $virtualnameInstall = $vname_install->check_install();\n //GET LANGUAGES\n $adminID = $_SESSION['adminid'];\n $configLang = $vname_admin->get_config_lang($adminID);\n //GET CUSTOM CLIENT\n $client_custom_fields = $vname_admin->get_config_clients_customfields();\n //GET ALL CUSTOM\n $custom_buttons = $vname_admin->custom_buttons($virtualnameInstall, $configLang);\n $configarray = array(\n 'FriendlyName' => array('Type' => 'System', 'Value'=> 'Virtualname - TCpanel', 'Description' =>'Virtualname - TCpanel'),\n 'Description' => array('Type' => 'System', 'Value'=> $configLang['name'].' <a href=\\'http://whmcs.virtualname.net\\' target=\\'_blank\\'>Virtualname</a> - v.'.$vname_admin->module_version, 'Description' =>'Module Domains Administration Virtualname - WHMCS'),\n 'Virtualname - TCpanel' => array('Type' => 'display', 'Description' => $configLang['description']),\n 'Module-Version' => array('Type' => 'display', 'Description' => 'v'.$vname_admin->module_version, 'value'=>$vname_admin->module_version, 'FriendlyName' => $configLang['moduleVersion']),\n 'APIKey' => array('Type'=> 'text', 'Description' => '', 'Size' => '50', 'FriendlyName' => 'APIKey'),\n 'autoRenew' => array('Type' => 'yesno', 'Description' => $configLang['autoRenew'], 'FriendlyName' => $configLang['autoRenewField']),\n 'hideicnumber' => array('Type' => 'yesno', 'Description' => $configLang['hideicnumber'], 'FriendlyName' => $configLang['hideicnumberField']),\n 'freeRegisterDomains' => array('Type' => 'yesno', 'Description' => $configLang['freeRegisterDomains'], 'FriendlyName' => $configLang['freeRegisterDomainsField']),\n 'freeRenewDomains' => array('Type' => 'yesno', 'Description' => $configLang['freeRenewDomains'], 'FriendlyName' => $configLang['freeRenewDomainsField']),\n 'templateVersion' => array('Type' => 'dropdown', 'Description' => $configLang['templateVersion'], 'Options' => 'six,five', 'Default' => 'six', 'FriendlyName' => $configLang['templateVersionField']),\n 'secureRenovation' => array('Type' => 'dropdown', 'Description' => $configLang['secureRenovation'], 'Options' => 'Disabled,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24', 'Default' => 'Disabled', 'FriendlyName' => $configLang['secureRenovationField'])\n );\n //CHECK IF TAX_ID CAN BE USED\n $check_enable_tax_id = $vname_admin->check_enable_customer_tax_id();\n if($check_enable_tax_id)\n $configarray = array_merge($configarray, array('taxid' => array('Type' => 'yesno', 'Description' => $configLang['taxid'], 'FriendlyName' => $configLang['taxidField'])));\n $configarray = array_merge($configarray, array(\n 'defaultvatnumber' => array('Type' => 'dropdown', 'Description' => $configLang['defaultvatnumber'], 'Options' => $client_custom_fields, 'Default' => 'Disabled', 'FriendlyName' => $configLang['defaultvatnumberField']),\n 'disablelocktlds' => array('Type' => 'textarea', 'Description' => $configLang['disablelocktlds'], 'Rows' => '3', 'Cols' => '50', 'Default' => 'es com.es org.es edu.es', 'FriendlyName' => $configLang['disablelocktldsField']),\n 'outboundTransferMailing' => array('Type' => 'yesno', 'Description' => $configLang['outboundTransferMailing'], 'FriendlyName' => $configLang['outboundTransferMailingField']),\n 'defaultNameserversError' => array('Type' => 'yesno', 'Description' => $configLang['defaultNameserversError'], 'FriendlyName' => $configLang['defaultNameserversErrorField']),\n 'disableAdvanceContacts' => array('Type' => 'yesno', 'Description' => $configLang['disableAdvanceContacts'], 'FriendlyName' => $configLang['disableAdvanceContactsField']),\n 'defaultDomainsMail' => array('Type' => 'text', 'Description' => $configLang['addDefaultDomainsMail'], 'FriendlyName' => $configLang['addDefaultDomainsMailField']),\n 'defaultAdminRoles' => array('Type' => 'dropdown', 'Description' => $configLang['defaultAdminRoles'], 'Options' => $custom_buttons['roles'], 'Default' => 'six', 'FriendlyName' => $configLang['defaultAdminRolesField']),\n 'validationNewClient' => array('Type' => 'yesno', 'Description' => $configLang['validationNewClient'], 'FriendlyName' => $configLang['validationNewClientField']),\n 'disableContactVerification'=> array('Type' => 'yesno', 'Description' => $configLang['disableContactVerification'], 'FriendlyName' => $configLang['disableContactVerificationField']),\n 'enableDomainRecords' => array('Type' => 'yesno', 'Description' => $configLang['enableDomainRecords'], 'FriendlyName' => $configLang['enableDomainRecordsField']),\n 'enableDomainLifecycle' => array('Type' => 'yesno', 'Description' => $configLang['enableDomainLifecycle'], 'FriendlyName' => $configLang['enableDomainLifecycleField']),\n 'devMode' => array('Type' => 'yesno', 'Description' => $configLang['devMode'], 'FriendlyName' => $configLang['devModeField']),\n 'debug' => array('Type' => 'yesno', 'Description' => $configLang['debug'], 'FriendlyName' => $configLang['debugField']),\n ));\n if($custom_buttons['warnings'])\n $configarray['check-warnings'] = array('Type' => 'display', 'Description' => $custom_buttons['warnings'], 'FriendlyName' => $configLang['checkWarnings']);\n if($custom_buttons['crons'])\n $configarray['crons'] = array('Type' => 'display', 'Description' => $custom_buttons['crons'], 'FriendlyName' => $configLang['crons']);\n if($custom_buttons['errors'])\n $configarray['errors'] = array('Type' => 'display', 'Description' => $custom_buttons['errors'], 'FriendlyName' => $configLang['errors']);\n if($custom_buttons['update'])\n $configarray['update-module'] = array('Type' => 'display', 'Description' => $custom_buttons['update'], 'FriendlyName' => $configLang['updateModule']);\n $configarray['install-virtualname'] = array('Type' => 'display', 'Description' => $custom_buttons['install'], 'FriendlyName' => $configLang['installVirtualname']);\n return $configarray;\n}", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Featured product';\r\n }\r\n $response = Configuration::updateValue('FIELD_FEATUREDPSL_NBR', 8);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_CAT', (int)Context::getContext()->shop->getCategory());\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_VERTICAL', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_MAXITEM', 4);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_MEDIUMITEM', 2);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_AUTOSCROLLDELAY', 5000);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_NAVIGATION', 1);\r\n\r\n return $response;\r\n }", "public function config_category()\n {\n require_javascript('checking');\n\n // Load up some basic details\n $category = $this->category;\n $post_url = build_url(array('page' => '_SELF', 'type' => 'set', 'id' => $category, 'redirect' => get_param_string('redirect', null)), '_SELF');\n $category_description = do_lang_tempcode('CONFIG_CATEGORY_DESCRIPTION__' . $category);\n\n // Find all options in category\n $hooks = find_all_hooks('systems', 'config');\n $options = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if (($GLOBALS['CURRENT_SHARE_USER'] === null) || ($option['shared_hosting_restricted'] == 0)) {\n if ($category == $option['category']) {\n if ($ob->get_default() !== null) {\n if (!isset($option['order_in_category_group'])) {\n $option['order_in_category_group'] = 100;\n }\n $option['ob'] = $ob;\n $option['name'] = $hook;\n $options[$option['group']][$hook] = $option;\n }\n }\n }\n }\n\n // Add in special ones\n if ($category == 'SITE') {\n $options['INTERNATIONALISATION']['timezone'] = array('name' => 'timezone', 'human_name' => 'TIMEZONE', 'c_value' => '', 'type' => 'special', 'category' => 'SITE', 'group' => 'INTERNATIONALISATION', 'explanation' => 'DESCRIPTION_TIMEZONE_SITE', 'shared_hosting_restricted' => 0, 'order_in_category_group' => 1);\n }\n require_code('files');\n $upload_max_filesize = (ini_get('upload_max_filesize') == '0') ? do_lang('NA') : clean_file_size(php_return_bytes(ini_get('upload_max_filesize')));\n $post_max_size = (ini_get('post_max_size') == '0') ? do_lang('NA') : clean_file_size(php_return_bytes(ini_get('post_max_size')));\n\n // Sort the groups\n $all_known_groups = array();\n foreach (array_keys($options) as $group) {\n $_group = do_lang($group);\n\n $_group = strtolower(trim(cms_preg_replace_safe('#(&.*;)|[^\\w\\s]#U', '', strip_tags($_group))));\n if ((isset($all_known_groups[$_group])) && ($all_known_groups[$_group] != $group)) {\n $_group = 'std_' . $group; // If cat names translate to same things or are in non-latin characters like Cyrillic\n }\n\n $all_known_groups[$_group] = $group;\n }\n $advanced_key = strtolower(trim(cms_preg_replace_safe('#(&.*;)|[^\\w\\s]#U', '', do_lang('ADVANCED'))));\n ksort($all_known_groups);\n if (isset($all_known_groups[$advanced_key])) { // Advanced goes last\n $temp = $all_known_groups[$advanced_key];\n unset($all_known_groups[$advanced_key]);\n $all_known_groups[$advanced_key] = $temp;\n }\n\n // Render option groups\n $groups_arr = array();\n require_code('form_templates');\n $_groups = array();\n foreach ($all_known_groups as $group_codename) {\n if (!isset($options[$group_codename])) {\n continue;\n }\n\n $options_in_group = $options[$group_codename];\n\n $all_orders_default = true;\n foreach ($options_in_group as $name => $option) {\n if ($option['order_in_category_group'] != 100) {\n $all_orders_default = false;\n }\n $options_in_group[$name]['human_name_trans'] = do_lang($option['human_name']);\n }\n if ($all_orders_default) {\n sort_maps_by($options_in_group, 'human_name_trans');\n } else {\n sort_maps_by($options_in_group, 'order_in_category_group');\n }\n\n $out = '';\n foreach ($options_in_group as $name => $option) {\n // Language strings\n $human_name = do_lang_tempcode($option['human_name']);\n $_explanation = do_lang($option['explanation'], null, null, null, null, false);\n if ($_explanation === null) {\n $_explanation = do_lang('CONFIG_GROUP_DEFAULT_DESCRIP_' . $option['group'], null, null, null, null, false);\n if ($_explanation === null) {\n // So an error shows\n $_explanation = do_lang($option['explanation']);\n $explanation = do_lang_tempcode($option['explanation']);\n } else {\n $explanation = do_lang_tempcode('CONFIG_GROUP_DEFAULT_DESCRIP_' . $option['group']);\n }\n } else {\n $explanation = do_lang_tempcode($option['explanation']);\n }\n $default = get_default_option($name);\n\n if (isset($option['required'])) {\n $required = $option['required'];\n } else {\n if ($option['type'] == 'integer') {\n $required = true;\n } elseif ($option['type'] == 'float') {\n $required = true;\n } elseif ($option['type'] == 'list') {\n $required = true;\n } else {\n $required = false;\n }\n }\n\n // Render field inputter\n switch ($option['type']) {\n case 'special':\n switch ($name) {\n case 'timezone':\n $list = '';\n $timezone = get_site_timezone();\n foreach (get_timezone_list() as $_timezone => $timezone_nice) {\n $list .= static_evaluate_tempcode(form_input_list_entry($_timezone, $_timezone == $timezone, $timezone_nice));\n }\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, 'timezone', make_string_tempcode($list)));\n break;\n\n default:\n $ob = $option['ob'];\n $out .= static_evaluate_tempcode($ob->field_inputter($name, $option, $human_name, $explanation));\n break;\n }\n break;\n\n case 'integer':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_integer($human_name, $explanation_with_default, $name, intval(get_option($name)), $required));\n break;\n\n case 'float':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, escape_html(($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(float_format(floatval($default)))));\n $out .= static_evaluate_tempcode(form_input_float($human_name, $explanation_with_default, $name, floatval(get_option($name)), $required));\n break;\n\n case 'line':\n case 'transline':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation_with_default, $name, get_option($name), $required, null, 100000));\n break;\n\n case 'text':\n case 'transtext':\n $out .= static_evaluate_tempcode(form_input_text($human_name, $explanation, $name, get_option($name), $required, null, true));\n break;\n\n case 'comcodeline':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_line_comcode($human_name, $explanation_with_default, $name, get_option($name), $required));\n break;\n\n case 'comcodetext':\n $out .= static_evaluate_tempcode(form_input_text_comcode($human_name, $explanation, $name, get_option($name), $required, null, true));\n break;\n\n case 'list':\n $_default = make_string_tempcode(escape_html($default));\n $list = '';\n if (!$required) {\n $list .= static_evaluate_tempcode(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_value = get_option($name);\n $values = explode('|', $option['list_options']);\n foreach ($values as $value) {\n $__value = str_replace(' ', '__', $value);\n $_option_text = do_lang('CONFIG_OPTION_' . $name . '_VALUE_' . $__value, null, null, null, null, false);\n if ($_option_text !== null) {\n $option_text = do_lang_tempcode('CONFIG_OPTION_' . $name . '_VALUE_' . $__value);\n if ($value == $default) {\n $_default = $option_text;\n }\n } else {\n $option_text = make_string_tempcode($value);\n }\n $list .= static_evaluate_tempcode(form_input_list_entry($value, $_value == $value, $option_text));\n }\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : $_default);\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation_with_default, $name, make_string_tempcode($list), null, false, false));\n break;\n\n case 'tick':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, escape_html(($default == '1') ? do_lang('YES') : do_lang('NO')));\n $out .= static_evaluate_tempcode(form_input_tick($human_name, $explanation_with_default, $name, get_option($name) == '1'));\n break;\n\n case 'username':\n $out .= static_evaluate_tempcode(form_input_username($human_name, $explanation, $name, get_option($name), $required, false));\n break;\n\n case 'colour':\n $out .= static_evaluate_tempcode(form_input_colour($human_name, $explanation, $name, get_option($name), $required));\n break;\n\n case 'date':\n $out .= static_evaluate_tempcode(form_input_date($human_name, $explanation, $name, $required, false, false, intval(get_option($name)), 40, intval(date('Y')) - 20, null));\n break;\n\n case 'forum':\n if ((get_forum_type() == 'cns') && (addon_installed('cns_forum'))) {\n $current_setting = get_option($name);\n if (!is_numeric($current_setting)) {\n $_current_setting = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forums', 'id', array('f_name' => $current_setting));\n if ($_current_setting === null) {\n if ($required) {\n $current_setting = strval(db_get_first_id());\n attach_message(do_lang_tempcode('FORUM_CURRENTLY_UNSET', $human_name), 'notice');\n } else {\n $current_setting = null;\n }\n } else {\n $current_setting = strval($_current_setting);\n }\n }\n $out .= static_evaluate_tempcode(form_input_tree_list($human_name, $explanation, $name, null, 'choose_forum', array(), $required, $current_setting));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n case 'forum_grouping':\n if (get_forum_type() == 'cns') {\n $tmp_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forum_groupings', 'id', array('c_title' => get_option($name)));\n\n require_code('cns_forums2');\n $_list = new Tempcode();\n if (!$required) {\n $_list->attach(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_list->attach(cns_create_selection_list_forum_groupings(null, $tmp_value));\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, $name, $_list));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n case 'usergroup':\n case 'usergroup_not_guest':\n if (get_forum_type() == 'cns') {\n $tmp_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_groups', 'id', array($GLOBALS['FORUM_DB']->translate_field_ref('g_name') => get_option($name)));\n\n require_code('cns_groups');\n $_list = new Tempcode();\n if (!$required) {\n $_list->attach(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_list->attach(cns_create_selection_list_usergroups($tmp_value, $option['type'] == 'usergroup'));\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, $name, $_list));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n default:\n fatal_exit('Invalid config option type: ' . $option['type'] . ' (for ' . $option['name'] . ')');\n }\n }\n\n // Render group\n $group_title = do_lang_tempcode($group_codename);\n $_group_description = do_lang('CONFIG_GROUP_DESCRIP_' . $group_codename, escape_html($post_max_size), escape_html($upload_max_filesize), null, null, false);\n if ($_group_description === null) {\n $group_description = new Tempcode();\n } else {\n $group_description = do_lang_tempcode('CONFIG_GROUP_DESCRIP_' . $group_codename, escape_html($post_max_size), escape_html($upload_max_filesize));\n }\n $groups_arr[] = array('GROUP_DESCRIPTION' => $group_description, 'GROUP_NAME' => $group_codename, 'GROUP' => $out, 'GROUP_TITLE' => $group_title);\n $_groups[$group_codename] = $group_title;\n }\n\n list($warning_details, $ping_url) = handle_conflict_resolution();\n\n // Render\n return do_template('CONFIG_CATEGORY_SCREEN', array(\n '_GUID' => 'd01b28b71c38bbb52b6aaf877c7f7b0e',\n 'CATEGORY_DESCRIPTION' => $category_description,\n '_GROUPS' => $_groups,\n 'PING_URL' => $ping_url,\n 'WARNING_DETAILS' => $warning_details,\n 'TITLE' => $this->title,\n 'URL' => $post_url,\n 'GROUPS' => $groups_arr,\n 'SUBMIT_ICON' => 'buttons__save',\n 'SUBMIT_NAME' => do_lang_tempcode('SAVE'),\n ));\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = '';\r\n }\r\n $response = Configuration::updateValue($this->name . '_TITLE', $title);\r\n $response &= Configuration::updateValue($this->name . '_MAXITEM', 5);\r\n $response &= Configuration::updateValue($this->name . '_MINITEM', 2);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLLDELAY', 5000);\r\n $response &= Configuration::updateValue($this->name . '_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue($this->name . '_PAGINATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_NAVIGATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_MANTITLE', 0);\r\n\r\n return $response;\r\n }", "function _tvchat_update( $config)\n{\n\tforeach($config as $key => $value) {\n\n switch ($key) {\n case 'reset_checkin':\n if ( $value == '1') _tvchat_reset_checkin();\n continue;\n\n case 'rate_now':\n if ( $value == '1') _tvchat_rate_now();\n continue;\n\n case 'create_episode':\n if ( $value == '1') _tvchat_create_episode();\n continue;\n\n case 'dir_timetable':\n if (isset($value)) { variable_set($key, $value); }\n break;\n\n case 'xmpp_send_cmd':\n if (isset($value)) { variable_set($key, $value); }\n break;\n\n case 'apns_request_url':\n if (isset($value)) { variable_set($key, $value); }\n break;\n case 'url_intro_shorten':\n if (isset($value)) { variable_set($key, $value); }\n break;\n\n case 'max_top_show':\n if (isset($value)) { variable_set($key, $value); }\n break;\n\n case 'cmp_usr_id':\n if (isset($value)) { variable_set($key, $value); }\n break;\n case 'snd_phn_id':\n if (isset($value)) { variable_set($key, $value); }\n break;\n case 'callback':\n if (isset($value)) { variable_set($key, $value); }\n break;\n case 'auth_msg':\n if (isset($value)) { variable_set($key, $value); }\n break;\n case 'invite_msg':\n if (isset($value)) { variable_set($key, $value); }\n break;\n case 'usernames_for_tracking':\n if (isset($value)) { variable_set($key, $value); }\n break;\n default:\n break;\n }\n\n\t\t$result = db_query( \"SELECT count(*) FROM tvchat_config WHERE keystr='%s'\", $key);\n\t\tif ( db_result( $result) == 0) {\n\t\t\tdb_query(\"INSERT INTO tvchat_config( keystr, valuestr) VALUES( '%s', '%s') \", $key, $value);\n\t\t\tif ( db_affected_rows() == 1)\n\t\t\t\tdrupal_set_message( t('insert new record ('.$key.','.$value.')'));\n\t\t}\n\t\telse {\n\t\t\tdb_query(\"UPDATE tvchat_config SET valuestr = '%s' WHERE keystr='%s'\", $value, $key);\n\t\t\tif ( db_affected_rows() >= 1)\n\t\t\t\tdrupal_set_message( t('update record ('.$key.','.$value.')'));\n\t\t}\n\t}\n\n return TRUE;\n}", "function do_server_info()\n{\n global $datasets; // from require_once \"../analysis/common/functions.php\"\n\n if (!isset($datasets)) {\n $datasets = []; // database tables not yet initialized\n }\n\n $server_roles = unserialize(CAPTUREROLES);\n\n $response_mediatype = choose_mediatype(['application/json', 'text/html',\n 'text/plain']);\n\n switch ($response_mediatype) {\n case 'application/json':\n $obj = array( 'roles' => $server_roles );\n respond_with_json($obj);\n // respond_with_json(array_keys($datasets));\n break;\n case 'text/html':\n html_begin(\"Server information\", [[\"Server information\"]]);\n\n if (count($server_roles) == 0) {\n echo \" <p>This TCAT instance is currently not tracking anything.</p>\\n\";\n } else {\n echo \" <p>Tracking roles:</p>\\n\";\n echo \" <ul>\\n\";\n\n foreach ($server_roles as $role) {\n echo \"<li>$role</li>\\n\";\n }\n\n echo \" </ul>\\n\";\n }\n\n html_end();\n break;\n\n case 'text/plain':\n default:\n print \"SERVER ROLES: \";\n if (count($server_roles) == 0) {\n print \"none\";\n } else {\n foreach ($server_roles as $role) {\n print($role . \" \");\n }\n }\n print \"\\n\";\n break;\n }\n}", "public function config_set()\n {\n require_code('input_filter_2');\n rescue_shortened_post_request();\n\n require_code('caches3');\n\n global $CONFIG_OPTIONS_CACHE;\n\n $category = get_param_string('id', 'MAIN');\n\n if (cms_srv('REQUEST_METHOD') != 'POST') {\n warn_exit(do_lang_tempcode('INTERNAL_ERROR'));\n }\n\n // Make sure we haven't locked ourselves out due to URL Scheme support\n if (\n (post_param_string('url_scheme', 'RAW') != 'RAW') &&\n (substr(cms_srv('SERVER_SOFTWARE'), 0, 6) == 'Apache') &&\n (\n (!file_exists(get_file_base() . '/.htaccess')) ||\n (stripos(file_get_contents(get_file_base() . '/.htaccess'), 'RewriteEngine on') === false) ||\n ((function_exists('apache_get_modules')) && (!in_array('mod_rewrite', apache_get_modules()))) ||\n (http_download_file(get_base_url() . '/pg/keymap', null, false, true) != '') && ($GLOBALS['HTTP_MESSAGE'] == '404')\n )\n ) {\n warn_exit(do_lang_tempcode('BEFORE_MOD_REWRITE'));\n }\n\n // Make sure we haven't just locked staff out\n if (addon_installed('staff')) {\n $new_site_name = substr(post_param_string('site_name', ''), 0, 200);\n if (($new_site_name != '') && (get_option('is_on_sync_staff') === '1')) {\n $admin_groups = array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(), $GLOBALS['FORUM_DRIVER']->get_moderator_groups());\n $staff = $GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups, 100);\n if (count($staff) < 100) {\n foreach ($staff as $row_staff) {\n $member = $GLOBALS['FORUM_DRIVER']->mrow_id($row_staff);\n if ($GLOBALS['FORUM_DRIVER']->is_staff($member)) {\n $sites = get_cms_cpf('sites');\n $sites = str_replace(', ' . get_site_name(), '', $sites);\n $sites = str_replace(',' . get_site_name(), '', $sites);\n $sites = str_replace(get_site_name() . ', ', '', $sites);\n $sites = str_replace(get_site_name() . ',', '', $sites);\n $sites = str_replace(get_site_name(), '', $sites);\n if ($sites != '') {\n $sites .= ', ';\n }\n $sites .= $new_site_name;\n $GLOBALS['FORUM_DRIVER']->set_custom_field($member, 'sites', $sites);\n }\n }\n }\n }\n }\n\n // Empty thumbnail cache if needed\n if (function_exists('imagetypes')) {\n if ((!is_null(post_param_string('thumb_width', null))) && (post_param_string('thumb_width') != get_option('thumb_width'))) {\n erase_thumb_cache();\n }\n }\n\n // Empty language cache if needed\n if ((!is_null(post_param_string('yeehaw', null))) && (post_param_string('yeehaw') != get_option('yeehaw'))) {\n erase_cached_language();\n }\n\n // Find all options in category\n $hooks = find_all_hooks('systems', 'config');\n $options = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if ($category == $option['category']) {\n if ((is_null($GLOBALS['CURRENT_SHARE_USER'])) || ($option['shared_hosting_restricted'] == 0)) {\n if (!is_null($ob->get_default())) {\n $option['ob'] = $ob;\n $options[$hook] = $option;\n }\n }\n }\n }\n\n // Add in special ones\n if ($category == 'SITE') {\n $options['timezone'] = array('shared_hosting_restricted' => 0, 'type' => 'special');\n }\n\n // Go through all options on the page, saving\n foreach ($options as $name => $option) {\n // Save\n if ($option['type'] == 'float') {\n $_value = post_param_string($name, '');\n $value = ($_value == '') ? '' : float_unformat($_value);\n } elseif ($option['type'] == 'tick') {\n $value = strval(post_param_integer($name, 0));\n } elseif ($option['type'] == 'date') {\n $date_value = post_param_date($name);\n $value = is_null($date_value) ? '' : strval($date_value);\n } elseif ((($option['type'] == 'forum') || ($option['type'] == '?forum')) && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forums', 'f_name', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif (($option['type'] == 'forum_grouping') && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forum_groupings', 'c_title', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif ((($option['type'] == 'usergroup') || ($option['type'] == 'usergroup_not_guest')) && (get_forum_type() == 'cns')) {\n $_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_groups', 'g_name', array('id' => post_param_integer($name)));\n if (is_null($_value)) {\n $value = '';\n } else {\n $value = get_translated_text($_value);\n }\n } else {\n $value = post_param_string($name, '');\n }\n\n // Hard-coded special options\n if ($name == 'timezone') {\n set_value('timezone', $value);\n } else {\n // If the option was changed\n $old_value = get_option($name);\n if (($old_value != $value) || (!isset($CONFIG_OPTIONS_CACHE[$name]['c_set'])) || ($CONFIG_OPTIONS_CACHE[$name]['c_set'] == 0)) {\n set_option($name, $value);\n }\n }\n }\n\n // Clear some caching\n erase_comcode_page_cache();\n erase_block_cache();\n //persistent_cache_delete('OPTIONS'); Done by set_option / erase_persistent_cache\n erase_persistent_cache();\n erase_cached_templates(false, null, TEMPLATE_DECACHE_WITH_CONFIG);\n\n // Show it worked / Refresh\n $redirect = get_param_string('redirect', null);\n if ($redirect === null) {\n $url = build_url(array('page' => '_SELF', 'type' => 'browse'), '_SELF'); // , 'type' => 'category', 'id' => $category\n } else {\n $url = make_string_tempcode($redirect);\n }\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "private static function print_log_configs() {\n\t//--\n\tglobal $configs;\n\t//--\n\t$log = '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>Application :: CONFIGURATION Log</b></font></div>';\n\t//-- vars\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App CONFIG VARIABLES</b></div>';\n\t$arr = (array) $configs;\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"195\"><div class=\"smartframework_debugbar_inforow\">';\n\t\t$log .= '<b>'.Smart::escape_html((string)$key).'</b>';\n\t\t$log .= '</div></td><td><div class=\"smartframework_debugbar_inforow\">';\n\t\tif(is_array($val)) {\n\t\t\t$log .= '<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:13px;\">';\n\t\t\t$j=0;\n\t\t\tforeach($val as $k => $v) {\n\t\t\t\t$j++;\n\t\t\t\tif($j % 2) {\n\t\t\t\t\t$color = '#FFFFFF';\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#FAFAFA';\n\t\t\t\t} //end if else\n\t\t\t\t$log .= '<tr bgcolor=\"'.$color.'\" valign=\"top\" title=\"#'.$i.'.'.$j.'\"><td width=\"290\"><b>'.Smart::escape_html((string)$k).'</b></td><td>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($v))), true).'</td></tr>';\n\t\t\t} //end foreach\n\t\t\t$log .= '</table>';\n\t\t} else {\n\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html((string)$val), true).'</pre>';\n\t\t} //end if else\n\t\t$log .= '</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//-- constants\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App SETTING CONSTANTS</b></div>';\n\t$arr = (array) get_defined_constants(true);\n\t$arr = (array) $arr['user'];\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\tif(((string)$key == 'SMART_FRAMEWORK_CHMOD_DIRS') OR ((string)$key == 'SMART_FRAMEWORK_CHMOD_FILES')) {\n\t\t\tif(is_numeric($val)) {\n\t\t\t\t$val = (string) '0'.@decoct($val).' (octal)';\n\t\t\t} else {\n\t\t\t\t$val = (string) $val.' (!!! Warning, Invalid ... Must be OCTAL !!!)';\n\t\t\t} //end if\n\t\t} //end if\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"375\"><div class=\"smartframework_debugbar_inforow\"><b>'.Smart::escape_html((string)$key).'</b></div></td><td><div class=\"smartframework_debugbar_inforow\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($val))), true).'</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//--\n\treturn $log;\n\t//--\n}", "private function configure() {\n\t\t$statement = $this -> database -> query(\"SELECT * FROM worlds\");\n\t\twhile ($worldData = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$this -> worlds[$worldData['world']] = new World($worldData);\n\t\t}\n\t\t$statement = $this -> database -> query(\"SELECT * FROM server.configs\");\n\t\twhile ($configData = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$this -> configs[$configData['key_']] = new Config($configData['key_'], $configData['value'], $configData['dataType']);\n\t\t}\n\t}", "function __construct()\n {\n $this->productGroupsToCategories = Array(\n 1 => 1, // Power kits => Systems\n 2 => 3, // Solar lanterns => Light\n 14 => 1, // SHS 12V => Systems\n 16 => 3, // LED => Light\n 17 => 2, // Fans => Appliances\n 18 => 2, // Fridges => Appliances\n 19 => 2, // Pumps => Appliances\n 24 => 2, // Various appliances => Appliances\n 20 => 2, // Radios => Appliances\n 21 => 2, // TV => Appliances\n 25 => 0, // PAYG (component) => n/a\n 26 => 1, // SHS <12V => Systems\n );\n\n /*\n * Productsubgroups => Options\n */\n $this->productSubGroupsToOptions = Array(\n 14 => 23, // 21Wp - 50Wp =>\n 15 => 23, // 1Wp - 20Wp =>\n 16 => 24, // 51Wp -100Wp =>\n 17 => 36, // Table =>\n 18 => 37, // Ceiling =>\n 19 => 79, // < 1W =>\n 20 => 80, // 1W =>\n 21 => 81, // 2W =>\n 22 => 82, // 3W =>\n 23 => 83, // 4W =>\n 24 => 84, // 5W =>\n 25 => 85, // > 5W =>\n 26 => 44, // up to 20'' =>\n 27 => 45, // > 20'' =>\n //28 => 0, // Cloth dryers =>\n 29 => 58, // Egg incubators =>\n 30 => 59, // Electric fences =>\n 31 => 60, // Hand drills =>\n 32 => 61, // Kettles =>\n 33 => 62, // Sewing machines =>\n //34 => 0, // Spinning wheels =>\n 35 => 63, // Washing machines =>\n 36 => 25, // > 100Wp =>\n 37 => 35, // Stand =>\n 38 => 41, // Surface =>\n 39 => 40, // Submersible =>\n 40 => 46, // Portable =>\n\n 41 => 57, // Iron =>\n 42 => 56, // Hair dryer =>\n 43 => 55, // Mosquito repellent =>\n 44 => 54, // Cooker/Stove =>\n\n 45 => 2, // <12V =>\n 46 => 3, // 12V =>\n 47 => 4, // 24V =>\n 48 => 5, // 48V =>\n\n 49 => 53, // Refrigerators/Freezers =>\n 50 => 50, // Medical Fridges/Freezers =>\n 51 => 51, // Mobile/Portable =>\n 52 => 52, // Refrigerators =>\n 53 => 49, // Freezers =>\n );\n }", "function ciniki_artcatalog_categoryList($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'artcatalog', 'private', 'checkAccess');\n $rc = ciniki_artcatalog_checkAccess($ciniki, $args['tnid'], 'ciniki.artcatalog.categoryList'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Load the status maps for the text description of each status\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'artcatalog', 'private', 'maps');\n $rc = ciniki_artcatalog_maps($ciniki);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $maps = $rc['maps'];\n\n //\n // Get the settings for the artcatalog\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash'); \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_web_settings', \n 'tnid', $args['tnid'], 'ciniki.web', 'settings', 'page-gallery-artcatalog');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['settings']) ) {\n $settings = $rc['settings'];\n } else {\n $settings = array();\n }\n\n if( isset($settings['page-gallery-artcatalog-split']) \n && $settings['page-gallery-artcatalog-split'] == 'yes' \n ) {\n $strsql = \"SELECT DISTINCT type, type AS name, category \"\n . \"FROM ciniki_artcatalog \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY type, category COLLATE latin1_general_cs, category \"\n . \"\";\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.artcatalog', array(\n array('container'=>'types', 'fname'=>'type', 'name'=>'type',\n 'fields'=>array('number'=>'type', 'name'),\n 'maps'=>array('name'=>$maps['item']['type'])),\n// 'maps'=>array('name'=>array('1'=>'Paintings', '2'=>'Photographs', '3'=>'Jewelry', '4'=>'Sculptures', '5'=>'Fibre Arts', '6'=>'Crafts', '8'=>'Pottery'))),\n array('container'=>'categories', 'fname'=>'category', 'name'=>'category',\n 'fields'=>array('type', 'name'=>'category')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['types']) ) {\n return array('stat'=>'ok', 'types'=>array());\n }\n return array('stat'=>'ok', 'types'=>$rc['types']);\n } else {\n $strsql = \"SELECT DISTINCT '0' AS type, category \"\n . \"FROM ciniki_artcatalog \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY category COLLATE latin1_general_cs, category \"\n . \"\";\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.artcatalog', array(\n array('container'=>'categories', 'fname'=>'category', 'name'=>'category',\n 'fields'=>array('type', 'name'=>'category')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['categories']) ) {\n return array('stat'=>'ok', 'categories'=>array());\n }\n return array('stat'=>'ok', 'categories'=>$rc['categories']);\n }\n}", "function getConfigArray()\t{\r\n\r\n\t\t\t# Keep the existing content of this function.\r\n\t\tparent::getConfigArray();\r\n\r\n\t\t# Check if the User Statistic feature is enabled in Setup.\r\n\t\tif ($this->config['config']['tx_feuserloginsystem.']['enableUserStatistics']) {\r\n\t\t # Do only write in statistic database table if a user is logged in!\r\n\t\t\tif ($this->loginUser)\t{\r\n\t\t\t\tif (t3lib_div::GPvar(\"logintype\") == 'login')\t{\r\n\t\t\t\t\t$this->feuserloginsystem_addUserStatisticEntry();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->feuserloginsystem_updateUserStatisticEntry();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "function addFields($config)\n {\n global $TSFE,$LANG;\n $this->storagePid = $this->getStorageFolderPid();\n // print_r($this->storagePid);\n if(!empty($this->storagePid)) {\n $sql = \"AND pid=$this->storagePid\";\n }else{\n $sql = '';\n }\n\n $optionList = array();\n // exec_SELECTquery\n // $res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, \"SELECT uid,cat FROM tx_sbdownloader_cat WHERE hidden=0 AND deleted=0 $sql\");\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\"uid,cat\", \"tx_sbdownloader_cat\", \"hidden=0 AND deleted=0 $sql\");\n\n $optionList[0] = array(0 => 'all', 1 => 0);\n $i = 1;\n // while($row = mysql_fetch_object($res)){\n while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n $optionList[$i] = array(0 => $row['cat'], 1 => $row['uid']);\n $i++;\n }\n\n $config['items'] = array_merge($config['items'], $optionList);\n\n return $config;\n }", "function configurationLoad() {\n\t\tglobal $podserver_config_map;\n\t\t$item_idx = 0;\n\t\tunset($this->itemsConfiguration);\n\t\t$this->itemsConfiguration = array();\n\t\t// load the configuration details for each item in the map\n\t\tforeach ($podserver_config_map as $itemToConfigure){\n\t\t\t// get the configuration variable by indirection ($$)\n\t\t\tglobal $$itemToConfigure[0];\n\t\t\t// get the label for the item in the correct language by indirection ($$)\n\t\t\t$label_item_variable = 'label_'.$itemToConfigure[0];\n\t\t\tglobal $$label_item_variable;\n\t\t\tif ($$label_item_variable == '') $$label_item_variable = '$'.$label_item_variable;\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$label_item_variable = '$'.$label_item_variable;\n\t\t\t// get the help for the item in the correct language by indirection ($$)\n\t\t\t$help_item_variable = 'help_'.$itemToConfigure[0];\n\t\t\tglobal $$help_item_variable;\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$help_item_variable = '$'.$help_item_variable;\n\t\t\t// get the title for the item in the correct language by indirection ($$)\n\t\t\t$title_item_variable = 'title_'.$itemToConfigure[0];\n\t\t\tglobal $$title_item_variable;\n\t\t\t// show title variable name for language debug\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$title_item_variable = '$'.$title_item_variable;\n\t\t\t// get the default value from configuration map if no value found for the item in the configuration file\n\t\t\tif ($$itemToConfigure[0] == '') $$itemToConfigure[0] = $itemToConfigure[4];\n\t\t\t// load the item with all datas (map, value, title and label)\n\t\t\t$this->itemsConfiguration[] = new ItemConfiguration(\n\t\t\t\t\t\t\t$itemToConfigure[0],\n\t\t\t\t\t\t\t$itemToConfigure[1],\n\t\t\t\t\t\t\t$itemToConfigure[2],\n\t\t\t\t\t\t\t$itemToConfigure[3],\n\t\t\t\t\t\t\t$$itemToConfigure[0],\n\t\t\t\t\t\t\t$itemToConfigure[5],\n\t\t\t\t\t\t\t$$label_item_variable,\n\t\t\t\t\t\t\t$$title_item_variable,\n\t\t\t\t\t\t\t$$help_item_variable\n\t\t\t\t\t\t\t);\t\t\t\n\t\t}\n\t}", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "public function run()\n {\n $categories = [\"legendize\",\"legendized\",\"legendizes\",\"legendizing\",\"legendries\",\"legendry\",\"legends\",\"leger\",\"legerdemain\",\"legerdemainist\",\"legerdemainists\",\"legerdemains\",\"legering\",\"legerings\",\"legerities\",\"legerity\",\"legers\",\"leges\",\"legge\",\"legged\",\"legger\",\"leggers\",\"legges\",\"leggie\",\"leggier\",\"leggiero\",\"leggies\",\"leggiest\",\"leggin\",\"legginess\",\"legginesses\",\"legging\",\"legginged\",\"leggings\",\"leggins\",\"leggism\",\"leggisms\",\"leggy\",\"leghorn\",\"leghorns\",\"legibilities\",\"legibility\",\"legible\",\"legibleness\",\"legiblenesses\",\"legibly\",\"legion\",\"legionaries\",\"legionary\",\"legioned\",\"legionella\",\"legionellae\",\"legionellas\",\"legionnaire\",\"legionnaires\",\"legions\",\"legislate\",\"legislated\",\"legislates\",\"legislating\",\"legislation\",\"legislations\",\"legislative\",\"legislatively\",\"legislatives\",\"legislator\",\"legislatorial\",\"legislators\",\"legislatorship\",\"legislatorships\",\"legislatress\",\"legislatresses\",\"legislature\",\"legislatures\",\"legist\",\"legists\",\"legit\",\"legitim\",\"legitimacies\",\"legitimacy\",\"legitimate\",\"legitimated\",\"legitimately\",\"legitimateness\",\"legitimates\",\"legitimating\",\"legitimation\",\"legitimations\",\"legitimatise\",\"legitimatised\",\"legitimatises\",\"legitimatising\",\"legitimatize\",\"legitimatized\",\"legitimatizes\",\"legitimatizing\",\"legitimator\",\"legitimators\",\"legitimisation\",\"legitimisations\",\"legitimise\",\"legitimised\",\"legitimiser\",\"legitimisers\",\"legitimises\",\"legitimising\",\"legitimism\",\"legitimisms\",\"legitimist\",\"legitimistic\",\"legitimists\",\"legitimization\",\"legitimizations\",\"legitimize\",\"legitimized\",\"legitimizer\",\"legitimizers\",\"legitimizes\",\"legitimizing\",\"legitims\",\"legits\",\"leglan\",\"leglans\",\"leglen\",\"leglens\",\"legless\",\"leglessness\",\"leglessnesses\",\"leglet\",\"leglets\",\"leglike\",\"leglin\",\"leglins\",\"legman\",\"legmen\",\"legong\",\"legongs\",\"legroom\",\"legrooms\",\"legs\",\"legside\",\"legsides\",\"leguaan\",\"leguaans\",\"leguan\",\"leguans\",\"legume\",\"legumes\",\"legumin\",\"leguminous\",\"legumins\",\"legwarmer\",\"legwarmers\",\"legwear\",\"legwears\",\"legwork\",\"legworks\",\"lehaim\",\"lehaims\",\"lehayim\",\"lehayims\",\"lehr\",\"lehrjahre\",\"lehrs\",\"lehua\",\"lehuas\",\"lei\",\"leidger\",\"leidgers\",\"leiger\",\"leigers\",\"leiomyoma\",\"leiomyomas\",\"leiomyomata\",\"leiotrichies\",\"leiotrichous\",\"leiotrichy\",\"leipoa\",\"leipoas\",\"leir\",\"leired\",\"leiring\",\"leirs\",\"leis\",\"leish\",\"leisher\",\"leishest\",\"leishmania\",\"leishmaniae\",\"leishmanial\",\"leishmanias\",\"leishmaniases\",\"leishmaniasis\",\"leishmanioses\",\"leishmaniosis\",\"leisler\",\"leislers\",\"leister\",\"leistered\",\"leistering\",\"leisters\",\"leisurable\",\"leisurably\",\"leisure\",\"leisured\",\"leisureliness\",\"leisurelinesses\",\"leisurely\",\"leisures\",\"leisuring\",\"leitmotif\",\"leitmotifs\",\"leitmotiv\",\"leitmotivs\",\"lek\",\"leke\",\"lekgotla\",\"lekgotlas\",\"lekked\",\"lekker\",\"lekking\",\"lekkings\",\"leks\",\"leku\",\"lekvar\",\"lekvars\",\"lekythi\",\"lekythoi\",\"lekythos\",\"lekythus\",\"leman\",\"lemans\",\"leme\",\"lemed\"];\n for ($i=0; $i < count($categories); $i++) {\n Category::create([\n 'name' => $categories[$i],\n ]);\n }\n }", "public function run()\n {\n\n $category_array = [\n \n //category\n 'Home Services' => [\n \n // sub-category\n 'Key Making' => [\n //services\n 'Car Key',\n 'Door Key',\n 'Bike Key',\n 'Other key making'\n ],\n \n // sub-category\n 'Carpenter' => [\n //services\n 'Furniture repair/manufacturing',\n 'Modular kitchen',\n 'Door/gate repairing and manufacturing',\n 'Interior decoration',\n 'Antique wooden work',\n 'Other wooden work',\n ],\n\n //sub-category\n 'Electrician' => [\n //services\n 'AC/refrigerator repairing',\n 'Geyser repairing',\n 'Juicer/mixture repairing',\n 'Home Wiring',\n 'Other electrician service',\n ],\n\n //sub-category\n 'Plumber' => [\n 'Tap Repair',\n 'Flush Repair',\n 'Leakage',\n 'Installation of Sanitaryware',\n 'Other plumber service',\n ]\n ],\n\n //category\n 'Road Services' => [\n \n //sub-category\n 'Crane/Towing' => [\n \n //services\n 'Hydraulic/Rope',\n 'Chain',\n 'Zero degree',\n 'Other towing service'\n ]\n ],\n\n //category\n 'Office Services' => [\n\n //sub-category\n 'Key Making' => [\n\n //services\n 'Car Key',\n 'Door Key',\n 'Bike Key',\n 'Others key making',\n ],\n\n //sub-category\n 'Carpenter' => [\n\n //services\n 'Flooring',\n 'Furniture repair/manufacturing',\n 'Modular kitchen',\n 'Door/gate repairing and manufacturing',\n 'Interior decoration',\n 'Antique wooden work',\n 'Other wooden work',\n ],\n\n //sub-category\n 'Electrician' => [\n\n //services\n 'AC/refrigerator repairing',\n 'Geyser repairing',\n 'Juicer/mixer repairing',\n 'Home Wiring',\n 'Other electrician service',\n ],\n ]\n ];\n\n foreach ($category_array as $category_name => $sub_category_array) {\n $category = new Category();\n $category->name = $category_name;\n $category->save();\n\n foreach ($sub_category_array as $sub_category_name => $services_array) {\n $sub_category = new SubCategory();\n $sub_category->name = $sub_category_name;\n $sub_category->category_id = $category->id;\n $sub_category->save();\n\n $total_services = count($services_array);\n for ($i = 0; $i < $total_services; $i++) {\n $service = new Service();\n $service->name = $services_array[$i];\n $service->sub_category_id = $sub_category->id;\n $service->save();\n }\n }\n }\n }", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "function expliquer_config($cfg){\n $table = 'meta';\n $casier = null;\n $sous_casier = array();\n $cfg = explode('/',$cfg);\n\n // si le premier argument est vide, c'est une syntaxe /table/ ou un appel vide ''\n if (!reset($cfg) AND count($cfg)>1) {\n array_shift($cfg);\n $table = array_shift($cfg);\n if (!isset($GLOBALS[$table]))\n lire_metas($table);\n }\n\n // si on a demande #CONFIG{/meta,'',0}\n if (count($cfg)) {\n // pas sur un appel vide ''\n if ('' !== ($c = array_shift($cfg))) {\n $casier = $c;\n }\n }\n\n if (count($cfg))\n $sous_casier = $cfg;\n\n return array($table,$casier,$sous_casier);\n}", "protected function getConfigFieldsValues()\n {\n return array(\n $this->mod_prefix.'SHOW_WEBPAGE' => Configuration::get($this->mod_prefix.'SHOW_WEBPAGE'),\n $this->mod_prefix.'SHOW_WEBSITE' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE'),\n $this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX'),\n $this->mod_prefix.'SHOW_ORGANIZATION' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION'),\n $this->mod_prefix.'SHOW_ORGANIZATION_LOGO' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_LOGO'),\n $this->mod_prefix.'SHOW_ORGANIZATION_CONTACT' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_CONTACT'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE'),\n $this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'SHOW_LOCALBUSINESS' => Configuration::get($this->mod_prefix.'SHOW_LOCALBUSINESS'),\n $this->mod_prefix.'LOCALBUSINESS_TYPE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_TYPE'),\n $this->mod_prefix.'LOCALBUSINESS_STORENAME' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STORENAME'),\n $this->mod_prefix.'LOCALBUSINESS_DESC' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_DESC'),\n $this->mod_prefix.'LOCALBUSINESS_VAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_VAT'),\n $this->mod_prefix.'LOCALBUSINESS_PHONE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PHONE'),\n $this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW'),\n //$this->mod_prefix.'LOCALBUSINESS_PRANGE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE'),\n $this->mod_prefix.'LOCALBUSINESS_STREET' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STREET'),\n $this->mod_prefix.'LOCALBUSINESS_COUNTRY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_COUNTRY'),\n $this->mod_prefix.'LOCALBUSINESS_REGION' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_REGION'),\n $this->mod_prefix.'LOCALBUSINESS_CODE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_CODE'),\n $this->mod_prefix.'LOCALBUSINESS_LOCALITY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_LOCALITY'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_SHOW'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LAT'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LON' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LON')\n );\n }", "function addNewsConfig($params, &$pObj) {\n\t\t\treturn array_merge_recursive($params['config'], array(\n\t\t 'fileName' => array (\n\t\t 'index' => array (\n\t\t 'rss.xml' => array (\n\t\t 'keyValues' => array (\n\t\t 'type' => '100'\n\t\t ),\n\t\t ),\n\t\t 'rss091.xml' => array (\n\t\t 'keyValues' => array (\n\t\t 'type' => '101'\n\t\t ),\n\t\t ),\n\t\t 'rdf.xml' => array (\n\t\t 'keyValues' => array (\n\t\t 'type' => '102'\n\t\t ),\n\t\t ),\n\t\t 'atom.xml' => array (\n\t\t 'keyValues' => array (\n\t\t 'type' => '103'\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t\t\t'postVarSets' => array (\n\t\t '_DEFAULT' => array (\n\t\t 'archive' => array (\n\t\t '0' => array (\n\t\t 'GETvar' => 'tx_ttnews[year]'\n\t\t ),\n\t\t '1' => array (\n\t\t 'GETvar' => 'tx_ttnews[month]',\n\t\t 'valueMap' => array (\n\t\t 'jan' => '01',\n\t\t 'feb' => '02',\n\t\t 'mar' => '03',\n\t\t 'apr' => '04',\n\t\t 'may' => '05',\n\t\t 'jun' => '06',\n\t\t 'jul' => '07',\n\t\t 'aug' => '08',\n\t\t 'sep' => '09',\n\t\t 'oct' => '10',\n\t\t 'nov' => '11',\n\t\t 'dec' => '12'\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'browse' => array (\n\t\t '0' => array (\n\t\t 'GETvar' => 'tx_ttnews[pointer]',\n\t\t ),\n\t\t ),\n\t\t 'select_category' => array (\n\t\t '0' => array (\n\t\t 'GETvar' => 'tx_ttnews[cat]',\n\t\t ),\n\t\t ),\n\t\t 'article' => array (\n\t\t '0' => array (\n\t\t 'GETvar' => 'tx_ttnews[tt_news]',\n\t\t 'lookUpTable' => array (\n\t\t 'table' => 'tt_news',\n\t\t 'id_field' => 'uid',\n\t\t 'alias_field' => 'title',\n\t\t 'addWhereClause' => ' AND NOT deleted',\n\t\t 'useUniqueCache' => '1',\n\t\t 'useUniqueCache_conf' => array (\n\t\t 'strtolower' => '1',\n\t\t 'spaceCharacter' => '-'\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t '1' => array (\n\t\t 'GETvar' => 'tx_ttnews[swords]'\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t )\n\t\t\t));\n\t\t\n\t\t}", "private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName('FIELD_FEATUREDPSL_TITLE');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_VERTICAL');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_COLUMNITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MAXITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MEDIUMITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MINITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_AUTOSCROLL');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_PAGINATION');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_NAVIGATION');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_AUTOSCROLLDELAY');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_PAUSEONHOVER');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_NBR');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_CAT');\r\n\r\n return $response;\r\n }", "function phpTrafficA_read_config($config_table, $connection) {\n// get configuration (browser, OS list, search engines definitions)\n$sql = \"SELECT * FROM $config_table\";\n$result = mysql_query ($sql);\necho mysql_error();\n$config = array(\"x\" =>\"x\");\nwhile($row = mysql_fetch_array($result)) {\n\t$config = $config + array($row[\"variable\"] => $row[\"value\"] );\n}\nmysql_free_result ($result);\n// Read the os_list and assign 2 arrays (label and id)\n$buffer = explode (\"\\n\",$config['os_list']);\nif (trim(end($buffer)) == \"\") {array_pop($buffer);}\n$i=0;\nforeach($buffer as $buffer1) {\n\tlist ($os_id[$i], $os_label[$i]) = explode ('|', trim($buffer1));\n\t$i+=1;\n}\n// Read the browser_list and assign 2 arrays (label and id)\n$buffer = explode (\"\\n\",$config['browser_list']);\nif (trim(end($buffer)) == \"\") {array_pop($buffer);}\n$i=0;\nforeach($buffer as $buffer1) {\n\tlist ($browser_id[$i], $browser_label[$i]) = explode ('|', trim($buffer1));\n\t$i+=1;\n}\n// Read search engines and keywords table\n$buffer = explode (\"\\n\",$config['search_engines']);\nif (trim(end($buffer)) == \"\") {array_pop($buffer);}\n$i=0;\nforeach($buffer as $buffer1) {\n\t$array = explode ('|', trim($buffer1));\n\t$engine_id[$i] = $array[0];\n\t$engine_url[$i] = $array[1];\n\t$keywords = $array[2];\n\tif (isset($array[3])) $engine_charset[$i] = $array[3];\n\t$engine_kwd[$i] = explode (':', $keywords);\n\t$i+=1;\n}\n// Read number of hosts to be saved\n$save_host = $config['save_host'];\n// Read the referrer black list\n$blacklist = explode (\"\\n\",$config['blacklist']);\nif (trim(end($blacklist)) == \"\") {array_pop($blacklist);}\n// Search engines in referrer table\n$seAreRef = $config['seref'];\n// Visit cut-off\n$visitCutoff = $config['visitcutoff'];\n// Prepare data to return\n$conf['save_host'] = $save_host;\n$conf['os_id'] = $os_id;\n$conf['os_label'] = $os_label;\n$conf['browser_id'] = $browser_id;\n$conf['browser_label'] = $browser_label;\n$conf['engine_id'] = $engine_id;\n$conf['engine_url'] = $engine_url;\n$conf['engine_kwd'] = $engine_kwd;\n$conf['engine_charset'] = $engine_charset;\n$conf['blacklist'] = $blacklist;\n$conf['seAreRef'] = $seAreRef;\n$conf['visitcutoff'] = $visitCutoff;\nreturn $conf;\n}", "function pico_get_requests4category($mydirname, $cat_id = null)\n{\n\t(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = &MyTextSanitizer::sGetInstance()) || $myts = &MyTextSanitizer::getInstance();\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\tinclude dirname(__DIR__) . '/include/configs_can_override.inc.php';\n\t$cat_options = [];\n\tforeach ($GLOBALS['xoopsModuleConfig'] as $key => $val) {\n\t\tif (empty($pico_configs_can_be_override[$key])) continue;\n\t\tforeach (explode(\"\\n\", @$_POST['cat_options']) as $line) {\n\t\t\tif (preg_match('/^' . $key . '\\:(.{1,100})$/', $line, $regs)) {\n\t\t\t\tswitch ($pico_configs_can_be_override[$key]) {\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t$cat_options[$key] = trim($regs[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'int':\n\t\t\t\t\t\t$cat_options[$key] = (int)$regs[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bool':\n\t\t\t\t\t\t$cat_options[$key] = (int)$regs[1] > 0 ? 1 : 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (0 === $cat_id) {\n\t\t// top category\n\t\t$cat_vpath = null;\n\t\t$pid = 0xffff;\n\t} else {\n\t\t// normal category\n\t\t$cat_vpath = trim($myts->stripSlashesGPC(@$_POST['cat_vpath']));\n\t\t$pid = (int)@$_POST['pid'];\n\t\t// check $pid\n\t\tif ($pid) {\n\t\t\t$sql = 'SELECT * FROM ' . $db->prefix($mydirname . '_categories') . \" c WHERE c.cat_id=$pid\";\n\t\t\tif (!$crs = $db->query($sql)) die(_MD_PICO_ERR_SQL . __LINE__);\n\t\t\tif ($db->getRowsNum($crs) <= 0) die(_MD_PICO_ERR_READCATEGORY);\n\t\t}\n\t}\n\n\treturn [\n 'cat_title' => $myts->stripSlashesGPC(@$_POST['cat_title']),\n 'cat_desc' => $myts->stripSlashesGPC(@$_POST['cat_desc']),\n 'cat_weight' => (int)@$_POST['cat_weight'],\n 'cat_vpath' => $cat_vpath,\n 'pid' => $pid,\n 'cat_options' => pico_common_serialize($cat_options),\n ];\n}", "function wind_config() {\n return array(\n\t\t \"wind_realm\" => \"cnmtl_full_np\",\n\t\t \"authorize\" => array(\"valid-user\" => true,\n\t\t\t\t \"users\" => array(\"sbd12\"),\n\t\t\t\t \"groups\"=> array(),\n\t\t\t\t ),\n\t\t \"logout_arg\" => \"windlogout\",\n\t\t \"wind_server\" => \"wind.columbia.edu\",\n\t\t \"wind_login_uri\" => \"/login\",\n\t\t \"wind_logout_uri\" => \"/logout\",\n\t\t \"wind_validate_uri\" => \"/validate\",\n\t\t // Path to public cert used to sign $wind_server's cert\n\t\t \"verify_ssl_certificate\" => false,\n\t\t \"ca_public_cert\" => \"/lamp/ccnmtl/CUWind.crt\",\n\t\t // These will usually be set correctly, but possibly not if you're\n\t\t // using a weird port or some other non-default configuration.\n\t\t );\n }", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\n\t\t$conn_city \t\t= ((in_array(strtolower($this->data_city), $this->dataservers)) ? strtolower($this->data_city) : 'remote');\n\t\t\n\t\t$this->conn_iro \t\t= $db[$conn_city]['iro']['master'];\n\t\t$this->conn_local \t\t= $db[$conn_city]['d_jds']['master'];\n\t\t$this->conn_tme \t\t= $db[$conn_city]['tme_jds']['master'];\n\t\t$this->conn_idc \t\t= $db[$conn_city]['idc']['master'];\n\t\t\n\t\tif(($this->module =='DE') || ($this->module =='CS'))\n\t\t{\n\t\t\t$this->conn_temp\t \t= $this->conn_local;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t}\n\t\telseif($this->module =='TME')\n\t\t{\n\t\t\t$this->conn_temp\t\t= $this->conn_tme;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t\tif((in_array($this->ucode, json_decode(TME_MONGOUSER)) || TME_ALLUSER_MONGO == 1) && in_array(strtolower($conn_city), json_decode(MONGOCITY))){\n\t\t\t\t$this->mongo_tme = 1;\n\t\t\t}\n\n\t\t}\n\t\telseif($this->module =='ME')\n\t\t{\n\t\t\t$this->conn_temp\t\t= $this->conn_idc;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t\tif((in_array($this->ucode, json_decode(MONGOUSER)) || ALLUSER == 1)){\n\t\t\t\t$this->mongo_flag = 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$message = \"Invalid Module.\";\n\t\t\techo json_encode($this->send_die_message($message));\n\t\t\tdie();\n\t\t}\t\t\n\t}", "protected function _getConfigArray(){\n \n return array(\n array(\n 'version' => '0.0.4',\n 'path' => 'bss_quickview/seting_theme/product_image_wrapper',\n 'value' => 'product-item-photo'\n ),\n array(\n 'version' => '0.0.5',\n 'path' => 'bss_quickview/success_popup_design/background_color',\n 'value' => '0088CC'\n ),\n array(\n 'version' => '0.0.5',\n 'path' => 'porto_settings/custom_settings/custom_style',\n 'value' => 'table.desc_spec_tbl{border-collapse:collapse}\ntable.desc_spec_tbl td{border:1px solid #dcdcdc}\n.product.description ul{list-style:disc}\n.page-header.type2.header-newskin .main-panel-top{border-bottom:1px solid rgba(248,248,248,0.2)}\n.page-header.type2.header-newskin .main-panel-inner{border:none}\n#phone-hrs{font-size:1.4em!important;color:#636363;padding-right:15px!important}\n#phone-hrs a{color:#08C!important}\n.page-header.type2.header-newskin .custom-block{width:100%!important;text-align:right!important;top:90%!important;right:0!important}\nh2.side-menu-title{margin:0;background-color:#FF7B0D;color:#fff;font-size:13px;font-weight:700;line-height:1;padding:14px 15px;border-radius:5px 5px 0 0;border-bottom:1px solid #ddd}\n.filterproduct-title{color:#fff!important;background-color:#08c!important;padding-left:20px!important}\n.products-grid.columns4{margin-left:0!important;margin-right:0!important}\n.home-side-menu h2.side-menu-title{color:#fff!important}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart:before,.page-header.type2.header-newskin .minicart-wrapper .action.showcart.active:before{font-size:33px;color:#08C!important}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart{padding-right:17px}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart .counter.qty{margin-top:-21px;background-color:#ff5b5b}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart:after{right:-6px}\n.homepage-bar{border:none;background-color:transparent}\n.homepage-bar .col-lg-4{border-color:#fff;padding-top:14px;padding-bottom:15px}\n.homepage-bar [class*=\" porto-icon-\"],.homepage-bar [class^=\"porto-icon-\"]{color:#465157}\n.homepage-bar .text-area{display:inline-block;vertical-align:middle;text-align:left;margin-left:5px}\n.homepage-bar h3{font-size:14px;font-weight:600;color:#465157;line-height:19px}\n.homepage-bar p{font-size:13px;font-weight:300;color:#839199;line-height:19px}\n.owl-theme .owl-dots .owl-dot span{width:13px;height:13px;border-radius:100%;border:solid 2px #d5d5d5;background:none;position:relative;margin:5px 2px}\n#banner-slider-demo-9.owl-bottom-narrow .owl-controls{text-align:left;padding-left:28px}\n#banner-slider-demo-9.owl-theme .owl-dots .owl-dot span{border:2px solid rgba(0,0,0,0.2);background:none}\n#banner-slider-demo-9.owl-theme .owl-dots .owl-dot.active span,#banner-slider-demo-9.owl-theme .owl-dots .owl-dot:hover span{border-color:#fff;background:none}\n.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{border-color:#05131c;background:none}\n.owl-theme .owl-controls .owl-dot.active span:before,.owl-theme .owl-dots .owl-dot:hover span:before{content:\"\";position:absolute;left:3px;top:3px;right:3px;bottom:3px;background-color:#05131c;border-radius:100%}\n#banner-slider-demo-9.owl-theme .owl-dots .owl-dot.active span:before,#banner-slider-demo-9.owl-theme .owl-dots .owl-dot:hover span:before{background-color:#fff}\n.owl-theme .owl-dots .owl-dot.active span:before,.owl-theme .owl-dots .owl-dot:hover span:before{background-color:#05131c}\n.block.block-subscribe.home-sidebar-block{border:none;background-color:#f4f4f4;text-align:center;border-radius:2px!important}\n.block.block-subscribe.home-sidebar-block .block-title strong{font-size:17px;font-weight:700;color:#05131c}\n.block.block-subscribe.home-sidebar-block .block-content p{line-height:24px;letter-spacing:.001em;color:#4a505e;font-size:14px}\n.block.block-subscribe.home-sidebar-block .newsletter .control input{height:45px;border-color:#e4e4e4;padding-right:10px;border-radius:3px;color:#05131c;text-transform:uppercase}\n.block.block-subscribe.home-sidebar-block button.subscribe{width:100%;margin:7px 0 0;height:auto;position:relative;left:auto;right:auto;top:auto;border-radius:5px;background-color:inherit}\n.block.block-subscribe.home-sidebar-block button.subscribe span{height:45px;text-transform:uppercase;background-color:#05131c;border:none;border-radius:3px;font-size:12px;letter-spacing:.005em;color:#fff;font-family:\"Oswald\";line-height:45px;display:block}\n#testimonials-slider-demo-9{padding:22px;border:solid 2px #0188cc;border-radius:2px}\n.cms-index-index .testimonial-author{margin:8px 0 0}\n.cms-index-index .testimonial-author .img-thumbnail{border:none;padding:0;margin-right:20px;border-radius:100%!important;overflow:hidden}\n.cms-index-index blockquote.testimonial{background-color:transparent;color:#62615e;font-size:14px;font-style:normal;line-height:24px;font-weight:400;font-family:\"Open Sans\";margin:0 -10px;padding:15px 30px 15px 43px;width:100%;float:left;margin-top:13px}\n.cms-index-index blockquote.testimonial:before{color:#0188cc;font-family:\"porto\";font-weight:400;font-size:54px}\n.cms-index-index blockquote.testimonial:after{color:#0188cc;font-family:\"porto\";font-weight:400;font-size:54px;right:-2px}\n.cms-index-index .testimonial-author p{line-height:20px}\n.cms-index-index .testimonial-author p >strong{text-transform:uppercase;font-size:13px;font-weight:700;letter-spacing:.0025em;color:#2b2b2d}\n.cms-index-index blockquote.testimonial p{line-height:24px;letter-spacing:.001em}\n#testimonials-slider-demo-6.owl-theme .owl-controls{text-align:left;padding-left:32px}\n.recent-posts .item{padding-top:40px}\n.recent-posts .post-date{display:block;float:none;text-align:left}\n.recent-posts .post-date .long-date{font-size:13px;font-weight:700;color:#0188cc;line-height:22px;text-transform:uppercase}\n.recent-posts .postTitle{min-height:auto}\n.recent-posts .postTitle h2{margin:0}\n.recent-posts .postTitle h2 a{font-size:17px;font-weight:600;line-height:22px;color:#2b2b2d}\n.recent-posts .postContent{margin:0;padding:0}\n.recent-posts .postContent>p{line-height:27px;letter-spacing:.001em}\n.recent-posts a.readmore{display:none}\n.recent-posts .owl-controls{text-align:left}\n.filterproduct-title{background:none;font-size:17px;color:#2b2b2d}\n.filterproduct-title .content{background:none;padding:0}\n.owl-top-narrow .owl-theme .owl-controls .owl-dots{margin-top:0}\n.small-list.products-grid .product-item .product-item-name{font-size:14px;font-weight:400;letter-spacing:.005em}\n.small-list.products-grid .product-item .product-reviews-summary{margin-top:0}\n.shop-features [class*=\" porto-icon-\"],.shop-features [class^=\"porto-icon-\"]{color:#0188cc;border-color:#0188cc}\n.shop-features h3{font-size:14px;font-weight:700}\n.shop-features p{color:#4a505e;line-height:27px;font-weight:400}\n.shop-features a{font-family:\"Oswald\";font-size:12.5px;text-transform:uppercase;color:#2b2b2d;letter-spacing:.0025em;line-height:26px;border:solid 1px #efefef;padding:7px 28px;background:none;box-shadow:none}\n.shop-features a:hover{background:none;color:#2b2b2d;border-color:#efefef}\n.owl-top-narrow{margin:0 -10px}\n.owl-top-narrow .owl-theme .owl-controls{right:8px}\n.owl-top-narrow .owl-carousel .owl-item > .item{padding:10px}\n@media (min-width: 768px) {\n.catalog-category-view .page-main,.catalog-product-view .page-main{padding-top:0}\n}\n.breadcrumbs li.home a{width:15px;display:inline-block;text-indent:30px;overflow:hidden;float:left;position:relative}\n.breadcrumbs li.home a:after{content:\"\\e883\";font-family:\"porto-icons\";position:absolute;left:0;top:0;text-indent:0}\n.sidebar.sidebar-main{position:relative}\n.block-category-list .block-title,.filter-options-title,.filter .filter-current-subtitle{border:none;background-color:transparent;padding:16px 20px 4px;font-size:15px;text-transform:uppercase;font-weight:600;color:#21293c;letter-spacing:.01em}\n.block-category-list .block-title{padding:0 20px 0}\n.block-category-list .block-title strong{font-weight:600}\n.block-category-list .block-content,.filter-options-content{border:none;background-color:transparent;padding:10px 20px 26px;border-bottom:#efefef solid 1px;position:relative;z-index:2;border-radius:0}\n.filter-current .items{border:none;background-color:transparent;position:relative;z-index:2}\n.filter-current .item{padding-left:20px}\n.filter-current .action.remove{right:20px;color:#21293c}\n.filter-actions{border:none;background-color:transparent;border-bottom:#efefef solid 1px;position:relative;z-index:2;padding-right:20px}\n.filter-actions a{color:#858585}\n.filter-options-title:after{content:\"\\f803\";border:none;color:#21293c;font-size:17px;margin-top:-6px}\n.filter-options-title:hover:after{background:none;color:#21293c}\n.active > .filter-options-title:after{content:\"\\f800\"}\n#ln_slider_price.ui-slider-horizontal{height:3px;box-shadow:none}\n#ln_slider_price .ui-slider-handle{width:12px;height:12px;border-radius:100%}\n.sidebar-title{font-size:15px;font-weight:600;color:#21293c;letter-spacing:.01em;margin-bottom:20px;padding-left:20px;padding-right:20px}\n.porto-icon-left-open-huge:before{content:\"\\f802\";color:#21293c}\n.porto-icon-right-open-huge:before{content:\"\\f801\";color:#21293c}\n.sidebar .owl-top-narrow .owl-theme .owl-controls{top:-40px;right:3px}\n.sidebar .owl-top-narrow .owl-theme .owl-controls .owl-nav div :before{color:#21293c}\n.sidebar .product-items .product-item-info .product-item-photo{max-width:25.19%}\n.sidebar .product-items .product-item-details{margin-left:calc(26% + 15px)}\n.sidebar .product-items .product-item-name a{font-size:12px;color:#5b5b5f;font-weight:400}\n.sidebar .sidebar-filterproducts{margin-bottom:30px;padding-bottom:40px;background:none;border-bottom:#efefef solid 1px}\n.sidebar .product-items .product-item .product-reviews-summary{display:block}\n.sidebar-filterproducts.custom-block + h2{font-size:15px!important;text-transform:uppercase;font-weight:600;color:#21293c!important;letter-spacing:.01em;padding:0 20px}\n.sidebar-filterproducts.custom-block + h2 +h5{font-family:\"Open Sans\"!important;font-weight:600!important;font-size:14px!important;color:#7a7d82!important;letter-spacing:.022em;padding:0 20px}\n.sidebar-filterproducts.custom-block + h2 + h5 + p{color:#21293c!important;font-size:15px!important;letter-spacing:.01em;padding:0 20px}\n.sidebar .custom-block{padding:0 20px}\n.category-boxed-banner.owl-theme .owl-controls{bottom:0}\n.page-products .toolbar .limiter{display:block}\n.page-with-filter .toolbar-amount{display:none}\n.full-width-image-banner{height:300px}\n.full-width-image-banner:after{display:none}\n.full-width-image-banner h2{font-size:36px;font-weight:900;letter-spacing:-.025em;text-transform:uppercase;line-height:38px}\n.full-width-image-banner p{font-size:18px;line-height:38px;font-weight:700;text-transform:uppercase}\n.full-width-image-banner .btn-default{font-size:14px;line-height:25px;letter-spacing:.025em;padding:10px 20px;background-color:#010204;color:#fff;font-family:\"Oswald\";text-transform:uppercase;border-radius:2px;margin-top:31px}\n.page-products .toolbar .limiter .limiter-text{display:none}\n.modes-mode.active{border:none;background:none;color:#111}\n.modes-mode,.modes-mode:hover{border:none;background:none;color:#111;width:15px}\n.toolbar select{border:1px solid #e4e4e4;height:37px;color:#7a7d82;font-weight:400;font-size:14px;text-transform:capitalize;padding:0 10px;padding-right:30px;line-height:31px}\n.toolbar-sorter .sorter-action{margin-top:6px;color:#21293c}\n.toolbar-sorter .sorter-action:before{color:#21293c}\n.pages a.page,.pages strong.page,.pages .action{width:32px;line-height:32px}\n.products-grid + .toolbar.toolbar-products{border-top:solid 1px #efefef;padding-top:25px}\n.filterproducts.products .product-item .product-item-photo{border:solid 1px #ececec}\n.product-item .product-reviews-summary{background:none}\n.price-box .price{font-family:\"Oswald\";font-weight:400;font-size:18px;color:#465157}\n.old-price .price{font-size:13px;color:#999}\n.catalog-product-view .sidebar .custom-block{border:none;color:#6b7a83;padding-bottom:0;margin-bottom:33px;background:none}\n.catalog-product-view .sidebar .custom-block-1>div i{color:#08c;border:none;font-size:40px;float:left}\n.catalog-product-view .sidebar .custom-block-1>div{min-height:65px;clear:both;padding:18px 0;border-bottom:solid 1px #dee5e8;margin-bottom:0}\n.catalog-product-view .sidebar .custom-block-1>div:last-child{border-bottom-width:0}\n.block-manufacturer{text-align:center;padding:10px 20px 0;margin-bottom:0}\n.block-manufacturer hr{border-color:#dee5e8;margin-bottom:0}\n.catalog-product-view .sidebar .custom-block-1>div h3{font-size:14px;font-weight:600;line-height:20px;letter-spacing:.005em;color:#6b7a83;margin-left:80px}\n.block.related{padding:0 20px}\n.block .title strong{font-size:15px;font-weight:600;color:#21293c;letter-spacing:.01em;margin-bottom:20px!important;padding-top:0;text-transform:uppercase}\n.block.related .product-items .product-item-actions{display:none}\n.product-info-main .page-title-wrapper h1{font-size:25px;font-weight:600;letter-spacing:-.01em;color:#21293c;margin:3px 0 15px}\n.prev-next-products a{color:#555}\n.product-reviews-summary .reviews-actions a{line-height:20px;font-size:14px;color:#bdbdbd}\n.product-info-main .product.overview{font-size:14px;font-weight:400;letter-spacing:.005em;line-height:27px;border-bottom:solid 1px #dae2e6}\n.product.media{padding-right:12px}\n.fotorama__stage__shaft{border:none}\n.fotorama__nav--thumbs .fotorama__thumb{border-color:#dae2e6}\n.product-options-bottom .price-box .price-container .price,.product-info-price .price-box .price-container .price{font-family:\"Oswald\";font-size:21px;font-weight:700;letter-spacing:.005em}\n.product-info-main .product-info-price .old-price .price-wrapper .price{font-size:16px;color:#2b2b2d;font-weight:400}\n.product-info-main .fieldset > .field.qty,.product-info-main .nested.options-list > .field.qty{position:relative;width:106px}\n.product-info-main .qty.field .control,.product-info-main .qty.field .qty-changer{margin-left:29px}\n.product-info-main .qty.field .qty-changer > a{position:absolute;top:0;left:0;height:43px;width:30px;line-height:41px;text-align:center;margin:0;border-color:#dae2e6}\n.product-info-main .qty.field .qty-changer > a:first-child{left:auto;right:4px}\n.product-info-main .box-tocart .input-text.qty{font-family:\"Oswald\";display:inline-block;vertical-align:middle;height:43px;width:44px!important;font-size:14px;font-weight:400;text-align:center;color:#61605a;margin:0;border-color:#dae2e6}\n.product-info-main .qty.field .qty-changer > a .porto-icon-up-dir:before{content:\"\\f882\"}\n.product-info-main .qty.field .qty-changer > a .porto-icon-down-dir:before{content:\"\\f883\"}\n.catalog-product-view:not(.weltpixel-quickview-catalog-product-view):not(.weltpixel_quickview-catalog_product-view) .box-tocart .action.tocart{height:43px;font-size:14px;letter-spacing:.05em;font-weight:400}\n.box-tocart .action.tocart:before{content:\"\\e87f\";font-family:\"porto-icons\";margin-right:7px;font-size:16px}\n.action.primary,.action.primary:active{font-family:\"Oswald\";letter-spacing:1px;text-transform:uppercase}\n.product-addto-links .action.towishlist,.product-addto-links .action.tocompare,.moved-add-to-links .action.mailto.friend,.product-social-links .action.mailto.friend{width:43px;height:43px;line-height:41px}\n.product.data.items > .item.content{background-color:#fff;box-shadow:none;border:none;border-top:#dae2e6 solid 1px;font-size:14px;font-weight:400;letter-spacing:.005em;line-height:27px}\n.main-upsell-product-detail .block.upsell .title strong{background:none}\n.block.upsell .title{background:none;border-bottom:#e1e1e1 solid 1px;font-weight:700;margin-bottom:16px;padding-bottom:10px;text-transform:uppercase;text-align:left}\n.block.upsell .title strong{font-size:14px;font-weight:400;font-family:\"Oswald\";color:#302e2a}\n.review-ratings .rating-label{display:block}\n.footer-middle{padding:62px 0 42px}\n.footer-ribbon{margin:-78px 0 25px}\n.footer-middle p{font-size:13px;line-height:20px;margin-bottom:0}\n.footer-middle .block .block-title{margin-bottom:15px}\n.footer-middle .block .block-title strong{font-size:16px;font-weight:700;text-transform:uppercase}\n.footer-middle ul.links li,.footer-middle ul.features li{padding:6px 0}\n.footer-container .validation-advice{position:absolute}\n.footer-middle .block.newsletter .form.subscribe{max-width:400px}\n.footer-middle .block.newsletter .control:before{line-height:48px;margin-left:20px}\n.footer-middle .block.newsletter .control{position:relative}\n.footer-middle .block.newsletter .control input{background-color:#fff;color:#686865;height:48px;border:none;font-size:14px;padding-left:10px}\n.footer-middle .block.newsletter .control div.mage-error{position:absolute;bottom:-22px}\n.footer-middle .block.newsletter .action.subscribe{height:48px;text-transform:uppercase;padding:0 22px}\n.footer-middle .block-bottom{border-top:1px solid #3d3d38;text-align:left;padding:27px 0;overflow:hidden}\n.footer-middle .social-icons a{background-image:none;background-color:#33332f;text-indent:0;color:#fff;border-radius:0;font-size:15px;width:37px;height:37px;text-align:center;margin-left:0;margin-right:4px;float:left;line-height:35px}\n.footer-middle .contact-info li:first-child{border-top-width:0}\n.footer-middle .contact-info li{padding:9px 0}\n.footer-middle .contact-info i{color:#e1ddc3!important;font-size:26px;line-height:28px}\n.footer-middle .contact-info p{line-height:1}\n.footer-middle .contact-info b{font-weight:400;font-size:13px;margin-bottom:7px;display:inline-block}\n.footer-bottom{padding:18px 0}\n.footer-bottom address{float:left}\n.footer-bottom .container{position:relative}\n.footer-bottom .container:before{content:\"\";position:absolute;background-color:#3d3d38;left:15px;right:15px;top:-18px;height:1px;width:calc(100% - 30px)}\n@media (max-width: 991px) {\n.footer .block .block-content{margin-bottom:30px}\n.footer-middle .block-content{min-width:auto!important;width:100%}\n}\n@media (max-width: 767px) {\n.navigation.sw-megamenu > .sticky-logo{display:none}\n.page-header.type2.header-newskin .custom-block{display:none}\n.homepage-bar .col-lg-4{text-align:left!important}\n#banner-slider-demo-9{margin-bottom:20px}\n.sidebar.sidebar-main{position:static}\n.page-products .toolbar .limiter{display:none}\n.product.data.items{margin:0}\n.prev-next-products .product-nav.product-next .product-pop{margin:0}\n.prev-next-products .product-nav.product-prev .product-pop{left:-20px}\n.product-info-main .fieldset > .field.qty{margin-bottom:20px}\n.fieldset > .actions{vertical-align:top}\n.catalog-product-view .sidebar .custom-block{padding:0}\n.footer-middle{padding:62px 0 0;margin-bottom:-20px}\n.footer .block .block-content{margin-bottom:30px}\n.footer-middle .block-content{float:none!important}\n.footer-middle .social-icons{overflow:hidden;float:none!important}\n.footer-bottom .custom-block.f-right{margin-left:0}\n}\n.page-products .sorter{float:left}\n.modes{float:right;margin-right:0;margin-left:20px;margin-top:7px}\n.modes-mode:before{content:\"\\e880\";font-size:14px}\n.mode-list:before{content:\"\\e87b\";font-size:14px}\n.products.wrapper ~ .toolbar .limiter{float:left}\n.products.wrapper ~ .toolbar .pages{float:right}\n@media (min-width: 768px) {\n.page-header.type2.header-newskin .minicart-wrapper{background-color:transparent;width:81px;height:41px;text-align:center;box-shadow:none;border-radius:0;border:none}\n.home-side-menu{background-color:transparent;border-color:#dae2e6;border-radius:2px}\n.home-side-menu h2.side-menu-title{color:#465157;font-size:14.5px;font-weight:700;letter-spacing:.001em}\n.navigation.side-megamenu a,.navigation.side-megamenu a:hover{color:#465157}\n.sw-megamenu.navigation.side-megamenu li.level0.parent > a:after{color:#838b90}\n.sw-megamenu.navigation.side-megamenu li.level0.parent:hover > a:after{color:#fff}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu{border:solid 1px #dae2e6;box-shadow:0 3px 15px -2px rgba(0,0,0,0.3);padding:10px 0 10px 15px}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:before,.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:after{border-bottom-style:solid;content:\"\";display:block;height:0;position:absolute;width:0}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:before{border:8px solid;border-color:transparent #fff transparent transparent;z-index:3;left:-16px;top:11px}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:after{border:9px solid;border-color:transparent #dae2e6 transparent transparent;z-index:2;left:-18px;top:10px;right:auto}\n.sw-megamenu.navigation li.level0.fullwidth .submenu li.level1 > a,.sw-megamenu.navigation li.level0.staticwidth .submenu li.level1 > a{font-size:13px;font-weight:700;color:#434d53;letter-spacing:-.001em;margin-top:9px}\n.sw-megamenu.navigation li.level0.fullwidth .submenu a,.sw-megamenu.navigation li.level0.staticwidth .submenu a,.sw-megamenu.navigation li.level0.classic .submenu a{font-size:13px;font-weight:600;color:#696969;line-height:inherit}\n.sidebar.sidebar-main:before{content:\"\";position:absolute;left:0;right:20px;border:solid 1px #dae2e6;top:0;bottom:0;border-radius:2px}\n.product.data.items > .item.title{padding:10px 30px 10px 0}\n.product.data.items > .item.title > .switch{font-size:14px;font-weight:700;color:#818692;text-transform:uppercase;border:none;border-radius:0;line-height:30px;background:none;padding:0}\n.product.data.items > .item.title:not(.disabled) > .switch:focus,.product.data.items > .item.title:not(.disabled) > .switch:hover{background:none;color:#818692}\n.product.data.items > .item.title.active > .switch,.product.data.items > .item.title.active > .switch:focus,.product.data.items > .item.title.active > .switch:hover{color:#21293c;position:relative;border-bottom:#08C solid 2px}\n.product.data.items > .item.content{padding:35px 0 0;margin-top:45px}\n}\n@media (min-widtH: 768px) {\n.page-header .switcher .options .action.toggle{color:#fff}\n}\n.products-grid .product-item .product-item-info .product-item-photo > a:not(.weltpixel-quickview):after{content:\"\";display:block;background-color:#000;opacity:0;width:100%;height:100%;position:absolute;left:0;top:0;z-index:2;visibility:hidden;transition:all .3s}\n.products-grid .product-item .product-item-info:hover .product-item-photo > a:not(.weltpixel-quickview):after{opacity:.1;visibility:visible}\n.page-header.type2.header-newskin.sticky-header .minicart-wrapper .block-minicart:after{right:38px}\n.page-header.type2.header-newskin.sticky-header .minicart-wrapper .block-minicart:before{right:39px}\n.swatch-attribute.size .swatch-option,.swatch-attribute.manufacturer .swatch-option{background:#fff;color:#636363;border-color:#e9e9e9}\n.swatch-option.text{min-width:26px;line-height:18px;padding:3px;height:26px}\n.pages a.page,.pages strong.page,.pages .action{background:transparent;color:#706f6c;font-size:15px;font-weight:600;line-height:30px}\n.pages a.page:hover,.pages a.action:hover{background-color:transparent;color:#706f6c}\n.pages a.action:hover:before{color:#706f6c!important}\n.pages .action{border-color:transparent}\n.product-info-main .product-info-stock-sku{color:#333;font-size:14px;padding-bottom:23px}\n.product-reviews-summary .reviews-actions a{color:#21293c}\n.product-info-main .product-info-stock-sku{color:#21293c}\n.catalog-product-view .sidebar .custom-block.custom-block-1{margin-top:-25px}\n.block-minicart .block-content > .actions > .secondary .action.viewcart{color:#333;font-weight:500;font-family:\"Oswald\"}\n.cms-index-index .single-images{margin-bottom:5px}\n.product-item .rating-summary .rating-result > span:before{color:#575f68}\n@media (max-width: 767px) {\n.block-category-list .block-title,.block-category-list .block-content,.sidebar-title,.sidebar .custom-block,.sidebar-filterproducts.custom-block + h2,.sidebar-filterproducts.custom-block + h2 +h5,.sidebar-filterproducts.custom-block + h2 + h5 + p{padding-left:0;padding-right:0}\n}\n.page-header .switcher .options .action.toggle{color:#bde1f5}\n.page-wrapper > .breadcrumbs{margin-bottom:0}\n.products-grid .product-item-details .product-item-actions .tocart{text-transform:uppercase;font-size:12.53px;font-family:\"Oswald\";font-weight:400;letter-spacing:.025em;color:#fff;line-height:30px;background-color:#08c;border-color:#08c;}\n.products-grid .product-item-details .product-item-actions .tocart:hover{background-color:#006496!important;border-color:#006496!important;color:#fff}\n.product-item .tocart:before{content:\"\\e87f\";font-size:17px;vertical-align:middle}\n.product-social-links .action.towishlist:before,.product-addto-links .action.towishlist:before,.block-bundle-summary .action.towishlist:before,.product-item .action.towishlist:before,.table-comparison .action.towishlist:before{content:\"\\e889\"}'\n ),\n array(\n 'version' => '0.0.6',\n 'path' => 'persistent/options/lifetime',\n 'value' => '14400'\n ),\n );\n }", "public function run()\n {\n $categories = [\n ['name' => 'cash_sale_without_check', 'name_ua' => 'Готівковий продаж без чеку', 'type' => 1, 'account_id' => 1],\n ['name' => 'sale_with_goods_delivery', 'name_ua' => 'Продаж з відправленням товару', 'type' => 1, 'account_id' => 1],\n ['name' => 'online_sale', 'name_ua' => 'Продаж онлайн', 'type' => 1, 'account_id' => 1],\n ['name' => 'withdrawal_non_cash_account', 'name_ua' => 'Зняття коштів з безготівкового рахунку', 'type' => 1, 'account_id' => 1],\n ['name' => 'ecquiring_sale', 'name_ua' => 'Продаж по еквайрингу', 'type' => 1, 'account_id' => 2],\n ['name' => 'other_noncash_addition', 'name_ua' => 'Інші поповнення безготівкового рахунку', 'type' => 1, 'account_id' => 2],\n ['name' => 'withdrawal_cash_account', 'name_ua' => 'Поповнення рахунку з готівкового', 'type' => 1, 'account_id' => 2],\n ['name' => 'goods_return', 'name_ua' => 'Повернення товару', 'type' => 0, 'account_id' => 1],\n ['name' => 'goods_purchase', 'name_ua' => 'Закупка нового товару', 'type' => 0, 'account_id' => 1],\n ['name' => 'other_cash_expenses', 'name_ua' => 'Інші витрати', 'type' => 0, 'account_id' => 1],\n ['name' => 'bank_services', 'name_ua' => 'Послуги банку', 'type' => 0, 'account_id' => 2],\n ['name' => 'other_noncash_expenses', 'name_ua' =>'Інші витрати', 'type' => 0, 'account_id' => 2],\n ];\n\n foreach($categories as $category){\n DB::table('categories')->insert($category);\n }\n }", "function _site_configuration_resource_retrieve($configuration) {\n switch ($configuration) {\n case \"clean_url\":\n $result['clean_url'] = variable_get('clean_url', 0);\n break;\n\n case \"site_maintenance\":\n $value = variable_get('site_offline', 0); \n $message = variable_get('site_offline_message', t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))));\n $result['site_offline'] = $value;\n $result['message'] = $message;\n break; \n\n case \"site_information\":\n $result['site_name'] = variable_get('site_name', 'Drupal');\n $result['site_mail'] = variable_get('site_mail', '');\n $result['site_slogan'] = variable_get('site_slogan', '');\n $result['site_mission'] = variable_get('site_mission', '');\n $result['site_footer'] = variable_get('site_footer', '');\n $result['anonymous'] = variable_get('anonymous', t('Anonymous'));\n $result['site_frontpage'] = variable_get('site_frontpage', 'node');\n break;\n\n case \"site_performance\":\n $result['cache'] = variable_get('cache', CACHE_DISABLED);\n $result['cache_lifetime'] = variable_get('cache_lifetime', 0);\n $result['page_compression'] = variable_get('page_compression', 1);\n $result['block_cache'] = variable_get('block_cache', CACHE_DISABLED);\n $result['preprocess_css'] = variable_get('preprocess_css', 0);\n $result['preprocess_js'] = variable_get('preprocess_js', 0);\n break;\n \n case \"file_system\":\n $result['file_directory_path'] = file_directory_path();\n $result['file_directory_temp'] = file_directory_temp();\n $result['file_downloads'] = variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC);\n break;\n\n case \"database_logging\":\n $result['dblog_row_limit'] = variable_get('dblog_row_limit', 1000); \n break;\n\n case \"date_time\":\n \n $zone_list = _system_zonelist();\n $i = 0;\n foreach($zone_list as $key => $value) {\n $default_zone[$i]['value'] = $key;\n $default_zone[$i]['format'] = $value; \n $i++;\n }\n $default_time_zone['selected'] = variable_get('date_default_timezone', 0);\n $default_time_zone['time_zone'] = $default_zone;\n $result['default_time_zone'] = $default_time_zone;\n \n $result['configurable_timezones'] = variable_get('configurable_timezones', 1);\n \n $result['week_first_day'] = variable_get('date_first_day', 0);\n\n // Date settings: possible date formats\n $date_short = array('Y-m-d H:i', 'm/d/Y - H:i', 'd/m/Y - H:i', 'Y/m/d - H:i',\n 'd.m.Y - H:i', 'm/d/Y - g:ia', 'd/m/Y - g:ia', 'Y/m/d - g:ia',\n 'M j Y - H:i', 'j M Y - H:i', 'Y M j - H:i',\n 'M j Y - g:ia', 'j M Y - g:ia', 'Y M j - g:ia');\n \n $date_medium = array('D, Y-m-d H:i', 'D, m/d/Y - H:i', 'D, d/m/Y - H:i',\n 'D, Y/m/d - H:i', 'F j, Y - H:i', 'j F, Y - H:i', 'Y, F j - H:i',\n 'D, m/d/Y - g:ia', 'D, d/m/Y - g:ia', 'D, Y/m/d - g:ia',\n 'F j, Y - g:ia', 'j F Y - g:ia', 'Y, F j - g:ia', 'j. F Y - G:i');\n \n $date_long = array('l, F j, Y - H:i', 'l, j F, Y - H:i', 'l, Y, F j - H:i',\n 'l, F j, Y - g:ia', 'l, j F Y - g:ia', 'l, Y, F j - g:ia', 'l, j. F Y - G:i');\n\n\n $short_date_format['selected'] = variable_get('date_format_short', $date_short[1]);\n\n $i = 0;\n foreach ($date_short as $format) {\n $short_format_list[$i]['value'] = $format;\n $short_format_list[$i]['format'] = format_date(time(), 'custom', $format);\n $i++;\n }\n $short_date_format['custom_short_format'] = variable_get('date_format_short_custom', 'd/m - H:i');\n $short_date_format['short_format'] = $short_format_list;\n $result['short_date_format'] = $short_date_format;\n \n $medium_date_format['selected'] = variable_get('date_format_medium', $date_medium[1]);\n\n $i = 0;\n foreach ($date_medium as $format) {\n $medium_format_list[$i]['value'] = $format;\n $medium_format_list[$i]['format'] = format_date(time(), 'custom', $format);\n $i++;\n }\n $medium_date_format['custom_medium_format'] = variable_get('date_format_medium_custom', 'D, m/d/Y - H:i'); \n $medium_date_format['medium_format'] = $medium_format_list;\n $result['medium_date_format'] = $medium_date_format;\n \n $long_date_format['selected'] = variable_get('date_format_long', $date_long[0]);\n \n $i = 0;\n foreach ($date_long as $format) {\n $long_format_list[$i]['value'] = $format;\n $long_format_list[$i]['format'] = format_date(time(), 'custom', $format);\n $i++;\n }\n $long_date_format['custom_long_format'] = variable_get('date_format_long_custom', 'l, F j, Y - H:i');\n $long_date_format['long_format'] = $long_format_list;\n $result['long_date_format'] = $long_date_format;\n return $result;\n break;\n \n case \"error_reporting\":\n $result['site_403'] = variable_get('site_403', '');\n $result['site_404'] = variable_get('site_404', '');\n $result['error_level'] = variable_get('error_level', 1); \n break;\n }\n return $result;\n}", "public function set_sections()\n\t{\n\t\t\n\t\t// We use the HTML helper to easily build the ordered list and heading in the view file\n\t\t$this->_EE->load->helper('html');\n\t\t$this->_EE->lang->loadfile('deployment_hooks');\n\t\t$this->_EE->load->model('Deployment_hooks_model');\n\t\t\n\t\t// If our module hasn't been installed along with the accessory display an error\n\t\tif ( ! $this->_EE->db->table_exists('deployment_hook_posts'))\n\t\t{\n\t\t\t$this->sections[lang('error')] = lang('dh:mod_not_installed');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$recent_deployments = $this->_EE->Deployment_hooks_model->get_recent_dh_posts(3);\n\t\t$data['deploy_log'] = $recent_deployments->result();\n\t\t\n\t\t$this->_EE->cp->add_to_head('\n\t\t\t<!-- added by Deployment Hooks accessory -->\n\t\t\t<style type=\"text/css\">\n\t\t\t\t#' . $this->id . ' h3 { color: #fff; margin-bottom: 5px; }\n\t\t\t\t#' . $this->id . ' table td { display: inline-block; margin-right: 35px; padding-right: 20px; border-right: 1px solid #445058; }\n\t\t\t\t#' . $this->id . ' ol { margin: 0 0 0 20px; width: 250px; }\n\t\t\t\t#' . $this->id . ' a {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tmargin: 15px 10px 5px 0;\n\t\t\t\t\t\tpadding: 5px 20px;\n\t\t\t\t\t\tbackground: #5D7D92;\n\t\t\t\t\t\tcolor: #fff !important;\n\t\t\t\t\t\t-webkit-border-radius: 3px;\n\t\t\t\t\t\t-moz-border-radius: 3px;\n\t\t\t\t\t\ttext-shadow: 0px 1px 0px #000;\n\t\t\t\t}\n\t\t\t\t#'.$this->id.' a:hover { background: #486272; }\n\t\t\t</style>\n\t\t\t<!-- end Deployment Hooks accessory additions -->\n\t\t');\n\t\t\n\t\t$this->sections[lang('dh:recent_deployment_notes')] = $this->_EE->load->view('accessory', $data, TRUE);\n\t\t\n\t}", "function cfgArray2CfgString($cfgArr) {\r\n\r\n // Initialize:\r\n $inLines = array();\r\n\r\n // Traverse the elements of the form wizard and transform the settings into configuration code.\r\n foreach($cfgArr as $vv) {\r\n if ($vv['comment']) {\r\n // If \"content\" is found, then just pass it over.\r\n $inLines[] = trim($vv['comment']);\r\n } else {\r\n // Begin to put together the single-line configuration code of this field:\r\n\r\n // Reset:\r\n $thisLine = array();\r\n\r\n // Set Label:\r\n $thisLine[0] = str_replace('|', '', $vv['label']);\r\n\r\n // Set Type:\r\n if ($vv['type']) {\r\n $thisLine[1] = ($vv['required']?'*':'').str_replace(',', '', ($vv['fieldname']?$vv['fieldname'].'=':'').$vv['type']);\r\n\r\n // Default:\r\n $tArr = array('', '', '', '', '', '');\r\n switch((string)$vv['type']) {\r\n case 'textarea':\r\n if (intval($vv['cols'])) $tArr[0] = intval($vv['cols']);\r\n if (intval($vv['rows'])) $tArr[1] = intval($vv['rows']);\r\n if (trim($vv['extra'])) $tArr[2] = trim($vv['extra']);\r\n if (strlen($vv['specialEval'])) {\r\n $thisLine[2] = '';\r\n // Preset blank default value so position 3 can get a value...\r\n $thisLine[3] = $vv['specialEval'];\r\n }\r\n break;\r\n case 'input':\r\n case 'password':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n if (intval($vv['max'])) $tArr[1] = intval($vv['max']);\r\n if (strlen($vv['specialEval'])) {\r\n $thisLine[2] = '';\r\n // Preset blank default value so position 3 can get a value...\r\n $thisLine[3] = $vv['specialEval'];\r\n }\r\n break;\r\n case 'file':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n break;\r\n case 'select':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n if ($vv['autosize']) $tArr[0] = 'auto';\r\n if ($vv['multiple']) $tArr[1] = 'm';\r\n\r\n }\r\n $tArr = $this->cleanT($tArr);\r\n if (count($tArr)) $thisLine[1] .= ','.implode(',', $tArr);\r\n\r\n $thisLine[1] = str_replace('|', '', $thisLine[1]);\r\n\r\n // Default:\r\n if ($vv['type'] == 'select' || $vv['type'] == 'radio') {\r\n $thisLine[2] = str_replace(chr(10), ', ', str_replace(',', '', $vv['options']));\r\n } elseif ($vv['type'] == 'checkbox') {\r\n if ($vv['default']) $thisLine[2] = 1;\r\n } elseif (strcmp(trim($vv['default']), '')) {\r\n $thisLine[2] = $vv['default'];\r\n }\r\n if (isset($thisLine[2])) $thisLine[2] = str_replace('|', '', $thisLine[2]);\r\n }\r\n\r\n // Compile the final line:\r\n $inLines[] = ereg_replace(\"[\\n\\r]*\", '', implode(' | ', $thisLine));\r\n }\r\n }\r\n // Finally, implode the lines into a string, and return it:\r\n return implode(chr(10), $inLines);\r\n }", "private function write_config_data()\n\t{\n\t\t$captcha_url = '{base_url}images/captchas/';\n\n\t\tforeach (array('avatar_path', 'photo_path', 'signature_img_path', 'pm_path', 'captcha_path', 'theme_folder_path') as $path)\n\t\t{\n\t\t\t$prefix = ($path != 'theme_folder_path') ? $this->root_theme_path : '';\n\t\t\t$this->userdata[$path] = rtrim(realpath($prefix.$this->userdata[$path]), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n\t\t\t$this->userdata[$path] = str_replace($this->base_path, '{base_path}', $this->userdata[$path]);\n\t\t}\n\n\t\t$config = array(\n\t\t\t'db_port' => $this->userdata['db_port'],\n\t\t\t'db_hostname' => $this->userdata['db_hostname'],\n\t\t\t'db_username' => $this->userdata['db_username'],\n\t\t\t'db_password' => $this->userdata['db_password'],\n\t\t\t'db_database' => $this->userdata['db_name'],\n\t\t\t'db_dbprefix' => $this->getDbPrefix(),\n\t\t\t'db_char_set' => $this->userdata['db_char_set'],\n\t\t\t'db_collat' => $this->userdata['db_collat'],\n\t\t\t'app_version' => $this->userdata['app_version'],\n\t\t\t'debug' => '1',\n\t\t\t'site_index' => $this->userdata['site_index'],\n\t\t\t'site_label' => $this->userdata['site_label'],\n\t\t\t'base_path' => $this->base_path,\n\t\t\t'base_url' => $this->userdata['site_url'],\n\t\t\t'cp_url' => str_replace($this->userdata['site_url'], '{base_url}', $this->userdata['cp_url']),\n\t\t\t'site_url' => '{base_url}',\n\t\t\t'theme_folder_url' => '{base_url}themes/',\n\t\t\t'webmaster_email' => $this->userdata['email_address'],\n\t\t\t'webmaster_name' => '',\n\t\t\t'channel_nomenclature' => 'channel',\n\t\t\t'max_caches' => '150',\n\t\t\t'cache_driver' => 'file',\n\t\t\t'captcha_url' => $captcha_url,\n\t\t\t'captcha_path' => $this->userdata['captcha_path'],\n\t\t\t'captcha_font' => 'y',\n\t\t\t'captcha_rand' => 'y',\n\t\t\t'captcha_require_members' => 'n',\n\t\t\t'require_captcha' => 'n',\n\t\t\t'enable_sql_caching' => 'n',\n\t\t\t'force_query_string' => 'n',\n\t\t\t'show_profiler' => 'n',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'cookie_domain' => '',\n\t\t\t'cookie_path' => '/',\n\t\t\t'cookie_prefix' => '',\n\t\t\t'website_session_type' => 'c',\n\t\t\t'cp_session_type' => 'c',\n\t\t\t'cookie_httponly' => 'y',\n\t\t\t'allow_username_change' => 'y',\n\t\t\t'allow_multi_logins' => 'y',\n\t\t\t'password_lockout' => 'y',\n\t\t\t'password_lockout_interval' => '1',\n\t\t\t'require_ip_for_login' => 'y',\n\t\t\t'require_ip_for_posting' => 'y',\n\t\t\t'require_secure_passwords' => 'n',\n\t\t\t'allow_dictionary_pw' => 'y',\n\t\t\t'name_of_dictionary_file' => '',\n\t\t\t'xss_clean_uploads' => 'y',\n\t\t\t'redirect_method' => $this->userdata['redirect_method'],\n\t\t\t'deft_lang' => $this->userdata['deft_lang'],\n\t\t\t'xml_lang' => 'en',\n\t\t\t'send_headers' => 'y',\n\t\t\t'gzip_output' => 'n',\n\t\t\t'is_system_on' => 'y',\n\t\t\t'allow_extensions' => 'y',\n\t\t\t'date_format' => '%n/%j/%Y',\n\t\t\t'time_format' => '12',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'server_offset' => '',\n\t\t\t'default_site_timezone' => date_default_timezone_get(),\n\t\t\t'mail_protocol' => 'mail',\n\t\t\t'email_newline' => '\\n', // single-quoted for portability\n\t\t\t'smtp_server' => '',\n\t\t\t'smtp_username' => '',\n\t\t\t'smtp_password' => '',\n\t\t\t'email_smtp_crypto' => 'ssl',\n\t\t\t'email_debug' => 'n',\n\t\t\t'email_charset' => 'utf-8',\n\t\t\t'email_batchmode' => 'n',\n\t\t\t'email_batch_size' => '',\n\t\t\t'mail_format' => 'plain',\n\t\t\t'word_wrap' => 'y',\n\t\t\t'email_console_timelock' => '5',\n\t\t\t'log_email_console_msgs' => 'y',\n\t\t\t'log_search_terms' => 'y',\n\t\t\t'un_min_len' => '4',\n\t\t\t'pw_min_len' => '5',\n\t\t\t'allow_member_registration' => 'n',\n\t\t\t'allow_member_localization' => 'y',\n\t\t\t'req_mbr_activation' => 'email',\n\t\t\t'new_member_notification' => 'n',\n\t\t\t'mbr_notification_emails' => '',\n\t\t\t'require_terms_of_service' => 'y',\n\t\t\t'default_member_group' => '5',\n\t\t\t'profile_trigger' => 'member',\n\t\t\t'member_theme' => 'default',\n\t\t\t'enable_avatars' => 'y',\n\t\t\t'allow_avatar_uploads' => 'n',\n\t\t\t'avatar_url' => '{base_url}'.$this->userdata['avatar_url'],\n\t\t\t'avatar_path' => $this->userdata['avatar_path'],\n\t\t\t'avatar_max_width' => '100',\n\t\t\t'avatar_max_height' => '100',\n\t\t\t'avatar_max_kb' => '50',\n\t\t\t'enable_photos' => 'n',\n\t\t\t'photo_url' => '{base_url}'.$this->userdata['photo_url'],\n\t\t\t'photo_path' => $this->userdata['photo_path'],\n\t\t\t'photo_max_width' => '100',\n\t\t\t'photo_max_height' => '100',\n\t\t\t'photo_max_kb' => '50',\n\t\t\t'allow_signatures' => 'y',\n\t\t\t'sig_maxlength' => '500',\n\t\t\t'sig_allow_img_hotlink' => 'n',\n\t\t\t'sig_allow_img_upload' => 'n',\n\t\t\t'sig_img_url' => '{base_url}'.$this->userdata['signature_img_url'],\n\t\t\t'sig_img_path' => $this->userdata['signature_img_path'],\n\t\t\t'sig_img_max_width' => '480',\n\t\t\t'sig_img_max_height' => '80',\n\t\t\t'sig_img_max_kb' => '30',\n\t\t\t'prv_msg_enabled' => 'y',\n\t\t\t'prv_msg_allow_attachments' => 'y',\n\t\t\t'prv_msg_upload_path' => $this->userdata['pm_path'],\n\t\t\t'prv_msg_max_attachments' => '3',\n\t\t\t'prv_msg_attach_maxsize' => '250',\n\t\t\t'prv_msg_attach_total' => '100',\n\t\t\t'prv_msg_html_format' => 'safe',\n\t\t\t'prv_msg_auto_links' => 'y',\n\t\t\t'prv_msg_max_chars' => '6000',\n\t\t\t'enable_template_routes' => 'y',\n\t\t\t'strict_urls' => 'y',\n\t\t\t'site_404' => '',\n\t\t\t'save_tmpl_revisions' => 'n',\n\t\t\t'max_tmpl_revisions' => '5',\n\t\t\t'save_tmpl_files' => 'y',\n\t\t\t'deny_duplicate_data' => 'y',\n\t\t\t'redirect_submitted_links' => 'n',\n\t\t\t'enable_censoring' => 'n',\n\t\t\t'censored_words' => '',\n\t\t\t'censor_replacement' => '',\n\t\t\t'banned_ips' => '',\n\t\t\t'banned_emails' => '',\n\t\t\t'banned_usernames' => '',\n\t\t\t'banned_screen_names' => '',\n\t\t\t'ban_action' => 'restrict',\n\t\t\t'ban_message' => 'This site is currently unavailable',\n\t\t\t'ban_destination' => 'http://www.yahoo.com/',\n\t\t\t'enable_emoticons' => 'y',\n\t\t\t'emoticon_url' => '{base_url}'.'images/smileys/',\n\t\t\t'recount_batch_total' => '1000',\n\t\t\t'image_resize_protocol' => 'gd2',\n\t\t\t'image_library_path' => '',\n\t\t\t'thumbnail_prefix' => 'thumb',\n\t\t\t'word_separator' => 'dash',\n\t\t\t'use_category_name' => 'n',\n\t\t\t'reserved_category_word' => 'category',\n\t\t\t'auto_convert_high_ascii' => 'n',\n\t\t\t'new_posts_clear_caches' => 'y',\n\t\t\t'auto_assign_cat_parents' => 'y',\n\t\t\t'new_version_check' => 'y',\n\t\t\t'enable_throttling' => 'n',\n\t\t\t'banish_masked_ips' => 'y',\n\t\t\t'max_page_loads' => '10',\n\t\t\t'time_interval' => '8',\n\t\t\t'lockout_time' => '30',\n\t\t\t'banishment_type' => 'message',\n\t\t\t'banishment_url' => '',\n\t\t\t'banishment_message' => 'You have exceeded the allowed page load frequency.',\n\t\t\t'enable_search_log' => 'y',\n\t\t\t'max_logged_searches' => '500',\n\t\t\t'memberlist_order_by' => \"member_id\",\n\t\t\t'memberlist_sort_order' => \"desc\",\n\t\t\t'memberlist_row_limit' => \"20\",\n\t\t\t'is_site_on' => 'y',\n\t\t\t'theme_folder_path' => $this->userdata['theme_folder_path'],\n\t\t);\n\n\t\t// Default Administration Prefs\n\t\t$admin_default = array(\n\t\t\t'site_index',\n\t\t\t'base_url',\n\t\t\t'base_path',\n\t\t\t'cp_url',\n\t\t\t'site_url',\n\t\t\t'theme_folder_url',\n\t\t\t'webmaster_email',\n\t\t\t'webmaster_name',\n\t\t\t'channel_nomenclature',\n\t\t\t'max_caches',\n\t\t\t'captcha_url',\n\t\t\t'captcha_path',\n\t\t\t'captcha_font',\n\t\t\t'captcha_rand',\n\t\t\t'captcha_require_members',\n\t\t\t'require_captcha',\n\t\t\t'enable_sql_caching',\n\t\t\t'force_query_string',\n\t\t\t'show_profiler',\n\t\t\t'include_seconds',\n\t\t\t'cookie_domain',\n\t\t\t'cookie_path',\n\t\t\t'website_session_type',\n\t\t\t'cp_session_type',\n\t\t\t'allow_username_change',\n\t\t\t'allow_multi_logins',\n\t\t\t'password_lockout',\n\t\t\t'password_lockout_interval',\n\t\t\t'require_ip_for_login',\n\t\t\t'require_ip_for_posting',\n\t\t\t'require_secure_passwords',\n\t\t\t'allow_dictionary_pw',\n\t\t\t'name_of_dictionary_file',\n\t\t\t'xss_clean_uploads',\n\t\t\t'redirect_method',\n\t\t\t'deft_lang',\n\t\t\t'xml_lang',\n\t\t\t'send_headers',\n\t\t\t'gzip_output',\n\t\t\t'date_format',\n\t\t\t'time_format',\n\t\t\t'include_seconds',\n\t\t\t'server_offset',\n\t\t\t'default_site_timezone',\n\t\t\t'mail_protocol',\n\t\t\t'email_newline',\n\t\t\t'smtp_server',\n\t\t\t'smtp_username',\n\t\t\t'smtp_password',\n\t\t\t'email_smtp_crypto',\n\t\t\t'email_debug',\n\t\t\t'email_charset',\n\t\t\t'email_batchmode',\n\t\t\t'email_batch_size',\n\t\t\t'mail_format',\n\t\t\t'word_wrap',\n\t\t\t'email_console_timelock',\n\t\t\t'log_email_console_msgs',\n\t\t\t'log_search_terms',\n\t\t\t'deny_duplicate_data',\n\t\t\t'redirect_submitted_links',\n\t\t\t'enable_censoring',\n\t\t\t'censored_words',\n\t\t\t'censor_replacement',\n\t\t\t'banned_ips',\n\t\t\t'banned_emails',\n\t\t\t'banned_usernames',\n\t\t\t'banned_screen_names',\n\t\t\t'ban_action',\n\t\t\t'ban_message',\n\t\t\t'ban_destination',\n\t\t\t'enable_emoticons',\n\t\t\t'emoticon_url',\n\t\t\t'recount_batch_total',\n\t\t\t'new_version_check',\n\t\t\t'enable_throttling',\n\t\t\t'banish_masked_ips',\n\t\t\t'max_page_loads',\n\t\t\t'time_interval',\n\t\t\t'lockout_time',\n\t\t\t'banishment_type',\n\t\t\t'banishment_url',\n\t\t\t'banishment_message',\n\t\t\t'enable_search_log',\n\t\t\t'max_logged_searches',\n\t\t\t'theme_folder_path',\n\t\t\t'is_site_on'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($admin_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_system_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Members Prefs\n\t\t$member_default = array(\n\t\t\t'un_min_len',\n\t\t\t'pw_min_len',\n\t\t\t'allow_member_registration',\n\t\t\t'allow_member_localization',\n\t\t\t'req_mbr_activation',\n\t\t\t'new_member_notification',\n\t\t\t'mbr_notification_emails',\n\t\t\t'require_terms_of_service',\n\t\t\t'default_member_group',\n\t\t\t'profile_trigger',\n\t\t\t'member_theme',\n\t\t\t'enable_avatars',\n\t\t\t'allow_avatar_uploads',\n\t\t\t'avatar_url',\n\t\t\t'avatar_path',\n\t\t\t'avatar_max_width',\n\t\t\t'avatar_max_height',\n\t\t\t'avatar_max_kb',\n\t\t\t'enable_photos',\n\t\t\t'photo_url',\n\t\t\t'photo_path',\n\t\t\t'photo_max_width',\n\t\t\t'photo_max_height',\n\t\t\t'photo_max_kb',\n\t\t\t'allow_signatures',\n\t\t\t'sig_maxlength',\n\t\t\t'sig_allow_img_hotlink',\n\t\t\t'sig_allow_img_upload',\n\t\t\t'sig_img_url',\n\t\t\t'sig_img_path',\n\t\t\t'sig_img_max_width',\n\t\t\t'sig_img_max_height',\n\t\t\t'sig_img_max_kb',\n\t\t\t'prv_msg_enabled',\n\t\t\t'prv_msg_allow_attachments',\n\t\t\t'prv_msg_upload_path',\n\t\t\t'prv_msg_max_attachments',\n\t\t\t'prv_msg_attach_maxsize',\n\t\t\t'prv_msg_attach_total',\n\t\t\t'prv_msg_html_format',\n\t\t\t'prv_msg_auto_links',\n\t\t\t'prv_msg_max_chars',\n\t\t\t'memberlist_order_by',\n\t\t\t'memberlist_sort_order',\n\t\t\t'memberlist_row_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($member_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_member_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Templates Prefs\n\t\t$template_default = array(\n\t\t\t'enable_template_routes',\n\t\t\t'strict_urls',\n\t\t\t'site_404',\n\t\t\t'save_tmpl_revisions',\n\t\t\t'max_tmpl_revisions',\n\t\t);\n\t\t$site_prefs = array();\n\n\t\tforeach($template_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_template_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Channels Prefs\n\t\t$channel_default = array(\n\t\t\t'image_resize_protocol',\n\t\t\t'image_library_path',\n\t\t\t'thumbnail_prefix',\n\t\t\t'word_separator',\n\t\t\t'use_category_name',\n\t\t\t'reserved_category_word',\n\t\t\t'auto_convert_high_ascii',\n\t\t\t'new_posts_clear_caches',\n\t\t\t'auto_assign_cat_parents',\n\t\t\t'enable_comments',\n\t\t\t'comment_word_censoring',\n\t\t\t'comment_moderation_override',\n\t\t\t'comment_edit_time_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($channel_default as $value)\n\t\t{\n\t\t\tif (isset($config[$value]))\n\t\t\t{\n\t\t\t\t$site_prefs[$value] = $config[$value];\n\t\t\t}\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_channel_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Remove Site Prefs from Config\n\t\tforeach(array_merge($admin_default, $member_default, $template_default, $channel_default) as $value)\n\t\t{\n\t\t\tunset($config[$value]);\n\t\t}\n\n\t\t// Write the config file data\n\t\t$this->write_config_from_template($config);\n\n\t\treturn TRUE;\n\t}", "function cfgString2CfgArray($cfgStr) {\r\n\r\n // Traverse the number of form elements:\r\n $tLines = explode(chr(10), $cfgStr);\r\n foreach($tLines as $k => $v) {\r\n\r\n // Initialize:\r\n $confData = array();\r\n $val = trim($v);\r\n\r\n // Accept a line as configuration if a) it is blank(! - because blank lines indicates new, unconfigured fields) or b) it is NOT a comment.\r\n if (!$val || strcspn($val, '#/')) {\r\n\r\n // Split:\r\n $parts = t3lib_div::trimExplode('|', $val);\r\n\r\n // Label:\r\n $confData['label'] = trim($parts[0]);\r\n\r\n // Field:\r\n $fParts = t3lib_div::trimExplode(',', $parts[1]);\r\n $fParts[0] = trim($fParts[0]);\r\n if (substr($fParts[0], 0, 1) == '*') {\r\n $confData['required'] = 1;\r\n $fParts[0] = substr($fParts[0], 1);\r\n }\r\n\r\n $typeParts = t3lib_div::trimExplode('=', $fParts[0]);\r\n $confData['type'] = trim(strtolower(end($typeParts)));\r\n\r\n if ($confData['type']) {\r\n if (count($typeParts) == 1) {\r\n $confData['fieldname'] = substr(ereg_replace('[^a-zA-Z0-9_]', '', str_replace(' ', '_', trim($parts[0]))), 0, 30);\r\n\r\n // Attachment names...\r\n if ($confData['type'] == 'file') {\r\n $confData['fieldname'] = 'attachment'.$attachmentCounter;\r\n $attachmentCounter = intval($attachmentCounter)+1;\r\n }\r\n } else {\r\n $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));\r\n }\r\n\r\n switch((string)$confData['type']) {\r\n case 'select':\r\n case 'radio':\r\n $confData['default'] = implode(chr(10), t3lib_div::trimExplode(',', $parts[2]));\r\n break;\r\n default:\r\n $confData['default'] = trim($parts[2]);\r\n break;\r\n }\r\n\r\n // Field configuration depending on the fields type:\r\n switch((string)$confData['type']) {\r\n case 'textarea':\r\n $confData['cols'] = $fParts[1];\r\n $confData['rows'] = $fParts[2];\r\n $confData['extra'] = strtoupper($fParts[3]) == 'OFF' ? 'OFF' :\r\n '';\r\n $confData['specialEval'] = trim($parts[3]);\r\n break;\r\n case 'input':\r\n case 'password':\r\n $confData['size'] = $fParts[1];\r\n $confData['max'] = $fParts[2];\r\n $confData['specialEval'] = trim($parts[3]);\r\n break;\r\n case 'file':\r\n $confData['size'] = $fParts[1];\r\n break;\r\n case 'select':\r\n $confData['size'] = intval($fParts[1])?$fParts[1]:\r\n '';\r\n $confData['autosize'] = strtolower(trim($fParts[1])) == 'auto' ? 1 :\r\n 0;\r\n $confData['multiple'] = strtolower(trim($fParts[2])) == 'm' ? 1 :\r\n 0;\r\n break;\r\n }\r\n }\r\n } else {\r\n // No configuration, only a comment:\r\n $confData = array(\r\n 'comment' => $val );\r\n }\r\n\r\n // Adding config array:\r\n $cfgArr[] = $confData;\r\n }\r\n\r\n // Return cfgArr\r\n return $cfgArr;\r\n }", "function read_openvpn_config($config_file_name){\r\n\t//Global $a_config_lines, $port_values, $proto_values, $dev_values, $ca_values, $key_values, $crt_values, $key_values, $group_values, $user_values, $dh_values, $server_values, $ifconfig_pool_values, $keepalive_values, $comp_values, $verb_values, $status_values, $management_values, $a_extra_config_settings;\r\n \t$a_config_lines = file($config_file_name);//read file to array\r\n\t//push the values that have no \"config settings\" like \"client-to-client\" to an array\r\n\tGlobal $a_extra_config_settings;\r\n $a_extra_config_settings = array();\r\n\t$i = 0;\r\n\tforeach ($a_config_lines as $line_num => $line) {\r\n\t\tif (stristr($line, \"cert\")){\r\n\t\t\t$crt_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"port\")){\r\n\t\t\t$port_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"proto\")){\r\n\t\t\t$proto_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"dev\")){\r\n\t\t\t$dev_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"ca\")){\r\n\t\t\t$ca_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"key \")){\r\n\t\t\t$key_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"dh\")){\r\n\t\t\t$dh_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\t\r\n\t\tif (stristr($line, \"server\")){\r\n\t\t\t$server_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"ifconfig-pool-persist\")){\r\n\t\t\t$ifconfig_pool_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"keepalive\")){\r\n\t\t\t$keepalive_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"status\")){\r\n\t\t\t$status_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"verb\")){\r\n\t\t\t$verb_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\t\r\n\t\tif (stristr($line, \"management\")){\r\n\t\t\t$management_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"user \")){\r\n\t\t\t$user_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (stristr($line, \"group \")){\r\n\t\t\t$group_values = explode(\" \", trim($line));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\telse{array_push($a_extra_config_settings, trim($line));}\r\n\t$i++;\r\n\t} \r\nGlobal $num_settings; \r\n$num_settings = $i;\r\n//return value will be array of arrays\r\n$return_value = array('a_config_lines' => $a_config_lines, 'port_values' => $port_values, 'proto_values' => $proto_values, 'dev_values' => $dev_values, 'ca_values' => $ca_values, 'key_values' => $key_values, 'crt_values' => $crt_values, 'key_values' => $key_values, 'group_values' => $group_values, 'user_values' => $user_values, 'dh_values' => $dh_values, 'server_values' => $server_values, 'ifconfig_pool_values' => $ifconfig_pool_values, 'keepalive_values' => $keepalive_values, 'comp_values' => $comp_values, 'verb_values' => $verb_values, 'status_values' => $status_values, 'management_values' => $management_values, 'a_extra_config_settings' => $a_extra_config_settings);\r\nreturn $return_value;\r\n}", "function serendipity_printConfigTemplate($config, $from = false, $noForm = false, $folded = true, $allowToggle = true, $showDangerous = false) {\n global $serendipity;\n $data = array();\n $data['noForm'] = $noForm;\n $data['formToken'] = serendipity_setFormToken();\n\n $data['allowToggle'] = $allowToggle;\n\n foreach ($config as &$category) {\n foreach ($category['items'] as &$item) {\n\n $value = $from[$item['var']] ?? false;\n\n /* Calculate value if we are not installed, how clever :) */\n if ($from == false) {\n $value = serendipity_query_default($item['var'], $item['default']);\n }\n\n /* Check for installOnly flag */\n if (in_array('installOnly', $item['flags']) && IS_installed === true) {\n continue;\n }\n\n if (in_array('hideValue', $item['flags'])) {\n $value = '';\n }\n\n if (!$showDangerous && ($item['view'] ?? null) == 'dangerous') {\n continue;\n }\n\n if (in_array('config', $item['flags']) && isset($from['authorid'])) {\n $value = serendipity_get_user_config_var($item['var'], $from['authorid'], $item['default']);\n }\n\n if (in_array('parseDescription', $item['flags'])) {\n $item['description'] = serendipity_replaceEmbeddedConfigVars($item['description']);\n }\n\n if (in_array('probeDefault', $item['flags'])) {\n $item['default'] = serendipity_probeInstallation($item['var']);\n }\n\n if (in_array('ignore', $item['flags'])) {\n $item['ignore'] = true;\n } else {\n $item['ignore'] = false;\n }\n\n if (in_array('ifEmpty', $item['flags']) && empty($value)) {\n $value = serendipity_query_default($item['var'], $item['default']);\n }\n $item['guessedInput'] = serendipity_guessInput($item['type'], $item['var'], $value, $item['default']);\n }\n }\n $data['config'] = $config;\n $data['config_groupkeys'] = null;\n return serendipity_smarty_show('admin/config_template.tpl', $data);\n}", "public function run()\n {\n $configs = [\n 'admin' => [\n [\n 'name' => 'labels.dashboard',\n 'icon' => 'chart-pie',\n 'link' => 'dashboard',\n 'group' => 'dashboard',\n 'is_dev_feature' => false,\n ],\n [\n 'name' => 'labels.company',\n 'icon' => 'user-group',\n 'link' => 'companies.index',\n 'group' => 'companies',\n 'is_dev_feature' => false,\n ],\n [\n 'name' => 'labels.nav.invoice',\n 'icon' => 'receipt-tax',\n 'group' => 'invoices',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'invoices.releases',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'invoices.downloads',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'invoices.settings.notices',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'invoices.settings.visibilities',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'invoices.rates',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n [\n 'name' => 'labels.nav.aws',\n 'icon' => 'cloud',\n 'group' => 'aws',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'aws.accounts',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n [\n 'name' => 'labels.nav.support',\n 'icon' => 'support',\n 'group' => 'support',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'supports.faqs',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n [\n 'name' => 'labels.nav.auth',\n 'icon' => 'finger-print',\n 'group' => 'auth',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'auth.users',\n 'is_dev_feature' => true,\n ],\n [\n 'group' => 'auth.roles',\n 'is_dev_feature' => true,\n ],\n [\n 'group' => 'auth.permissions',\n 'is_dev_feature' => true,\n ],\n ]\n ],\n [\n 'name' => 'labels.nav.system',\n 'icon' => 'server',\n 'group' => 'systems',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'systems.logs',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'systems.messages',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'systems.schedules',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'systems.settings',\n 'is_dev_feature' => false,\n ],\n ],\n ]\n ],\n 'frontend' => [\n [\n 'icon' => 'fas fa-chart-pie',\n 'link' => 'dashboard',\n 'group' => 'dashboard',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-bell',\n 'link' => 'notifications.index',\n 'group' => 'notifications',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-file-pdf',\n 'link' => 'invoices.pdf',\n 'group' => 'invoices.pdf',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-file-csv',\n 'link' => 'invoices.csv',\n 'group' => 'invoices.csv',\n 'is_dev_feature' => false,\n ],\n [\n 'name' => 'labels.nav.ec2',\n 'icon' => 'fas fa-microchip',\n 'group' => 'ec2.instances',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'ec2.instances.registered',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'ec2.instances.requests',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n [\n 'name' => 'labels.nav.rds',\n 'icon' => 'fas fa-database',\n 'group' => 'rds.instances',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'rds.instances.registered',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'rds.instances.requests',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n [\n 'icon' => 'fas fa-network-wired',\n 'link' => 'aws.elbs.index',\n 'group' => 'aws.elbs',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fas fa-history',\n 'link' => 'logs.index',\n 'group' => 'logs',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fas fas fa-cog',\n 'link' => 'settings.index',\n 'group' => 'settings',\n 'is_dev_feature' => false,\n ],\n [\n 'name' => 'Trusted Advisor',\n 'icon' => 'fas fa-user-check',\n 'group' => 'aws.trusted-advisors',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'group' => 'aws.trusted-advisors.settings',\n 'is_dev_feature' => false,\n ],\n [\n 'group' => 'aws.trusted-advisors.reports',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n [\n 'name' => 'labels.nav.apps',\n 'icon' => 'fas fa-layer-group',\n 'link' => 'apps',\n 'group' => 'apps',\n 'is_dev_feature' => false,\n ],\n // headers\n [\n 'name' => 'labels.nav.help',\n 'icon' => 'fas fa-question-circle',\n 'group' => 'help',\n 'position' => 'header',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'icon' => 'fas fa-comments',\n 'group' => 'faqs',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-book',\n 'group' => 'help.manual',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-info',\n 'group' => 'help.specs',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-check',\n 'group' => 'help.terms',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n [\n 'name' => 'labels.user',\n 'icon' => 'fas fa-user-circle',\n 'group' => null,\n 'position' => 'header',\n 'is_dev_feature' => false,\n 'subs' => [\n [\n 'icon' => 'fas fa-at',\n 'group' => 'contact',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-id-card',\n 'group' => 'profile',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-exchange-alt',\n 'group' => 'login.confirm',\n 'is_dev_feature' => false,\n ],\n [\n 'icon' => 'fas fa-sign-out-alt',\n 'group' => 'logout',\n 'is_dev_feature' => false,\n ],\n ],\n ],\n ],\n ];\n\n $navigations = [];\n\n foreach ($configs as $site => $items) {\n foreach ($items as $item) {\n $subs = $item['subs'] ?? [];\n unset($item['subs']);\n // prepend site to all group & link\n $item['group'] = \"{$site}.{$item['group']}\";\n $item['link'] = isset($item['link']) ? \"{$site}.{$item['link']}\" : null;\n !isset($item['name']) && $item['name'] = \"routes.{$item['link']}\";\n isset($item['position']) || $item['position'] = 'sidebar';\n $item['site'] = $site;\n $item['parent'] = null;\n\n $navigations[] = $item;\n\n if ($subs) {\n foreach ($subs as $subItem) {\n $subItem['group'] = \"{$site}.{$subItem['group']}\";\n $link = $subItem['group'] . '.index';\n if (!Route::has($link)) {\n $link = $subItem['group'];\n }\n $name = 'routes.' . $link;\n\n $navigations[] = [\n 'name' => $name,\n 'icon' => $subItem['icon'] ?? null,\n 'link' => $link,\n 'group' => $subItem['group'],\n 'parent' => $item['name'],\n 'is_dev_feature' => $subItem['is_dev_feature'],\n 'position' => $item['position'],\n 'site' => $site,\n ];\n }\n }\n }\n }\n\n Navigation::truncate();\n Navigation::insert($navigations);\n\n cache()->forget('admin.navigations');\n cache()->forget('frontend.navigations');\n cache()->forget('frontend.headers');\n }", "function truethemes_site_option(){\n\t\t//this values contains the theme layout array.\n\t\t//use print_r to see the multi-dimension array key and values.\n\t\t$option_template_items = get_option('of_template');\n\n\t\t$op_count = count($option_template_items);\n\t\t\n\t\t//set empty site option name array container.\n\t\t$site_option_name = array();\n\t\t\n\t\tfor($index = 0; $index < $op_count; $index ++){\n\t\t\t\n\t\t\t//we only add in theme option name which is the id array key\n\t\t\tif(!empty($option_template_items[$index]['id'])){\n\t\t\t$site_option_name[] = $option_template_items[$index]['id'];\n\t\t\t}\n\t\t\t \t\t\t\n\t\t}\n\n\t\t//print_r($site_option_name); //to see array of site option name.\n\t\t\n\t\t//assign for use in set_all();\n $this->site_option_name = $site_option_name;\n \n\t\t}", "public function index(Request $request)\n {\n session(['mainPage' => $request->fullUrl()]);\n $breadcrumbs = [\n 'title' => __('admin.configurations.breadcrumbs.title'),\n 'links' => [\n [\n 'href' => url('admin/configurations'),\n 'text' => __('admin.configurations.breadcrumbs.title')\n ]\n ]\n ];\n \n $enable_price = Configuration::where('config_key','ENABLE_PRICE')->first();\n\n $group_one = Configuration::where('config_type', 1)->get();\n foreach ($group_one as $configuration){\n $configuration->config_value = json_decode($configuration->config_value, true);\n }\n\n $group_two = Configuration::whereIn('config_type',[2,4])->get();\n foreach ($group_two as $configuration){\n if ($configuration->config_type == 2) {\n if ($configuration->config_key == 'LOGO') {\n $configuration->config_value = ['image' => $configuration->config_value];\n } else {\n $configuration->config_value = ['face_and_email' => $configuration->config_value];\n }\n } else {\n $configuration->config_value = ['localization' => $configuration->config_value];\n }\n }\n\n $group_three = Configuration::where('config_type',3)->get();\n foreach ($group_three as $configuration){\n $configuration->config_value = ['promotion_display' => $configuration->config_value];\n }\n\n $group_four = Configuration::where('config_type',5)->get();\n foreach ($group_four as $configuration){\n $configuration->config_value = ['login' => $configuration->config_value];\n }\n\n $group_five = Configuration::where('config_type', 6)->get();\n foreach ($group_five as $configuration) {\n $configuration->config_value = ['contact' => $configuration->config_value];\n }\n\n $group_six = Configuration::where('config_type', 7)->get();\n foreach ($group_six as $configuration){\n $configuration->config_value = ['sms_message' => $configuration->config_value];\n }\n\n return view('admin.configurations.index', compact( 'breadcrumbs','enable_price', 'group_one', 'group_two', 'group_three', 'group_four', 'group_five', 'group_six'));\n }", "public function activities_config(){\n $config = array(\n array('field' => 'activitiesName','label' => 'Activity Name','rules' => 'trim|required'),\n array('field' => 'txtchoiceItem','label' => 'Choice Item','rules' => 'trim|required'),\n array('field' => 'txtFrom','label' => 'From Date', 'rules' => 'trim|required'),\n array('field' => 'txtTo','label' => 'End Date','rules' => 'trim|required'),\n array('field' => 'txtStartTime','label' => 'start time','rules' => 'trim|required' ),\n array('field' => 'txtEndTime','label' => 'end time', 'rules' => 'trim|required' ),\n array('field' => 'txtLocation','label' => 'Location','rules' => 'trim|required'),\n array('field' => 'txtFastival','label' => 'fastival','rules' => 'trim|required'),\n array('field' => 'txtSupplier','label' => 'supplier','rules' => 'trim|required'),\n array('field' => 'txtPhotos', 'label' => 'Photo','rules' => 'trim|required'),\n array('field' => 'txtEticket','label' => 'Text for E-Ticket','rules' => 'trim|required'),\n array('field' => 'txtBooking','label' => 'booking text','rules' => 'trim|required'),\n array('field' => 'purchasePrice','label' => 'Purchase Price','rules' => 'trim|required'),\n array('field' => 'salePrice','label' => 'Sale Price','rules' => 'trim|required'),\n array('field' => 'originalStock','label' => 'Original Stock','rules' => 'trim|required|numeric' ),\n array('field' => 'actualStock', 'label' => 'Actual Stock','rules' => 'trim|required|numeric'),\n // array('field' => 'check', 'label' => 'available day','rules' => 'trim|required'),\n );\n return $config;\n }", "private static function _addMainConfigurationEntries()\n {\n global $db;\n\n $db->Execute(\n 'insert into ' . TABLE_CONFIGURATION . \"\n (configuration_title, configuration_key, configuration_value,\n configuration_description, configuration_group_id, sort_order,\n set_function, use_function, date_added)\n values\n ('Enable emerchantpay Checkout Module',\n '\" . EmpCheckoutSettings::getCompleteSettingKey('STATUS') . \"',\n 'true',\n 'Do you want to process payments via emerchantpay''s Genesis Gateway?',\n '6', '3', 'emp_zfg_draw_toggle(', 'emp_zfg_get_toggle_value', now())\"\n );\n $db->Execute(\n 'insert into ' . TABLE_CONFIGURATION . \"\n (configuration_title, configuration_key, configuration_value,\n configuration_description, configuration_group_id, sort_order,\n set_function, date_added)\n values\n ('Checkout Title',\n '\" . EmpCheckoutSettings::getCompleteSettingKey(\n 'CHECKOUT_PAGE_TITLE'\n ) . \"',\n 'Pay safely with emerchantpay Checkout',\n 'This name will be displayed on the checkout page', '6', '4',\n 'emp_zfg_draw_input(null, ', now())\"\n );\n }", "function cxense_get_settings() {\n return array(\n array('name'=>'cxense_site_id', 'title' => 'Site ID'),\n array('name'=>'cxense_user_name', 'title' => 'User name'),\n array('name'=>'cxense_api_key', 'title' => 'API Key'),\n array('name'=>'cxense_generate_og_tags', 'title' => 'Generate og-tags', 'select'=>array('yes' => 'Yes', 'no' => 'No')),\n array('name'=>'cxense_add_analytics_script', 'title' => 'Add analytics script', 'select'=>array('yes' => 'Yes', 'no' => 'No')),\n array('name'=>'cxense_recommendable_post_types', 'title' => 'Recommendable post types (comma separated)'),\n array('name'=>'cxense_default_site_desc', 'title' => 'The default website description used in og:description'),\n array('name'=>'cxense_default_og_image', 'title' => 'URL to default og:image'),\n array('name'=>'cxense_org_prefix', 'title' => 'Organisation prefix'),\n array('name'=>'cxense_user_products', 'title' => 'Paywall user products (comma separated string)'),\n array('name'=>'cxense_widgets_options', 'title' => 'cxense_widgets_options', 'add_field' => false)\n );\n}", "function isms_component_config_func($mode = \"\", $inargs, &$outargs, &$result)\n{\n\n // initialize return code and output\n $result = 0;\n $output = \"\";\n\n $component_name = \"isms\";\n\n switch ($mode) {\n case COMPONENT_CONFIGMODE_GETSETTINGSHTML:\n\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n\n // initial values\n $address = grab_array_var($settings, \"address\", \"\");\n $http_port = grab_array_var($settings, \"http_port\", \"81\");\n $username = grab_array_var($settings, \"username\", \"admin\");\n $password = grab_array_var($settings, \"password\", \"\");\n $enabled = grab_array_var($settings, \"enabled\", \"\");\n $authorized_responders = grab_array_var($settings, \"authorized_responders\", \"\");\n\n //echo \"ACI1: $autocreateissues<BR>\";\n\n // values passed to us\n $address = grab_array_var($inargs, \"address\", $address);\n $http_port = grab_array_var($inargs, \"http_port\", $http_port);\n $username = grab_array_var($inargs, \"username\", $username);\n $password = grab_array_var($inargs, \"password\", $password);\n $enabled = checkbox_binary(grab_array_var($inargs, \"enabled\", $enabled));\n $authorized_responders = grab_array_var($inargs, \"authorized_responders\", $authorized_responders);\n\n //echo \"ACI2: $autocreateissues<BR>\";\n\n //$autocreateissues=checkbox_binary($autocreateissues);\n\n //echo \"ACI3: $autocreateissues<BR>\";\n\n //print_r($inargs);\n\n $component_url = get_component_url_base($component_name);\n\n $output = '\n \n<p><a href=\"http://www.multitech.com\" target=\"_blank\"><img src=\"' . $component_url . '/images/multitech.png\"></a></p>\n<p>' . _('Allows integration between Nagios XI and a Multi-Tech iSMS GSM modem.') . ' <strong>' . _('Requires') . '</strong> ' . _('Multi-Tech iSMS modem') . ' <a href=\"https://assets.nagios.com/downloads/nagiosxi/docs/MultiTech_iSMS_Integration_With_XI.pdf\" target=\"_blank\" title=\"Documentation\">' . _('setup') . '</a>.</p>\n\n<h5 class=\"ul\">' . _('Integration Settings') . '</h5>\n\n<table class=\"table table-condensed table-no-border table-auto-width\">\n <tr>\n <td></td>\n <td class=\"checkbox\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" id=\"enabled\" name=\"enabled\" ' . is_checked($enabled, 1) . '>\n ' . _('Enable integration') . '\n </label>\n </td>\n </tr>\n</table>\n\n<h5 class=\"ul\">' . _('Sender Settings') . '</h5>\n\n<p>' . _('These settings relate to sending SMS alerts from Nagios XI through the iSMS Send API.') . '</p>\n\n<table class=\"table table-condensed table-no-border table-auto-width\">\n <tr>\n <td class=\"vt\">\n <label>' . _('IP Address') . ':</label>\n </td>\n <td>\n <input type=\"text\" size=\"40\" name=\"address\" id=\"address\" value=\"' . $address . '\" class=\"form-control\">\n <div class=\"subtext\">' . _('The IP address of the iSMS.') . '</div>\n </td>\n </tr>\n <tr>\n <td class=\"vt\">\n <label>' . _('HTTP Port:') . '</label>\n </td>\n <td>\n <input type=\"text\" size=\"4\" name=\"http_port\" id=\"http_port\" value=\"' . $http_port . '\" class=\"form-control\">\n <div class=\"subtext\">' . _('The HTTP port used to access the iSMS Send API') . '.</div>\n </td>\n </tr>\n <tr>\n <td class=\"vt\">\n <label>' . _('Username') . ':</label>\n </td>\n <td>\n <input type=\"text\" size=\"20\" name=\"username\" id=\"username\" value=\"' . $username . '\" class=\"form-control\">\n <div class=\"subtext\">' . _('The username used to authenticate to the iSMS.') . '</div>\n </td>\n </tr>\n <tr>\n <td class=\"vt\">\n <label>' . _('Password:') . '</label>\n </td>\n <td>\n <input type=\"password\" size=\"20\" name=\"password\" id=\"password\" value=\"' . $password . '\" class=\"form-control\">\n <div class=\"subtext\">' . _('The password used to authenticate to the iSMS.') . '</div>\n </td>\n </tr>\n</table>';\n\n $receive_url = get_component_url_base($component_name, false) . \"/receiver.php\";\n /*\n $output.='\n\n <div class=\"sectionTitle\">Receiver Settings</div>\n\n <p>These settings relate to processing SMS text messages received from the iSMS Receive API.</p>\n\n <table>\n\n <tr>\n <td valign=\"top\">\n <label>Receive API Page:</label>\n </td>\n <td>\n <input type=\"textfield\" size=\"60\" name=\"receive_url\" id=\"receive_url\" value=\"'.$receive_url.'\" class=\"textfield\" readonly />\n Use this URL when configuring the iSMS Receive API page. Read-Only.<br><br>\n </td>\n </tr>\n\n <tr>\n <td valign=\"top\">\n <label>Authorized Responders:</label>\n </td>\n <td>\n <textarea name=\"authorized_responders\" cols=\"20\" rows=\"5\">\n '.$authorized_responders.'\n </textarea>\n \n Phone numbers of cellphones that are authorized to acknowledge problems, disable notifications, and submit other commands.<br>Enter one phone number per line in international format (e.g. +16515555555).\n </td>\n </tr>\n\n </table>\n ';\n */\n $output .= '\n\n<h5 class=\"ul\">' . _('Test Message') . '</h5>\n\n<table class=\"table table-condensed table-no-border table-auto-width\">\n <tr>\n <td valign=\"top\">\n <label>' . _('Phone Number') . ':</label>\n </td>\n <td>\n <input type=\"text\" size=\"20\" name=\"testnumber\" id=\"testnumber\" value=\"\" class=\"form-control\">\n <div class=\"subtext\">' . _('Enter a mobile phone number to send a test SMS message to. This is used for testing the Nagios XI and Multi-Tech iSMS integration.') . '</div>\n </td>\n </tr>\n</table>\n\n<p style=\"font-size: 7pt;\">' . _('Multi-Tech and the Multi-Tech logo are trademarks or registered trademarks of') . ' <a href=\"http://www.multitech.com\" target=\"_blank\">Multi-Tech Systems, Inc.</a></p>\n ';\n break;\n\n case COMPONENT_CONFIGMODE_SAVESETTINGS:\n\n // get variables\n $address = grab_array_var($inargs, \"address\", \"\");\n $http_port = grab_array_var($inargs, \"http_port\", \"\");\n $username = grab_array_var($inargs, \"username\", \"\");\n $password = grab_array_var($inargs, \"password\", \"\");\n $enabled = checkbox_binary(grab_array_var($inargs, \"enabled\", \"\"));\n $authorized_responders = grab_array_var($inargs, \"authorized_responders\", \"\");\n\n // validate variables\n $errors = 0;\n $errmsg = array();\n if ($enabled == 1) {\n if (have_value($address) == false) {\n $errmsg[$errors++] = \"No address specified.\";\n }\n if (have_value($http_port) == false) {\n $errmsg[$errors++] = \"No HTTP port specified.\";\n }\n if (have_value($username) == false) {\n $errmsg[$errors++] = \"No username specified.\";\n }\n if (have_value($password) == false) {\n $errmsg[$errors++] = \"No password specified.\";\n }\n }\n\n // handle errors\n if ($errors > 0) {\n $outargs[COMPONENT_ERROR_MESSAGES] = $errmsg;\n $result = 1;\n return '';\n }\n\n // save settings\n $settings = array(\n \"address\" => $address,\n \"http_port\" => $http_port,\n \"username\" => $username,\n \"password\" => $password,\n \"enabled\" => $enabled,\n \"authorized_responders\" => $authorized_responders,\n );\n set_option(\"isms_component_options\", serialize($settings));\n\n // send a test message\n $testnumber = grab_array_var($inargs, \"testnumber\", \"\");\n $smsoutput = array();\n $smsresult = -1;\n if ($testnumber != \"\") {\n $args = array(\n \"number\" => $testnumber,\n \"message\" => \"Test Multi-Tech iSMS message from Nagios XI\\n\" . get_option('url'),\n );\n $smsresult = isms_component_send_sms($args, $smsoutput);\n\n // handle errors\n if ($smsresult == 1) {\n $errmsg[$errors++] = \"An error occurred sending the test SMS message.\";\n $outargs[COMPONENT_ERROR_MESSAGES] = $errmsg;\n $result = 1;\n return '';\n }\n }\n\n // info messages\n $okmsg = array();\n $okmsg[] = _(\"Multi-Tech iSMS settings updated.\");\n if ($smsresult == 0) {\n $okmsg[] = _(\"Test SMS message sent to \") . $testnumber . _(\" successfully.\");\n }\n if ($smsresult >= 0) {\n //$okmsg[]=serialize($smsoutput);\n }\n $outargs[COMPONENT_INFO_MESSAGES] = $okmsg;\n\n break;\n\n default:\n break;\n\n }\n\n return $output;\n}", "public function run()\n\t{\n\t\t\\DB::table('configures')->delete();\n \n\t\t\\DB::table('configures')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => 1,\n\t\t\t\t'cname' => 'Title Site',\n\t\t\t\t'ckey' => 'title_site',\n\t\t\t\t'cvalue' => 'Digital Printing and Wide Format Printing',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-07-15 09:01:20',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => 2,\n\t\t\t\t'cname' => 'Meta Description',\n\t\t\t\t'ckey' => 'meta_description',\n\t\t\t\t'cvalue' => 'Specialty digital printer, we focus on unique display graphic solution.',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-07-15 09:01:27',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => 3,\n\t\t\t\t'cname' => 'Main Logo',\n\t\t\t\t'ckey' => 'main_logo',\n\t\t\t\t'cvalue' => 'assets/images/logos/logo.14-07-15.png',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-07-15 08:56:14',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => 4,\n\t\t\t\t'cname' => 'VI Format',\n\t\t\t\t'ckey' => 'vi_format',\n\t\t\t\t'cvalue' => '2',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 3,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-21 09:24:48',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => 5,\n\t\t\t\t'cname' => 'Instagram App ID',\n\t\t\t\t'ckey' => 'instagram_app_id',\n\t\t\t\t'cvalue' => 'f6b31259ea3d4f8489da2e137cec4c34',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-17 10:27:04',\n\t\t\t),\n\t\t\t5 => \n\t\t\tarray (\n\t\t\t\t'id' => 6,\n\t\t\t\t'cname' => 'Skydrive App ID',\n\t\t\t\t'ckey' => 'skydrive_app_id',\n\t\t\t\t'cvalue' => '0000000040149c21',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-17 10:27:04',\n\t\t\t),\n\t\t\t6 => \n\t\t\tarray (\n\t\t\t\t'id' => 7,\n\t\t\t\t'cname' => 'Google Drive App ID',\n\t\t\t\t'ckey' => 'googledrive_app_id',\n\t\t\t\t'cvalue' => '542866151209-h64bq9qnogf0e51b7rir1cuni1pnlc8j.apps.googleusercontent.com',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-17 10:27:04',\n\t\t\t),\n\t\t\t7 => \n\t\t\tarray (\n\t\t\t\t'id' => 8,\n\t\t\t\t'cname' => 'Dropbox App ID',\n\t\t\t\t'ckey' => 'dropbox_app_id',\n\t\t\t\t'cvalue' => '4h5nj85dysuxe3s',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-17 10:27:04',\n\t\t\t),\n\t\t\t8 => \n\t\t\tarray (\n\t\t\t\t'id' => 9,\n\t\t\t\t'cname' => 'Flickr App Secret',\n\t\t\t\t'ckey' => 'flickr_app_secret',\n\t\t\t\t'cvalue' => '58db44a1386f0b4e',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-17 10:27:04',\n\t\t\t),\n\t\t\t9 => \n\t\t\tarray (\n\t\t\t\t'id' => 10,\n\t\t\t\t'cname' => 'Flickr App ID',\n\t\t\t\t'ckey' => 'flickr_app_id',\n\t\t\t\t'cvalue' => '24fdd4da6151132517c7d4572c29d1f0',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-17 10:27:04',\n\t\t\t),\n\t\t\t10 => \n\t\t\tarray (\n\t\t\t\t'id' => 11,\n\t\t\t\t'cname' => 'Facebook APP ID',\n\t\t\t\t'ckey' => 'facebook_app_id',\n\t\t\t\t'cvalue' => '1601264390104375',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-04-17 10:27:04',\n\t\t\t\t'updated_at' => '2015-04-17 10:27:04',\n\t\t\t),\n\t\t\t11 => \n\t\t\tarray (\n\t\t\t\t'id' => 12,\n\t\t\t\t'cname' => 'Google Drive Email',\n\t\t\t\t'ckey' => 'google_drive_email',\n\t\t\t\t'cvalue' => '590750925671-qkiep6bvosvpmeespk2sjls8177bsbe9@developer.gserviceaccount.com',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-05-31 00:54:43',\n\t\t\t\t'updated_at' => '2015-05-31 00:54:43',\n\t\t\t),\n\t\t\t12 => \n\t\t\tarray (\n\t\t\t\t'id' => 13,\n\t\t\t\t'cname' => 'Google Drive Key File',\n\t\t\t\t'ckey' => 'google_drive_key_file',\n\t\t\t\t'cvalue' => '/var/www/vi/app/files/google_drive_key_file.p12',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-05-31 00:56:36',\n\t\t\t\t'updated_at' => '2015-05-31 00:56:36',\n\t\t\t),\n\t\t\t13 => \n\t\t\tarray (\n\t\t\t\t'id' => 14,\n\t\t\t\t'cname' => 'System Margin',\n\t\t\t\t'ckey' => 'margin',\n\t\t\t\t'cvalue' => '20',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-06-02 23:00:03',\n\t\t\t\t'updated_at' => '2015-06-02 23:06:47',\n\t\t\t),\n\t\t\t14 => \n\t\t\tarray (\n\t\t\t\t'id' => 15,\n\t\t\t\t'cname' => 'Background 1',\n\t\t\t\t'ckey' => 'background',\n\t\t\t\t'cvalue' => 'http://vi.anvyonline.com/assets/images/background-1b6c4998efbc1045452e47dc9e15dd99.jpg',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-06-16 04:13:04',\n\t\t\t\t'updated_at' => '2015-06-16 04:13:04',\n\t\t\t),\n\t\t\t15 => \n\t\t\tarray (\n\t\t\t\t'id' => 16,\n\t\t\t\t'cname' => 'Background 2',\n\t\t\t\t'ckey' => 'background',\n\t\t\t\t'cvalue' => 'http://vi.anvyonline.com/assets/images/background-f6884f3c1217a3d2c1aa33eff175681f.jpg',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-06-16 04:13:39',\n\t\t\t\t'updated_at' => '2015-06-16 04:13:39',\n\t\t\t),\n\t\t\t16 => \n\t\t\tarray (\n\t\t\t\t'id' => 17,\n\t\t\t\t'cname' => 'Google Analytic ID',\n\t\t\t\t'ckey' => 'google_analytic_id',\n\t\t\t\t'cvalue' => 'UA-62240241-2',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-06-24 01:06:02',\n\t\t\t\t'updated_at' => '2015-06-24 01:06:02',\n\t\t\t),\n\t\t\t17 => \n\t\t\tarray (\n\t\t\t\t'id' => 18,\n\t\t\t\t'cname' => '',\n\t\t\t\t'ckey' => 'home_header_title',\n\t\t\t\t'cvalue' => 'Large Format Specialty Printer',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-07 15:53:08',\n\t\t\t\t'updated_at' => '2015-07-23 22:47:33',\n\t\t\t),\n\t\t\t18 => \n\t\t\tarray (\n\t\t\t\t'id' => 19,\n\t\t\t\t'cname' => '',\n\t\t\t\t'ckey' => 'home_header_description',\n\t\t\t\t'cvalue' => 'Welcome to Anvy Digital Imaging Inc.',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-07 15:53:08',\n\t\t\t\t'updated_at' => '2015-07-24 11:52:54',\n\t\t\t),\n\t\t\t19 => \n\t\t\tarray (\n\t\t\t\t'id' => 20,\n\t\t\t\t'cname' => '',\n\t\t\t\t'ckey' => 'home_main_title',\n\t\t\t\t'cvalue' => 'Create something beautiful',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-07 15:53:09',\n\t\t\t\t'updated_at' => '2015-07-07 16:02:01',\n\t\t\t),\n\t\t\t20 => \n\t\t\tarray (\n\t\t\t\t'id' => 21,\n\t\t\t\t'cname' => '',\n\t\t\t\t'ckey' => 'home_main_description',\n\t\t\t\t'cvalue' => 'Give cherished moments the love and attention they deserve',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-07 15:53:09',\n\t\t\t\t'updated_at' => '2015-07-07 16:02:01',\n\t\t\t),\n\t\t\t21 => \n\t\t\tarray (\n\t\t\t\t'id' => 22,\n\t\t\t\t'cname' => '',\n\t\t\t\t'ckey' => 'home_footer_title',\n\t\t\t\t'cvalue' => 'Let&#039;s be friends!',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-07 15:53:09',\n\t\t\t\t'updated_at' => '2015-07-07 16:02:01',\n\t\t\t),\n\t\t\t22 => \n\t\t\tarray (\n\t\t\t\t'id' => 23,\n\t\t\t\t'cname' => '',\n\t\t\t\t'ckey' => 'home_footer_description',\n\t\t\t\t'cvalue' => 'For exclusive offers, up to the minute news and more',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-07 15:53:09',\n\t\t\t\t'updated_at' => '2015-07-07 16:02:01',\n\t\t\t),\n\t\t\t23 => \n\t\t\tarray (\n\t\t\t\t'id' => 24,\n\t\t\t\t'cname' => 'Google Map Link',\n\t\t\t\t'ckey' => 'google_map_link',\n\t\t\t\t'cvalue' => 'https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d5015.090301114683!2d-113.98509010154422!3d51.061485941854784!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0000000000000000%3A0x9c66042789ce65f4!2sAnvy+Digital+Imaging!5e0!3m2!1sen!2sca!4v1414011757410',\n\t\t\t\t'cdescription' => NULL,\n\t\t\t\t'active' => 1,\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-13 13:42:44',\n\t\t\t\t'updated_at' => '2015-07-13 13:42:44',\n\t\t\t),\n\t\t));\n\t}", "public function get_default_list_config()\n {\n return '[[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_id\",false,\"LC__CMDB__OBJTYPE__ID\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_id\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_title\",false,\"LC__UNIVERSAL__TITLE_LINK\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_title\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"its_type\",\"isys_its_type__title\",\"LC__CMDB__CATG__TYPE\",\"isys_cmdb_dao_category_g_its_type::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_created\",false,\"LC__TASK__DETAIL__WORKORDER__CREATION_DATE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_created\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_changed\",false,\"LC__CMDB__LAST_CHANGE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_changed\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"purpose\",\"isys_purpose__title\",\"LC__CMDB__CATG__GLOBAL_PURPOSE\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"category\",\"isys_catg_global_category__title\",\"LC__CMDB__CATG__GLOBAL_CATEGORY\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_cmdb_status\",false,\"LC__UNIVERSAL__CMDB_STATUS\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_cmdb_status\"]]]';\n }", "public function calculateConfigs()\n {\n $ITEMS = $this->getItems();\n $SHIP_DATA = $this->getShipInfo();\n\n $CONFIGS = [\n 1 => [\n \"DAMAGE\" => 0,\n \"SHIELD\" => 0,\n \"SHIELD_ABSORBATION\" => 0,\n \"SPEED\" => $SHIP_DATA[\"SPEED\"],\n \"LASER_COUNT\" => 0,\n \"LAUNCHER_COUNT\" => 0,\n \"HEAVY\" => [],\n \"EXTRAS\" => [],\n ],\n 2 => [\n \"DAMAGE\" => 0,\n \"SHIELD\" => 0,\n \"SHIELD_ABSORBATION\" => 0,\n \"SPEED\" => $SHIP_DATA[\"SPEED\"],\n \"LASER_COUNT\" => 0,\n \"LAUNCHER_COUNT\" => 0,\n \"HEAVY\" => [],\n \"EXTRAS\" => [],\n ],\n ];\n\n $PET_CONFIGS = [\n 1 => [\n \"DAMAGE\" => 0,\n \"SHIELD\" => 0,\n \"SHIELD_ABSORBATION\" => 0,\n ],\n 2 => [\n \"DAMAGE\" => 0,\n \"SHIELD\" => 0,\n \"SHIELD_ABSORBATION\" => 0,\n ],\n ];\n\n for ($config = 1; $config <= 2; $config++) {\n foreach ($ITEMS as $ITEM_OBJ) {\n $ITEM = new Item($ITEM_OBJ, $this->mysql);\n if (!$ITEM->isInUse($this->user->Hangars->CURRENT_HANGAR->ID, $config)) {\n continue;\n }\n\n if ($ITEM->isInUse($this->user->Hangars->CURRENT_HANGAR->ID, $config, true) == \"ON_PET_\". $config) {\n $PET_CONFIGS[$config]['DAMAGE'] += $ITEM->LVL > 1 ? $ITEM->ATTRIBUTES['DAMAGE'] * ((($ITEM->LVL - 1) * 0.004) + 1) : $ITEM->ATTRIBUTES['DAMAGE'];\n $PET_CONFIGS[$config]['SHIELD'] += $ITEM->LVL > 1 ? $ITEM->ATTRIBUTES['SHIELD'] * ((($ITEM->LVL - 1) * 0.01) + 1) : $ITEM->ATTRIBUTES['SHIELD'];\n $PET_CONFIGS[$config]['SHIELD_ABSORBATION'] += $ITEM->LVL > 1 ? $ITEM->ATTRIBUTES['SHIELD_ABSORBATION'] * ((($ITEM->LVL - 1) * 0.01) + 1) : $ITEM->ATTRIBUTES['SHIELD_ABSORBATION'];\n continue;\n }\n\n if ($ITEM->CATEGORY == 'extra') {\n //SET EXTRAS\n $ITEM_ARR = [\n \"Id\" => $ITEM->ID,\n \"Amount\" => $ITEM->AMOUNT,\n \"LootId\" => $ITEM->LOOT_ID,\n ];\n $CONFIGS[$config]['EXTRAS'][] = $ITEM_ARR;\n } elseif ($ITEM->CATEGORY == 'heavy') {\n //SET ROCKETLAUNCHER\n if ($CONFIGS[$config]['LAUNCHER_COUNT'] < 15) {\n $LAUNCHER_TYPE = $ITEM->ITEM_NAME == 'HST-01' ? 1 : 2;\n $CONFIGS[$config]['LAUNCHER_COUNT']++;\n $CONFIGS[$config]['HEAVY'][] = $LAUNCHER_TYPE;\n }\n } else {\n //SET LASER DAMAGE\n if ($ITEM->CATEGORY == 'laser') {\n $CONFIGS[$config]['LASER_COUNT'] < 15 ? $CONFIGS[$config]['LASER_COUNT']++ : null;\n }\n\n $CONFIGS[$config]['DAMAGE'] += $ITEM->LVL > 1 ? $ITEM->ATTRIBUTES['DAMAGE'] * ((($ITEM->LVL - 1) * 0.004) + 1) : $ITEM->ATTRIBUTES['DAMAGE'];\n $CONFIGS[$config]['SHIELD'] += $ITEM->LVL > 1 ? $ITEM->ATTRIBUTES['SHIELD'] * ((($ITEM->LVL - 1) * 0.01) + 1) : $ITEM->ATTRIBUTES['SHIELD'];\n $CONFIGS[$config]['SHIELD_ABSORBATION'] += $ITEM->LVL > 1 ? $ITEM->ATTRIBUTES['SHIELD_ABSORBATION'] * ((($ITEM->LVL - 1) * 0.01) + 1) : $ITEM->ATTRIBUTES['SHIELD_ABSORBATION'];\n $CONFIGS[$config]['SPEED'] += $ITEM->ATTRIBUTES['SPEED'];\n }\n }\n }\n\n //UPDATE SHIP CONFIGS\n $this->mysql->QUERY(\n \"UPDATE player_ship_config\n SET CONFIG_1_DMG = ?,\n CONFIG_1_SHIELD = ?,\n CONFIG_1_SPEED = ?,\n CONFIG_1_SHIELDABSORB = ?,\n CONFIG_1_LASERCOUNT = ?,\n CONFIG_1_HEAVY = ?,\n CONFIG_1_EXTRAS = ?,\n CONFIG_2_DMG = ?,\n CONFIG_2_SHIELD = ?,\n CONFIG_2_SPEED = ?,\n CONFIG_2_SHIELDABSORB = ?,\n CONFIG_2_LASERCOUNT = ?,\n CONFIG_2_HEAVY = ?,\n CONFIG_2_EXTRAS = ?\n WHERE USER_ID = ? AND PLAYER_ID = ?\",\n [\n $CONFIGS[1]['DAMAGE'],\n $CONFIGS[1]['SHIELD'],\n $CONFIGS[1]['SPEED'],\n $CONFIGS[1]['SHIELD_ABSORBATION'],\n $CONFIGS[1]['LASER_COUNT'],\n json_encode($CONFIGS[1]['HEAVY']),\n json_encode($CONFIGS[1]['EXTRAS']),\n $CONFIGS[2]['DAMAGE'],\n $CONFIGS[2]['SHIELD'],\n $CONFIGS[2]['SPEED'],\n $CONFIGS[2]['SHIELD_ABSORBATION'],\n $CONFIGS[2]['LASER_COUNT'],\n json_encode($CONFIGS[2]['HEAVY']),\n json_encode($CONFIGS[2]['EXTRAS']),\n $this->user->USER_ID,\n $this->user->PLAYER_ID\n ]\n );\n\n if ($this->user->hasPet()) {\n // UPDATE PET CONFIGS\n $this->mysql->QUERY(\n \"UPDATE player_pet_config\n SET CONFIG_1_DMG = ?,\n CONFIG_1_SHIELD = ?,\n CONFIG_1_SHIELDABSORB = ?,\n CONFIG_2_DMG = ?,\n CONFIG_2_SHIELD = ?,\n CONFIG_2_SHIELDABSORB = ? \n WHERE USER_ID = ? AND PLAYER_ID = ?\",\n [\n $PET_CONFIGS[1]['DAMAGE'],\n $PET_CONFIGS[1]['SHIELD'],\n $PET_CONFIGS[1]['SHIELD_ABSORBATION'],\n $PET_CONFIGS[2]['DAMAGE'],\n $PET_CONFIGS[2]['SHIELD'],\n $PET_CONFIGS[2]['SHIELD_ABSORBATION'],\n $this->user->USER_ID,\n $this->user->PLAYER_ID\n ]\n );\n }\n\n $this->mysql->QUERY(\"UPDATE player_hangar SET SHIP_HP = ? WHERE USER_ID = ? AND PLAYER_ID = ? AND ACTIVE = 1\",\n [$this->user->USER_ID, $this->user->PLAYER_ID, $SHIP_DATA[\"HP\"]]);\n $this->user->refresh();\n }", "function get_interface_config() {\n\t\nglobal $lbhomedir;\n\n$logging_config = \"interface.cfg\";\t\t// fixed filename to pass log entries to ext. Prog.\n\n$level = LBSystem::pluginloglevel();\n# suche nach evtl. vorhandenen Plugins die T2S nutzen\n$pluginusage = glob(\"$lbhomedir/config/plugins/*/\".$logging_config);\n# Laden der Plugindb\n$plugindb = LBSystem::get_plugins();\n$alldata = array();\nforeach($pluginusage as $plugfolder) {\n\t$folder = explode('/',$plugfolder);\n\t$plugfolder = $folder[5];\n\t$myFolder = $lbhomedir.\"/config/plugins/\".$plugfolder;\n\t$key = recursive_array_search($plugfolder,$plugindb);\n\tif (!file_exists($myFolder.'/'.$logging_config)) {\n\t\tLOGGING('The file '.$logging_config.' could not be opened, please try again!', 4);\n\t} else {\n\t\t$tmp_ini = parse_ini_file($myFolder.'/'.$logging_config, TRUE);\n\t\t$folders = $lbhomedir.\"/log/plugins/\".$plugfolder.\"/\".$tmp_ini['SYSTEM']['NAME_LOGFILE'];\n\t\t$alldata[] = array(\n\t\t\t\t\t\t\t'name' => $tmp_ini['SYSTEM']['PLUGINDB_NAME'], \n\t\t\t\t\t\t\t'filename' => $folders, \n\t\t\t\t\t\t\t\"append\" => 1,\n\t\t\t\t\t\t\t);\n\t\tLOGGING(\"TTS Logging config '\".$logging_config.\"' has been loaded\", 5);\n\t}\n}\n#print_r($pluginusage);\n#print_r($alldata);\nreturn $alldata;\n}", "private function _advancedConfig($key,$value){\r\n\r\n $sefConfig = & Sh404sefFactory::getConfig();\r\n if ((strpos($key,\"com_\")) !== false) {\r\n // V 1.2.4.m\r\n $key = str_replace('com_','',$key);\r\n $param = explode('___',$key);\r\n switch ($param[1]) {\r\n case 'manageURL' :\r\n switch ($value) {\r\n case 1 :\r\n array_push($sefConfig->nocache,$param[0]);\r\n break;\r\n case 2 :\r\n array_push($sefConfig->skip,$param[0]);\r\n break;\r\n case 3 :\r\n array_push($sefConfig->useJoomlaRouter,$param[0]);\r\n break;\r\n }\r\n break;\r\n case 'translateURL':\r\n if ($value == 1)\r\n array_push($sefConfig->notTranslateURLList,$param[0]);\r\n break;\r\n case 'insertIsoCode':\r\n if ($value == 1)\r\n array_push($sefConfig->notInsertIsoCodeList,$param[0]);\r\n break;\r\n case 'shDoNotOverrideOwnSef':\r\n\r\n switch( $value) {\r\n case Sh404sefClassBaseextplugin::TYPE_JOOMLA_ROUTER:\r\n array_push($sefConfig->shDoNotOverrideOwnSef,$param[0]);\r\n break;\r\n case Sh404sefClassBaseextplugin::TYPE_JOOMSEF_ROUTER:\r\n array_push($sefConfig->useJoomsefRouter,$param[0]);\r\n break;\r\n case Sh404sefClassBaseextplugin::TYPE_ACESEF_ROUTER:\r\n array_push($sefConfig->useAcesefRouter,$param[0]);\r\n break;\r\n\r\n }\r\n break;\r\n case 'compEnablePageId':\r\n if ($value == 1)\r\n array_push($sefConfig->compEnablePageId,$param[0]);\r\n break;\r\n case 'defaultComponentString':\r\n $cleanedUpValue = empty($value) ? '': titleToLocation($value);\r\n $cleanedUpValue = JString::trim( $cleanedUpValue, $sefConfig->friendlytrim);\r\n $sefConfig->defaultComponentStringList[$param[0]] = $cleanedUpValue;\r\n break;\r\n }\r\n } else {\r\n\r\n switch ($key){\r\n case 'shSecOnlyNumVars':\r\n $this->_shSetArrayParam($value, $sefConfig->shSecOnlyNumVars);\r\n break;\r\n case 'shSecAlphaNumVars':\r\n $this->_shSetArrayParam($value, $sefConfig->shSecAlphaNumVars);\r\n break;\r\n case 'shSecNoProtocolVars':\r\n $this->_shSetArrayParam($value, $sefConfig->shSecNoProtocolVars);\r\n break;\r\n case 'analyticsExcludeIP':\r\n $this->_shSetArrayParam($value, $sefConfig->analyticsExcludeIP);\r\n break;\r\n }\r\n\r\n if (preg_match('/languages_([a-zA-Z]{2}-[a-zA-Z]{2})_translateURL/U', $key, $matches)) {\r\n $sefConfig->shLangTranslateList[$matches[1]] = $value;\r\n }\r\n if (preg_match('/languages_([a-zA-Z]{2}-[a-zA-Z]{2})_insertCode/U', $key, $matches)) {\r\n $sefConfig->shLangInsertCodeList[$matches[1]] = $value;\r\n }\r\n if (preg_match('/languages_([a-zA-Z]{2}-[a-zA-Z]{2})_pageText/U', $key, $matches)) {\r\n $sefConfig->pageTexts[$matches[1]] = $value;\r\n }\r\n }\r\n }", "public function prepareConfigSchema()\n {\n // Store Chapters\n $fromchapter = ['labels' => [],'id' => []];\n foreach ($this->container->db->getFormats() as $f) {\n array_push($fromchapter['labels'], $f->getName());\n array_push($fromchapter['id'], $f->getId());\n }\n\n // Store Issues\n $fromissue = ['labels' => [],'id' => []];\n foreach ($this->container->db->getIssues() as $i) {\n array_push($fromissue['labels'], $i->getName());\n array_push($fromissue['id'], $i->getId());\n }\n\n // Store Books\n $frombook = ['labels' => [],'id' => []];\n foreach ($this->container->db->getBooks() as $b) {\n array_push($frombook['labels'], $b->getName());\n array_push($frombook['id'], $b->getId());\n }\n\n // Store Templates\n $fromtemplate = ['labels' => [],'id' => []];\n foreach ($this->container->db->getTemplatenames() as $t) {\n array_push($fromtemplate['labels'], $t->getName());\n array_push($fromtemplate['id'], $t->getId());\n }\n\n // Store Templates\n $fromfield = ['labels' => [],'id' => []];\n foreach ($this->container->db->getTemplatefields() as $t) {\n array_push($fromfield['labels'], $t->getFieldname());\n array_push($fromfield['id'], $t->getId());\n }\n\n // Store Historytypes\n\n foreach (['books', 'issues', 'chapters', 'cloud', 'other', 'self', 'contributional', 'structural', 'fixed'] as $_ht) {\n $historytypes['id'][] = $_ht;\n $historytypes['labels'][] = $this->container->translations['field_historytype_'.$_ht];\n }\n\n // Todo\n $thisfields = [\n 'labels' => ['fielda', 'fieldb','fieldc'],\n 'id' => [1,2,3]\n ];\n\n $lengthinfluence = [\n 'title' => $this->container->translations['field_config'.'lengthinfluence'],\n 'options' => [\n 'collapsed' => true\n ],\n 'type' => 'array',\n 'propertyOrder' => 100,\n 'format' => 'table',\n 'items' => [\n 'type' => 'object',\n 'format' => 'grid',\n 'title' => $this->container->translations['field_config'.'lengthinfluence'.'row'],\n 'headerTemplate' => '{{ self.fieldname }}',\n 'properties' => [\n 'factor' => [\n 'type' => 'integer',\n 'format' => 'number',\n 'title' => $this->container->translations['field_config'.'lengthinfluence'.'factor'],\n ],\n 'fieldname' => [\n 'type' => 'string',\n 'uniqueItems' => true,\n 'enum' => [],//$fromfield['id'],\n 'options' => [\n 'enum_titles' => $fromfield['labels'],\n 'title' => [],//$this->container->translations['field_config'.'lengthinfluence'.'labels'],\n ]\n ]\n ]\n ]\n ];\n\n $schema = [\n 'title' => 'Field Configuration',\n 'type' => 'object',\n 'properties' => [\n 'imagesize' => [\n 'title' => $this->container->translations['field_config'.'imagesize'],\n 'options' => [\n 'collapsed' => true\n ],\n 'propertyOrder' => 100,\n 'type' => 'array',\n 'format' => 'table',\n 'items' => [\n 'type' => 'object',\n 'format' => 'grid',\n 'title' => $this->container->translations['field_config'.'imagesize'.'row'],\n 'properties' => [\n 'width' => [\n 'type' => 'integer',\n 'format' => 'number',\n 'title' => $this->container->translations['field_config'.'imagesize'.'width'],\n ],\n 'height' => [\n 'type' => 'integer',\n 'format' => 'number',\n 'title' => $this->container->translations['field_config'.'imagesize'.'height'],\n ]\n ]\n ]\n ],\n 'caption_variants' => [\n 'title' => $this->container->translations['field_config'.'imagecaptions'],\n 'options' => [\n 'collapsed' => true\n ],\n 'propertyOrder' => 11,\n 'type' => 'array',\n 'format' => 'table',\n 'items' => [\n 'type' => 'string',\n 'title' => $this->container->translations['field_config'.'imagecaption'],\n ]\n ],\n 'history' => [\n 'title' => $this->container->translations['field_config'.'history'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'fullhistory' => [\n 'title' => $this->container->translations['field_config'.'fullhistory'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox',\n 'watch' => [\n 'hist' => 'history'\n ],\n 'hidden' => '!history'\n ],\n 'growing' => [\n 'title' => $this->container->translations['field_config'.'growing'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'maxlines' => [\n 'title' => $this->container->translations['field_config'.'maxlines'],\n 'type' => 'integer',\n 'propertyOrder' => 2\n ],\n 'textlength' => [\n 'title' => $this->container->translations['field_config'.'textlength'],\n 'type' => 'integer',\n 'propertyOrder' => 2\n ],\n 'lengthinfluence' => $lengthinfluence,\n 'rtfeditor' => [\n 'title' => $this->container->translations['field_config'.'rtfeditor'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'markdowneditor' => [\n 'title' => $this->container->translations['field_config'.'markdowneditor'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'codeeditor' => [\n 'title' => $this->container->translations['field_config'.'codeeditor'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'editorcolumns' => [\n 'title' => $this->container->translations['field_config'.'editorcolumns'],\n 'options' => [\n 'collapsed' => true\n ],\n 'propertyOrder' => 100,\n 'type' => 'array',\n 'format' => 'table',\n 'items' => [\n 'type' => 'object',\n 'format' => 'grid',\n 'title' => 'Line',\n 'properties' => [\n \"lines\" => [\n 'type' => 'integer',\n 'title' => $this->container->translations['field_config'.'editorcolumns'.'lines'],\n ],\n \"label\" => [\n 'type' => 'string',\n 'title' => $this->container->translations['field_config'.'editorcolumns'.'label'],\n ]\n ]\n ]\n ],\n 'arrayeditor' => [\n 'title' => $this->container->translations['field_config'.'arrayeditor'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'columns' => [\n 'title' => $this->container->translations['field_config'.'columns'],\n 'type' => 'integer',\n 'propertyOrder' => 2\n ],\n 'colnames' => [\n 'title' => $this->container->translations['field_config'.'colnames'],\n 'options' => [\n 'collapsed' => true\n ],\n 'propertyOrder' => 100,\n 'type' => 'array',\n 'format' => 'table',\n 'items' => [\n 'type' => 'string',\n 'format' => 'text',\n 'title' => $this->container->translations['field_config'.'colnames'.'labels'],\n ]\n ],\n 'latitude' => [\n 'title' => $this->container->translations['field_config'.'latitude'],\n 'type' => 'number',\n 'propertyOrder' => 0\n ],\n 'longitude' => [\n 'title' => $this->container->translations['field_config'.'longitude'],\n 'type' => 'number',\n 'propertyOrder' => 0\n ],\n 'dateformat' => [\n 'title' => $this->container->translations['field_config'.'dateformat'],\n 'type' => 'string',\n 'propertyOrder' => 2,\n 'uniqueItems' => true,\n 'enum' => [\n 'd/m/Y H:i:s', 'd/m/Y H:i', 'd/m/Y', 'm/Y', 'Y'\n ],\n 'options' => [\n 'enum_titles' => [\n 'dd/mm/yyyy hh:mm:ss', 'dd/mm/yyyy hh:mm', 'dd/mm/yyyy', 'mm/yyyy', 'yyyy'\n ]\n ]\n ],\n 'integer' => [\n 'title' => $this->container->translations['field_config'.'integer'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'resolve_foreign' => [\n 'title' => $this->container->translations['field_config'.'resolve_foreign'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'multiple' => [\n 'title' => $this->container->translations['field_config'.'multiple'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n //cloud\n 'threeDee' => [\n 'title' => $this->container->translations['field_config'.'threeDee'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n 'history_command' => [\n 'title' => $this->container->translations['field_config'.'history_command'],\n 'format' => 'select',\n 'propertyOrder' => -1,\n 'uniqueItems' => true,\n 'type' => 'string',\n 'enum' => $historytypes['id'],\n 'options' => [\n 'enum_titles' => $historytypes['labels'],\n 'grid_columns' => 12,\n ]\n ],\n //legends\n 'legends' => [\n 'options' => [\n 'grid_columns' => 12,\n ],\n 'title' => $this->container->translations['field_config'.'legends'],\n 'propertyOrder' => 100,\n 'type' => 'array',\n 'format' => 'table',\n 'items' => [\n 'type' => 'string'\n ]\n ],\n //fixed\n 'fixedvalues' => [\n 'options' => [\n 'grid_columns' => 12,\n ],\n 'title' => $this->container->translations['field_config'.'fixedvalues'],\n 'propertyOrder' => 100,\n 'type' => 'array',\n 'format' => 'table',\n 'items' => [\n 'type' => 'string',\n 'title' => $this->container->translations['field_config'.'fixedvalues'.'row'],\n ]\n ],\n //issues, cloud, self, contributional\n 'restrict_to_open' => [\n 'title' => $this->container->translations['field_config'.'restrict_to_open'],\n 'type' => 'boolean',\n 'propertyOrder' => 0,\n 'format' => 'checkbox'\n ],\n // not implemented so far\n 'restrict_to_book' => [\n 'title' => $this->container->translations['field_config'.'restrict_to_book'],\n 'type' => 'boolean',\n 'propertyOrder' => 2,\n 'format' => 'checkbox'\n ],\n //issues, chapters\n 'frombook' => [\n 'title' => $this->container->translations['field_config'.'frombook'],\n 'format' => 'select',\n 'type' => 'integer',\n 'propertyOrder' => 1,\n 'uniqueItems' => true,\n 'enum' => $frombook['id'],\n 'options' => [\n 'enum_titles' => $frombook['labels'],\n 'grid_columns' => 12,\n ]\n ],\n //cloud, other, self, contributional\n 'restrict_to_issue' => [\n 'title' => $this->container->translations['field_config'.'restrict_to_issue'],\n 'type' => 'boolean',\n 'propertyOrder' => 4,\n 'format' => 'checkbox'\n ],\n //cloud, other, self, contributional\n 'fromissue' => [\n 'title' => $this->container->translations['field_config'.'fromissue'],\n 'format' => 'select',\n 'type' => 'integer',\n 'propertyOrder' => 3,\n 'uniqueItems' => true,\n 'enum' => $fromissue['id'],\n 'options' => [\n 'enum_titles' => $fromissue['labels'],\n 'grid_columns' => 12,\n ]\n ],\n\n //contributional,\n 'restrict_to_chapter' => [\n 'title' => $this->container->translations['field_config'.'restrict_to_chapter'],\n 'type' => 'boolean',\n 'propertyOrder' => 6,\n 'format' => 'checkbox'\n ],\n //contributional\n 'fromchapter' => [\n 'title' => $this->container->translations['field_config'.'fromchapter'],\n 'format' => 'select',\n 'type' => 'integer',\n 'propertyOrder' => 5,\n 'uniqueItems' => true,\n 'enum' => $fromchapter['id'],\n 'options' => [\n 'enum_titles' => $fromchapter['labels'],\n 'grid_columns' => 12,\n ]\n ],\n // not implemented so far\n 'restrict_to_template' => [\n 'title' => $this->container->translations['field_config'.'restrict_to_template'],\n 'type' => 'boolean',\n 'propertyOrder' => 9,\n 'format' => 'checkbox'\n ],\n //contributional, structural\n 'fromtemplate' => [\n 'title' => $this->container->translations['field_config'.'fromtemplate'],\n 'format' => 'select',\n 'type' => 'integer',\n 'propertyOrder' => 8,\n 'uniqueItems' => true,\n 'enum' => $fromtemplate['id'],\n 'options' => [\n 'enum_titles' => $fromtemplate['labels'],\n 'grid_columns' => 12,\n ]\n ],\n //cloud, other\n 'fromfield' => [\n 'title' => $this->container->translations['field_config'.'fromfield'],\n 'format' => 'select',\n 'type' => 'integer',\n 'propertyOrder' => 10,\n 'uniqueItems' => true,\n 'enum' => $fromfield['id'],\n 'options' => [\n 'enum_titles' => $fromfield['labels'],\n 'grid_columns' => 12,\n ]\n ],\n ],\n ];\n return json_encode($schema);\n }", "public function convertConjugation(array $conjugated){\n\n $conjugations = $conjugated['conjugations'];\n $dialect = $conjugated['dialect'];\n $out = \"\";\n $ModesArray = array();\n $name = $conjugated['name'];\t \n // for each temps\n for ($i=ConjugationBase::IND_PRESENT;$i < ConjugationBase::CONDITIONAL +1 ;$i++){\n $conjugation = $conjugations[$i];\n\n switch($i){\n case ConjugationBase::IND_PRESENT : $ModesArray['Indicative']= array(); $mode ='Indicative' ;break;\n case ConjugationBase::INFINITIVE : $ModesArray['Impersonal forms']= array(); $mode ='Impersonal forms' ; break;\n case ConjugationBase::IMPERATIVE : $ModesArray['Imperative']= array(); $mode ='Imperative' ;break;\n case ConjugationBase::SUBJ_PRESENT: $ModesArray['Subjunctive']= array(); $mode ='Subjunctive'; break;\n case ConjugationBase::CONDITIONAL : $ModesArray['Conditional']= array(); $mode ='Conditional'; break;\n }\n\n \n // big dispatch\n // Each temps is dispatched in its own mode \n switch($mode){\n \tcase \"Indicative\" :\n \t\t$ModesArray['Indicative'][] = $conjugation; \n \t\tbreak; \n \tcase \"Impersonal forms\" :\n \t\t$ModesArray['Impersonal forms'][] = $conjugation; \n \t\tbreak; \n \tcase \"Imperative\" :\n \t\t$ModesArray['Imperative'][] = $conjugation; \n \t\tbreak; \n \tcase \"Subjunctive\" :\n \t\t$ModesArray['Subjunctive'][] = $conjugation; \n \t\tbreak; \n \tcase \"Conditional\" :\n \t\t$ModesArray['Conditional'][] = $conjugation; \n \t\tbreak; \n } // switch\n } // for\n\n $o = $this->getHeader($dialect);\n if (count($conjugated) > 0){\n \t$o .= \"<entry>\\n\";\n \t$o .= \"\\t<form>\\n\";\n\t$o .= \"\\t\\t<orth>\\n\";\n\t$infinitive = $conjugated['infinitive'][0];\n\t$o .= \"\\t\\t\\t$infinitive\\n\";\n\t$o .= \"\\t\\t</orth>\\n\";\n\t$o .= \"\\t\\t<model>\\n\";\n\t$model = $conjugated['model'];\n\t$o .= \"\\t\\t\\t$model\\n\";\n\t$o .= \"\\t\\t</model>\\n\";\n $o .= $this->formatConjugation($model,$ModesArray);\n\t$o .= \"\\t</form>\\n\";\n \t$o .= \"</entry>\\n\";\n } // if\n\n $o .= $this->getFooter();\n $this->createDownloadFile($o,$conjugated['dialect'] . \"_$name\");\t \n }", "function categories($prefix_subcategories = true)\n{\n $temp = [];\n $temp['01-00'] = 'Arts';\n $temp['01-01'] = 'Design';\n $temp['01-02'] = 'Fashion & Beauty';\n $temp['01-03'] = 'Food';\n $temp['01-04'] = 'Books';\n $temp['01-05'] = 'Performing Arts';\n $temp['01-06'] = 'Visual Arts';\n\n $temp['02-00'] = 'Business';\n $temp['02-02'] = 'Careers';\n $temp['02-03'] = 'Investing';\n $temp['02-04'] = 'Management';\n $temp['02-06'] = 'Entrepreneurship';\n $temp['02-07'] = 'Marketing';\n $temp['02-08'] = 'Non-Profit';\n\n $temp['03-00'] = 'Comedy';\n $temp['03-01'] = 'Comedy Interviews';\n $temp['03-02'] = 'Improv';\n $temp['03-03'] = 'Stand-Up';\n\n $temp['04-00'] = 'Education';\n $temp['04-04'] = 'Language Learning';\n $temp['04-05'] = 'Courses';\n $temp['04-06'] = 'How To';\n $temp['04-07'] = 'Self-Improvement';\n\n $temp['20-00'] = 'Fiction';\n $temp['20-01'] = 'Comedy Fiction';\n $temp['20-02'] = 'Drama';\n $temp['20-03'] = 'Science Fiction';\n\n $temp['06-00'] = 'Government';\n\n $temp['30-00'] = 'History';\n\n $temp['07-00'] = 'Health & Fitness';\n $temp['07-01'] = 'Alternative Health';\n $temp['07-02'] = 'Fitness';\n // $temp['07-03'] = 'Self-Help';\n $temp['07-04'] = 'Sexuality';\n $temp['07-05'] = 'Medicine';\n $temp['07-06'] = 'Mental Health';\n $temp['07-07'] = 'Nutrition';\n\n $temp['08-00'] = 'Kids & Family';\n $temp['08-01'] = 'Education for Kids';\n $temp['08-02'] = 'Parenting';\n $temp['08-03'] = 'Pets & Animals';\n $temp['08-04'] = 'Stories for Kids';\n\n $temp['40-00'] = 'Leisure';\n $temp['40-01'] = 'Animation & Manga';\n $temp['40-02'] = 'Automotive';\n $temp['40-03'] = 'Aviation';\n $temp['40-04'] = 'Crafts';\n $temp['40-05'] = 'Games';\n $temp['40-06'] = 'Hobbies';\n $temp['40-07'] = 'Home & Garden';\n $temp['40-08'] = 'Video Games';\n\n $temp['09-00'] = 'Music';\n $temp['09-01'] = 'Music Commentary';\n $temp['09-02'] = 'Music History';\n $temp['09-03'] = 'Music Interviews';\n\n $temp['10-00'] = 'News';\n $temp['10-01'] = 'Business News';\n $temp['10-02'] = 'Daily News';\n $temp['10-03'] = 'Entertainment News';\n $temp['10-04'] = 'News Commentary';\n $temp['10-05'] = 'Politics';\n $temp['10-06'] = 'Sports News';\n $temp['10-07'] = 'Tech News';\n\n $temp['11-00'] = 'Religion & Spirituality';\n $temp['11-01'] = 'Buddhism';\n $temp['11-02'] = 'Christianity';\n $temp['11-03'] = 'Hinduism';\n $temp['11-04'] = 'Islam';\n $temp['11-05'] = 'Judaism';\n $temp['11-06'] = 'Religion';\n $temp['11-07'] = 'Spirituality';\n\n $temp['12-00'] = 'Science';\n $temp['12-01'] = 'Medicine';\n $temp['12-02'] = 'Natural Sciences';\n $temp['12-03'] = 'Social Sciences';\n $temp['12-04'] = 'Astronomy';\n $temp['12-05'] = 'Chemistry';\n $temp['12-06'] = 'Earth Sciences';\n $temp['12-07'] = 'Life Sciences';\n $temp['12-08'] = 'Mathematics';\n $temp['12-09'] = 'Nature';\n $temp['12-10'] = 'Physics';\n\n $temp['13-00'] = 'Society & Culture';\n // $temp['13-01'] = 'History';\n $temp['13-02'] = 'Personal Journals';\n $temp['13-03'] = 'Philosophy';\n $temp['13-04'] = 'Places & Travel';\n $temp['13-05'] = 'Relationships';\n $temp['13-06'] = 'Documentary';\n\n $temp['14-00'] = 'Sports';\n $temp['14-05'] = 'Baseball';\n $temp['14-06'] = 'Basketball';\n $temp['14-07'] = 'Cricket';\n $temp['14-08'] = 'Fantasy Sports';\n $temp['14-09'] = 'Football';\n $temp['14-10'] = 'Golf';\n $temp['14-11'] = 'Hockey';\n $temp['14-12'] = 'Rugby';\n $temp['14-13'] = 'Running';\n $temp['14-14'] = 'Soccer';\n $temp['14-15'] = 'Swimming';\n $temp['14-16'] = 'Tennis';\n $temp['14-17'] = 'Volleyball';\n $temp['14-18'] = 'Wilderness';\n $temp['14-19'] = 'Wrestling';\n\n $temp['15-00'] = 'Technology';\n\n $temp['50-00'] = 'True Crime';\n\n $temp['16-00'] = 'TV & Film';\n $temp['16-01'] = 'After Shows';\n $temp['16-02'] = 'Film History';\n $temp['16-03'] = 'Film Interviews';\n $temp['16-04'] = 'Film Reviews';\n $temp['16-05'] = 'TV Reviews';\n\n if ($prefix_subcategories) {\n foreach ($temp as $key => $val) {\n $parts = explode('-', $key);\n $cat = $parts[0];\n $subcat = $parts[1];\n\n if ($subcat != '00') {\n $temp[$key] = $temp[$cat.'-00'].' > '.$val;\n }\n }\n }\n\n return $temp;\n}", "protected function afterInit() {\r\n\t\tparent::afterInit();\r\n\r\n\t\tif (!$this->cfg->uniqValue)\r\n\t\t\t$this->cfg->name.= '[]';\r\n\r\n\t\t$dbList = $this->cfg->dbList;\r\n\t\tif (is_array($dbList) && $dbList['table']) {\r\n\t\t\t$list = $this->cfg->list;\r\n\t\t\tif (!$list)\r\n\t\t\t\t$list = array();\r\n\r\n\t\t\t$group = $this->cfg->group;\r\n\t\t\tif (!$group)\r\n\t\t\t\t$group = array();\r\n\r\n\t\t\t$db = db::getInstance();\r\n\r\n\t\t\t$values = $db->select(array_merge($dbList, array('result'=>PDO::FETCH_ASSOC)));\r\n\r\n\t\t\t$tmp = null;\r\n\t\t\tforeach($values as $v) {\r\n\t\t\t\t$key = array_shift($v);\r\n\t\t\t\tif ($dbList['nbFieldGr'] > 0) {\r\n\t\t\t\t\t$arr = utils::cutArray($v, $dbList['nbFieldGr']);\r\n\t\t\t\t\t$tmp2 = implode($dbList['sepGr'], $arr[0]);\r\n\t\t\t\t\tif ($tmp != $tmp2) {\r\n\t\t\t\t\t\t$group[$key] = $tmp2;\r\n\t\t\t\t\t\t$tmp = $tmp2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$v = $arr[1];\r\n\t\t\t\t}\r\n\t\t\t\tif (empty($v))\r\n\t\t\t\t\t$v = array($key);\r\n\t\t\t\t$list[$key] = implode($dbList['sep'], $v);\r\n\t\t\t}\r\n \r\n\t\t\t$this->cfg->group = utils::htmlOut($group);\r\n\t\t\t$this->cfg->list = utils::htmlOut($list);\r\n\t\t} else if ($this->cfg->needOut)\r\n\t\t\t$this->cfg->list = utils::htmlOut($this->cfg->list, true);\r\n\r\n\t\tif (is_array($this->cfg->list))\r\n\t\t\t$this->addRule('in', array_keys($this->cfg->list));\r\n\t}", "function get_parse_ini($file)\n{\n if (!is_file($file))\n return false;\n\n $ini = file($file);\n\n // to hold the categories, and within them the entries\n $cats = array();\n\n foreach ($ini as $i) {\n if (@preg_match('/\\[(.+)\\]/', $i, $matches)) {\n $last = $matches[1];\n } elseif (@preg_match('/(.+)=(.+)/', $i, $matches)) {\n $cats[$last][trim($matches[1])] = trim($matches[2]);\n }\n }\n\n return $cats;\n\n}", "public function __construct($id,$createNewIfComplete=false,$specificReport=0){\r\n\t\t$this->categories=array(\r\n //'demographics'=>array('first_name','last_name','address1','address2','city','state','zipcode','email','dob','gender','race','marital_status','education','vision','hearing','language'),\r\n 'demographics'=>array(), \t\r\n \t'current_health_status'=>array('q4','q5_0','q5_1','q5_2','q5_3','q5_4','q5_5','q5_6','q5_7','q5_8','q5_9','q5_10','q5_11','q5_12','q5_13','q5_14','q5_15','q7','q9'),\r\n \t'family_health'=>array('q10_1','q10_2','q10_3','q10_4','q10_5','q10_6'),\r\n \t'preventative_health'=>array('q8','q11','q12','q13','q14','q15','q16','q17','q18','q19','q20'),\r\n \t'weight_nutrition'=>array('q21','q22','q23_1','q23_2','q23_3','q23_4','q23_5','q23_6','q23_7','q23_8', 'qn24', 'qn25'),\r\n \t'physical_activity'=>array('q24','q25','q26'),\r\n \t'stress_management'=>array('q27','q28','q29','q30','q31','q32','q33'),\r\n \t'mental_health'=>array('q38_1','q38_2','q38_3','q38_4','q38_5','q38_6','q38_7','q38_8'),\r\n\t\t\t'alcohol_use' => array('q39', 'q40'),\r\n \t'self_care'=>array('q41','q42','q42a', 'q43'),\r\n \t'tobaco_use'=>array('q44','q45','q46','q47'),\r\n \t'readiness_to_change'=>array('q48_1','q48_2','q48_3','q48_4','q48_5','q48_6','q48_7'),\r\n \t'wlq'=>array('wlq1a', 'wlq1b','wlq2a','wlq2b','wlq3','wlq4'),\r\n \t'biometric_data'=>array('height','weight','bp_systolic','bp_diastolic','body_fat','bmi','waist','blood_glucose','glucose_test','hemoglobin','cotinine','cholesterol','triglycerides','hdl','ldl'),\r\n \t);\r\n\r\n//\r\n//Database table columns that are free due to changes from client\r\n//\tq6, q34_1, q34_2, q35, q36, q37_1, q37_2\r\n//\r\n\r\n\t\t//Number of questions in each category.\r\n\t\t$this->nq = array ('demographics' => 3,\r\n\t\t 'current_health_status' => 4,\r\n\t\t 'family_health' => 1,\r\n\t\t 'preventative_health_M' => 7,\r\n\t\t 'preventative_health_F' => 8,\r\n\t\t 'weight_nutrition' => 5,\r\n\t\t 'physical_activity' => 3,\r\n\t\t 'stress_management' => 7,\r\n\t\t 'mental_health' => 1,\r\n\t\t 'alcohol_use' => 2,\r\n\t\t 'self_care' => 4,\r\n\t\t 'tobaco_use' => 4,\r\n\t\t 'readiness_to_change' => 1,\r\n\t\t 'wlq' => 4,\r\n\t\t 'biometric_data' => 12);\r\n\r\n\t\tforeach($this->categories as $cat=>$val){\r\n\t\t\t$this->data[$cat]=array();\r\n\t\t}\r\n\r\n\t\t$cred=UserCredentials::load();\r\n\t\t$this->acceptUpdates=$id==$cred->getId();\r\n\r\n\t\t$this->dbOb=Database::create();\r\n\t\t$this->retrieve($id,$createNewIfComplete,$specificReport);\r\n\t\t$this->vc= new Validator();\r\n\r\n\t\t$sql=\"SELECT is_gina,is_wlq FROM u_profile \r\n \t\t JOIN p_company on u_profile.company_id=p_company.id \r\n \t\t WHERE z_user_id='\".$this->dbOb->escape_string($id).\"'\"; \t\r\n\t\t$r=$this->dbOb->getRow($sql);\r\n\t\t$this->gina=$r['is_gina']==1;\r\n\t\t$this->wlq=$r['is_wlq']==1;\r\n\t}", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\n\t\t$data_city \t\t= ((in_array(strtolower($this->params['data_city']), $this->dataservers)) ? strtolower($this->params['data_city']) : 'remote');\n\t\t\n\t\t$this->dbConIro \t\t= $db[$data_city]['iro']['master'];\n\t\t$this->dbConDjds \t\t= $db[$data_city]['d_jds']['master'];\n\t\t$this->dbConDjds_slave\t= $db[$data_city]['d_jds']['master'];\n\t\t$this->dbContme\t\t\t= $db[$data_city]['tme_jds']['master'];\n\t\t//$this->dbConIro_slave\t= $db[$data_city]['iro']['slave'];\n\t\t$this->dbConIdc \t\t= $db[$data_city]['idc']['master'];\t\t\n\t\t$this->dbConbudget \t= $db[$data_city]['db_budgeting']['master'];\n\t\tif((in_array($this->ucode, json_decode(MONGOUSER)) || ALLUSER == 1)){\n\t\t\t$this->mongo_flag = 1;\n\t\t}\n\t\tif((in_array($this->ucode, json_decode(TME_MONGOUSER)) || TME_ALLUSER_MONGO == 1) && in_array(strtolower($data_city), json_decode(MONGOCITY))){\t\n\t\t\t$this->mongo_tme = 1;\n\t\t}\n\t}", "public function run()\n {\n\n\n /* `air`.`aqi_categories` */\n\n\n\n /**\n * Database `air`\n */\n\n /* `air`.`aqi_categories` */\n $aqi_categories = array(\n array('id' => '1','name' => 'Good','min' => '0.00','max' => '50.00','health_implications' => 'No health implications.\t','recommendation' => 'Everyone can continue their outdoor activities normally.','description' => 'Minimal impact','created_at' => NULL,'updated_at' => NULL,'color' => '#00e400'),\n array('id' => '2','name' => 'Moderate','min' => '51.00','max' => '100.00','health_implications' => 'Some pollutants may slightly affect very few hypersensitive individuals.\t','recommendation' => 'Only very few hypersensitive people should reduce outdoor activities.','description' => 'May cause minor breathing discomfort to sensitive people.','created_at' => NULL,'updated_at' => NULL,'color' => '#ffff00'),\n array('id' => '3','name' => 'Unhealthy for Sensitive Groups','min' => '101.00','max' => '150.00','health_implications' => 'Healthy people may experience slight irritations and sensitive individuals will be slightly affected to a larger extent.\t','recommendation' => 'Children, seniors and individuals with respiratory or heart diseases should reduce sustained and high-intensity outdoor exercises.','description' => 'May cause breathing discomfort to people with lung disease such as asthma, and discomfort to people with heart disease, children and older adults.','created_at' => NULL,'updated_at' => NULL,'color' => '#ff7e00'),\n array('id' => '4','name' => 'Unhealthy','min' => '151.00','max' => '200.00','health_implications' => 'Sensitive individuals will experience more serious conditions. The hearts and respiratory systems of healthy people may be affected.\t','recommendation' => 'Children, seniors and individuals with respiratory or heart diseases should avoid sustained and high-intensity outdoor exercises. General population should moderately reduce outdoor activities.','description' => 'May cause breathing discomfort to people on prolonged exposure, and discomfort to people with heart disease.','created_at' => NULL,'updated_at' => NULL,'color' => '#ff0000'),\n array('id' => '5','name' => 'Very Unhealthy','min' => '201.00','max' => '300.00','health_implications' => 'Healthy people will commonly show symptoms. People with respiratory or heart diseases will be significantly affected and will experience reduced endurance in activities.\t','recommendation' => 'Children, seniors and individuals with heart or lung diseases should stay indoors and avoid outdoor activities. General population should reduce outdoor activities.','description' => 'May cause respiratory illness to the people on prolonged exposure. Effect may be more pronounced in people with lung and heart diseases.','created_at' => NULL,'updated_at' => NULL,'color' => '#8f3f97'),\n array('id' => '6','name' => 'Hazardous','min' => '301.00','max' => '500.00','health_implications' => 'Healthy people will experience reduced endurance in activities and may also show noticeably strong symptoms. Other illnesses may be triggered in healthy people. Elders and the sick should remain indoors and avoid exercise. Healthy individuals should avoid outdoor activities.\t','recommendation' => 'Children, seniors and the sick should stay indoors and avoid physical exertion. General population should avoid outdoor activities.','description' => 'May cause respiratory impact even on healthy people, and serious health impacts on people with lung/heart disease. The health impacts may be experienced even during light physical activity.','created_at' => NULL,'updated_at' => NULL,'color' => '#7e0023'),\n );\n\n DB::table('aqi_categories')->insert($aqi_categories);\n\n }", "function cfg_add(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: $CONFIG[$args[0]][] = $args[1]; break;\n\t\tcase 3: $CONFIG[$args[0]][$args[1]][] = $args[2]; break;\n\t\tcase 4: $CONFIG[$args[0]][$args[1]][$args[2]][] = $args[3]; break;\n\t\tcase 5: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][] = $args[4]; break;\n\t\tcase 6: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][] = $args[5]; break;\n\t\tcase 7: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]][] = $args[6]; break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "public static function getSummary():array {\n\n # Set result\n $result = [];\n\n # Get config values\n foreach([\"app\", \"api\", \"asset\"] as $type){\n\n # Get routers\n $routers = Config::getValue(\"Router.$type\");\n\n # Check routers\n if(is_array($routers) && !empty($routers)){\n\n # Iteration routers\n foreach($routers as $router){\n\n # Check router name\n if(isset($router[\"name\"]) && $router[\"name\"]){\n\n $result[\"$type.\".$router[\"name\"]] = \"(\".ucfirst($type).\") \".$router[\"name\"];\n\n }\n\n }\n\n }\n\n }\n\n # Return result\n return $result;\n\n }", "public function run()\n {\n \\App\\Models\\Config::truncate();\n //创建相应的权限\n $config = [\n [\n 'name'=>'shop_title',\n 'value'=>'尤为商城',\n 'inc_type'=>'shop_info'\n ],\n\n [\n 'name'=>'shop_keyword',\n 'value'=>'韩国海购,尤为商城',\n 'inc_type'=>'shop_info'\n ],\n\n [\n 'name'=>'shop_desc',\n 'value'=>'尤为商城为韩国海外直购,实时跟踪明星的小物件',\n 'inc_type'=>'shop_info'\n ],\n\n [\n 'name'=>'shop_mark',\n 'value'=>'\\public\\templates',\n 'inc_type'=>'shop_info'\n ],\n [\n 'name'=>'shop_uploads',\n 'value'=>'\\public\\Uploads',\n 'inc_type'=>'shop_info'\n ],\n [\n 'name'=>'shop_copyright',\n 'value'=>'黎宝宝 版权所有',\n 'inc_type'=>'shop_info'\n ],\n [\n 'name'=>'shop_number',\n 'value'=>'3135131',\n 'inc_type'=>'shop_info'\n ],\n [\n 'name'=>'stats_code',\n 'value'=>'切切胜多负少的',\n 'inc_type'=>'shop_info'\n ],\n [\n 'name'=>'access_ip',\n 'value'=>'',\n 'inc_type'=>'shop_safety'\n ],\n [\n 'name'=>'max_num',\n 'value'=>'',\n 'inc_type'=>'shop_safety'\n ],\n [\n 'name'=>'send_mode',\n 'value'=>'smtp',\n 'inc_type'=>'sms'\n ],\n [\n 'name'=>'smtp_server',\n 'value'=>'smtp.163.com',\n 'inc_type'=>'sms'\n ],\n [\n 'name'=>'smtp_port',\n 'value'=>'25',\n 'inc_type'=>'sms'\n ],\n [\n 'name'=>'smtp_user',\n 'value'=>'[email protected]',\n 'inc_type'=>'sms'\n ],\n [\n 'name'=>'smtp_pwd',\n 'value'=>'li6565697',\n 'inc_type'=>'sms'\n ],\n [\n 'name'=>'test_eamil',\n 'value'=>'[email protected]',\n 'inc_type'=>'sms'\n ],\n [\n 'name'=>'open',\n 'value'=>'0',\n 'inc_type'=>'open'\n ],\n\n ];\n\n foreach ($config as $value){\n \\App\\Models\\Config::create($value);\n }\n\n }", "public function run() {\n $systemConfigs = [\n [\n 'name' => 'basic_admin_run',\n 'title' => '后台开关',\n 'value' => 1,\n 'type' => 'basic',\n 'genre' => 'switch',\n 'tips' => '关闭后只有站长能登录后台',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'basic_wxapp_run',\n 'title' => '小程序开关',\n 'value' => 1,\n 'type' => 'basic',\n 'genre' => 'switch',\n 'tips' => '关闭后小程序所有接口失效',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'basic_page_size',\n 'title' => '默认分页数量',\n 'value' => 20,\n 'type' => 'basic',\n 'genre' => 'text',\n 'tips' => '含有分页的接口或列表页面默认数量都从这里取值',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'basic_index_url',\n 'title' => '前台链接',\n 'value' => '',\n 'type' => 'basic',\n 'genre' => 'text',\n 'tips' => '如含有http://或https://则走外网,否则走动作方法,动作方法格式必须有效且不能携带参数',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'basic_static_file_version',\n 'title' => '静态文件版本',\n 'value' => mt_rand(100, 1000),\n 'type' => 'basic',\n 'genre' => 'text',\n 'tips' => '如果静态文件有改动,只需要把这里的值+1即可,客户端就不走缓存将重新请求静态文件',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_name',\n 'title' => '名称',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'text',\n 'tips' => '后台名称',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_logo',\n 'title' => 'LOGO',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'image',\n 'tips' => '后台左上角的左边的logo,也会被用作网页标题图标;图片宽高最佳比例:1:1;图片宽高最佳尺寸40*40px',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_logo_text',\n 'title' => 'LOGO文字',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'image',\n 'tips' => '后台左上角的右边的logo文字;图片宽高最佳比例:4:1;图片宽高最佳尺寸160*40px',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_logo_signin',\n 'title' => '登录LOGO',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'image',\n 'tips' => '后台登录页面的logo;图片宽高最佳比例:7:3;图片宽高最佳尺寸350*150px',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_login_captcha',\n 'title' => '登录验证码',\n 'value' => 0,\n 'type' => 'admin',\n 'genre' => 'switch',\n 'tips' => '关闭后后台登录不需要输入验证码',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_keywords',\n 'title' => '关键词',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'text',\n 'tips' => '后台搜索引擎关键字',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_describe',\n 'title' => '描述',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'textarea',\n 'tips' => '后台描述,有利于搜索引擎抓取相关信息',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_icp',\n 'title' => '备案',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'text',\n 'tips' => '后台备案号',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'admin_copyright',\n 'title' => '版权',\n 'value' => '',\n 'type' => 'admin',\n 'genre' => 'text',\n 'tips' => '后台版权信息',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_file_limit_size',\n 'title' => '文件大小限制',\n 'value' => '',\n 'type' => 'upload',\n 'genre' => 'text',\n 'tips' => '留空或填0为不限制大小,单位:kb',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_file_allow_extension',\n 'title' => '允许的文件后缀',\n 'value' => '',\n 'type' => 'upload',\n 'genre' => 'tags',\n 'tips' => '多个后缀用英文逗号隔开,不填写则不限制类型',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_image_limit_size',\n 'title' => '图片大小限制',\n 'value' => '',\n 'type' => 'upload',\n 'genre' => 'text',\n 'tips' => '留空或填0为不限制大小,单位:kb',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_image_allow_extension',\n 'title' => '允许的图片后缀',\n 'value' => '',\n 'type' => 'upload',\n 'genre' => 'tags',\n 'tips' => '多个后缀用英文逗号隔开,不填写则不限制类型',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_image_watermark_on',\n 'title' => '水印开关',\n 'value' => 1,\n 'type' => 'upload',\n 'genre' => 'switch',\n 'tips' => '开启后,如果没有上传水印图片,则默认使用系统水印;注意:图片过小不会生成水印!',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_editor_image_watermark_on',\n 'title' => '编辑器水印',\n 'value' => 1,\n 'type' => 'upload',\n 'genre' => 'switch',\n 'tips' => '开启后,如果没有上传水印图片,则默认使用系统水印;注意:图片过小不会生成水印!只针对编辑器的图片上传',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_editor_catch_image_watermark_on',\n 'title' => '编辑器抓取水印',\n 'value' => 0,\n 'type' => 'upload',\n 'genre' => 'switch',\n 'tips' => '开启后,如果没有上传水印图片,则默认使用系统水印;注意:图片过小不会生成水印!只针对编辑器的抓取图片',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_image_watermark_pic',\n 'title' => '水印图片',\n 'value' => '',\n 'type' => 'upload',\n 'genre' => 'image',\n 'tips' => '宽高最佳尺寸为60px及以下,超过100px,系统会自动等比例压缩水印至100px;水印图片最好是带透明色的png图片;上传的图片宽高需不小于2(w+10)px、2(h+10)px才会生成水印,w和h为水印宽高。',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_image_watermark_position',\n 'title' => '水印位置',\n 'value' => '',\n 'type' => 'upload',\n 'genre' => 'select',\n 'tips' => '不选择默认为右下角',\n 'options' => json_encode([\n 'top-left' => '左上角',\n 'top-right' => '右上角',\n 'bottom-left' => '左下角',\n 'bottom-right' => '右下角',\n 'top' => '正上方',\n 'bottom' => '正下方',\n 'left' => '正左方',\n 'right' => '正右方',\n 'center' => '正中心',\n ]\n ),\n 'required' => 0,\n ],\n [\n 'name' => 'upload_image_thumb_on',\n 'title' => '缩略图开关',\n 'value' => 1,\n 'type' => 'upload',\n 'genre' => 'switch',\n 'tips' => '开启后,如果没有填写缩略图尺寸则采用200*200进行等比例缩略;注意:图片过小不会生成缩略图!',\n 'options' => '',\n 'required' => 0,\n ],\n [\n 'name' => 'upload_image_thumb_size',\n 'title' => '缩略图尺寸',\n 'value' => '',\n 'type' => 'upload',\n 'genre' => 'text',\n 'tips' => '格式:w*h;默认200*200;注意:上传的图片宽和高都不大于设置的缩略图尺寸,则不会生成缩略图。',\n 'options' => '',\n 'required' => 0,\n ],\n ];\n foreach ($systemConfigs as $systemConfig) {\n \\App\\Model\\Admin\\SystemConfig::create($systemConfig);\n }\n }", "public function filterSpecificCategories($array){\n\n $newArray = [];\n\n foreach($array as $key => $value){\n $cat = trim(strtolower(strstr($value->getArticleID()->getCategory(), ' ')));\n if($cat == \"world news\" || $cat == \"football\"/* ||$cat == \"fashion\" || $cat == \"technology\"*/){\n //test fashion whs technology $numb raus? film und politics guuut 0.8\n $newArray[$key] = $value;\n }\n\n /* if($cat == \"sport\"|| $cat == \"football\" || $cat == \"culture\" || $cat == \"art and design\"){\n $newArray[$key] = $value;\n }*/\n\n /*if( $cat == \"sport\" || $cat == \"uk news\" || $cat == \"opinion\" || $cat == \"society\" || $cat == \"business\" ||\n $cat == \"politics\" || $cat == \"world news\" || $cat == \"life and style\" || $cat == \"environment\" || $cat == \"technology\"\n ||$cat == \"television & radio\" || $cat == \"culture\" || $cat == \"art and design\" || $cat == \"film\" || $cat == \"books\"\n ||$cat == \"us news\" || $cat == \"football\" || $cat == \"fashion\" || $cat == \"travel\" || $cat == \"science\"/*){ //20 categories\n $newArray[$key] = $value;\n }*/\n\n /* if( $cat == \"us news\" || $cat == \"technology\" || $cat == \"science\" || $cat == \"sport\" || $cat == \"opinion\" ||\n $cat == \"world news\" || $cat == \"football\" || $cat == \"politics\" || $cat == \"fashion\" || $cat == \"television & radio\"\n ||$cat == \"culture\" || $cat == \"environment\" || $cat == \"art and design\" || $cat == \"life and style\" || $cat == \"travel\"/*\n || $cat == \"books\" || $cat == \"uk news\" || $cat == \"business\" || $cat == \"film\" || $cat == \"society\"){ //20 categories\n $newArray[$key] = $value;\n }\n */\n\n }\n\n\n return $newArray;\n }", "public function get_config_field_subtext()\n\t{\n\t\treturn array(\n\t\t\t'site_url'\t\t\t\t\t=> array('url_explanation'),\n\t\t\t'is_site_on'\t\t\t\t=> array('is_site_on_explanation'),\n\t\t\t'is_system_on'\t\t\t\t=> array('is_system_on_explanation'),\n\t\t\t'debug'\t\t\t\t\t\t=> array('debug_explanation'),\n\t\t\t'show_profiler'\t\t\t\t=> array('show_profiler_explanation'),\n\t\t\t'max_caches'\t\t\t\t=> array('max_caches_explanation'),\n\t\t\t'use_newrelic'\t\t\t\t=> array('use_newrelic_explanation'),\n\t\t\t'newrelic_app_name'\t\t\t=> array('newrelic_app_name_explanation'),\n\t\t\t'gzip_output'\t\t\t\t=> array('gzip_output_explanation'),\n\t\t\t'server_offset'\t\t\t\t=> array('server_offset_explain'),\n\t\t\t'default_member_group'\t\t=> array('group_assignment_defaults_to_two'),\n\t\t\t'smtp_server'\t\t\t\t=> array('only_if_smpte_chosen'),\n\t\t\t'smtp_port'\t\t\t\t\t=> array('only_if_smpte_chosen'),\n\t\t\t'smtp_username'\t\t\t\t=> array('only_if_smpte_chosen'),\n\t\t\t'smtp_password'\t\t\t\t=> array('only_if_smpte_chosen'),\n\t\t\t'email_batchmode'\t\t\t=> array('batchmode_explanation'),\n\t\t\t'email_batch_size'\t\t\t=> array('batch_size_explanation'),\n\t\t\t'webmaster_email'\t\t\t=> array('return_email_explanation'),\n\t\t\t'cookie_domain'\t\t\t\t=> array('cookie_domain_explanation'),\n\t\t\t'cookie_prefix'\t\t\t\t=> array('cookie_prefix_explain'),\n\t\t\t'cookie_path'\t\t\t\t=> array('cookie_path_explain'),\n\t\t\t'deny_duplicate_data'\t\t=> array('deny_duplicate_data_explanation'),\n\t\t\t'redirect_submitted_links'\t=> array('redirect_submitted_links_explanation'),\n\t\t\t'require_secure_passwords'\t=> array('secure_passwords_explanation'),\n\t\t\t'allow_dictionary_pw'\t\t=> array('real_word_explanation', 'dictionary_note'),\n\t\t\t'censored_words'\t\t\t=> array('censored_explanation', 'censored_wildcards'),\n\t\t\t'censor_replacement'\t\t=> array('censor_replacement_info'),\n\t\t\t'password_lockout'\t\t\t=> array('password_lockout_explanation'),\n\t\t\t'password_lockout_interval' => array('login_interval_explanation'),\n\t\t\t'require_ip_for_login'\t\t=> array('require_ip_explanation'),\n\t\t\t'allow_multi_logins'\t\t=> array('allow_multi_logins_explanation'),\n\t\t\t'name_of_dictionary_file'\t=> array('dictionary_explanation'),\n\t\t\t'force_query_string'\t\t=> array('force_query_string_explanation'),\n\t\t\t'image_resize_protocol'\t\t=> array('image_resize_protocol_exp'),\n\t\t\t'image_library_path'\t\t=> array('image_library_path_exp'),\n\t\t\t'thumbnail_prefix'\t\t\t=> array('thumbnail_prefix_exp'),\n\t\t\t'member_theme'\t\t\t\t=> array('member_theme_exp'),\n\t\t\t'require_terms_of_service'\t=> array('require_terms_of_service_exp'),\n\t\t\t'email_console_timelock'\t=> array('email_console_timelock_exp'),\n\t\t\t'log_email_console_msgs'\t=> array('log_email_console_msgs_exp'),\n\t\t\t'use_membership_captcha'\t=> array('captcha_explanation'),\n\t\t\t'strict_urls'\t\t\t\t=> array('strict_urls_info'),\n\t\t\t'enable_template_routes'\t=> array('enable_template_routes_exp'),\n\t\t\t'tmpl_display_mode'\t\t\t=> array('tmpl_display_mode_exp'),\n\t\t\t'site_404'\t\t\t\t\t=> array('site_404_exp'),\n\t\t\t'channel_nomenclature'\t\t=> array('channel_nomenclature_exp'),\n\t\t\t'enable_sql_caching'\t\t=> array('enable_sql_caching_exp'),\n\t\t\t'email_debug'\t\t\t\t=> array('email_debug_exp'),\n\t\t\t'use_category_name'\t\t\t=> array('use_category_name_exp'),\n\t\t\t'reserved_category_word'\t=> array('reserved_category_word_exp'),\n\t\t\t'auto_assign_cat_parents'\t=> array('auto_assign_cat_parents_exp'),\n\t\t\t'save_tmpl_revisions'\t\t=> array('template_rev_msg'),\n\t\t\t'max_tmpl_revisions'\t\t=> array('max_revisions_exp'),\n\t\t\t'max_page_loads'\t\t\t=> array('max_page_loads_exp'),\n\t\t\t'time_interval'\t\t\t\t=> array('time_interval_exp'),\n\t\t\t'lockout_time'\t\t\t\t=> array('lockout_time_exp'),\n\t\t\t'banishment_type'\t\t\t=> array('banishment_type_exp'),\n\t\t\t'banishment_url'\t\t\t=> array('banishment_url_exp'),\n\t\t\t'banishment_message'\t\t=> array('banishment_message_exp'),\n\t\t\t'enable_search_log'\t\t\t=> array('enable_search_log_exp'),\n\t\t\t'dynamic_tracking_disabling'=> array('dynamic_tracking_disabling_info')\n\t\t);\n\t}", "protected function setupConfig()\n\t{\n\t\t$this->config = OLPBlackbox_Config::getInstance();\n\t\t$site_config = SiteConfig::getInstance()->asObject();\n\n\t\t//Add site config data to the OLPBlackbox_Config\n\t\tforeach ($site_config as $key => $value)\n\t\t{\n\t\t\t$this->config->$key = $value;\n\t\t}\n\n\t\t$this->config->blackbox_mode = $this->mode;\n\t\t$this->config->debug = new OLPBlackbox_DebugConf();\n\t\t$this->config->title_loan = $this->config_data->title_loan;\n\t\t$this->config->olp_db = $this->config_data->sql;\n\t\t$this->config->event_log = $this->config_data->log;\n\t\t$this->config->session = $this->config_data->session;\n\t\t$this->config->allowSnapshot = TRUE;\n\t\t$this->config->allow_datax_rework = $this->config_data->config->enable_rework;\n\t\t$this->config->do_datax_rework = !empty($_SESSION['do_datax_rework']);\n\t\t$this->config->return_visitor = !empty($_SESSION['return_visitor']);\n\t\t$this->config->track_key = $_SESSION['statpro']['track_key'];\n\t\t$this->config->space_key = $_SESSION['statpro']['space_key'];\n\t\t$this->config->hit_stats_bb = defined('STAT_SYSTEM_2') ? STAT_SYSTEM_2 : FALSE;\n\t\t$this->config->hit_stats_site = TRUE;\n\n\t\t// whether we're on the enterprise site; the actual\n\t\t// enterprise company is available via bb_force_winner?\n\t\t$this->config->is_enterprise = $this->config_data->is_enterprise;\n\t\t$this->config->react_company = $this->getReactCompany();\n\n\t\t$this->config->applog = OLP_Applog_Singleton::Get_Instance(\n\t\t\t'blackbox',\n\t\t\t1000000000,\n\t\t\t20,\n\t\t\tNULL,\n\t\t\tFALSE,\n\t\t\t002\n\t\t);\n\t}", "private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName('FIELD_SPECIALPLS_TITLE');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_VERTICAL');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_COLUMNITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_MAXITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_MEDIUMITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_MINITEM');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_AUTOSCROLL');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_PAGINATION');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_NAVIGATION');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_AUTOSCROLLDELAY');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_PAUSEONHOVER');\r\n $response &= Configuration::deleteByName('FIELD_SPECIALPLS_NBR');\r\n\r\n return $response;\r\n }", "protected function process()\r\n\t{\r\n\t\t$this->authentication_sources[\"guest\"] = \"guest\";\t\t\r\n\t\t\r\n\t\tforeach ( $this->xml->configuration->config as $config )\r\n\t\t{\r\n\t\t\t// server specific config,\r\n\t\t\t// e.g., only a test server\r\n\t\t\t\t\r\n\t\t\t$host = (string) $config[\"host\"];\r\n\t\t\t\t\r\n\t\t\tif ( $host != \"\" && isset($_SERVER) )\r\n\t\t\t{\r\n\t\t\t\t// nope not this server, so skip it\r\n\t\t\r\n\t\t\t\tif ($host != $_SERVER['SERVER_NAME'] && $host != $_SERVER['SERVER_ADDR'] )\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// name\r\n\t\t\t\t\r\n\t\t\t$name = Parser::strtoupper( $config[\"name\"] );\r\n\t\t\t$lang = (string) $config[\"lang\"];\r\n\t\t\t\t\r\n\t\t\tif ( $lang != \"\" && $lang != $this->initDefaultLanguage() )\r\n\t\t\t{\r\n\t\t\t\t$name .= \"_$lang\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif ( $config[\"xml\"] == \"true\" )\r\n\t\t\t{\r\n\t\t\t\t// special XML config, already parsed as SimpleXML, leave it that way.\r\n\t\t\t\t$value = $config;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//simple string\r\n\t\t\t\t \r\n\t\t\t\t$value = trim( ( string ) $config );\r\n\t\t\r\n\t\t\t\t// convert simple xml-encoded values to something easier\r\n\t\t\t\t// for the client code to digest\r\n\t\t\r\n\t\t\t\t$value = str_replace( \"&lt;\", \"<\", $value );\r\n\t\t\t\t$value = str_replace( \"&gt;\", \">\", $value );\r\n\t\t\t\t$value = str_replace( \"&amp;\", \"&\", $value );\r\n\t\t\t}\r\n\t\t\r\n\t\t\t// special logic for authentication_source because we can\r\n\t\t\t// have more than one.\r\n\t\t\r\n\t\t\tif ( $name == \"AUTHENTICATION_SOURCE\" )\r\n\t\t\t{\r\n\t\t\t\t$this->authentication_sources[( string ) $config[\"id\"]] = $value;\r\n\t\t\r\n\t\t\t\t// and don't overwrite the first one in our standard config array\r\n\t\t\r\n\t\t\t\tif ( ! empty( $this->arrConfig[\"AUTHENTICATION_SOURCE\"] ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$value = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif (! empty($value) )\r\n\t\t\t{\r\n\t\t\t\t// add it to the config array\r\n\t\t\r\n\t\t\t\t$this->arrConfig[$name] = $value;\r\n\t\t\r\n\t\t\t\t// types that are listed as 'pass' will be forwarded\r\n\t\t\t\t// on to the xml layer for use in the view\r\n\t\t\r\n\t\t\t\tif ( ( string ) $config[\"pass\"] == \"true\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->arrPass[Parser::strtolower( $name )] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function prepareCfg() {\n if($result = DB::get()->query(\"SELECT * FROM `config` WHERE `sid` = '\" . $this->sid . \"'\")) {\n $row = $result->fetch_assoc();\n $result->close();\n\n $file = PATH . '/serverdata/server' . $this->sid . '.cfg';\n if(!file_exists($file)) {\n touch($file);\n chmod($file, 0777);\n }\n file_put_contents($file, $row['cfg']);\n\n $file = PATH . '/serverdata/mapcycle' . $this->sid . '.txt';\n if(!file_exists($file)) {\n touch($file);\n chmod($file, 0777);\n }\n file_put_contents($file, $row['mapcycle']);\n }\n }", "function cfg_setd(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: if( !isset($CONFIG[$args[0]]) ) $CONFIG[$args[0]] = $args[1]; break;\n\t\tcase 3: if( !isset($CONFIG[$args[0]][$args[1]]) ) $CONFIG[$args[0]][$args[1]] = $args[2]; break;\n\t\tcase 4: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]]) ) $CONFIG[$args[0]][$args[1]][$args[2]] = $args[3]; break;\n\t\tcase 5: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]]) ) $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]] = $args[4]; break;\n\t\tcase 6: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]]) ) $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]] = $args[5]; break;\n\t\tcase 7: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]]) ) $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]] = $args[6]; break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "function processConfiguration() ;", "public function testconfig_vars()\n\t{\n\t\t$vars = array ('sys_name',\n\t\t\t 'sys_user_reg_restricted',\n\t\t\t 'sys_require_accept_conditions',\n\t\t\t 'sys_project_reg_restricted',\n\t\t\t 'sys_use_private_project',\n\t\t\t 'sys_default_domain',\n\t\t\t 'sys_scm_tarballs_path',\n\t\t\t 'sys_scm_snapshots_path',\n\t\t\t 'sys_theme',\n\t\t\t 'sys_lang',\n\t\t\t 'sys_default_timezone',\n\t\t\t 'sys_default_country_code',\n\t\t\t 'sys_use_scm',\n\t\t\t 'sys_use_tracker',\n\t\t\t 'sys_use_forum',\n\t\t\t 'sys_use_pm',\n\t\t\t 'sys_use_docman',\n\t\t\t 'sys_use_diary',\n\t\t\t 'sys_use_news',\n\t\t\t 'sys_use_mail',\n\t\t\t 'sys_use_survey',\n\t\t\t 'sys_use_frs',\n\t\t\t 'sys_use_project_tags',\n\t\t\t 'sys_use_project_full_list',\n\t\t\t 'sys_use_fti',\n\t\t\t 'sys_use_ftp',\n\t\t\t 'sys_use_trove',\n\t\t\t 'sys_use_snippet',\n\t\t\t 'sys_use_ssl',\n\t\t\t 'sys_use_people',\n\t\t\t 'sys_use_shell',\n\t\t\t 'sys_use_ratings',\n\t\t\t 'sys_use_ftpuploads',\n\t\t\t 'sys_use_manual_uploads',\n\t\t\t 'sys_use_gateways',\n\t\t\t 'sys_use_project_vhost',\n\t\t\t 'sys_use_project_database',\n\t\t\t 'sys_use_project_multimedia',\n\t\t\t 'sys_download_host',\n\t\t\t 'sys_shell_host',\n\t\t\t 'sys_users_host',\n\t\t\t 'sys_lists_host',\n\t\t\t 'sys_scm_host',\n\t\t\t 'sys_forum_return_domain',\n\t\t\t 'sys_chroot',\n\t\t\t 'sys_upload_dir',\n\t\t\t 'sys_ftp_upload_dir',\n\t\t\t 'sys_ftp_upload_host',\n\t\t\t 'sys_apache_user',\n\t\t\t 'sys_apache_group',\n\t\t\t 'sys_require_unique_email',\n\t\t\t 'sys_bcc_all_email_address',\n\t\t\t 'sys_themeroot',\n\t\t\t 'sys_force_login',\n\t\t\t 'sys_custom_path',\n\t\t\t 'sys_plugins_path',\n\t\t\t 'sys_use_jabber',\n\t\t\t 'sys_jabber_user',\n\t\t\t 'sys_jabber_server',\n\t\t\t 'sys_jabber_port',\n\t\t\t 'sys_jabber_pass',\n\t\t\t 'sys_ldap_host',\n\t\t\t 'sys_ldap_port',\n\t\t\t 'sys_ldap_version',\n\t\t\t 'sys_ldap_base_dn',\n\t\t\t 'sys_ldap_bind_dn',\n\t\t\t 'sys_ldap_admin_dn',\n\t\t\t 'sys_ldap_passwd',\n\t\t\t 'sys_news_group',\n\t\t\t 'sys_stats_group',\n\t\t\t 'sys_peer_rating_group',\n\t\t\t 'sys_template_group',\n\t\t\t 'sys_sendmail_path',\n\t\t\t 'sys_path_to_mailman',\n\t\t\t 'sys_path_to_jpgraph',\n\t\t\t 'sys_account_manager_type',\n\t\t\t 'unix_cipher',\n\t\t\t 'homedir_prefix',\n\t\t\t 'groupdir_prefix',\n\t\t\t 'sys_urlroot',\n\t\t\t 'sys_urlprefix',\n\t\t\t 'sys_images_url',\n\t\t\t 'sys_images_secure_url',\n\t\t\t 'sys_admin_email',\n\t\t\t 'sys_session_key',\n\t\t\t 'sys_session_expire',\n\t\t\t 'sys_show_source',\n\t\t\t 'default_trove_cat',\n\t\t\t 'sys_dbhost',\n\t\t\t 'sys_dbport',\n\t\t\t 'sys_dbname',\n\t\t\t 'sys_dbuser',\n\t\t\t 'sys_dbpasswd',\n\t\t\t 'sys_share_path',\n\t\t\t 'sys_var_path',\n\t\t\t 'sys_etc_path',\n\t\t\t) ;\n\n\t\t$pattern = implode ('|', $vars) ;\n\t\t\n\t\t$root = dirname(dirname(dirname(dirname(__FILE__))));\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\$($pattern)\\b(?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$var for var in ($pattern):\");\n\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\\\$GLOBALS\\\\[.?($pattern).?\\\\](?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$GLOBALS['\\$var'] for var in ($pattern):\");\n\t}", "public function verCategoria(){\n\t\t\t$array[] = array(\"id\"=>\"A00-B99\",\"name\"=>\"Ciertas enfermedades infecciosas y parasitarias\");\n\t\t\t$array[] = array(\"id\"=>\"C00-D48\",\"name\"=>\"Neoplasias\");\n\t\t\t$array[] = array(\"id\"=>\"D50-D89\",\"name\"=>\"Enfermedades de la sangre y de los órganos hematopoyéticos y otros trastornos que afectan el mecanismo de la inmunidad\");\n\t\t\t$array[] = array(\"id\"=>\"E00-E90\",\"name\"=>\"Enfermedades endocrinas, nutricionales y metabólicas\");\n\t\t\t$array[] = array(\"id\"=>\"F00-F99\",\"name\"=>\"Trastornos mentales y del comportamiento\");\n\t\t\t$array[] = array(\"id\"=>\"G00-G99\",\"name\"=>\"Enfermedades del sistema nervioso\");\n\t\t\t$array[] = array(\"id\"=>\"H00-H59\",\"name\"=>\"Enfermedades del ojo y sus anexos\");\n\t\t\t$array[] = array(\"id\"=>\"H60-H95\",\"name\"=>\"Enfermedades del oído y de la apófisis mastoides\");\n\t\t\t$array[] = array(\"id\"=>\"I00-I99\",\"name\"=>\"Enfermedades del sistema circulatorio\");\n\t\t\treturn $array;\n\t\t\t/*\n\t\t\t$array=array(\n\t\t\t\t'CATEGORIA_ID'=>$categoria_id\n\t\t\t\t);\n\n\t\t\t$consult= oci_parse($conn,\"BEGIN Ips$_sndCitas.Ver_subcie10 END \");\n\t\t\t// $consult= oci_parse($conn,\"SELECT * FROM SUBCATEGORIA_CIE10\");\n\t\t\toci_execute($consult);\n\t\t\t*/\n\t\t}", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\t\t\n\t\tif(DEBUG_MODE)\n\t\t{\n\t\t\techo '<pre>db array :: ';\n\t\t\tprint_r($db);\n\t\t}\n\t\t\n\t\t$data_city \t\t\t\t= ((in_array(strtolower($this->params['data_city']), $this->dataservers)) ? strtolower($this->params['data_city']) : 'remote');\n\t\t$this->idc_con\t\t\t= $db[strtolower($data_city)]['idc']['master'];\n\t\t$this->local_tme_conn\t= $db[strtolower($data_city)]['tme_jds']['master'];\n\t\t$this->local_d_jds\t\t= $db[strtolower($data_city)]['d_jds']['master'];\n\t\t$this->local_iro_conn\t= $db[strtolower($data_city)]['db_iro']['master'];\n\t\t$this->fin_con\t\t\t= $db[strtolower($data_city)]['fin']['master'];\n\t\t\n\t}", "public static function ConfigConstants(&$ConfigVars){ \n $ConfigVars['database'] = array(\n 'datasource' => 'Database/Mysql',\n 'persistent' => false,\n 'host' => '127.0.0.1',\n 'port'=>3306,\n 'login' => 'root',\n #'password'=>'ypZMJfYcuO/5',\n 'password'=> 'aditya07',\n 'database' => self::DATABASEDEFAULT,\n 'prefix' => ''\n );\n //checking that it is runnig locally or not.\n $ConfigVars['RootUrl'] = ($_SERVER[\"REMOTE_ADDR\"]==\"127.0.0.1\") ? 'http://localhost/ams/' : 'http://127.0.0.1/ams/';\n\n }", "public function filterVariableCategories($array,$option)\n {\n $newArray = [];\n\n foreach ($array as $key => $value) {\n $cat = trim(strtolower(strstr($value->getArticleID()->getCategory(), ' ')));\n switch ($option) {\n case 0:\n if ($cat == \"sport\" || $cat == \"uk news\" || $cat == \"opinion\" || $cat == \"society\" || $cat == \"business\") {\n $newArray[$key] = $value;\n }\n break;\n case 1:\n if ($cat == \"politics\" || $cat == \"world news\" || $cat == \"life and style\" || $cat == \"environment\" || $cat == \"technology\") {\n $newArray[$key] = $value;\n }\n break;\n case 2:\n if ($cat == \"television & radio\" || $cat == \"culture\" || $cat == \"art and design\" || $cat == \"film\" || $cat == \"books\") {\n $newArray[$key] = $value;\n }\n break;\n case 3:\n if ($cat == \"us news\" || $cat == \"football\" || $cat == \"fashion\" || $cat == \"travel\" || $cat == \"science\") {\n $newArray[$key] = $value;\n }\n break;\n case 4:\n if ($cat == \"sport\" || $cat == \"uk news\" || $cat == \"opinion\" || $cat == \"society\" || $cat == \"business\" ||\n $cat == \"politics\" || $cat == \"world news\" || $cat == \"life and style\" || $cat == \"environment\" || $cat == \"technology\"\n ) {\n $newArray[$key] = $value;\n }\n break;\n case 5:\n if ($cat == \"television & radio\" || $cat == \"culture\" || $cat == \"art and design\" || $cat == \"film\" || $cat == \"books\"\n || $cat == \"us news\" || $cat == \"football\" || $cat == \"fashion\" || $cat == \"travel\" || $cat == \"science\"\n ) {\n $newArray[$key] = $value;\n }\n }\n }\n\n return $newArray;\n\n }", "function sportal_categories()\n{\n\tglobal $context, $scripturl, $txt;\n\n\tloadTemplate('PortalCategories');\n\n\t$context['categories'] = sportal_get_categories(0, true, true);\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?action=portal;sa=categories',\n\t\t'name' => $txt['sp-categories'],\n\t);\n\n\t$context['page_title'] = $txt['sp-categories'];\n\t$context['sub_template'] = 'view_categories';\n}", "private function setUpConfig() {\n\n //Get the file where the configs are and process the arrays\n require($this->_data['pathtodata']);\n\n $this->_data = array_merge($this->_data,$acs_confdata);\n\n if (empty($this->_data['indexfile']))\n $this->_data['indexfile'] = 'index';\n\n if (empty($this->_data['common_extension']))\n $this->_data['common_extension'] = COMMON_EXTENSION;\n \n $this->setUriData($this->_data); \n \n //Create the cache file of the config\n if (isset($this->_data['cache_config']) && $this->_data['cache_config'])\n $this->saveConfig();\n else\n if (file_exists($this->_data['cache_config_file']))\n unlink($this->_data['cache_config_file']); \n }", "public function deleteConfigVars()\n {\n $config_vars = [\n 'DF_AI_ADMIN_ENDPOINT',\n 'DF_AI_API_ENDPOINT',\n 'DF_AI_APIKEY',\n 'DF_API_KEY',\n 'DF_API_LAYER_DESCRIPTION',\n 'DF_CSS_VS',\n 'DF_CUSTOMEXPLODEATTR',\n 'DF_DEBUG',\n 'DF_DEBUG_CURL',\n 'DF_DSBL_AJAX_TKN',\n 'DF_DSBL_DFCKIE_JS',\n 'DF_DSBL_DFFAC_JS',\n 'DF_DSBL_DFLINK_JS',\n 'DF_DSBL_DFPAG_JS',\n 'DF_DSBL_FAC_CACHE',\n 'DF_DSBL_HTTPS_CURL',\n 'DF_EB_LAYER_DESCRIPTION',\n 'DF_ENABLED_V9',\n 'DF_ENABLE_HASH',\n 'DF_EXTRA_CSS',\n 'DF_FACETS_TOKEN',\n 'DF_FEATURES_SHOWN',\n 'DF_FEED_FULL_PATH',\n 'DF_FEED_INDEXED',\n 'DF_FEED_MAINCATEGORY_PATH',\n 'DF_GROUP_ATTRIBUTES_SHOWN',\n 'DF_GS_DESCRIPTION_TYPE',\n 'DF_GS_DISPLAY_PRICES',\n 'DF_GS_IMAGE_SIZE',\n 'DF_GS_MPN_FIELD',\n 'DF_GS_PRICES_USE_TAX',\n 'DF_INSTALLATION_ID',\n 'DF_SHOW_LAYER',\n 'DF_SHOW_LAYER_MOBILE',\n 'DF_REGION',\n 'DF_RESTART_OV',\n 'DF_SHOW_PRODUCT_FEATURES',\n 'DF_SHOW_PRODUCT_VARIATIONS',\n 'DF_UPDATE_ON_SAVE_DELAY',\n 'DF_UPDATE_ON_SAVE_LAST_EXEC',\n 'DF_FEED_INDEXED',\n ];\n\n $hashid_vars = array_column(\n Db::getInstance()->executeS('\n SELECT name FROM ' . _DB_PREFIX_ . \"configuration where name like 'DF_HASHID_%'\"),\n 'name'\n );\n\n $config_vars = array_merge($config_vars, $hashid_vars);\n\n foreach ($config_vars as $var) {\n Configuration::deleteByName($var);\n }\n\n return true;\n }", "private function getConfig() {\n // call the GetConfig API\n $args = array('hostname' => $this->hostname);\n $api = new \\xmlAPI('GetConfig', $this->_default_key, 'xml', $args);\n $api->server_url = $this->_default_server;\n $api->send();\n\n // change hostname if found by custom_name\n $this->hostname = $api->hostname;\n \n // save fields in metadata\n $this->key = $api->api_key ? $api->api_key : $this->_default_key;\n $this->server = $api->api_server ? $api->api_server : $this->_default_server;\n $this->controller_path = $api->controller_path;\n $this->controller = $api->controller;\n $this->error_page = $api->error_page ? $api->error_page : '404';\n $this->mode = $api->mode ? $api->mode : 'test';\n $this->site_path = $api->site_path ? $api->site_path : $this->hostname;\n $this->default_site_path = $api->default_site_path;\n $this->secure_domain = $api->secure_domain;\n \n // set the list of controllers this site can use\n $this->setRights($api->row);\n }", "function ciniki_artcatalog_categoryDetails($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'type'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Type'),\n 'category'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Category'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'artcatalog', 'private', 'checkAccess');\n $rc = ciniki_artcatalog_checkAccess($ciniki, $args['tnid'], 'ciniki.artcatalog.categoryDetails'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Get the settings for the artcatalog\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash'); \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_artcatalog_settings', \n 'tnid', $args['tnid'], 'ciniki.artcatalog', 'settings', 'category');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['settings']) ) {\n $settings = $rc['settings'];\n } else {\n $settings = array();\n }\n \n $fields = array('synopsis', 'description');\n $details = array();\n foreach($fields as $f) {\n $details[$f] = '';\n if( isset($args['type']) && $args['type'] > 0\n && isset($settings['category-' . $f . '-' . $args['type'] . '-' . $args['category']]) ) {\n $details[$f] = $settings['category-' . $f . '-' . $args['type'] . '-' . $args['category']];\n } elseif( isset($settings['category-' . $f . '-' . $args['category']]) ) {\n $details[$f] = $settings['category-' . $f . '-' . $args['category']];\n }\n }\n\n return array('stat'=>'ok', 'details'=>$details);\n}", "function cfg_set(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: $CONFIG[$args[0]] = $args[1]; break;\n\t\tcase 3: $CONFIG[$args[0]][$args[1]] = $args[2]; break;\n\t\tcase 4: $CONFIG[$args[0]][$args[1]][$args[2]] = $args[3]; break;\n\t\tcase 5: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]] = $args[4]; break;\n\t\tcase 6: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]] = $args[5]; break;\n\t\tcase 7: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]] = $args[6]; break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "private function update_categories($incident_id, $ivr_data)\n \t{\n \t\t//find the two categories that apply to wells and IVR data\n \t\t$functioning_category = ORM::factory('category')->where('category_title',api_ivr::$wellstatus['functioning'])->find();\n\t\tif(! $functioning_category->loaded){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = \"Could not find well functioning category: \" . api_ivr::$wellstatus['functioning'];\n\t\t\t$this->errors_found = TRUE;\n\t\t\treturn;\n\t\t}\n\n\t\t$malfunctioning_category = ORM::factory('category')->where('category_title',api_ivr::$wellstatus['malfunctioning'])->find();\n\t\tif(! $malfunctioning_category->loaded){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = \"Could not find well malfunctioning category: \" . api_ivr::$wellstatus['malfunctioning'];\n\t\t\t$this->errors_found = TRUE;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//so there are easier ways to do this, but we've done things in this way so we can be compatible with the\n\t\t//Version Categories plugin. We try to simulate a report being updated via a Post command\n\t\t\n\t\t\n\t\n\t\t\n\t\t//now add the correct category\n\t\t$chosen_cat_id = $malfunctioning_category->id;\n\t\t$remove_cat_id = $functioning_category->id;\n\t\tif($ivr_data->well_working)\n\t\t{\n\t\t\t$chosen_cat_id = $functioning_category->id;\t\t\t \n\t\t\t$remove_cat_id = $malfunctioning_category->id;\n\t\t}\n\t\t\n\t\t//get the current cats for this incident\n\t\t$new_cats = array();\n\t\t$current_cats = ORM::factory('incident_category')->where('incident_id', $incident_id)->find_all();\n\t\tforeach($current_cats as $c)\n\t\t{\n\t\t\tif($c->category_id != $remove_cat_id)\n\t\t\t{\n\t\t\t\t$new_cats[$c->category_id] = $c->category_id;\n\t\t\t}\n\t\t}\n\t\t$new_cats[$chosen_cat_id] = $chosen_cat_id;\n\t\t\n\t\t$post = new dummy_post($new_cats);\n\t\t$incident = ORM::factory('incident')->where('id',$incident_id)->find();\n\t\treports::save_category($post, $incident);\n\t\t\n\t\t/*\n\t\t// Event so the category change plugin can record the date and time\n\t\t// that categories are changed and what they were changed to\n\t\t$event_data = array('id'=>$incident_id, 'new_categories'=>$new_cats);\n\t\tEvent::run('ushahidi_action.report_categories_changing', $event_data);\n\t\t\n\t\t/*\n\t\t\n\t\t//now remove any current category associates between these two categories and our well\n\t\tORM::factory('incident_category')\n\t\t\t->where(array('category_id'=> $remove_cat_id, 'incident_id'=>$incident_id))\n\t\t\t->delete_all();\n\t\t\t\t\t\t\n\t\t//now add in the right category\n\t\t$cat = ORM::factory('incident_category');\n\t\t$cat->incident_id = $incident_id;\n\t\t$cat->category_id = $chosen_cat_id;\n\t\t$cat->save();\n\t\t*/\n\t\t\t\t\n \t}", "protected function parseConfig(array $config)\n {\n // Currently only one connection is supported. This might be extended\n // in the future being able to use multiple connections and/or having\n // a split between search endpoints and index endpoints.\n $connection = array();\n foreach ($config as $k => $v) {\n if (in_array($k, $this->connAllowedConfig)) {\n $connection[$k] = $v;\n }\n }\n\n // Force the user-agent header to match SugarCRM's version\n $connection['curl'][CURLOPT_USERAGENT] = self::USER_AGENT . '/' . $this->getSugarVersion();\n\n return array('connections' => array($connection));\n }", "abstract protected function configs(): array;", "private function generateSiteMapCategories()\n {\n $max \t\t= $this->model_extension_module_siteMapGenerate->countCategories();\n $step \t\t= 50000;\n $count \t\t= 0;\n $fileNumber = 1;\n\n while ($count <= $max) {\n $output = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\n $output .= '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">';\n $categories\t= $this->model_extension_module_siteMapGenerate->getCategories($step, $count);\n\n foreach ($categories as $category) {\n $outputCategory = $this->generateUrlCategory($category['category_id'], $category['parent_id']);\n $output .= '<url>';\n $output .= '<loc>' . $outputCategory . '</loc>';\n $output .= '<changefreq>weekly</changefreq>';\n $output .= '<priority>1.0</priority>';\n $output .= '</url>';\n }\n\n $output \t.= '</urlset>';\n $this->response->addHeader('Content-Type: application/xml');\n\n $siteMapName = (!file_exists(DIR_MAIN . 'sitemap-categories.xml')) ? 'sitemap-categories' : 'sitemap-categories-' . $fileNumber;\n $siteMapXmlUrl = DIR_MAIN . $siteMapName . '.xml';\n $openedFile = fopen($siteMapXmlUrl, 'w');\n chmod($siteMapXmlUrl, 0775);\n file_put_contents($siteMapXmlUrl, $output);\n fclose($openedFile);\n\n array_push($this->includedFiles, $siteMapXmlUrl);\n\n if (file_exists(DIR_MAIN . 'sitemap-categories-' . $fileNumber . '.xml')) $fileNumber++;\n $count = $count + $step;\n }\n }", "function _prepare_data(&$data, &$mod_data)\n {\n $this->instantiate('channel_categories');\n \n // Category parents - we toss the rest\n \n if (isset($data['category']) AND is_array($data['category']))\n {\n foreach ($data['category'] as $cat_id)\n {\n $this->EE->api_channel_categories->cat_parents[] = $cat_id;\n }\n\n if ($this->EE->api_channel_categories->assign_cat_parent == TRUE)\n {\n $this->EE->api_channel_categories->fetch_category_parents($data['category']);\n }\n }\n unset($data['category']);\n\n // Prep y / n values \n \n $data['allow_comments'] = (isset($data['allow_comments']) && $data['allow_comments'] == 'y') ? 'y' : 'n';\n\n if (isset($data['cp_call']) && $data['cp_call'] == TRUE)\n {\n $data['allow_comments'] = ($data['allow_comments'] !== 'y' OR $this->c_prefs['comment_system_enabled'] == 'n') ? 'n' : 'y';\n }\n \n if ($this->c_prefs['enable_versioning'] == 'n')\n {\n $data['versioning_enabled'] = 'y';\n }\n else\n {\n if (isset($data['versioning_enabled']))\n {\n $data['versioning_enabled'] = 'y';\n }\n else\n {\n $data['versioning_enabled'] = 'n';\n \n // In 1.6, this happened right before inserting new revisions,\n // but it makes more sense here.\n $this->c_prefs['enable_versioning'] = 'n';\n }\n }\n \n \n // If we have the \"honor_entry_dst\" pref turned on we need to reverse the effects.\n $this->_cache['dst_enabled'] = 'n';\n\n if ($this->EE->config->item('honor_entry_dst') == 'y')\n {\n $this->_cache['dst_enabled'] = (isset($data['dst_enabled']) && $data['dst_enabled'] == 'y') ? 'y' : 'n';\n }\n \n $this->instantiate('channel_fields');\n\n /* Extending the core API only to change this query... ugh.\n $this->EE->db->select('field_id, field_name, field_label, field_type, field_required');\n $this->EE->db->join('channels', 'channels.field_group = channel_fields.group_id', 'left');\n $this->EE->db->where('channel_id', $this->channel_id);\n $query = $this->EE->db->get('channel_fields');\n */\n \n $sql = \"SELECT cf.field_id, cf.field_name, cf.field_label, cf.field_type, cf.field_required \n FROM exp_channels c\n LEFT JOIN exp_channel_fields cf ON (c.field_group = cf.group_id OR (cf.field_is_drifter = 'y' AND cf.drifter_channels LIKE '%{\". $this->channel_id . \"}%'))\n WHERE c.channel_id = $this->channel_id\";\n\n $query = $this->EE->db->query($sql);\n \n if ($query->num_rows() > 0)\n {\n foreach ($query->result_array() as $row)\n {\n $field_name = 'field_id_'.$row['field_id'];\n \n $this->EE->api_channel_fields->settings[$row['field_id']]['field_id'] = $row['field_id'];\n \n if (isset($data[$field_name]) OR isset($mod_data[$field_name]))\n {\n $this->EE->api_channel_fields->setup_handler($row['field_id']);\n\n // Break out module fields here\n if (isset($data[$field_name]))\n {\n $data[$field_name] = $this->EE->api_channel_fields->apply('save', array($data[$field_name]));\n }\n elseif (isset($mod_data[$field_name]))\n {\n $mod_data[$field_name] = $this->EE->api_channel_fields->apply('save', array($mod_data[$field_name]));\n }\n } \n }\n }\n }", "public function init_sections () {\r\n\t\t$sections = array();\r\n\t\t\r\n\t\t$sections['general'] = array(\r\n\t\t\t'name' \t\t\t=> __( 'General Settings', 'woodojo-maintenance-mode' ), \r\n\t\t\t'description'\t=> sprintf( __( 'The default option is to use a native error message on the front end of your website. You can customize this by entering a title and note below. To customize your own maintenance mode theme, you can add a %s file to your current theme (child theme, if you\\'re using one).', 'woodojo-maintenance-mode' ), '<code>503.php</code>' )\r\n\t\t);\r\n\t\t\r\n\t\t$this->sections = $sections;\r\n\t}", "public function getCategoryList()\n {\n global $user;\n\n $returned=array();\n\n if($this->options['galleryRoot'])\n {\n $startLevel=1;\n }\n else\n {\n $startLevel=0;\n }\n\n $sql=\"SELECT DISTINCT pct.id, pct.name, pct.global_rank AS `rank`, pct.status\n FROM \".CATEGORIES_TABLE.\" pct \";\n\n switch($this->options['filter'])\n {\n case self::FILTER_PUBLIC :\n $sql.=\" WHERE pct.status = 'public' \";\n break;\n case self::FILTER_ACCESSIBLE :\n if(!is_admin())\n {\n $sql.=\" JOIN \".USER_CACHE_CATEGORIES_TABLE.\" pucc\n ON (pucc.cat_id = pct.id) AND pucc.user_id='\".$user['id'].\"' \";\n }\n else\n {\n $sql.=\" JOIN (\n SELECT DISTINCT pgat.cat_id AS catId FROM \".GROUP_ACCESS_TABLE.\" pgat\n UNION DISTINCT\n SELECT DISTINCT puat.cat_id AS catId FROM \".USER_ACCESS_TABLE.\" puat\n UNION DISTINCT\n SELECT DISTINCT pct2.id AS catId FROM \".CATEGORIES_TABLE.\" pct2 WHERE pct2.status='public'\n ) pat\n ON pat.catId = pct.id \";\n }\n\n break;\n }\n $sql.=\"ORDER BY global_rank;\";\n\n $result=pwg_query($sql);\n if($result)\n {\n while($row=pwg_db_fetch_assoc($result))\n {\n $row['level']=$startLevel+substr_count($row['rank'], '.');\n\n /* rank is in formated without leading zero, giving bad order\n * 1\n * 1.10\n * 1.11\n * 1.2\n * 1.3\n * ....\n *\n * this loop cp,vert all sub rank in four 0 format, allowing to order\n * categories easily\n * 0001\n * 0001.0010\n * 0001.0011\n * 0001.0002\n * 0001.0003\n */\n $row['rank']=explode('.', $row['rank']);\n foreach($row['rank'] as $key=>$rank)\n {\n $row['rank'][$key]=str_pad($rank, 4, '0', STR_PAD_LEFT);\n }\n $row['rank']=implode('.', $row['rank']);\n\n $row['name']=GPCCore::getUserLanguageDesc($row['name']);\n\n $returned[]=$row;\n }\n }\n\n if($this->options['galleryRoot'])\n {\n $returned[]=array(\n 'id' => 0,\n 'name' => l10n('All the gallery'),\n 'rank' => '0000',\n 'level' => 0,\n 'status' => 'public',\n 'childs' => null\n );\n }\n\n usort($returned, array(&$this, 'compareCat'));\n\n if($this->options['tree'])\n {\n $index=0;\n $returned=$this->buildSubLevel($returned, $index);\n }\n else\n {\n //check if cats have childs & remove rank (enlight the response)\n $prevLevel=-1;\n for($i=count($returned)-1;$i>=0;$i--)\n {\n unset($returned[$i]['rank']);\n if($returned[$i]['status']=='private')\n {\n $returned[$i]['status']='0';\n }\n else\n {\n $returned[$i]['status']='1';\n }\n\n if($returned[$i]['level']>=$prevLevel)\n {\n $returned[$i]['childs']=false;\n }\n else\n {\n $returned[$i]['childs']=true;\n }\n $prevLevel=$returned[$i]['level'];\n }\n }\n\n return($returned);\n }", "function set_sections()\n\t{\n\t\t$EE =& get_instance();\n\t\t$versions = FALSE;\n\n\t\tif($feeds = $this->_updateFeeds())\n\t\t{\n\t\t\tforeach ($feeds as $addon_id => $feed)\n\t\t\t{\n\t\t\t\t$namespaces = $feed->getNameSpaces(true);\n\t\t\t\t$latest_version = 0;\n\n\t\t\t\tinclude PATH_THIRD . '/' . $addon_id . '/config.php';\n\n\t\t\t\tforeach ($feed->channel->item as $version)\n\t\t\t\t{\n\t\t\t\t\t$ee_addon = $version->children($namespaces['ee_addon']);\n\t\t\t\t\t$version_number = (string)$ee_addon->version;\n\n\t\t\t\t\tif(version_compare($version_number, $config['version'], '>') && version_compare($version_number, $latest_version, '>') )\n\t\t\t\t\t{\n\t\t\t\t\t\t$versions[$addon_id] = array(\n\t\t\t\t\t\t\t'addon_name' \t\t=> $config['name'],\n\t\t\t\t\t\t\t'installed_version' => $config['version'],\n\t\t\t\t\t\t\t'title' \t\t\t=> (string)$version->title,\n\t\t\t\t\t\t\t'latest_version' \t=> $version_number,\n\t\t\t\t\t\t\t'notes' \t\t\t=> (string)$version->description,\n\t\t\t\t\t\t\t'docs_url' \t\t\t=> (string)$version->link,\n\t\t\t\t\t\t\t'download' \t\t\t=> FALSE,\n\t\t\t\t\t\t\t'created_at'\t\t=> $version->pubDate,\n\t\t\t\t\t\t\t'extension_class' \t=> $addon_id\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif($version->enclosure)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$versions[$addon_id]['download'] = array(\n\t\t\t\t\t\t\t\t'url' => (string)$version->enclosure['url'],\n\t\t\t\t\t\t\t\t'type' => (string)$version->enclosure['type'],\n\t\t\t\t\t\t\t\t'size' => (string)$version->enclosure['length']\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif(isset($config['nsm_addon_updater']['custom_download_url']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$versions[$addon_id]['download']['url'] = call_user_func($config['nsm_addon_updater']['custom_download_url'], $versions[$addon_id]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$EE->cp->load_package_js(\"accessory_tab\");\n\t\t$EE->cp->load_package_css(\"accessory_tab\");\n\n\t\t$this->sections['Available Updates'] = $EE->load->view(\"/accessory/updates\", array('versions' => $versions), TRUE); \n\t}", "function set_new_config()\n{\n\tglobal $avalaible_config, $_POST;\n\n\t$new_config = array();\n\tforeach ($avalaible_config as $element) {\n\t\tswitch ($element['type']) {\n\t\tcase 'array':\n\t\t\t$new_config[$element['name']] = explode(',', $_POST[$element['name']]);\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\tif ($_POST[$element['name']] == 'TRUE')\n\t\t\t\t$new_config[$element['name']] = TRUE;\n\t\t\telse\n\t\t\t\t$new_config[$element['name']] = FALSE;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$new_config[$element['name']] = $_POST[$element['name']];\n\t\t}\n\t}\n\t\t\n\treturn $new_config;\n}", "public function manageCatalog()\r\n {\r\n foreach ($this->data as $line) {\r\n if (count($line) > 2 || ($line[0] == '' && $line[1] == '')) {\r\n $this->invalid_line[] = implode(\";\", $line);\r\n } else {\r\n foreach ($line as $k => $v) {\r\n if ($this->getType($v) == \"name\") {\r\n $name[] = $v;\r\n } elseif ($this->getType($v) == \"number\") {\r\n $v = str_replace(\" \", \"\", trim($v));\r\n $number[] = $v;\r\n $validatednumber[] = $this->validateTelNum($v);\r\n } elseif ($this->getType($v) == \"empty\") {\r\n if ($this->getType($this->temp) == \"name\") {\r\n $v = str_replace(\" \", \"\", trim($v));\r\n $number[] = $v;\r\n $validatednumber[] = $this->validateTelNum($v);\r\n } else{\r\n $name[] = $v;\r\n }\r\n }\r\n $this->temp = $v;\r\n }\r\n }\r\n }\r\n $this->raw_catalog = array_combine($name, $number); // array me ola ta onomata kai ta noumera opws erxetai apo to arxeio\r\n $this->tempcatalog = array_combine($name, $validatednumber); // array me ola ta onomata kai \"invalid number\" opou einai lathos to noumero \r\n $this->create_catalogs($this->tempcatalog);\r\n /*foreach (array_keys($this->tempcatalog, \"invalid number\") as $k => $v) {\r\n $invalidname[] = $v;\r\n $invalidnumber[] = $this->raw_catalog[$v];\r\n $this->invalidcatalog = array_combine($invalidname, $invalidnumber); //aray me onomata kai \"invalid number\" mono\r\n unset($this->tempcatalog[$v]); // kopsimo twn \"invalid number\"\r\n }\r\n foreach ($this->tempcatalog as $k => $v) {\r\n if ($k == '') {\r\n unset($this->tempcatalog[$k]);\r\n $this->invalidcatalog += array($k => $v);\r\n \r\n }\r\n }\r\n $this->invalidcatalog += array('invalid line' => $this->invalid_line);*/\r\n //foreach ($this->tempcatalog as $k => $v) {\r\n /*foreach ($this->valid_catalog->number as $k => $v) {\r\n $finalnumber[] = $this->transformTelNum($v, $this->outputformat);\r\n $final_name[] = $k;\r\n if ($this->order == \"names\") {\r\n $this->finalcatalog = array_combine($final_name, $finalnumber); //array me onomata kai noumera se morfh pou edwse o xrhsths\r\n } else {\r\n $this->finalcatalog = array_combine($finalnumber, $final_name); //array me onomata kai noumera se morfh pou edwse o xrhsths\r\n }\r\n }*/\r\n $this->Catalogs = new ArrayObject();\r\n $this->Catalogs[\"rawcatalog\"] = $this->raw_catalog;\r\n $this->Catalogs[\"validcatalog\"] = $this->valid_catalog;\r\n $this->Catalogs[\"invalidcatalog\"] = $this->invalid_catalog;\r\n $this->Catalogs[\"validatedcatalog\"] = $this->validated_catalog;\r\n return $this->Catalogs;\r\n //return array($this->finalcatalog, $this->invalid_catalog);\r\n }", "public function run()\n {\n \n\n \\DB::table('system_config')->delete();\n \n \\DB::table('system_config')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'site_id' => 1,\n 'var_name' => 'web_name',\n 'var_info' => '网站名称',\n 'var_group' => 1,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 2,\n 'created_at' => '2019-08-12 15:10:27',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 1 => \n array (\n 'id' => 2,\n 'site_id' => 1,\n 'var_name' => 'web_url',\n 'var_info' => '网站地址',\n 'var_group' => 1,\n 'var_value' => 'https://www.gcci.com',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:10:51',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 2 => \n array (\n 'id' => 3,\n 'site_id' => 1,\n 'var_name' => 'web_path',\n 'var_info' => '网站目录',\n 'var_group' => 1,\n 'var_value' => NULL,\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:15:03',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 3 => \n array (\n 'id' => 4,\n 'site_id' => 1,\n 'var_name' => 'author',\n 'var_info' => '网站作者',\n 'var_group' => 1,\n 'var_value' => 'CrazyCodes',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:15:25',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 4 => \n array (\n 'id' => 5,\n 'site_id' => 1,\n 'var_name' => 'generator',\n 'var_info' => '程序引擎',\n 'var_group' => 1,\n 'var_value' => 'Laravel CMS',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:15:49',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 5 => \n array (\n 'id' => 6,\n 'site_id' => 1,\n 'var_name' => 'seo_title',\n 'var_info' => 'SEO标题',\n 'var_group' => 1,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:16:09',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 6 => \n array (\n 'id' => 7,\n 'site_id' => 1,\n 'var_name' => 'keyword',\n 'var_info' => '关键字设置',\n 'var_group' => 1,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:30:53',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 7 => \n array (\n 'id' => 8,\n 'site_id' => 1,\n 'var_name' => 'description',\n 'var_info' => '网站描述',\n 'var_group' => 1,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:31:09',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 8 => \n array (\n 'id' => 9,\n 'site_id' => 1,\n 'var_name' => 'copyright',\n 'var_info' => '版权信息',\n 'var_group' => 1,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:31:25',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 9 => \n array (\n 'id' => 10,\n 'site_id' => 1,\n 'var_name' => 'icp',\n 'var_info' => '备案编号',\n 'var_group' => 1,\n 'var_value' => NULL,\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:31:43',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 10 => \n array (\n 'id' => 11,\n 'site_id' => 1,\n 'var_name' => 'upload_img_type',\n 'var_info' => '上传图片类型',\n 'var_group' => 2,\n 'var_value' => 'gif|png|jpg|bmp',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:32:15',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 11 => \n array (\n 'id' => 12,\n 'site_id' => 1,\n 'var_name' => 'upload_soft_type',\n 'var_info' => '上传软件类型',\n 'var_group' => 2,\n 'var_value' => 'zip|gz|rar|iso|doc|xls|ppt|wps|txt',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:37:39',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 12 => \n array (\n 'id' => 13,\n 'site_id' => 1,\n 'var_name' => 'upload_media_type',\n 'var_info' => '上传媒体类型',\n 'var_group' => 2,\n 'var_value' => 'swf|flv|mpg|mp3|rm|rmvb|wmv|wma|wav',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:38:32',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 13 => \n array (\n 'id' => 14,\n 'site_id' => 1,\n 'var_name' => 'max_file_size',\n 'var_info' => '上传文件大小',\n 'var_group' => 2,\n 'var_value' => '2097152',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:39:08',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 14 => \n array (\n 'id' => 15,\n 'site_id' => 1,\n 'var_name' => 'count_code',\n 'var_info' => '流量统计代码',\n 'var_group' => 2,\n 'var_value' => NULL,\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:39:29',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 15 => \n array (\n 'id' => 16,\n 'site_id' => 1,\n 'var_name' => 'start_time',\n 'var_info' => '大会开始时间',\n 'var_group' => 1,\n 'var_value' => NULL,\n 'sort' => 0,\n 'created_at' => '2019-08-12 16:48:38',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 16 => \n array (\n 'id' => 19,\n 'site_id' => 2,\n 'var_name' => 'web_name',\n 'var_info' => '网站名称',\n 'var_group' => 4,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 2,\n 'created_at' => '2019-08-12 15:10:27',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 17 => \n array (\n 'id' => 20,\n 'site_id' => 2,\n 'var_name' => 'web_url',\n 'var_info' => '网站地址',\n 'var_group' => 4,\n 'var_value' => 'https://www.gcci.com',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:10:51',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 18 => \n array (\n 'id' => 21,\n 'site_id' => 2,\n 'var_name' => 'web_path',\n 'var_info' => '网站目录',\n 'var_group' => 4,\n 'var_value' => NULL,\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:15:03',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 19 => \n array (\n 'id' => 22,\n 'site_id' => 2,\n 'var_name' => 'author',\n 'var_info' => '网站作者',\n 'var_group' => 4,\n 'var_value' => 'CrazyCodes',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:15:25',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 20 => \n array (\n 'id' => 23,\n 'site_id' => 2,\n 'var_name' => 'generator',\n 'var_info' => '程序引擎',\n 'var_group' => 4,\n 'var_value' => 'Laravel CMS',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:15:49',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 21 => \n array (\n 'id' => 24,\n 'site_id' => 2,\n 'var_name' => 'seo_title',\n 'var_info' => 'SEO标题',\n 'var_group' => 4,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:16:09',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 22 => \n array (\n 'id' => 25,\n 'site_id' => 2,\n 'var_name' => 'keyword',\n 'var_info' => '关键字设置',\n 'var_group' => 4,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:30:53',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 23 => \n array (\n 'id' => 26,\n 'site_id' => 2,\n 'var_name' => 'description',\n 'var_info' => '网站描述',\n 'var_group' => 4,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:31:09',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 24 => \n array (\n 'id' => 27,\n 'site_id' => 2,\n 'var_name' => 'copyright',\n 'var_info' => '版权信息',\n 'var_group' => 4,\n 'var_value' => 'The third global intelligent industry conference and expo 2019 & global chuangxin technology achievements transfer conference',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:31:25',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 25 => \n array (\n 'id' => 28,\n 'site_id' => 2,\n 'var_name' => 'icp',\n 'var_info' => '备案编号',\n 'var_group' => 4,\n 'var_value' => NULL,\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:31:43',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n 26 => \n array (\n 'id' => 29,\n 'site_id' => 2,\n 'var_name' => 'upload_img_type',\n 'var_info' => '上传图片类型',\n 'var_group' => 5,\n 'var_value' => 'gif|png|jpg|bmp',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:32:15',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 27 => \n array (\n 'id' => 30,\n 'site_id' => 2,\n 'var_name' => 'upload_soft_type',\n 'var_info' => '上传软件类型',\n 'var_group' => 5,\n 'var_value' => 'zip|gz|rar|iso|doc|xls|ppt|wps|txt',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:37:39',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 28 => \n array (\n 'id' => 31,\n 'site_id' => 2,\n 'var_name' => 'upload_media_type',\n 'var_info' => '上传媒体类型',\n 'var_group' => 5,\n 'var_value' => 'swf|flv|mpg|mp3|rm|rmvb|wmv|wma|wav',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:38:32',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 29 => \n array (\n 'id' => 32,\n 'site_id' => 2,\n 'var_name' => 'max_file_size',\n 'var_info' => '上传文件大小',\n 'var_group' => 5,\n 'var_value' => '2097152',\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:39:08',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 30 => \n array (\n 'id' => 33,\n 'site_id' => 2,\n 'var_name' => 'count_code',\n 'var_info' => '流量统计代码',\n 'var_group' => 5,\n 'var_value' => NULL,\n 'sort' => 1,\n 'created_at' => '2019-08-12 15:39:29',\n 'updated_at' => '2019-08-13 11:19:01',\n ),\n 31 => \n array (\n 'id' => 34,\n 'site_id' => 2,\n 'var_name' => 'start_time',\n 'var_info' => '大会开始时间',\n 'var_group' => 4,\n 'var_value' => NULL,\n 'sort' => 0,\n 'created_at' => '2019-08-12 16:48:38',\n 'updated_at' => '2019-08-13 14:49:05',\n ),\n ));\n \n \n }", "function getForumCategoryListCfg() {\n return array(\n 'sqlQuery' => 'SELECT id, nom, ordre FROM '. FORUM_CAT_TABLE,\n 'defaultSortables' => array(\n 'order' => array('ordre', 'nom')\n ),\n 'fields' => array(\n 'nom' => array('label' => __('CATEGORY')),\n 'ordre' => array('label' => __('ORDER'))\n ),\n 'edit' => array(),\n 'delete' => array()\n );\n}", "public function buildConfigurationSummary();", "private function _getAreas() \r\n {\r\n $values = explode(\",\", Mage::getStoreConfig('cms/banners/areas'));\r\n $areas = array();\r\n\r\n foreach ($values as $value) {\r\n $areas[] = array('value' => $value, 'label' => $value);\r\n }\r\n $areas[] = array('value' => 'category', 'label' => 'categoria');\r\n\r\n return $areas;\r\n }", "function process_config( $config ) {\n \n // clean form data\n $config->hosts = array_map( 'trim', $config->hosts );\n $config->hosts = array_filter( $config->hosts );\n \n $config->roles = array_intersect_key( $config->roles, $config->hosts );\n \n $config->hosts = array_values( $config->hosts );\n $config->roles = array_values( $config->roles );\n \n $config->roles = array_map('trim', $config->roles );\n \n // set defaults\n $config = $this->set_defaults( $config );\n \n // delete previous hosts and roles configuration from db\n foreach ( range(0, 9) as $i ) {\n unset_config('host'.$i, 'auth/imap_plus');\n unset_config('role'.$i, 'auth/imap_plus');\n }\n \n // save to db\n foreach ( $config->hosts as $key=>$val ) {\n set_config( 'host'.$key, $val, 'auth/imap_plus' );\n set_config( 'role'.$key, $config->roles[$key], 'auth/imap_plus' );\n }\n \n set_config('type', $config->type, 'auth/imap_plus');\n set_config('port', $config->port, 'auth/imap_plus');\n set_config('changepasswordurl', $config->changepasswordurl, 'auth/imap_plus');\n \n return true;\n }", "function issuu_document_categories() {\n return array(\n '000000' => 'Unknown',\n '001000' => 'Auto & Vehicles',\n '002000' => 'Business & Marketing',\n '003000' => 'Creative',\n '004000' => 'Film & Music',\n '005000' => 'Fun & Entertainment',\n '006000' => 'Hobby & Home',\n '007000' => 'Knowledge & Resources',\n '008000' => 'Nature & Animals',\n '009000' => 'News & Politics',\n '010000' => 'Nonprofits & Activism',\n '011000' => 'Religon & Philosophy',\n '012000' => 'Sports',\n '013000' => 'Technology & Internet',\n '014000' => 'Travel & Events',\n '015000' => 'Weird & Bizarre',\n '016000' => 'Other'\n );\n}", "function categories_upgrade($oldversion)\n{\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n // Upgrade dependent on old version number\n switch($oldversion) {\n case '1.0':\n // Code to upgrade from version 1.0 goes here\n // fall through to the next upgrade\n\n case '2.0':\n // Code to upgrade from version 2.0 goes here\n\n // TODO: remove this for release\n $query = \"ALTER TABLE $xartable[categories]\n ADD COLUMN xar_image varchar(255) NOT NULL\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n // fall through to the next upgrade\n\n case '2.1':\n // Code to upgrade from version 2.1 goes here\n\n // TODO: remove this for release\n\n // when a new module item is being specified\n if (!xarModRegisterHook('item', 'new', 'GUI',\n 'categories', 'admin', 'newhook')) {\n return false;\n }\n // when a module item is created (uses 'cids')\n if (!xarModRegisterHook('item', 'create', 'API',\n 'categories', 'admin', 'createhook')) {\n return false;\n }\n // when a module item is being modified (uses 'cids')\n if (!xarModRegisterHook('item', 'modify', 'GUI',\n 'categories', 'admin', 'modifyhook')) {\n return false;\n }\n // when a module item is updated (uses 'cids')\n if (!xarModRegisterHook('item', 'update', 'API',\n 'categories', 'admin', 'updatehook')) {\n return false;\n }\n // when a module item is deleted\n if (!xarModRegisterHook('item', 'delete', 'API',\n 'categories', 'admin', 'deletehook')) {\n return false;\n }\n // when a module configuration is being modified (uses 'cids')\n if (!xarModRegisterHook('module', 'modifyconfig', 'GUI',\n 'categories', 'admin', 'modifyconfighook')) {\n return false;\n }\n // when a module configuration is updated (uses 'cids')\n if (!xarModRegisterHook('module', 'updateconfig', 'API',\n 'categories', 'admin', 'updateconfighook')) {\n return false;\n }\n // when a whole module is removed, e.g. via the modules admin screen\n // (set object ID to the module name !)\n if (!xarModRegisterHook('module', 'remove', 'API',\n 'categories', 'admin', 'removehook')) {\n return false;\n }\n // fall through to the next upgrade\n\n case '2.2':\n // Code to upgrade from version 2.2 goes here\n\n if (xarModIsAvailable('articles')) {\n // load API for table definition etc.\n if (!xarModAPILoad('articles','user')) return;\n }\n\n $linkagetable = $xartable['categories_linkage'];\n\n xarDBLoadTableMaintenanceAPI();\n\n // add the xar_itemtype column\n $query = xarDBAlterTable($linkagetable,\n array('command' => 'add',\n 'field' => 'xar_itemtype',\n 'type' => 'integer',\n 'null' => false,\n 'default' => '0'));\n $result = $dbconn->Execute($query);\n if (!$result) return;\n\n // make sure all current records have an itemtype 0 (just in case)\n $query = \"UPDATE $linkagetable SET xar_itemtype = 0\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // update the itemtype field for all articles\n if (xarModIsAvailable('articles')) {\n $modid = xarModGetIDFromName('articles');\n $articlestable = $xartable['articles'];\n\n $query = \"SELECT xar_aid, xar_pubtypeid FROM $articlestable\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n while (!$result->EOF) {\n list($aid,$ptid) = $result->fields;\n $update = \"UPDATE $linkagetable SET xar_itemtype = $ptid WHERE xar_iid = $aid AND xar_modid = $modid\";\n $test = $dbconn->Execute($update);\n if (!$test) return;\n\n $result->MoveNext();\n }\n $result->Close();\n }\n\n// TODO: any other modules where we need to insert the right itemtype here ?\n\n // add an index for the xar_itemtype column\n $index = array('name' => 'i_' . xarDBGetSiteTablePrefix() . '_cat_linkage_4',\n 'fields' => array('xar_itemtype'),\n 'unique' => FALSE);\n $query = xarDBCreateIndex($linkagetable,$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // fall through to the next upgrade\n\n case '2.3':\n case '2.3.0':\n // remove old instance definitions for 'Category'\n $instancetable = $xartable['security_instances'];\n $query = \"DELETE FROM $instancetable\n WHERE xar_module='categories' AND xar_component='Category'\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $categorytable =$xartable['categories'];\n // use external privilege wizard for 'Category' instance\n $instances = array(\n array('header' => 'external', // this keyword indicates an external \"wizard\"\n 'query' => xarModURL('categories', 'admin', 'privileges'),\n 'limit' => 0\n )\n );\n // TODO: get this parent/child stuff to work someday, or implement some other way ?\n //xarDefineInstance('categories', 'Category', $instances);\n xarDefineInstance('categories', 'Category', $instances,1,$categorytable,'xar_cid',\n 'xar_parent','Instances of the categories module, including multilevel nesting');\n\n // fall through to the next upgrade\n\n case '2.3.1':\n xarTplRegisterTag('categories', 'categories-filter',\n array(),\n 'categories_userapi_filtertag');\n\n // fall through to the next upgrade\n\n case '2.3.2':\n xarTplRegisterTag('categories', 'categories-catinfo', array(),\n 'categories_userapi_getcatinfotag');\n // fall through to the next upgrade\n case '2.3.3':\n\n xarRemoveInstances('categories','Block');\n\n case '2.3.4':\n xarModSetVar('categories', 'inputsize', 5);\n case '2.3.5'://\n\n case '2.4.0':\n // Indicate to the core privilege there is some xarprivilege.php to extend\n xarModSetVar('categories', 'extended_privileges', 1);\n\n // Todo: add the minimum core version requirement dependancy. Or should the privilege acts the same than before for full compability?\n\n //Load Table Maintainance API\n xarDBLoadTableMaintenanceAPI();\n\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n $fields = array(\n 'xar_pid'=>array('type'=>'integer','null'=>FALSE,'default'=>'0'),\n 'xar_name'=>array('type'=>'varchar','size'=>254,'null'=>FALSE,'default'=>'0'),\n 'xar_cid'=>array('type'=>'integer','null'=>FALSE,'default'=>'0'),\n 'xar_forced_deny'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_forced_allow'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_forbid_receive'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_multi_level'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_to_children'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_to_parents'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_to_siblings'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_not_itself'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_override_others'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_inheritance_depth'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_deactivated'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_comment'=>array('type'=>'varchar','size'=>254,'null'=>FALSE,'default'=>'')\n );\n\n // Create the Table - the function will return the SQL is successful or\n // raise an exception if it fails, in this case $query is empty\n $query = xarDBCreateTable($xartable['categories_ext_privileges'],$fields);\n if (empty($query)) return; // throw back\n\n // Pass the Table Create DDL to adodb to create the table and send exception if unsuccessful\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $index = array(\n 'name' => 'i_' . xarDBGetSiteTablePrefix() . '_categories_priv_pid',\n 'fields' => array('xar_pid'),\n 'unique' => false\n );\n $query = xarDBCreateIndex($xartable['categories_ext_privileges'],$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $index = array(\n 'name' => 'i_' . xarDBGetSiteTablePrefix() . '_categories_priv_cid',\n 'fields' => array('xar_cid'),\n 'unique' => false\n );\n $query = xarDBCreateIndex($xartable['categories_ext_privileges'],$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $index = array(\n 'name' => 'i_' . xarDBGetSiteTablePrefix() . '__categories_priv_cid_pid',\n 'fields' => array('xar_pid','xar_cid'),\n 'unique' => true\n );\n $query = xarDBCreateIndex($xartable['categories_ext_privileges'],$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n case '2.4.1':\n // One or all-or nothing category access\n // http://xarigami.com/contrails/display/xcat/554\n xarModSetVar('categories', 'securitytestall', true);\n // Set to true to keep the former testall behavior.\n\n case '2.4.2':\n //upgrade for core 1.4.0 compatibility\n //add modvar to turn on/off dragdrop\n xarModSetVar('categories','allowdragdrop',false);\n\n case '2.4.3':\n\n case '2.5.0':\n case '2.5.1':\n case '2.5.2':\n case '2.5.3':\n xarModSetVar('categories', 'singleinput', false);\n case '2.5.5': //upgrade to reflect javascript update of treeTable. admin-veiwcats-render template also updated.\n default:\n break;\n }\n\n // Upgrade successful\n return true;\n}", "function check_servers ($serv_params){\r\n\r\n global $lingo,$divstyle_white,$divstyle_blue,$divstyle_orange,$divstyle_grey,$strings,$crm_api_user, $crm_api_pass, $crm_wsdl_url,$funky_gear,$sess_account_id,$sess_contact_id;\r\n\r\n #$lingoname = \"name_ja\";\r\n $lingoname = \"name_\".$lingo;\r\n\r\n $server_id = $serv_params[0];\r\n $server_name = $serv_params[1];\r\n $server_type = $serv_params[2];\r\n\r\n ##########################################\r\n # Get server-related switches\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n // parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n // The type is Live Status 1/0\r\n $serverbit_type_id = '423752fe-a632-9b4d-8c3b-52ccc968fe59';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatus\"];\r\n\r\n $addserver = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$server_name.\": \".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_white;\r\n break;\r\n case '1':\r\n $server_status_show = $strings[\"CI_ServerStatusOnline\"];\r\n $addserver = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n break;\r\n case '0':\r\n $server_status_show = $strings[\"CI_ServerStatusOffline\"];\r\n $addserver = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addserver.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addserver.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # End get server-related switches\r\n ##########################################\r\n # Get server-related switches\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n // parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n // The type is Live Status 1/0\r\n $serverbit_type_id = '2864a518-19f4-ddfa-366e-52ccd012c28b';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_maintenance_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_maintenance_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_white;\r\n break;\r\n case '1':\r\n $server_status_show = \"ON\";\r\n $addservermaintenance = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n $view = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id;\r\n break;\r\n case '0':\r\n $server_status_show = \"OFF\";\r\n $addservermaintenance = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n $view = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.$view.$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # Maintenance Window DateTime Start\r\n $serverbit_type_id = '787ab970-8f2a-efed-3aca-52ecd566b16b';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n\r\n $serverbits = \"\";\r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = \"Maintenance Window Start DateTime\"; //$strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_start_datetime_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $server_maintenance_start_datetime = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_start_datetime_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_start_datetime_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n if ($server_maintenance_start_datetime){\r\n $start_datetime_show = $server_maintenance_start_datetime;\r\n $thisdivstyle = $divstyle_orange;\r\n $addservermaintenance = \"\";\r\n } else {\r\n $start_datetime_show = \"NA\";\r\n $thisdivstyle = $divstyle_white;\r\n } \r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$start_datetime_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_start_datetime_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B>NA<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # Maintenance Window DateTime End\r\n $serverbit_type_id = 'b38181b6-eb59-0bc3-bad3-52ecd65163f5';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n\r\n $serverbits = \"\";\r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = \"Maintenance Window End DateTime\"; //$strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_end_datetime_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $server_maintenance_end_datetime = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_end_datetime_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_end_datetime_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n if ($server_maintenance_end_datetime){\r\n $end_datetime_show = $server_maintenance_end_datetime;\r\n $thisdivstyle = $divstyle_orange;\r\n $addservermaintenance = \"\";\r\n } else {\r\n $end_datetime_show = \"NA\";\r\n $thisdivstyle = $divstyle_white;\r\n } \r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$end_datetime_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_end_datetime_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B>NA<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n\r\n # End get server-related switches\r\n ##########################################\r\n # Get server-related back-up details\r\n # Back-up Day: 67a6bcaf-4e45-42d6-79da-52d4df16784c\r\n # Back-up End Time: 913315fd-34d5-036e-0c52-52d4d91550d9\r\n # Back-up Job Name: 8802ae00-1abe-9819-558f-52d4d74b6ca2\r\n # Back-up Start Time: 4d440215-68e1-efe3-158e-52d4d808e6b1\r\n # Back-up Status: 530ae095-b3e7-c9fe-61fb-52d5aee0a272\r\n # Back-up Status Keyword(s): 56291976-233c-912a-b10e-52d4dfc8357c\r\n # Execution Server: 91694cfa-3f33-6505-d894-52d4d84722c0\r\n # Target Server: 734f02a8-5821-86f1-3229-52d4d80696ac\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n # parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n # The type is Maintenance 1/0\r\n $serverbit_type_id = '530ae095-b3e7-c9fe-61fb-52d5aee0a272';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatusBackup\"];\r\n\r\n $addserverbackup = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"&partype=dbcb0dbb-c3b8-8edb-1bd6-52b8e31ff812');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_backup_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_backup_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_backup_status_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_backup_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_backup_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_grey;\r\n break;\r\n case '1':\r\n $server_status_show = \"OK\";\r\n $addserverbackup = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n break;\r\n case '0':\r\n $server_status_show = \"NG\";\r\n $addserverbackup = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_backup_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addserverbackup.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addserverbackup.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # End get server-related switches\r\n ##########################################\r\n\r\n return $servers;\r\n\r\n }" ]
[ "0.5982476", "0.58706844", "0.5782111", "0.570049", "0.55908024", "0.552025", "0.53857785", "0.53610164", "0.52334493", "0.51933086", "0.51803577", "0.5179615", "0.51159894", "0.5115016", "0.50811833", "0.5073223", "0.5065959", "0.50629276", "0.5054828", "0.50415343", "0.50369817", "0.50126797", "0.5003238", "0.49978092", "0.49633887", "0.495259", "0.49392772", "0.4926612", "0.49203613", "0.48876888", "0.4887515", "0.48702168", "0.48634923", "0.48453352", "0.48450875", "0.48401302", "0.4834586", "0.48189732", "0.48181176", "0.4802773", "0.48026982", "0.48006594", "0.47972155", "0.47924525", "0.47802782", "0.47779348", "0.4774019", "0.47560725", "0.47510436", "0.47445738", "0.47403365", "0.4736328", "0.47346613", "0.47302213", "0.47127685", "0.47123298", "0.4702754", "0.4702217", "0.46802834", "0.4677279", "0.46771458", "0.4675057", "0.4674639", "0.46739984", "0.46738344", "0.46702364", "0.46693704", "0.46676895", "0.4665524", "0.46626052", "0.46585786", "0.46419606", "0.4641281", "0.46328884", "0.46251476", "0.46213314", "0.46180728", "0.46155614", "0.46141917", "0.4605006", "0.46038646", "0.4603187", "0.45977104", "0.45973378", "0.45958045", "0.45946395", "0.45935425", "0.45875728", "0.4582396", "0.45752853", "0.4562492", "0.45613775", "0.4558551", "0.4557884", "0.4547743", "0.4546978", "0.4545222", "0.45449933", "0.45413324", "0.45308766" ]
0.68413734
0
function render_backend tersebut dari file core/MY_Controller.php
public function regis(){ $this->load->view('v_register'); // load view home.php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function render() {}", "protected function render() {}", "protected function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render(){\n\t\t\n\t}", "abstract public function render() ;", "public function render()\n {\n //\n }", "protected function getFrontendController() {}", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render(){\r\n //Current controller is loaded from within the action method.\r\n define(\"RENDER_BEGIN\", microtime());\r\n \r\n\t\t\t$this->controller->render();\r\n \r\n\t\t\t\r\n\t\t}", "public function render()\n {\n }", "public function render()\n {\n }", "public function render()\n {\n }", "public function render()\n {\n }", "protected function getTypoScriptFrontendController() {}", "public function render(){\n\n }", "public function render() {\r\n\t\t\r\n\t}", "protected static function getTypoScriptFrontendController() {}", "function render() ;", "public abstract function render();", "public abstract function render();", "public function render()\n {\n $controller_name = \"App\\Controllers\\\\\" . $this->controller;\n // $controller_name = $this->controller;\n if (class_exists($controller_name )) {\n $controller_object = new $controller_name;\n\n if (method_exists($controller_object, $this->action)) {\n // call the method\n // // $action_name = $this->action;\n // // $controller_object->$action_name();\n\n call_user_func_array([$controller_object , $this->action] , $this->params);\n #OR WITH $CONTROLLER_NAME\n // call_user_func_array([$controller_name , $this->action] , $this->params);\n\n\n } else {\n // echo $this->action . 1 . '<br />'; \n die(\"$this->action action doesn't exist\");\n }\n } else {\n // echo $this->controller . 1 . '<br />';\n die(\"$this->controller controller doesn't exist\");\n }\n }", "protected function _render()\n {\n }", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract function render();", "function render() {}", "public function pengguna(){\n $this->authenticated();\n if($this->session->userdata('role') != 'admin') // Jika user yg login bukan admin\n show_404(); // Redirect ke halaman 404 Not found\n // function render_backend tersebut dari file core/MY_Controller.php\n $this->render_backend('pengguna'); // load view pengguna.php\n }", "abstract public function render(): mixed;" ]
[ "0.69994164", "0.69994164", "0.6999078", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6973623", "0.6893361", "0.6875239", "0.6868432", "0.6836171", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68306017", "0.68048334", "0.67959094", "0.67959094", "0.67959094", "0.67959094", "0.67933124", "0.6752448", "0.67223066", "0.671653", "0.6692742", "0.6675859", "0.6675859", "0.666079", "0.66448593", "0.66268986", "0.66268986", "0.66268986", "0.66268986", "0.66268986", "0.66268986", "0.66123956", "0.6576545", "0.6532388", "0.6521568" ]
0.0
-1
Return null if no type can be inferred. Return MixedType if unknown type is inferred.
public function inferProperty($property) : ?\PHPStan\Type\Type;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function mixed(): Type\n {\n return new Type(null, 'mixed');\n }", "public static function mixed()\n {\n return self::builtinType('mixed');\n }", "public function getType(): ?Type\n {\n return $this->type;\n }", "public function singleType(): ?string\n {\n return $this->isUnion() ? null : $this->types[0];\n }", "public function resolveType(): Type\n {\n return $this->typeRegistry->get($this->currentType);\n }", "public function getType(): ?string;", "public function getType(): ?string;", "public function getType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null\n {\n $type = $this->node->type;\n assert($type instanceof Node\\Identifier || $type instanceof Node\\Name || $type instanceof Node\\NullableType || $type instanceof Node\\UnionType || $type instanceof Node\\IntersectionType || $type === null);\n\n if ($type === null) {\n return null;\n }\n\n return ReflectionType::createFromNode($this->reflector, $this, $type);\n }", "function mixedTypeHintNullable(?Mixed $var1) {}", "protected abstract function primitiveTypeTested(): Type;", "public function valueType(): ?string;", "public function getType(): ?string\n {\n return $this->type;\n }", "public function getType(): ?string\n {\n return $this->type;\n }", "public function getType(): ?string\n {\n return $this->type;\n }", "public function getType(): ?string\n {\n return $this->type;\n }", "public function getType(): ?string\n {\n return $this->type;\n }", "public function getUnexpectedType() {\n\t\tif ( $this->input instanceof TokenStream ) {\n\t\t\treturn $this->token->getType();\n\t\t}\n\t\t/*\n\t\telse if ( $this->input instanceof TreeNodeStream ) {\n\t\t\t$nodes = $this->input;\n\t\t\t$adaptor = $nodes->getTreeAdaptor();\n\t\t\treturn $adaptor->getType($this->node);\n\t\t}\n\t\t*/\n\t\telse {\n\t\t\treturn $this->c;\n\t\t}\n\t}", "public function getType(string $name): ?Definition;", "public function getType()\n\t{\n\t\treturn empty($this->type) ? $this->guessType() : $this->type;\n\t}", "public function getType(): ?string\n {\n }", "public function getType(): ?string\n {\n }", "public function getType()\n {\n if (array_key_exists(\"type\", $this->_propDict)) {\n return $this->_propDict[\"type\"];\n } else {\n return null;\n }\n }", "public function getType()\n {\n if (array_key_exists(\"type\", $this->_propDict)) {\n return $this->_propDict[\"type\"];\n } else {\n return null;\n }\n }", "public function getType()\n {\n return isset($this->Type) ? $this->Type : null;\n }", "public function type(): RootType\n {\n return $this->registry->type($this->modelSchema->typename())->nullable(false);\n }", "public function getType()\n {\n return isset($this->type) ? $this->type : null;\n }", "public function getImpureResultTypeDeterminer()\n {\n $staticDefinitionNodes = [];\n\n foreach ($this->expressionBagNode->getExpressions() as $attributeName => $expressionNode) {\n $staticDefinitionNodes[$attributeName] = new FixedStaticDefinitionNode(\n $attributeName,\n $expressionNode->getResultTypeDeterminer()\n );\n }\n\n $attributeBagModelNode = new FixedStaticBagModelNode($staticDefinitionNodes);\n\n return new StaticStructureTypeDeterminer($attributeBagModelNode);\n }", "public function getType()\n {\n return $this->types ? $this->types[count($this->types) - 1] : null;\n }", "public function getDefaultType(): ?UnionType\n {\n return $this->default_type;\n }", "public function testGuessTypeNoMetadata(): void\n {\n $class = 'FakeClass';\n $property = 'fakeProperty';\n\n $this->modelManager->method('getParentMetadataForProperty')->with($class, $property)\n ->willThrowException(new MappingException());\n\n $result = $this->guesser->guessType($class, $property, $this->modelManager);\n\n $this->assertSame('text', $result->getType());\n $this->assertSame(Guess::LOW_CONFIDENCE, $result->getConfidence());\n }", "protected function getCandidateType()\n {\n if (!$this->detectedType) {\n $this->detectedType = $this->detectType();\n }\n\n return $this->detectedType;\n }", "private static function _getNativeType($type){\n if (in_array($type, self::$_nativeTypes)){\n return $type;\n } else {\n if (array_key_exists($type, self::$_extendedTypes)){\n if (in_array(self::$_extendedTypes[$type]['type'], self::$_nativeTypes)){\n return self::$_extendedTypes[$type]['type'];\n }\n }\n }\n return null;\n }", "public function type(): ?string\n {\n return $this->getAttribute('type');\n }", "public function type(): ?string\n {\n if (isset($this->type)) {\n return $this->type;\n }\n if (Str::startsWith($this->mimeType(), 'image')) {\n return $this->type = 'image';\n }\n if (Str::startsWith($this->mimeType(), 'text')) {\n return $this->type = 'text';\n }\n if (Str::startsWith($this->mimeType(), 'audio')) {\n return $this->type = 'audio';\n }\n if (Str::startsWith($this->mimeType(), 'video')) {\n return $this->type = 'video';\n }\n if ($this->mimeType() === MimeType::fromExtension('pdf')) {\n return $this->type = 'pdf';\n }\n if ($this->matchExtensions(['doc', 'docx', 'odt', 'odm', 'ott'])) {\n return $this->type = 'document';\n }\n if ($this->matchExtensions(['ppt', 'pptx', 'pps', 'odp', 'otp'])) {\n return $this->type = 'presentation';\n }\n if ($this->matchExtensions(['xls', 'xlsx', 'ods', 'ots'])) {\n return $this->type = 'spreadsheet';\n }\n if ($this->matchExtensions(['gz', '7z', 'bz2', 'rar', 'tar', 'zip'])) {\n return $this->type = 'archive';\n }\n return null;\n }", "function guessType ($value) {\n\tif (is_bool ($value)) {\n\t\treturn BOOL;\n\t} elseif (is_real ($value)) {\n\t\treturn REAL;\n\t} elseif (is_int ($value)) {\n\t\treturn NUMERIC;\n\t} else {\n\t\treturn STRING;\n\t}\n}", "public function getType(): ?string {\n $val = $this->getBackingStore()->get('type');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'type'\");\n }", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "protected function typeNormalize($type)\n {\n if (\\in_array($type, array('', null), true)) {\n return null;\n }\n return \\preg_replace_callback('/\\b(boolean|integer|self)\\b/', function ($matches) {\n switch ($matches[1]) {\n case 'boolean':\n return 'bool';\n case 'integer':\n return 'int';\n case 'self':\n return $this->reflector\n ? $this->getReflectorsClassname($this->reflector)\n : 'self';\n }\n }, $type);\n }", "public static function guessType($value) {\r\n\t\t\r\n\t\tif (is_array($value) && (count($value) > 0)) {\r\n\t\t\t$value = first($value);\r\n\t\t}\r\n\r\n\t\tif ($value === NULL) {\r\n\t\t\treturn NULL;\r\n\t\t} else if (is_bool($value)) {\r\n\t\t\treturn FieldType::BOOLEAN;\r\n\t\t} else if (is_numeric($value) && !is_string($value)) {\r\n\t\t\treturn FieldType::NUMBER;\r\n\t\t} else {\r\n\t\t\treturn FieldType::TEXT;\r\n\t\t}\r\n\t}", "public function findDeclaredType(string $qualifiedName): ?ISchemaType\n {\n return array_key_exists($qualifiedName, $this->primitiveTypeByName) ? $this->primitiveTypeByName[$qualifiedName] : null;\n }", "public function getDefaultType();", "#[Pure]\n public static function convertParameterType(string $type, mixed $value): string|int|bool|null\n {\n return match ($type) {\n 'string' => (string)$value,\n 'int' => (int)$value,\n 'bool' => $value === true || $value === '1' || $value === 'true',\n default => null\n };\n }", "public function getForcedType()\n {\n return $this->_forcedType;\n }", "final public function GetExpectedType() { return $this->type; }", "public function getType(string $name) : ?\\GraphQL\\Type\\Definition\\Type\n {\n }", "protected abstract function getType();", "public function getType()\n {\n return $this->factory->resolveType($this);\n }", "public function get_type();", "abstract protected function getType();", "public function getTypeFromNode(Node $node)\n {\n if ($node instanceof Node\\Param) {\n // Parameters\n $docBlock = $node->getAttribute('parentNode')->getAttribute('docBlock');\n if ($docBlock !== null) {\n // Use @param tag\n foreach ($docBlock->getTagsByName('param') as $paramTag) {\n if ($paramTag->getVariableName() === $node->name) {\n if ($paramTag->getType() === null) {\n break;\n }\n return $paramTag->getType();\n }\n }\n }\n if ($node->type !== null) {\n // Use PHP7 return type hint\n if (is_string($node->type)) {\n // Resolve a string like \"bool\" to a type object\n $type = $this->typeResolver->resolve($node->type);\n } else {\n $type = new Types\\Object_(new Fqsen('\\\\' . (string)$node->type));\n }\n }\n if ($node->default !== null) {\n $defaultType = $this->resolveExpressionNodeToType($node->default);\n if (isset($type) && !is_a($type, get_class($defaultType))) {\n $type = new Types\\Compound([$type, $defaultType]);\n } else {\n $type = $defaultType;\n }\n }\n return $type ?? new Types\\Mixed;\n }\n if ($node instanceof Node\\FunctionLike) {\n // Functions/methods\n $docBlock = $node->getAttribute('docBlock');\n if (\n $docBlock !== null\n && !empty($returnTags = $docBlock->getTagsByName('return'))\n && $returnTags[0]->getType() !== null\n ) {\n // Use @return tag\n return $returnTags[0]->getType();\n }\n if ($node->returnType !== null) {\n // Use PHP7 return type hint\n if (is_string($node->returnType)) {\n // Resolve a string like \"bool\" to a type object\n return $this->typeResolver->resolve($node->returnType);\n }\n return new Types\\Object_(new Fqsen('\\\\' . (string)$node->returnType));\n }\n // Unknown return type\n return new Types\\Mixed;\n }\n if ($node instanceof Node\\Expr\\Variable) {\n $node = $node->getAttribute('parentNode');\n }\n if (\n $node instanceof Node\\Stmt\\PropertyProperty\n || $node instanceof Node\\Const_\n || $node instanceof Node\\Expr\\Assign\n || $node instanceof Node\\Expr\\AssignOp\n ) {\n if ($node instanceof Node\\Stmt\\PropertyProperty || $node instanceof Node\\Const_) {\n $docBlockHolder = $node->getAttribute('parentNode');\n } else {\n $docBlockHolder = $node;\n }\n // Property, constant or variable\n // Use @var tag\n if (\n isset($docBlockHolder)\n && ($docBlock = $docBlockHolder->getAttribute('docBlock'))\n && !empty($varTags = $docBlock->getTagsByName('var'))\n && ($type = $varTags[0]->getType())\n ) {\n return $type;\n }\n // Resolve the expression\n if ($node instanceof Node\\Stmt\\PropertyProperty) {\n if ($node->default) {\n return $this->resolveExpressionNodeToType($node->default);\n }\n } else if ($node instanceof Node\\Const_) {\n return $this->resolveExpressionNodeToType($node->value);\n } else if ($node instanceof Node\\Expr\\Assign || $node instanceof Node\\Expr\\AssignOp) {\n return $this->resolveExpressionNodeToType($node);\n }\n // TODO: read @property tags of class\n // TODO: Try to infer the type from default value / constant value\n // Unknown\n return new Types\\Mixed;\n }\n return null;\n }", "public abstract function getType();", "public function getMixed(): ?bool\n {\n return $this->mixedAttr;\n }", "public function getMixed(): ?bool\n {\n return $this->mixedAttr;\n }", "protected function detectType()\n {\n if (property_exists($this, 'allow')) {\n return $this->allow;\n }\n\n $interfaces = (new ReflectionClass($this))->getInterfaceNames();\n\n if ($interfaces) {\n return $interfaces[0];\n }\n\n return get_class($this);\n }", "private function inflateType($identifier, $type = Scope::class)\n {\n if ($identifier === null) {\n return null;\n }\n\n return $this->entityManager->find($type, $identifier);\n }", "public function getTypeRestriction() {\n if ($this->_reflect->isArray()) {\n return Primitive::$ARRAY;\n } else if ($c= $this->_reflect->getClass()) {\n return new XPClass($c);\n } else {\n return NULL;\n }\n }", "public function get_meta_type() {\n\t\tif ( $this instanceof Term ) {\n\t\t\treturn 'term';\n\t\t}\n\n\t\tif ( $this instanceof Post ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\tif ( isset( $this->meta_type ) ) {\n\t\t\treturn $this->meta_type;\n\t\t}\n\n\t\treturn null;\n\t}", "public function getType()\n {\n return $this->getResolved()->getType();\n }", "public function getType()\n {\n if (is_null($this->type)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_TYPE);\n if (is_null($data)) {\n return null;\n }\n\n $this->type = TypeResourceIdentifierModel::of($data);\n }\n\n return $this->type;\n }", "public function getXmlSchemaSimpleType( slSimpleTypeInferencer $typeInferencer )\n {\n switch ( $type = $typeInferencer->inferenceType() )\n {\n case 'empty':\n case 'PCDATA':\n return 'string';\n\n default:\n // @todo: Throw proper exception\n throw new RuntimeException( \"Unhandled inferenced simple type '$type'.\" );\n }\n }", "private function currentType() {\n $top = count($this->stack) - 1;\n\n if ($top < 0) {\n return null;\n }\n\n $type = $this->stack[ $top ];\n\n return $type->getAST();\n }", "protected abstract function get_meta_type();", "public function getMixed()\n {\n return $this->mixed;\n }", "public function meta_type();", "public function getType()\n {\n $type = $this->data['type'];\n if (null === $type) {\n $type = Reader\\Reader::detectType($this->getDomDocument());\n $this->setType($type);\n }\n return $type;\n }", "public static function normalizeNarrowedParamType(UnionType $phpdoc_param_union_type, UnionType $real_param_type): ?UnionType\n {\n if ($phpdoc_param_union_type->isNeverType() || $phpdoc_param_union_type->isNull()) {\n // Return the phpdoc 'never' type so that it can override the nullable type.\n return $phpdoc_param_union_type;\n }\n if (!$real_param_type->containsNullable() || $phpdoc_param_union_type->containsNullable()) {\n // We already validated that the other casts were supported.\n return $phpdoc_param_union_type;\n }\n $has_null = $phpdoc_param_union_type->hasType(NullType::instance(false));\n if (!$has_null) {\n // Attempting to narrow nullable to non-nullable is usually a mistake, currently not supported.\n return null;\n }\n // Create a clone, converting \"T|S|null\" to \"?T|?S\"\n return $phpdoc_param_union_type->nullableClone()->withoutType(NullType::instance(false));\n }", "public static function get_meta_type();", "public function getType()\n\t{\n\t\treturn 'null';\n\t}", "public function getType(): ?PhoneType {\n $val = $this->getBackingStore()->get('type');\n if (is_null($val) || $val instanceof PhoneType) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'type'\");\n }", "protected function _determineType($var, $resultGraph)\n {\n $type = null;\n // find in namedGraphs\n if (!$var instanceof Literal) {\n $iter = $this->dataset->findInNamedGraphs(\n null,\n $var,\n new Resource(RDF_NAMESPACE_URI.'type'),\n null,\n true\n );\n while ($iter->valid()) {\n $statement = $iter->current();\n $type = $statement->getObject1();\n $resultGraph->add($iter->current());\n break;\n }\n }\n // if no type information found find in default graph\n if (!$type) {\n if (!$var instanceof Literal) {\n $iter1 = $this->dataset->findInDefaultGraph(\n $var,\n new Resource(RDF_NAMESPACE_URI.'type'),\n null\n );\n $type = null;\n while ($iter1->valid()) {\n $statement = $iter1->current();\n $type = $statement->getObject1();\n $resultGraph->add($iter1->current());\n break;\n }\n }\n }\n return $type;\n }", "public function getMetadata($mixed)\n {\n if ($this->doctrine !== null)\n {\n try\n {\n return $this->getDoctrine()->getManager($this->getConnection())->getClassMetadata((is_object($mixed) ? get_class($mixed) : $mixed));\n }\n catch (\\Exception $e)\n {\n // Not found\n }\n }\n\n return null;\n }", "#[Pure]\n public function getType() {}", "public function getType()\n\t{\n\t\t$annotations = $this->parseAnnotations();\n\t\treturn EloquentIterable::wrap($annotations)\n\t\t\t->filter(function ($annotation) {\n\t\t\t\treturn $annotation->getAnnotation() == '@var';\n\t\t\t})->transform(function ($annotation) {\n\t\t\t\treturn $annotation->getType();\n\t\t\t})->first();\n\t}", "public function resolveType($root)\n {\n $type = array_key_exists('__Union_Type', $root)\n ? $root['__Union_Type']\n : $this->types[0];\n\n return GraphQL::type($type);\n }", "public function getContentType()\n {\n if (array_key_exists(\"contentType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"contentType\"], \"\\Microsoft\\Graph\\Model\\ContentTypeInfo\") || is_null($this->_propDict[\"contentType\"])) {\n return $this->_propDict[\"contentType\"];\n } else {\n $this->_propDict[\"contentType\"] = new ContentTypeInfo($this->_propDict[\"contentType\"]);\n return $this->_propDict[\"contentType\"];\n }\n }\n return null;\n }", "public abstract function type();", "public abstract function type();", "public function getQueryType() : ?\\GraphQL\\Type\\Definition\\Type\n {\n }", "public function getSupersedenceType()\n {\n if (array_key_exists(\"supersedenceType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"supersedenceType\"], \"\\Beta\\Microsoft\\Graph\\Model\\MobileAppSupersedenceType\") || is_null($this->_propDict[\"supersedenceType\"])) {\n return $this->_propDict[\"supersedenceType\"];\n } else {\n $this->_propDict[\"supersedenceType\"] = new MobileAppSupersedenceType($this->_propDict[\"supersedenceType\"]);\n return $this->_propDict[\"supersedenceType\"];\n }\n }\n return null;\n }", "final protected function get_type() {\n return $this->type;\n }", "function getTypeConverter() ;", "public function getMediaType()\n {\n $contentType = $this->getContentType();\n if ($contentType) {\n $contentTypeParts = preg_split('/\\s*[;,]\\s*/', $contentType);\n\n return strtolower($contentTypeParts[0]);\n }\n\n return null;\n }", "public function type()\n {\n return $this->hasOne(Type::class);\n }", "public static function null()\n {\n return self::builtinType('null');\n }", "protected function getFallbackDatatype($value): ?string {\r\n if($value === null) {\r\n return null; // unspecified\r\n } else {\r\n if(is_int($value)) {\r\n return 'number_natural';\r\n } else if(is_float($value)) {\r\n return 'number';\r\n } else if(is_bool($value)) {\r\n return 'boolean';\r\n } else if(is_string($value)) {\r\n return 'text';\r\n }\r\n }\r\n throw new exception('INVALID_FALLBACK_PARAMETER_TYPE', exception::$ERRORLEVEL_ERROR);\r\n }", "public function getDataType() {\n return null;\n }", "public function expectedType()\n {\n return $this->expectedType;\n }", "abstract public function type();", "abstract public function type();", "public function getType(): ?PropertyType {\n $val = $this->getBackingStore()->get('type');\n if (is_null($val) || $val instanceof PropertyType) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'type'\");\n }", "public function consumes(Type $type): Trinary\n {\n if ($type instanceof ArrayLiteral && count($type->types()) === 0) {\n return Trinary::true();\n }\n\n return Trinary::maybe();\n }", "public function getTypeHeure(): ?string {\n return $this->typeHeure;\n }", "public function getOptionalType()\n {\n return $this->readOneof(101);\n }", "public function getDataType(): ?string {\n $val = $this->getBackingStore()->get('dataType');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'dataType'\");\n }" ]
[ "0.61918867", "0.6068833", "0.579241", "0.55838156", "0.54610014", "0.54294926", "0.54294926", "0.54200906", "0.53860706", "0.5365065", "0.5269663", "0.5260746", "0.5260746", "0.5260746", "0.5260746", "0.5260746", "0.52369845", "0.52177685", "0.52108896", "0.5190625", "0.5190625", "0.5113298", "0.5113298", "0.50653744", "0.5056488", "0.50432616", "0.49826875", "0.4973671", "0.49720123", "0.4942486", "0.4939114", "0.49381682", "0.49356085", "0.49161267", "0.4893348", "0.4880076", "0.48749915", "0.48749915", "0.48749915", "0.48749915", "0.48749915", "0.48749915", "0.48559138", "0.48531574", "0.48509637", "0.48415878", "0.48395422", "0.4836571", "0.4836074", "0.48353797", "0.4835015", "0.48286432", "0.48275778", "0.48234737", "0.48144352", "0.4798785", "0.47932953", "0.47671962", "0.47671962", "0.47616234", "0.47615045", "0.47493553", "0.47449756", "0.47446454", "0.47367924", "0.47351828", "0.47329137", "0.4704429", "0.4699366", "0.4685385", "0.4682911", "0.46814063", "0.4681135", "0.46700528", "0.46522844", "0.4649615", "0.46480396", "0.4624414", "0.46159837", "0.46124953", "0.4605433", "0.4600559", "0.4600559", "0.459599", "0.45918122", "0.45898616", "0.45846143", "0.45786548", "0.45772666", "0.4574961", "0.45709625", "0.4570193", "0.45666185", "0.45655924", "0.45655924", "0.45586872", "0.45573008", "0.4550787", "0.45396918", "0.4535032" ]
0.6049839
2
================================================== Theme's scripts and styles
function aitAdminEnqueueScriptsAndStyles() { $mapLanguage = get_locale(); aitAddScripts(array( 'ait-googlemaps-api' => array( //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage, 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage, 'deps' => array('jquery') ), 'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function kesha_theme_scripts() {\n\n // Register Custom CSS\n wp_register_style( 'theme', get_template_directory_uri() . '/dist/css/built.min.css', array(), rand(111,9999), 'all' );\n\n // Enqueue Styles\n wp_enqueue_style( 'theme' );\n\n // Register JS.\n wp_register_script( 'scripts', get_template_directory_uri() . '/dist/js/built.min.js', array( 'jquery' ), rand(111,9999), TRUE );\n\n // Enqueue JS\n wp_enqueue_script( 'scripts' );\n}", "function wpdocs_theme_name_scripts() {\n wp_enqueue_style('pva-style', get_stylesheet_uri());\n wp_enqueue_style('pva-bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_script('pva-script', get_template_directory_uri() . '/js/sitescript.js', array(), '1.0.0', true);\n}", "public function theme_scripts() {\n\t\t$suffix = !TALEMY_DEV_MODE ? '.min' : '';\n\n\t\t// stylesheets\n\t\twp_register_style(\n\t\t\t'font-awesome-5-all',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/all.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'font-awesome-5-shim',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/v4-shims.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\t\t\n\t\twp_register_style(\n\t\t\t'fancybox',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/css/fancybox.min.css'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/css/style'. $suffix . '.css',\n\t\t\tfalse,\n\t\t\tTALEMY_THEME_VERSION\n\t\t);\n\n\t\twp_enqueue_style( 'font-awesome-5-all' );\n\t\twp_enqueue_style( 'font-awesome-5-shim' );\n\t\twp_enqueue_style( 'talemy' );\n\t\twp_style_add_data( 'talemy', 'rtl', 'replace' );\n\n\t\t// scripts\n\n \twp_register_script(\n \t\t'fancybox',\n \t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fancybox.min.js',\n \t\tarray( 'jquery' ),\n \t\tTALEMY_THEME_VERSION,\n \t\ttrue\n \t);\n\n\t\twp_register_script(\n\t\t\t'jquery-fitvids',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fitvids.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-matchheight',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.matchHeight.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-placeholder',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.placeholder.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'2.3.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-requestanimationframe',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.requestanimationframe.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.2.3',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-selectric',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.selectric.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.13.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-superfish',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.superfish.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.7.10',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-throttle-debounce',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.throttle-debounce.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'resize-sensor',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/ResizeSensor.min.js',\n\t\t\tarray(),\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'theia-sticky-sidebar',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/theia-sticky-sidebar.min.js',\n\t\t\tarray( 'jquery', 'resize-sensor' ),\n\t\t\t'1.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-modernizr',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/modernizr.js',\n\t\t\tarray(),\n\t\t\t'3.6.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-block',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy-block.min.js',\n\t\t\tarray( 'jquery', 'imagesloaded', 'jquery-matchheight' ),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy' . $suffix . '.js',\n\t\t\tarray(\n\t\t\t\t'jquery',\n\t\t\t\t'imagesloaded',\n\t\t\t\t'jquery-fitvids',\n\t\t\t\t'jquery-superfish',\n\t\t\t\t'jquery-selectric',\n\t\t\t\t'jquery-throttle-debounce',\n\t\t\t\t'jquery-requestanimationframe',\n\t\t\t\t'jquery-matchheight',\n\t\t\t\t'jquery-placeholder',\n\t\t\t\t'theia-sticky-sidebar',\n\t\t\t\t'talemy-modernizr'\n\t\t\t),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script( 'jquery-fitvids' );\n\t\twp_enqueue_script( 'jquery-superfish' );\n\t\twp_enqueue_script( 'jquery-selectric' );\n\t\twp_enqueue_script( 'jquery-throttle-debounce' );\n\t\twp_enqueue_script( 'jquery-requestanimationframe' );\n\t\twp_enqueue_script( 'jquery-matchheight' );\n\t\twp_enqueue_script( 'jquery-placeholder' );\n\t\twp_enqueue_script( 'theia-sticky-sidebar' );\n\t\twp_enqueue_script( 'talemy-modernizr' );\n\t\twp_enqueue_script( 'talemy' );\n\t\twp_localize_script( 'talemy', 'talemy_js_data', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\tif ( is_single() ) {\n\t\t\tif ( talemy_get_option( 'post_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t\tif ( is_singular( 'sfwd-courses' ) ) {\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t} else {\n\t\t\t\t$in_focus_mode = false;\n\t\t\t\tif ( class_exists( 'LearnDash_Settings_Section' ) ) {\n\t\t\t\t\t$in_focus_mode = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Theme_LD30', 'focus_mode_enabled' );\n\t\t\t\t}\n\t\t\t\tif ( !$in_focus_mode && in_array( get_post_type(), array( 'sfwd-lessons', 'sfwd-topic' ) ) ) {\n\t\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( is_page() && !is_front_page() ) {\n\t\t\tif ( talemy_get_option( 'page_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t}\n\t}", "function wpdocs_theme_name_scripts() {\n // style sheets\n wp_enqueue_style( 'style', get_stylesheet_uri() );\n wp_enqueue_style( 'linearicons', get_template_directory_uri() . '/css/linearicons.css' );\n wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css');\n wp_enqueue_style( 'themify-icons', get_template_directory_uri() . '/css/themify-icons.css' );\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css' );\n wp_enqueue_style( 'owl.carousel', get_template_directory_uri() . '/css/owl.carousel.css');\n wp_enqueue_style( 'nice-select', get_template_directory_uri() . '/css/nice-select.css');\n wp_enqueue_style( 'nouislider', get_template_directory_uri() . '/css/nouislider.min.css');\n wp_enqueue_style( 'ion-rangeSlider', get_template_directory_uri() . '/css/ion.rangeSlider.css');\n wp_enqueue_style( 'ion-rangeSlider-skinFlat', get_template_directory_uri() . '/css/ion.rangeSlider.skinFlat.css');\n wp_enqueue_style( 'magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css');\n wp_enqueue_style( 'main', get_template_directory_uri() . '/css/main.css');\n\n // scripts\n\n wp_enqueue_script( 'jquery-2.2.4', get_template_directory_uri() . '/js/vendor/jquery-2.2.4.min.js', true );\n wp_enqueue_script( 'popper', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js', true );\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/vendor/bootstrap.min.js', true );\n wp_enqueue_script( 'jquery.ajaxchimp', get_template_directory_uri() . '/js/jquery.ajaxchimp.min.js', true );\n wp_enqueue_script( 'jquery.nice-select', get_template_directory_uri() . '/js/jquery.nice-select.min.js', true );\n wp_enqueue_script( 'jquery.sticky', get_template_directory_uri() . '/js/jquery.sticky.js', true );\n wp_enqueue_script( 'nouislider', get_template_directory_uri() . '/js/nouislider.min.js', true );\n wp_enqueue_script( 'countdown', get_template_directory_uri() . '/js/countdown.js', true );\n wp_enqueue_script( 'jquery.magnific-popup', get_template_directory_uri() . '/js/jquery.magnific-popup.min.js', true );\n wp_enqueue_script( 'owl.carousel', get_template_directory_uri() . '/js/owl.carousel.min.js', true );\n // js gmap\n wp_enqueue_script( 'google-maps','https://maps.googleapis.com/maps/api/js?key=AIzaSyCjCGmQ0Uq4exrzdcL6rvxywDDOvfAu6eE', true );\n wp_enqueue_script( 'gmaps', get_template_directory_uri() . '/js/gmaps.min.js', true );\n wp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', true );\n \n\n}", "function pentamint_wp_theme_scripts() {\n\t\t// Initiate Default Wordpress jQuery\n\t\twp_enqueue_script('jquery');\n\n\t\t// Bootstrap Support\n\t\twp_enqueue_script('popper.js', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', array(), null, true);\n\t\twp_enqueue_script('bootstrap', 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js', array(), null, true);\n\n\t\t// Theme Custom\n\t\twp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap', false);\n\t\twp_enqueue_style('nanum-fonts-nanumsquareround', 'https://cdn.rawgit.com/innks/NanumSquareRound/master/nanumsquareround.min.css', false);\n\t\twp_enqueue_style('animate.css', 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css', true);\n\t\twp_enqueue_script('ofi-min-js', get_stylesheet_directory_uri() . '/js/ofi.min.js', array(), '3.2.4', true);\n\t\twp_enqueue_script('main-js', get_stylesheet_directory_uri() . '/js/main.js', array('jquery'), time(), true);\n\t}", "function nameless_sheep_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'nameless_sheep-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "function dfd_themes_scripts() {\n\t\tglobal $dfd_native;\n\t\t/*\n\t\t * Css styles\n\t\t */\n\t\twp_register_style('dfd_site_style', get_template_directory_uri() . '/assets/css/app.css', false, null);\n\t\t\n\t\twp_register_style('dfd_mobile_responsive', get_template_directory_uri() . '/assets/css/mobile-responsive.css', false, null);\n\t\t\n\t\twp_enqueue_style('dfd_site_style');\n\t\t\n\t\t/**\n\t\t * Check if WooCommerce is active\n\t\t * */\n\t\tif (class_exists('WooCommerce')) {\n\t\t\t$woocommerce_css_file = get_template_directory_uri() . '/assets/css/woocommerce.css';\n\t\t\t\n\t\t\twp_register_style('dfd_wocommerce_style', $woocommerce_css_file, false, null);\n\t\t\twp_enqueue_style('dfd_wocommerce_style');\n\t\t}\n\t\t\n\t\t/**\n\t\t * mobile responsive\n\t\t */\n\t\tif (!isset($dfd_native['mobile_responsive']) || $dfd_native['mobile_responsive'] != '0') {\n\t\t\twp_enqueue_style('dfd_mobile_responsive');\n\t\t}\n\t\t\n\t\tif(class_exists('ReduxFramework') && isset(ReduxFramework::$_upload_url) && isset(ReduxFramework::$_upload_dir) && file_exists(ReduxFramework::$_upload_dir . 'options.css') && isset($dfd_native['enqueue_styles_file']) && $dfd_native['enqueue_styles_file'] == 'on') {\n\t\t\twp_enqueue_style('dfd_theme_options', ReduxFramework::$_upload_url . 'options.css', false, null);\n\t\t}\n\t\t\n\t\tif(!class_exists('Dfd_Theme_extensions')) {\n\t\t\t$font_url = add_query_arg( 'family', urlencode( 'Open Sans:300,300italic,400,400italic,600,600italic,700italic,700&subset=latin,latin-ext' ), \"//fonts.googleapis.com/css\" );\n\t\t\twp_enqueue_style('dfd_defalt_fonts', $font_url, false, null);\n\t\t\twp_enqueue_style('dfd_default_icons', get_template_directory_uri() . '/assets/fonts/dfd_icon_set.css', false, null);\n\t\t}\n\t\t\n\t\twp_enqueue_style( 'main-style', get_stylesheet_uri(), false, null );\n\t\t\n\t\tif(function_exists('dfd_custom_page_style')){\n\t\t\tdfd_custom_page_style();\n\t\t}\n\t\t\n\t\t/* RTL support */\n\t\tif(is_rtl()) {\n\t\t\twp_enqueue_style('dfd_rtl', get_template_directory_uri() . '/assets/css/rtl.css', false, null);\n\t\t}\n\t\t\n\t\t/*\n\t\t * JS register\n\t\t */\n\t\t\n\t\t$google_api_key = 'AIzaSyCEc0PM7rpun59m20yBBtRsl62I6eEsKl4';\n\t\tif(isset($dfd_native['custom_google_api_key']) && !empty($dfd_native['custom_google_api_key'])) {\n\t\t\t$google_api_key = $dfd_native['custom_google_api_key'];\n\t\t}\n\t\t\n\t\twp_register_script('gmaps', '//maps.googleapis.com/maps/api/js?key='.$google_api_key, array('jquery'), null, false, true);\n\t\t\n\t\twp_register_script('gmap3', get_template_directory_uri() . '/assets/js/gmap3.min.js', array('jquery'), null, true, true);\n\t\twp_register_script('dfd_gmap', get_template_directory_uri() . '/assets/js/dfd_gmap.js', array('jquery'), null, true, true);\n\t\t\n\t\twp_register_script('dfd_woocommerce_scripts', get_template_directory_uri() . '/assets/js/woocommerce.js', array('jquery'), null, true);\n\n\t\t// Video Player\n\t\twp_register_script('dfd_zencdn_video_js', get_template_directory_uri() . '/assets/js/video-js.js', array('jquery'), null);\n\t\t\n\t\t// Facebook Widget\n\t\twp_register_script('dfd_facebook_widget_script', get_template_directory_uri().'/assets/js/widget-facebook.js', array('jquery'), null, true);\n\n\t\t// keyframe\n\t\t\n\t\t// ajax pagination\n\t\twp_register_script('ajax-pagination', get_template_directory_uri().'/assets/js/ajax-pagination.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-lazy-load', get_template_directory_uri().'/assets/js/ajax-lazy-load.js', array('jquery'), null, true);\n\t\t\n\t\t//slick slider\n\t\t\n\t\twp_register_script('dfd-particleground', get_template_directory_uri().'/assets/js/jquery.particleground.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-particleground-old', get_template_directory_uri().'/assets/js/jquery.particleground.old.min.js', array('jquery'), null, true);\n\t\t\n\t\twp_register_script('dfd-canvas-bg-first', get_template_directory_uri().'/assets/js/dfd_canvas_bg_style_1.js', array('jquery'), null, true);\n\t\t\n\t\twp_register_script('dfd-canvas-bg-third', get_template_directory_uri().'/assets/js/dfd_canvas_bg_style_3.js', array('jquery'), null, true);\n\t\t\n\t\twp_register_script('dfd-jparallax', get_template_directory_uri().'/assets/js/jquery.parallax.js', array('jquery'), null, false);\n\t\t\n//\t\twp_register_script('dfd-sly', get_template_directory_uri().'/assets/js/sly.min.js', array('jquery'), null, false);\n\t\t\n//\t\twp_register_script('dfd-jpcqarallax', get_template_directory_uri().'/assets/js/jquery.parallax.js', array('jquery'), null, false);\n\t\t\n\t\t/*\n\t\t * JS enquene\n\t\t */\n\t\tif(!isset($dfd_native['dev_mode']) || $dfd_native['dev_mode'] != 'on' || !defined('DFD_DEBUG_MODE') || !DFD_DEBUG_MODE) {\n\t\t\tif (strcmp(DfdMetaBoxSettings::compared('site_preloader_enabled', 'off'),'1')===0) {\n\t\t\t\twp_register_script('dfd_queryloader2', get_template_directory_uri() . '/assets/js/jquery.queryloader2.min.js', array('jquery'), '2', false, true);\n\t\t\t\twp_enqueue_script('dfd_queryloader2');\n\t\t\t}\n\t\t\twp_register_script('dfd_js_plugins', get_template_directory_uri() . '/assets/js/plugins.min.js', array('jquery'), null, true);\n\t\t\twp_localize_script('dfd_js_plugins', 'ajax_var', array(\n\t\t\t\t'url' => admin_url('admin-ajax.php'),\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce')\n\t\t\t));\n\t\t\twp_enqueue_script('dfd_js_plugins');\n\t\t\t\n\t\t\twp_register_script('dfd.onepagescroll', get_template_directory_uri().'/assets/js/jquery.fullPage.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-multislider', get_template_directory_uri().'/assets/js/jquery.multiscroll.min.js', array('jquery'), null, true);\n\t\t\t\n\t\t} else {\n\t\t\twp_register_script('dfd_foundation', get_template_directory_uri() . '/assets/js/foundation.js', array('jquery'), null, true);\n\t\t\twp_register_script('keyframes', get_template_directory_uri().'/assets/js/jquery.keyframes.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd_effects', get_template_directory_uri() . '/assets/js/animation.js', array('jquery'), null, true);\n\t\t\twp_register_script('mmenu', get_template_directory_uri().'/assets/js/jquery.sidr.js', array('jquery'), null, true);\n\t\t\twp_register_script('slick', get_template_directory_uri().'/assets/js/jquery.slick.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd_scrollTo', get_template_directory_uri().'/assets/js/jquery.scrollTo.js', array('jquery'), null, true);\n\t\t\twp_register_script('jquery.easing', get_template_directory_uri().'/assets/js/jquery.easing.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-folio-hover', get_template_directory_uri().'/assets/js/jquery.hoverdir.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-chaffle', get_template_directory_uri().'/assets/js/jquery.chaffle.js', array('jquery'), null, true);\n\t\t\twp_register_script('prettyphoto', get_template_directory_uri() . '/assets/js/jquery.prettyPhoto.js', array('jquery'), null, true, true);\n\t\t\twp_register_script('custom-share', get_template_directory_uri() . '/assets/js/share.js', array('jquery'), null, true);\n\t\t\twp_register_script('vertical_js', get_template_directory_uri() . '/assets/js/vertical.js', array('jquery'), null, true);\n\t\t\twp_register_script('dropkick', get_template_directory_uri() . '/assets/js/jquery.dropkick-min.js', array('jquery'), null, true);\n\t\t\twp_register_script('isotope', get_template_directory_uri() . '/assets/js/jquery.isotope.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('justified', get_template_directory_uri() . '/assets/js/justifiedGallery.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-3d-hover', get_template_directory_uri() . '/assets/js/jquery.hover3d.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-sticky-kit', get_template_directory_uri() . '/assets/js/sticky-kit.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-tween-max', get_template_directory_uri().'/assets/js/TweenMax.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-mousestop', get_template_directory_uri().'/assets/js/mousestop.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-images-loaded', get_template_directory_uri().'/assets/js/imagesloaded.pkgd.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-fancy-text', get_template_directory_uri().'/assets/js/fancy-text.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-svg-loaded', get_template_directory_uri().'/assets/js/svgLoader.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-hotspot', get_template_directory_uri().'/assets/js/jquery.hotspot.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-multislider', get_template_directory_uri().'/assets/js/jquery.multiscroll.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd_main', get_template_directory_uri() . '/assets/js/app.js', array('jquery'), null, true);\n\t\t\twp_localize_script('dfd_main', 'ajax_var', array(\n\t\t\t\t'url' => admin_url('admin-ajax.php'),\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce')\n\t\t\t));\n\t\t\t\n\t\t\twp_register_script('smooth-scroll', get_template_directory_uri() . '/assets/js/jquery.smoothscroll.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('dfd_slide_parallax', get_template_directory_uri() . '/assets/js/jquery.slide_parallax.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('dfd-typed', get_template_directory_uri().'/assets/js/typed.js', array('jquery'), null, false);\n\t\t\t\n\t\t\twp_register_script('dfd-swiper', get_template_directory_uri().'/assets/js/swiper.js', array('jquery'), null, false);\n\t\t\t\n\t\t\twp_register_script('dfd.onepagescroll', get_template_directory_uri().'/assets/js/jquery.fullPage.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('js-audio', get_template_directory_uri().'/assets/js/audioplayer.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('mega_menu', get_template_directory_uri().'/assets/js/jquery.mega-menu.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('mega_menu_run', get_template_directory_uri().'/assets/js/jquery.mega-menu.run.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_register_script('countdown-js',get_template_directory_uri().'/assets/js/jquery.countdown.min.js',array('jquery'));\n\t\t\t\n\t\t\twp_register_script( 'odometer-js', get_template_directory_uri() . '/assets/js/odometer.min.js', array( 'jquery' ), false, true );\n\t\t\t\n\t\t\twp_register_script( 'piechart-js', get_template_directory_uri() . '/assets/js/circle-progress.js', array( 'jquery' ), false, true );\n\t\t\t\n\t\t\tif (strcmp(DfdMetaBoxSettings::compared('site_preloader_enabled', 'off'),'1')===0) {\n\t\t\t\twp_register_script('dfd_queryloader2', get_template_directory_uri() . '/assets/js/jquery.queryloader2.js', array('jquery'), '2', false, true);\n\t\t\t\twp_enqueue_script('dfd_queryloader2');\n\t\t\t}\n\t\t\t\n\t\t\twp_enqueue_script('dfd_foundation');\n\t\t\twp_enqueue_script('keyframes');\n\t\t\twp_enqueue_script('dfd-chaffle');\n\t\t\twp_enqueue_script('js-audio');\n\n\t\t\twp_enqueue_script('dfd_effects');\n\t\t\twp_enqueue_script('isotope');\n\t\t\twp_enqueue_script('justified');\n\t\t\twp_enqueue_script('dfd-3d-hover');\n\t\t\twp_enqueue_script('dfd-sticky-kit');\n\t\t\twp_enqueue_script('dfd-tween-max');\n\t\t\twp_enqueue_script('dfd-mousestop');\n\t\t\twp_enqueue_script('dfd-images-loaded');\n\t\t\twp_enqueue_script('dfd-svg-loaded');\n\n\t\t\twp_enqueue_script('slick');\n\t\t\twp_enqueue_script('dfd_scrollTo');\n\t\t\twp_enqueue_script('jquery.easing');\n\t\t\twp_enqueue_script('custom-share');\n\t\t\twp_enqueue_script('vertical_js');\n\t\t\twp_enqueue_script('dropkick');\n\t\t\twp_enqueue_script('prettyphoto');\n\n\t\t\twp_enqueue_script('dfd-swiper');\n\n\t\t\twp_enqueue_script('mmenu');\n\n\t\t\twp_enqueue_script('dfd-folio-hover');\n\n\t\t\twp_enqueue_script('dfd-panr', get_template_directory_uri().'/assets/js/jquery.panr.js', array('jquery'), null, true);\n\t\t\t\n\t\t\twp_enqueue_script('mega_menu');\n\t\t\t\n\t\t\twp_enqueue_script('mega_menu_run');\n\t\t\n\t\t\twp_enqueue_script('smooth-scroll');\n\t\t\t\n\t\t\twp_enqueue_script('countdown-js');\n\t\t\twp_enqueue_script( 'odometer-js');\n\t\t\twp_enqueue_script( 'piechart-js' );\n\t\t\t\n\t\t\twp_enqueue_script('dfd_main');\n\t\t}\n\t\t\n\t\tif (class_exists('WooCommerce')) {\n\t\t\twp_enqueue_script('dfd_woocommerce_scripts');\n\t\t}\n\t\t\n\t\t# Load script/styles for page templates\n\t\tif (is_page()) {\n\t\t\t$curr_page_template = basename(get_page_template());\n\n\t\t\tif($curr_page_template == 'tmp-one-page-scroll.php') {\n\t\t\t\twp_enqueue_script('dfd.onepagescroll');\n\t\t\t}\n\n\t\t\tif($curr_page_template == 'tmp-side-by-side.php') {\n\t\t\t\twp_enqueue_script('dfd-multislider');\n\t\t\t}\n\t\t}\n\t\tif(function_exists('dfd_print_head_js')){\n\t\t\tdfd_print_head_js();\n\t\t}\n\t}", "function theme_scripts() {\n\twp_enqueue_style( 'theme-style', get_stylesheet_uri(), array(), _S_VERSION );\n\t// wp_style_add_data( 'theme-style', 'rtl', 'replace' );\n\n\twp_enqueue_script( 'lib-jquery', get_template_directory_uri() . '/lib/jquery-3.3.1.min.js', array(), _S_VERSION, true );\n\twp_enqueue_script( 'common-script', get_template_directory_uri() . '/assets/js/script.js', array(), _S_VERSION, true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "function scripts() {\n\n\t\t// Foundation core\n\t\twp_register_style( 'maera_zf', MAERA_FOUNDATION_SHELL_URL . '/assets/css/foundation.css' );\n\t\twp_enqueue_style( 'maera_zf' );\n\n\t\t// Foundation icons\n\t\twp_register_style( 'maera_foundation_icons', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation-icons/foundation-icons.css' );\n\t\twp_enqueue_style( 'maera_foundation_icons' );\n\n\t\t// Add Foundation required scripts\n\t\twp_enqueue_script( 'fastclick', MAERA_FOUNDATION_SHELL_URL . '/assets/vendor/fastclick.js', false );\n\t\twp_enqueue_script( 'foundation', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation.min.js', 'jquery' );\n\n\t\t// Add our custom styles\n\t\twp_register_style( 'maera_foundation_custom', MAERA_FOUNDATION_SHELL_URL . '/assets/css/style.css' );\n\t\twp_enqueue_style( 'maera_foundation_custom' );\n\n\t}", "function theme_files() {\n \n wp_register_style('style', get_template_directory_uri() . '/dist/app.css', [], 1, 'all');\n wp_enqueue_style('style');\n\n wp_enqueue_script('jquery');\n\n wp_register_script('app', get_template_directory_uri() . '/dist/app.js', ['jquery'], 1, true);\n wp_enqueue_script('app');\n}", "public function scripts()\n {\n wp_deregister_script('jquery');\n //bootstrap styles for this theme\n wp_enqueue_style('na_theme-bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '1.0');\n\n // Add custom fonts, used in the main stylesheet\n $fonts = $this->fonts_url();\n wp_enqueue_style('na_theme-fonts', $fonts, array(), null);\n\n //main styles for this theme\n\n wp_enqueue_style('main-edge', get_template_directory_uri() . '/assets/css/edge.css', array(), '1.0');\n\n // font awesome icons\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), '3.2');\n wp_enqueue_style('font-na-theme', get_template_directory_uri() . '/assets/fonts/na-theme/stylesheet.css', array(), '3.2');\n\n\n //custom styles for this theme\n if ($this->menu) {\n wp_enqueue_style('na_menu', get_template_directory_uri() . '/assets/css/menu/' . $this->menu, array('na_theme-main'), '1.0');\n } else {\n wp_enqueue_style('na_menu', get_template_directory_uri() . '/assets/css/menu/default.css', array('na_theme-main'), '1.0');\n }\n if (class_exists('woocommerce')) {\n wp_enqueue_style('na_woocommerce', get_template_directory_uri() . '/assets/css/woocommerce.css', array('na_theme-main', 'woocommerce-general'), '1.0');\n }\n\n if (function_exists('pll_current_language') && pll_current_language() == \"ar\") {\n wp_enqueue_style('na_theme-rtl', get_template_directory_uri() . '/rtl.css', '1.0');\n }\n if (is_singular() && comments_open() && get_option('thread_comments')) {\n wp_enqueue_script('comment-reply');\n }\n\n //main scripts\n wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array(), '1.0.0', true);\n\n\n\n wp_enqueue_script('na_theme-scripts', get_template_directory_uri() . '/assets/js/theme.js', array(), '1.0.0', true);\n wp_enqueue_script('na_theme-custom', get_template_directory_uri() . '/assets/js/custom.js', array('na_theme-scripts'), '1.0.0', true);\n\n if ($this->homepage_scrolling != \"\") {\n wp_add_inline_script('na_theme-scripts', 'options.scrolling = ' . strval($this->homepage_scrolling) . ';');\n\n if ($this->homepage_scrolling == 1) {\n wp_enqueue_script('na_theme-fullpage', get_template_directory_uri() . '/assets/js/plugins/fullpage/javascript.fullPage.min.js', array(), '1.0.0', true);\n wp_enqueue_style('na_theme-fullpage', get_template_directory_uri() . '/assets/css/plugins/fullpage.min.css', array(), '1.0');\n } else {\n wp_enqueue_script('na_theme-tweenmax', get_template_directory_uri() . '/assets/js/plugins/scrollmagic/TweenMax.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('na_theme-scrollmagic', get_template_directory_uri() . '/assets/js/plugins/scrollmagic/ScrollMagic.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('na_theme-gsap-animation', get_template_directory_uri() . '/assets/js/plugins/scrollmagic/animation.gsap.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('na_theme-gsap-scrollto-plugin', get_template_directory_uri() . '/assets/js/plugins/scrollmagic/ScrollToPlugin.min.js', array('jquery'), '1.0.0', true);\n }\n }\n wp_localize_script(\n 'na_theme-script',\n 'screenReaderText',\n array(\n 'expand' => '<span class=\"screen-reader-text\">' . __('expand child menu', NA_THEME_TEXT_DOMAIN) . '</span>',\n 'collapse' => '<span class=\"screen-reader-text\">' . __('collapse child menu', NA_THEME_TEXT_DOMAIN) . '</span>',\n )\n );\n\n wp_enqueue_style('na_theme-main', get_template_directory_uri() . '/assets/css/style.css', array('na_theme-bootstrap'), '1.0');\n\n // Load our main stylesheet.\n wp_enqueue_style('na_theme-style', get_stylesheet_uri(), array('na_theme-main'));\n }", "function wagw_scripts() {\n\t\t$theme = wp_get_theme();\n\t\t$ver = $theme->get( 'Version' );\n\t$themecsspath = get_stylesheet_directory() . '/style.css';\n\t$style_ver = filemtime( $themecsspath );\n\twp_enqueue_style( 'wagw-style', get_stylesheet_uri(),array(),$style_ver );\n\n\twp_enqueue_script( 'wagw-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\twp_enqueue_script( 'wagw-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\twp_enqueue_script( 'thickbox', true );\n\twp_enqueue_style( 'thickbox' );\n\n\tif ( is_page_template( 'slider-page.php' ) ) {\n\t\twp_enqueue_style( 'flexslider-css', get_stylesheet_directory_uri() . '/flexslider/flexslider.css' );\n\t}\n\n}", "function tcsn_theme_scripts_styles() {\n\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.min.js', array('jquery'), '2.6.2', false );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.0.2', true );\n\t\twp_enqueue_script( 'theme-scripts', get_template_directory_uri() . '/js/theme-scripts.js', array('jquery'), '1.0.0', true );\n\t\twp_enqueue_script( 'theme-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.0', true );\n\t\twp_enqueue_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.css', null, '3.0.2', 'all' );\n\t\twp_enqueue_style( 'font', get_template_directory_uri() . '/css/iconfont.css' );\n\t\twp_enqueue_style( 'style-main', get_stylesheet_directory_uri() . '/style.css', null, '1.0.0' );\n\t\twp_enqueue_style( 'prettyPhoto-style', get_template_directory_uri() . '/css/prettyPhoto.css', null, '3.1.4', 'all ');\n\t\twp_enqueue_style( 'owlcarousel-style', get_template_directory_uri() . '/css/owl.carousel.css' );\n\t\twp_enqueue_style( 'elastislide-style', get_template_directory_uri() . '/css/elastislide.css', null, '1.0.0', 'all' );\n\t\twp_enqueue_style( 'isotope-style', get_template_directory_uri() . '/css/isotope.css', null, '1.5.25' );\n\t\twp_enqueue_style( 'bootstrap-override', get_template_directory_uri() . '/css/bootstrap-override.css', null, '1.0.0' );\n\t\twp_enqueue_style( 'rev-custom-style', get_template_directory_uri() . '/css/rev-custom.css', null, '1.0.0', 'all' );\n\t\twp_enqueue_style( 'responsive', get_template_directory_uri() . '/css/responsive.css', null, '1.0.0', 'all' );\n\t\t\n\t\t\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\t\t\n\t\t// To disable responsiveness\n\t\twp_register_style( 'bootstrap-nonrs-style', get_template_directory_uri() . '/css/non-responsive.css', null, '1.0.0', 'all' );\n\t\tglobal $smof_data;\n\t\tif( $smof_data['tcsn_layout_responsive'] == 0 ) {\n\t\t\twp_enqueue_style( 'bootstrap-nonrs-style' );\n\t\t}\n}", "function theme_scripts_and_styles() {\n if (!is_admin()) {\n global $wp_scripts;\n wp_deregister_script('jquery');\n foreach($wp_scripts->registered as $handle => $script) {\n $wp_scripts->add_data($handle, 'group', 1);\n }\n\n theme_scripts::register();\n theme_styles::register();\n\n // comment reply script for threaded comments\n if ( is_singular() && comments_open() && (get_option('thread_comments') == 1)) {\n wp_enqueue_script('comment-reply');\n }\n\n theme_styles::enqueue();\n theme_scripts::enqueue();\n }\n}", "function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\n }", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "function addThemeScripts() \n {\n wp_enqueue_script('constructor-theme', CONSTRUCTOR_DIRECTORY_URI.'/js/ready.js', array('jquery'));\n }", "public function adminThemeStylesAndScripts()\n {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.admin.min.css', array());\n wp_enqueue_style('my-admin-theme', get_template_directory_uri() . '/includes/snv/Theme/admin/style.css');\n wp_enqueue_script('my-admin-script', get_template_directory_uri() . '/includes/snv/Theme/admin/script.js', array('jquery'), '1.0', true);\n\n // for the contactonfo page\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_style('thickbox');\n }", "public function setup_theme()\n {\n }", "function artistpress_scripts() {\n\t\twp_enqueue_style( 'reset', get_template_directory_uri() . '/css/reset.css', array(), '2.0' );\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7' );\n\t\twp_enqueue_style( 'main_style', get_template_directory_uri() . '/style.css' );\n\t\twp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3', true );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );\n\t\twp_register_script( 'load', get_template_directory_uri() . '/js/load.js' );\n\n\t\t//localize params for use in load.js\n\t\t$theme_params = array(\n\t\t 'backround_image' => get_option('backround_image'),\n\t\t 'action_url' => get_option('action_url'),\n\t\t);\n\n\t\twp_localize_script( 'load', 'themeParams', $theme_params );\n\n\t\twp_enqueue_script( 'load', get_template_directory_uri() . '/js/load.js', array( 'jquery' ,'bootstrap'), '1', true );\n\t}", "function wt_scripts() {\n\twp_enqueue_style( 'vue-writing-theme-pacifico', 'https://fonts.googleapis.com/css?family=Pacifico', '', null );\n\twp_enqueue_style( 'vue-writing-theme-montserrat', 'https://fonts.googleapis.com/css?family=Montserrat', '', null );\n\twp_enqueue_style( 'vue-writing-theme-styles', get_stylesheet_uri() );\n\n wp_enqueue_script('vue-writing-theme-general',\n get_template_directory_uri() . '/dist/build.js',\n array('jquery'),\n time(),\n true );\n\n\n // wp_localize_script( 'vue-writing-theme-general', 'sitedata', array(\n // 'rest_url' => esc_url_raw( rest_url('wp/v2/' ) ),\n // \t\t)\n // ;\n\n}", "function health_access2017_scripts() {\n\t// theme style.css file\n\t// wp_enqueue_style( 'google-fonts', 'http://fonts.googleapis.com/css?family=Lato:400,700,900', false ); \n\twp_enqueue_style( 'health-access2017-style', get_stylesheet_uri() );\n\n\t//enqueue additional stylesheet for custom css to be added in addition to theme css\n\twp_enqueue_style( 'additional-styles', get_stylesheet_directory_uri() . '/custom.css' );\n\t\n\t// threaded comments\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\t// vendor scripts\n//\twp_enqueue_script(\n//\t\t'vendor',\n//\t\tget_template_directory_uri() . '/assets/vendor/newscript.js',\n//\t\tarray('jquery')\n//\t);\n\t// theme scripts\n\twp_enqueue_script(\n\t\t'theme-init',\n\t\tget_template_directory_uri() . '/assets/theme.js',\n\t\tarray('jquery')\n\t);\n}", "function karmic_scripts() {\n // Get the theme data.\n $the_theme = wp_get_theme();\n $theme_version = $the_theme->get( 'Version' );\n \n $css_version = $theme_version . '.' . filemtime( KARMIC_THEMEROOT . '/assets/css/main.min.css' );\n wp_enqueue_style( 'karmic-styles', KARMIC_THEME_DIR . '/assets/css/main.min.css', array(), $css_version );\n \n wp_deregister_script( 'jquery' );\n \n $js_version = $theme_version . '.' . filemtime( KARMIC_THEMEROOT . '/assets/js/main.min.js' );\n wp_enqueue_script( 'jquery', 'https://code.jquery.com/jquery-3.4.1.min.js', '', '3.4.1', true );\n wp_enqueue_script( 'karmic-scripts', KARMIC_THEME_DIR . '/assets/js/main.min.js', array(), $js_version, true );\n wp_enqueue_script( 'vendor-scripts', KARMIC_THEME_DIR . '/assets/js/vendors.min.js', array(), $js_version, true );\n wp_enqueue_script( 'fontawesome', KARMIC_THEME_DIR . '/assets/js/all.min.js', array(), '5.11.2', true );\n \n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n }", "public function wp_enqueue_scripts() {\n wp_enqueue_style('normalize', get_template_directory_uri() .\n '/normalize.css', array(), '8.0.1');\n wp_enqueue_style('theme-css', get_stylesheet_uri(),\n array(), '1.0');\n wp_enqueue_script('jquery');\n }", "function scripts_styles() {\n\n\t\t// No need to process if in admin.\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$main_css_url = $theme_url . '/style.css';\n\t\t$main_css_path = get_template_directory() . '/style.css';\n\t\t$main_css_ver = file_exists( $main_css_path ) ? filemtime( $main_css_path ) : '';\n\n\t\twp_enqueue_style( 'superiocity-style', $main_css_url, null, $main_css_ver );\n\t\twp_deregister_script( 'wp-embed' );\n\t}", "function load_theme_scripts() {\n\n // UCITAJ GOOGLE FONTOVE\n wp_enqueue_style( 'material-icons', 'http://fonts.googleapis.com/icon?family=Material+Icons');\n wp_enqueue_style( 'dosis-font', 'https://fonts.googleapis.com/css?family=Dosis:400,700&subset=latin,latin-ext');\n\n // UCITAJ CSS STILOVE\n // Dodaj Bootstrap 3 CSS >> Bootstrap framework CSS\n wp_enqueue_style( 'materialize', get_template_directory_uri() .'/css/materialize.css');\n\n // Dodaj SWIPER CSS\n wp_enqueue_style( 'swiper', get_template_directory_uri() .'/css/swiper/swiper.min.css');\n\n // Dodaj glavni Style CSS\n wp_enqueue_style( 'xception', get_stylesheet_uri() );\n\n // UCITAJ JAVASKRIPTE\n // Dodaj JQuery 1.11.3 JS\n wp_enqueue_script( 'theme-jquery', 'https://code.jquery.com/jquery-2.1.1.min.js', array(), '', true);\n\n // Dodaj Masonry\n wp_enqueue_script('masonry-js', get_template_directory_uri() .'/js/masonry/masonry.pkgd.min.js', array(),'theme-jquery', true);\n\n // Dodaj Materialize JS\n wp_enqueue_script('materialize-js', get_template_directory_uri() .'/js/materialize/materialize.min.js', array(),'theme-jquery', true);\n\n // Dodaj CLASSIE JS\n wp_enqueue_script( 'classie-js', get_template_directory_uri() .'/js/classie/classie.js', array(), 'theme-jquery', true);\n\n // Dodaj SWIPER JS\n wp_enqueue_script('swiper-js', get_template_directory_uri() .'/js/swiper/swiper.min.js', array(),'theme-jquery', true);\n\n // Add theme JS file\n wp_enqueue_script('xception-js', get_template_directory_uri() .'/js/theme.js', array(),'theme-jquery', true);\n\n }", "function enqueue_scripts() {\n\n\t\t//$the_theme = wp_get_theme();\n\t\t// Get the custom theme data.\n\t\twp_enqueue_style( 'styles', get_stylesheet_directory_uri() . '/css/screen.css', array(), '2.2.2' );\n\t\twp_enqueue_style( 'webfonts' , 'https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:ital,wght@0,300;0,700;1,300&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap', array(), false);\n\n\t\t//wp_enqueue_script( 'jquery-last', get_template_directory_uri() . '/vendor/js/jquery-3.2.1.min.js', array(), '', true);\n\t\twp_enqueue_script( 'jquery-fancybox', get_template_directory_uri() . '/vendor/js/jquery.fancybox.min.js', array(), '', true);\n\t\twp_enqueue_script( 'swiper', get_template_directory_uri() . '/vendor/js/swiper.min.js', array(), '', true);\n\n\t\twp_enqueue_script( 'theme-scripts', get_template_directory_uri() . '/js/app.min.js', array('jquery', 'jquery-fancybox', 'swiper'), '2.0.1', true );\n\n\t\twp_localize_script( 'theme-scripts', 'config', array(\n\t\t\t'ajax_url'\t=>\tadmin_url('admin-ajax.php'),\n\t\t\t'site_url'\t=>\tget_bloginfo( 'url' ),\n\t\t\t'theme_url'\t=>\tget_bloginfo( 'template_url' ),\n\t\t));\n\n\t}", "function themeslug_enqueue_script() {\n}", "function theme_name_scripts() {\n\t\t// wp_enqueue_style( 'style-name', get_stylesheet_uri() );\n\t\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'retina.min', get_template_directory_uri() . '/js/retina.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'isotope.pkgd.min', get_template_directory_uri() . '/js/isotope.pkgd.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.magnific-popup.min', get_template_directory_uri() . '/js/jquery.magnific-popup.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.mousewheel.min', get_template_directory_uri() . '/js/jquery.mousewheel.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.tinycarousel.min', get_template_directory_uri() . '/js/jquery.tinycarousel.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.lazylinepainter.min.js', get_template_directory_uri() . '/js/jquery.lazylinepainter.min.js', array(), '1.0.0', true );\n\t\tif ( is_page( 'contact' ) ){ wp_enqueue_script( 'jquery.gmap.min', get_template_directory_uri() . '/js/jquery.gmap.min.js', array(), '1.0.0', true ); }\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array(), '1.0.0', true );\n\t}", "function elytra_scripts() {\n\n\t// Theme stylesheet.\n\twp_enqueue_style( 'elytra-style', get_stylesheet_uri() );\n\n}", "function wptheme_scripts() {\n wp_enqueue_style( 'wptheme-style-xlarge', get_template_directory_uri().\"/css/skel.css\" );\n wp_enqueue_style( 'wptheme-style-default', get_template_directory_uri().\"/css/style-default.css\" );\n wp_enqueue_style( 'wptheme-style-default', get_template_directory_uri().\"/css/style-xlarge.css\" );\n wp_enqueue_style( 'wptheme-style', get_stylesheet_uri() );\n\n // for ie 8\n if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT'])){\n wp_enqueue_script('wptheme-ie8-style', get_template_directory_uri().\"/css/ie/html5shiv.js\");\n wp_enqueue_style('wptheme-style', get_stylesheet_uri().\"css/ie/v8.css\");\n }\n\n wp_enqueue_script(\"jquery\");\n wp_enqueue_script(\"wptheme-poptrox-js\",get_template_directory_uri().\"/js/jquery.poptrox.min.js\",array(\"jquery\"),\"1.0\", true);\n wp_enqueue_script(\"wptheme-skel-js\",get_template_directory_uri().\"/js/skel.min.js\",array(\"jquery\"),\"1.0\", true);\n wp_enqueue_script(\"wptheme-init-js\",get_template_directory_uri().\"/js/init\",array(\"jquery\", \"wptheme-skel-js\"),\"1.0\", true);\n}", "function gwself_scripts() {\n\tglobal $post;\n\t//default script - needed everywhere\n\twp_enqueue_script( 'theme-jquery', get_template_directory_uri() . '/dist/js/theme.js', array('jquery'), 20190529, true);\n\twp_localize_script('theme-jquery', 'WPURLS', array('siteurl' => get_option('siteurl')));\n\t//header, footer, global css\n\twp_enqueue_style( 'theme-style', get_template_directory_uri() . '/dist/css/theme.css', array(), date(\"H:i:s\"));\n\n\t//section specific styles and scripts\n\tif(is_front_page()) {\n\t\t//FRONT PAGE SCRIPTS\n\t\twp_enqueue_script( 'fp-script', get_template_directory_uri() . '/dist/js/frontpage.js', array('jquery'), 20190529, true);\n\t\twp_enqueue_style( 'frontpage-style', get_template_directory_uri() . '/dist/css/frontpage.css', array(), date(\"H:i:s\"));\n\t} elseif(is_singular()) {\n\t\t$type = $post->post_type;\n\t\twp_enqueue_style( $type.'-style', get_template_directory_uri() . '/dist/css/type_'.$type.'.css', array(), date(\"H:i:s\"));\n\t} else {\n\t\twp_enqueue_style( 'page-style', get_template_directory_uri() . '/dist/css/type_page.css', array(), date(\"H:i:s\"));\n\t}\n}", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function add_theme_scripts() {\n\n wp_enqueue_style( 'style', get_stylesheet_uri());\n wp_enqueue_style( 'font-awesome-css', get_template_directory_uri().'/stylesheets/font-awesome.min.css'); \n wp_enqueue_style( 'bootstrap-css', get_template_directory_uri().'/stylesheets/bootstrap.min.css'); \n wp_enqueue_style( 'carousel-css', get_template_directory_uri().'/stylesheets/owl.carousel.css'); \n wp_enqueue_style( 'mmenu-css', get_template_directory_uri().'/stylesheets/jquery.mmenu.all.css');\n wp_enqueue_style( 'global-css', get_template_directory_uri().'/stylesheets/global.css');\n wp_enqueue_style( 'device-css', get_template_directory_uri().'/stylesheets/device.css');\n \n //js\n //wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'jquery-lib-js', get_template_directory_uri().'/javascripts/jquery-3.2.1.min.js');\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri().'/javascripts/bootstrap.min.js');\n wp_enqueue_script( 'mmenu-js', get_template_directory_uri().'/javascripts/jquery.mmenu.min.all.js');\n wp_enqueue_script( 'carousel-js', get_template_directory_uri().'/javascripts/owl.carousel.js');\n //wp_enqueue_script( 'masonry-js', get_template_directory_uri().'/javascripts/masonry.pkgd.min.js');\n wp_enqueue_script( 'global-js', get_template_directory_uri().'/javascripts/global.js');\n \n}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "function massively_theme_assets() {\n\n\t\t$var = '1.0.0';\n\n\t\t/* CSS */\n\t\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), '', $var );\n\t\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), '', $var );\n\t\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\n\n\t\t/* JavaScripts */\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), '', $var );\n\t\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), '', $var );\n\t\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), '', $var );\n\t\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), '', $var );\n\t\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), '', $var );\n\t\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\n\t}", "public function theme_scripts()\n\t{\n\t\t\n\n\t\t$user_id = get_current_user_id();\n\n\t\twp_enqueue_script(\n\t\t\t'theme',\n\t\t\tTHEME_URL . '/assets/js/theme.js',\n\t\t\t[],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'react-script',\n\t\t\tTHEME_URL . '/assets/js/react-main.js',\n\t\t\t[],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\n\t\t//$bannerImage = get_field('banner_image', 'option');\n\t\t//$welcomeContent = get_field('welcome_text', 'option');\n\n\t\t$banner = array(\n\t\t\t'title' => __('Search Page', 'freshportfolio'),\n\t\t\t'image' => $bannerImage,\n\t\t);\n\n\t\t$welcome = array(\n\t\t\t'title' => __('Welcome', 'freshportfolio'),\n\t\t\t'content' => $welcomeContent,\n\t\t);\n\n\t\t$filter = array(\n\t\t\t'title' => __('Search for', 'freshportfolio'),\n\t\t\t'placeholder' => __('Type keywords here...', 'freshportfolio'),\n\t\t\t'sorting' => array(\n\t\t\t\t'name' => __('Name', 'freshportfolio'),\n\t\t\t\t'time' => __('Date', 'freshportfolio'),\n\t\t\t),\n\t\t);\n\n\t\t// user data\n\t\t// 1. avatar\n\t\t// 2. displayname\n\t\t// 3. first login\n\t\t$user \t\t\t= get_user_by('id', $user_id);\n\t\t$avatar_url \t= get_avatar_url($user_id);\n\t\t$display_name = $user->display_name;\n\n\t\t$is_first_login = get_user_meta($user_id, 'first_login', true);\n\n\t\twp_localize_script('theme', 'SITE_OPTIONS', array(\n\t\t\t'siteURL' => site_url(),\n\t\t\t'ajaxURL' => admin_url('admin-ajax.php'),\n\t\t\t'themeURL' => THEME_URL,\n\t\t));\n\n\t\twp_localize_script('theme', 'SITE_AJAX', array(\n\t\t\t'hideWelcome' => array(\n\t\t\t\t'action' => 'hide_welcome',\n\t\t\t\t'nonce' => wp_create_nonce('HideWelcome'),\n\t\t\t),\n\t\t));\n\n\t\twp_localize_script('theme', 'SITE_DATA', array(\n\t\t\t'banner' => $banner,\n\t\t\t'welcome' => $welcome,\n\t\t\t'filter' => $filter,\n\t\t\t'first_login' => $is_first_login,\n\t\t\t'user_data' => array(\n\t\t\t\t'avatar' => $avatar_url,\n\t\t\t\t'display_name' => $display_name,\n\t\t\t)\n\t\t));\n\t}", "function theme_name_scripts() {\r\n //wp_enqueue_style( 'fonts', '//cloud.webtype.com/css/1b7cfdf0-9828-4ed8-b99b-ccab8b975185.css');\r\n\twp_enqueue_style( 'fonts', '//fast.fonts.net/cssapi/e64835e4-ce1a-486d-8414-bc9d3ec7ae11.css');\r\n\twp_enqueue_style( 'main-style', get_stylesheet_uri(), array(), strval(filemtime(get_template_directory().\"/style.css\")) );\r\n\twp_enqueue_script( 'main-script', get_template_directory_uri() . '/script.js', array('jquery'), '1.0.0', true );\r\n\twp_enqueue_script( 'touchswipe', get_template_directory_uri() . '/inc/jquery.touchSwipe.min.js', array('jquery'), '1.0.0', true );\r\n}", "function theme_setup_scripts() {\n wp_enqueue_script(\"main\", get_theme_file_uri('/assets/js/script.js'), NULL, '1.0', true);\n wp_register_style('styles', get_template_directory_uri() . '/assets/css/style.css', array(), 'microtime()', 'all');\n wp_enqueue_style('styles'); // Enqueue it!\n // --> Change microtime to version number (for example '1.1') before release!\n\n //Bootstrap\n wp_enqueue_style(\"bootstrap-stylesheet\", 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css');\n wp_enqueue_script(\"jquery\", 'https://code.jquery.com/jquery-3.5.1.min.js');\n wp_enqueue_script(\"jquery-form-plugin\", 'https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js');\n wp_enqueue_script(\"bootstrap-popper\", 'https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js');\n wp_enqueue_script(\"bootstrap-js\", 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js');\n\n}", "function linolakestheme_scripts_setup() {\n\t\twp_enqueue_style( 'linolakes-bootstrap-css', get_template_directory_uri() . '/lib/bootstrap/css/bootstrap.min.css', array( ), current_time( 'mysql' ), 'all' );\n\t\twp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/lib/bootstrap/css/font-awesome.min.css', array( ), current_time( 'mysql' ), 'all' );\n\t\t \n\t\t// Loads our main stylesheet.\n\t\twp_enqueue_style( 'flat_responsive-style', get_stylesheet_uri(), array(), current_time( 'mysql' ) );\n\t\t\n\t\t// Loads our scripts.\t \n\t\twp_enqueue_script('linolakes-bootstrap-js', get_template_directory_uri() . '/lib/bootstrap/js/bootstrap.min.js', array('jquery'), current_time( 'mysql' ), true);\n\t\twp_enqueue_script('linolakes-jquery-js', get_template_directory_uri() . '/lib/bootstrap/js/jquery.min.js', array('jquery'), current_time( 'mysql' ), true);\n\t\t\t\t\n\t}", "function register_theme_js_styles(){\n wp_register_script('global', get_template_directory_uri() . '/js/global.js', array('jquery'), false, true);\n\n wp_register_style('theme-styles', get_template_directory_uri() . '/style.css');\n wp_enqueue_style('theme-styles');\n\n wp_register_style('blocks', get_template_directory_uri() . '/blocks.css');\n wp_enqueue_style('blocks');\n\n wp_enqueue_script('jquery');\n wp_enqueue_script('global');\n //enqueue_slick();\n enqueue_lightbox();\n}", "function scripts(){\n wp_register_style('style',get_template_directory_uri() . '/assets/css/style.css',[],1,'all');\n wp_enqueue_style('style');\n wp_enqueue_style('custom-google-font','//fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');\n wp_register_script('app',get_template_directory_uri() . '/assets/js/app.js',[],1,true);\n wp_enqueue_script('app');\n}", "function fp_scripts_styles () {\n\t\n\t/*\tjs */\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.min.js', array(), null, true);\n\twp_enqueue_script('foundation');\n\t\n\t/*\tcss\t */\n\twp_register_style('foundation', get_template_directory_uri() . '/css/foundation.min.css', array(), null, 'all');\n\twp_enqueue_style('foundation');\n\n\t/* load our global stylesheet conditionally */\n\tif (is_child_theme) {\n\t\twp_register_style('global', get_stylesheet_directory_uri() . '/style.css', array(), null, 'screen');\n\t} else {\n\t\twp_register_style('global', get_template_directory_uri() . '/style.css', array(), null, 'screen');\n\t}\n\twp_enqueue_style('global');\n}", "public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}", "function rt_theme_styles(){\n\t/**\n\t priemrio o nome\n\t segundo o diretorio\n\t*/\n\twp_enqueue_style('bootstrap-css', get_template_directory_uri() . '/vendor/bootstrap/css/bootstrap.min.css?ver=1');\n\twp_enqueue_style('clean-blog', get_template_directory_uri() . '/css/clean-blog.css?ver=1');\n\twp_enqueue_style('font-awesome', get_template_directory_uri() . '/vendor/font-awesome/css/font-awesome.min.css');\n\n\t// FONTES\n\twp_enqueue_style('google-font-lora', 'https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic');\n\twp_enqueue_style('google-font-open-sans', 'https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800');\n\n\t// SCRIPTS\n\n\twp_enqueue_script('theme-jquery', get_template_directory_uri() . '/vendor/jquery/jquery.min.js');\n\twp_enqueue_script('theme-js', get_template_directory_uri() . '/vendor/jquery/jquery.js', array('jquery'), '', true);\n\t\n\twp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/vendor/bootstrap/js/bootstrap.bundle.min.js');\n\twp_enqueue_script('clean-blog-js', get_template_directory_uri() . '/js/clean-blog.min.js');\n\t\n}", "function theme_styles_scripts() {\n wp_enqueue_style('theme-style', get_template_directory_uri() . '/style.css');\n wp_enqueue_script('app-main', get_template_directory_uri() . '/app.bundle.js', null, null, true);\n}", "public function theme()\n {\n }", "function pwrstudio_template_scripts() {\n\n // Enque font style file\n // wp_enqueue_style( 'univers_light', get_template_directory_uri() . '/fonts/UniversLTCYR-45Light.css');\n wp_enqueue_style( 'pwrstudio_template-style', get_template_directory_uri() . '/style.css');\n\n if (!is_admin()) {\n\n wp_deregister_script('jquery');\n\n wp_register_script( 'pwr_scripts', get_template_directory_uri() . '/app.min.js', false, '1', true);\n wp_enqueue_script('pwr_scripts');\n\n }\n\n}", "function wpdocs_theme_name_scripts() {\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/libs/bootstrap/js/bootstrap.min.js', array(), '1.0.0', true );\n wp_enqueue_script( 'magnific-popup', get_template_directory_uri() . '/libs/magnific/jquery.magnific-popup.min.js', array(), '1.0.0', true );\n wp_enqueue_script( 'owl', get_template_directory_uri() . '/libs/owlcarousel/owl.carousel.min.js', array(), '1.0.0', true );\n wp_enqueue_script( 'isotope', get_template_directory_uri() . '/libs/isotope.pkgd.min.js', array(), '1.0.0', true );\n wp_enqueue_script( 'imagesloaded', get_template_directory_uri() . '/libs/imagesloaded.pkgd.min.js', array(), '1.0.0', true );\n wp_enqueue_script( 'commonn', get_template_directory_uri() . '/js/common.js', array(), '1.0.0', true );\n\n\n\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/libs/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style('magnific-popup', get_template_directory_uri() . '/libs/magnific/magnific-popup.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/libs/font-awesome/css/font-awesome.min.css');\n wp_enqueue_style('owl.carousel', get_template_directory_uri() . '/libs/owlcarousel/assets/owl.carousel.min.css');\n wp_enqueue_style('owl.theme', get_template_directory_uri() . '/libs/owlcarousel/assets/owl.theme.default.min.css');\n wp_enqueue_style('mun_animate', get_template_directory_uri() . '/css/animate.css');\n wp_enqueue_style('mun_font', get_template_directory_uri() . '/css/font.css');\n wp_enqueue_style('mun_style', get_template_directory_uri() . '/css/style.css');\n wp_enqueue_style('mun_media', get_template_directory_uri() . '/css/media.css');\n wp_enqueue_style('mun_override', get_template_directory_uri() . '/css/override.css');\n\n}", "function basetheme_scripts() {\n\n //DEREGISTER SCRIPTS\n wp_deregister_script('jquery');\n wp_deregister_script( 'wp-embed' );\n\n\twp_enqueue_style( 'basetheme-style', get_stylesheet_uri() );\n\n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/assets/js/vendor/jquery/jquery-3.5.1.min.js' );\n\twp_enqueue_script( 'basetheme-scripts', get_template_directory_uri() . '/assets/js/app.js' );\n\n\n $datatoBePassed = array (\n 'isHome' => is_home()? 'true' : 'false',\n 'theme_dir' => get_template_directory_uri()\n );\n\n wp_localize_script( 'basetheme-scripts', 'PHPVARS', $datatoBePassed );\n\n}", "function mystartertheme_scripts() {\n\t// wp_enqueue_script( 'mystartertheme-navigation', get_template_directory_uri() . '/dist/js/navigation.js', array(), '20151215', true );\n\t// wp_enqueue_script( 'mystartertheme-skip-link-focus-fix', get_template_directory_uri() . '/dist/js/skip-link-focus-fix.js', array(), '20151215', true );\n\twp_enqueue_script( 'mystartertheme-main', get_template_directory_uri() . '/dist/js/main.js', array(), '20151215', true );\n\t\n\tif (is_user_logged_in() ) {\n\t\t// wp_enqueue_script( 'mystartertheme-admin', get_template_directory_uri() . '/dist/js/admin.js', array(), '20151215', true );\n\t\twp_enqueue_style( 'mystartertheme-admin-style', get_template_directory_uri() . '/dist/css/admin.css' );\n\t}\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function add_theme_scripts_styles_func() {\n//\tscripts\n\twp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-3.5.0.min.js', array(), false, true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('jquery-theme', get_template_directory_uri() . '/assets/js/vendor/jquery-1.12.4.min.js', array(), false, true);\n\twp_enqueue_script('jquery-theme');\n\twp_register_script('popper', get_template_directory_uri() . '/assets/js/popper.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('popper');\n\twp_register_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('bootstrap');\n\twp_register_script('jquery-slicknav', get_template_directory_uri() . '/assets/js/jquery.slicknav.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('jquery-slicknav');\n\twp_register_script('owl-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('owl-carousel');\n\twp_register_script('slick', get_template_directory_uri() . '/assets/js/slick.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('slick');\n\twp_register_script('wow', get_template_directory_uri() . '/assets/js/wow.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('wow');\n\twp_register_script('animated', get_template_directory_uri() . '/assets/js/animated.headline.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('animated');\n\twp_register_script('magnific-popup', get_template_directory_uri() . '/assets/js/jquery.magnific-popup.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('magnific-popup');\n\twp_register_script('scrollUp', get_template_directory_uri() . '/assets/js/jquery.scrollUp.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('scrollUp');\n\twp_register_script('nice-select', get_template_directory_uri() . '/assets/js/jquery.nice-select.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('nice-select');\n\twp_register_script('sticky', get_template_directory_uri() . '/assets/js/jquery.sticky.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('sticky');\n\twp_register_script('contact', get_template_directory_uri() . '/assets/js/contact.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('contact');\n\twp_register_script('mailsend', get_template_directory_uri() . '/assets/js/mailsend.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('mailsend');\n\twp_localize_script( 'mailsend', 'data',\n\t\tarray(\n\t\t\t'url' => admin_url('admin-ajax.php')\n\t\t)\n\t);\n\twp_register_script('form', get_template_directory_uri() . '/assets/js/jquery.form.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('form');\n\twp_register_script('validate', get_template_directory_uri() . '/assets/js/jquery.validate.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('validate');\n\twp_register_script('mail-script', get_template_directory_uri() . '/assets/js/mail-script.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('mail-script');\n\twp_register_script('ajaxchimp', get_template_directory_uri() . '/assets/js/jquery.ajaxchimp.min.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('ajaxchimp');\n\twp_register_script('plugins', get_template_directory_uri() . '/assets/js/plugins.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('plugins');\n\twp_register_script('main', get_template_directory_uri() . '/assets/js/main.js', array('jquery-theme'), false, true);\n\twp_enqueue_script('main');\n//\tstyles\n\twp_register_style('bootstrap-style', get_template_directory_uri() . '/assets/css/bootstrap.min.css');\n\twp_enqueue_style('bootstrap-style');\n\twp_register_style('owl-carousel', get_template_directory_uri() . '/assets/css/owl.carousel.min.css');\n\twp_enqueue_style('owl-carousel');\n\twp_register_style('flaticon', get_template_directory_uri() . '/assets/css/flaticon.css');\n\twp_enqueue_style('flaticon');\n\twp_register_style('slicknav', get_template_directory_uri() . '/assets/css/slicknav.css');\n\twp_enqueue_style('slicknav');\n\twp_register_style('animate', get_template_directory_uri() . '/assets/css/animate.min.css');\n\twp_enqueue_style('animate');\n\twp_register_style('magnific-popup', get_template_directory_uri() . '/assets/css/magnific-popup.css');\n\twp_enqueue_style('magnific-popup');\n\twp_register_style('fontawesome-all', get_template_directory_uri() . '/assets/css/fontawesome-all.min.css');\n\twp_enqueue_style('fontawesome-all');\n\twp_register_style('themify-icons', get_template_directory_uri() . '/assets/css/themify-icons.css');\n\twp_enqueue_style('themify-icons');\n\twp_register_style('slick', get_template_directory_uri() . '/assets/css/slick.css');\n\twp_enqueue_style('slick');\n\twp_register_style('nice-select', get_template_directory_uri() . '/assets/css/nice-select.css');\n\twp_enqueue_style('nice-select');\n\twp_register_style('style', get_template_directory_uri() . '/assets/css/style.css');\n\twp_enqueue_style('style');\n}", "function thrive_theme_pack_scripts() {\n\n wp_register_style( 'thrive-theme-pack-stylesheet', plugins_url( '/assets/css/themepack.css', __FILE__ ), array( 'thrive-style' ), '1.0' );\n wp_enqueue_style( 'thrive-theme-pack-stylesheet' );\n\n\treturn;\n}", "function vacatures_single_style_scripts() {\n //wp_enqueue_style( 'vacatures-single-page-template-theme-style' );\n wp_enqueue_style('vacatures-single-page-template-theme-style',content_url( 'templates/assets/css/vacatures-single-page-template-theme-style.css' , __FILE__ ) );\n}", "function load_dev_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dev/style.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dev/header.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dev/footer.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dev/single.js', array( 'jquery' ), null, true );\n }\n}", "function theme_scripts()\r\n{\r\n // Load Bootstrap\r\n\twp_enqueue_style( 'theme-bootstrap', get_theme_file_uri( '/assets/vendor/bootstrap/css/bootstrap.min.css' ));\r\n\t// Load Font-Awesome\r\n\twp_enqueue_style( 'theme-fontawesome', get_theme_file_uri( '/assets/vendor/font-awesome/css/all.min.css' ));\r\n // Theme stylesheet.\r\n\twp_enqueue_style( 'theme-style', get_stylesheet_uri() );\r\n}", "function aurum_wp_enqueue_scripts() {\n\t// Styles\n\t$rtl_include = '';\n\n\twp_enqueue_style( 'icons-entypo' );\n\twp_enqueue_style( 'icons-fontawesome' );\n\twp_enqueue_style( 'bootstrap' );\n\twp_enqueue_style( 'aurum-main' );\n\t\n\tif ( ! is_child_theme() ) {\n\t\twp_enqueue_style( 'style' );\n\t}\n\n\t// Right to left bootstrap\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( array( 'bootstrap-rtl' ) );\n\t}\t\n\n\t// Custom Skin\n\tif ( get_data( 'use_custom_skin' ) ) {\n\t\tif ( false == apply_filters( 'aurum_use_filebased_custom_skin', aurum_use_filebased_custom_skin() ) ) {\n\t\t\twp_enqueue_style( 'custom-skin', site_url( '?custom-skin=1' ), null, null );\n\t\t}\n\t}\n\n\t// Scripts\n\twp_enqueue_script( array( 'jquery', 'bootstrap', 'tweenmax' ) );\n}", "function scripts() {\n\twp_register_script(\n\t\t'bootstrap',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/bootstrap/dist/js/bootstrap.min.js\",\n\t\tarray( 'jquery' ),\n\t\tVINCENTRAGOSTA_COM_VERSION,\n\t\ttrue\n\t);\n\n\twp_enqueue_script(\n\t\t'vincentragosta_com',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/js/vincentragosta---twenty-seventeen.js\",\n\t\tarray( 'jquery', 'bootstrap' ),\n\t\tVINCENTRAGOSTA_COM_VERSION,\n\t\ttrue\n\t);\n\n\twp_localize_script( 'vincentragosta_com', 'themeUrl', VINCENTRAGOSTA_COM_TEMPLATE_URL );\n}", "function achilles_scripts() {\n\t\n\t//main stylesheet for now\n\twp_enqueue_style('achilles_style', get_template_directory_uri() . '/style.css', false, '1.0');\n\t\n\t//Foundations stylesheet\n\twp_register_style( 'achilles_main', get_template_directory_uri(). '/css/app.css', false, '1.0');\n\t\n\t\n\twp_enqueue_style( 'achilles_main' );\n\t\n\t//Load built in jQuery from WordPress \n\t// @TODO: Load jQuery from CDN or Google\n\twp_enqueue_script( 'jquery' );\n}", "function autodidact_theme_setup() {\n\n}", "function zanblog_scripts_styles() {\r\n // Add Bootstrap JavaScript file.\r\n wp_enqueue_script( 'bootstrap-script', get_template_directory_uri() . '/ui/js/bootstrap.js', array('jquery'), '3.0.0');\r\n\r\n // Add icheck JavaScript file for iffixed.\r\n wp_enqueue_script( 'icheck-script', get_template_directory_uri() . '/ui/js/jquery.icheck.js', array('jquery'));\r\n\r\n // Add zanblog JavaScript file.\r\n wp_enqueue_script( 'zanblog-script', get_template_directory_uri() . '/ui/js/zanblog.min.js', array('jquery'), '2.0.4');\r\n \r\n // Add custom JavaScript file.\r\n wp_enqueue_script( 'custom-script', get_template_directory_uri() . '/ui/js/custom.js', array('jquery'), '2.0.4');\r\n\r\n // Add zanblog main css.\r\n wp_enqueue_style( 'zanblog-style', get_stylesheet_uri(), array(), '2.0.4');\r\n\r\n // Add Bootstrap css.\r\n wp_enqueue_style( 'bootstrap-style', get_template_directory_uri() . '/ui/css/bootstrap.css', array(), '3.0.0');\r\n\r\n // Add FontAwesome css.\r\n wp_enqueue_style( 'fontawesome-style', get_template_directory_uri() . '/ui/css/font-awesome.min.css', array(), '3.2.1');\r\n\r\n // Add iCheck css.\r\n wp_enqueue_style( 'icheck-style', get_template_directory_uri() . '/ui/css/flat/red.css', array());\r\n\r\n // Add Custom css.\r\n wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/ui/css/custom.css', array(), '2.0.4');\r\n}", "function add_theme_scripts() {\r\n /* CSS */\r\n wp_enqueue_style( 'style', get_stylesheet_uri() );\r\n\r\n /* JS */\r\n wp_enqueue_script( 'fontawesome', 'https://kit.fontawesome.com/2ed38fdfce.js', array (), false, true);\r\n wp_enqueue_script( 'swup', 'https://unpkg.com/swup@latest/dist/swup.min.js', array (), false, true);\r\n wp_enqueue_script( 'canvas-background', get_template_directory_uri() . '/js/canvas-background.js', array (), false, true);\r\n wp_enqueue_script( 'sounds', get_template_directory_uri() . '/js/sounds.js', array (), false, true);\r\n wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array (), false, true);\r\n\r\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\r\n wp_enqueue_script( 'comment-reply' );\r\n }\r\n}", "function krypton_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );\n\t//wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.js');\n}", "function custom_theme_scripts() {\n\n // Bootstrap Integration\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\n //Main CSS\n wp_enqueue_style('main-styles', get_stylesheet_uri());\n\n //JS Files\n wp_enqueue_script('custom-js', get_template_directory_uri() . '/js/main.js');\n wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-3.4.1.min.js');\n wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js');\n\n }", "function register_theme_styles_and_scripts(){\n // Register style\n wp_enqueue_style( 'theme-icons', get_template_directory_uri(). '/css/icons.css', array(), '1.0.0', 'all' ); // Register font icons\n wp_enqueue_style( 'google_fonts', sunset_google_fonts_url(), array(), '1.0.0'); // Register Google fonts\n wp_enqueue_style( 'slick-style', get_template_directory_uri(). '/css/slick.css', array(), '1.9.0', 'all' ); // Register theme main style\n wp_enqueue_style( 'theme-main-style', get_template_directory_uri(). '/css/main.css', array(), '1.0.0', 'all' ); // Register theme main style\n\n // Register scripts\n wp_enqueue_script( 'jquery');\n wp_enqueue_script( 'slick-scripts', get_template_directory_uri(). '/js/slick.js', array('jquery'), '1.9.0', true );\n wp_enqueue_script( 'main-scripts', get_template_directory_uri(). '/js/main.js', array('jquery'), '1.0.0', true );\n }", "function estilos_scripts() { \n wp_enqueue_style('googlefonts', '//fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i|Yanone+Kaffeesatz:400,700', array(), '' , 'screen', false);\n wp_enqueue_style('fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '' , 'screen', false);\n wp_enqueue_style('layout', get_template_directory_uri() . '/css/layout.css', array(), '', 'all', null);\n\n wp_enqueue_script( 'canvas', get_template_directory_uri() . '/js/canvas.js', array('jquery'), '', true);\n wp_enqueue_script( 'bx', get_template_directory_uri() . '/js/bx.js', array('jquery'), '', true);\n wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array('bx'), '', true);\n}", "public function myScripts()\n {\n //wp_register_script('angularjs',plugins_url('bower_components/angular/angular.min.js', __FILE__));\n wp_enqueue_style('grimagecss', plugins_url('style.css', __FILE__));\n //wp_enqueue_script('grimagescripts',plugins_url('/app.js',__FILE__));\n }", "function frulape_basic_scripts() {\n\twp_enqueue_style( 'frulape_basic-style', get_stylesheet_uri() ); // wordpress styles\n\n\twp_enqueue_style( 'bootstrap-grid', get_template_directory_uri() . '/assets/css/bootstrap-grid.min.css' ); // custom styles\n\n\twp_enqueue_style( 'frulape_basic-custom_style', get_template_directory_uri() . '/assets/css/style.css', array('frulape_basic-style', 'bootstrap-grid'), '0.0.1' ); // custom styles\n\n\twp_enqueue_script( 'frulape_basic-navigation', get_template_directory_uri() . '/js/navigation.js', array('jquery'), '20151215', true );\n\n\twp_enqueue_script( 'frulape_basic-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "function pulcherrimum_scripts()\n {\n\n // Add custom fonts, used in the main stylesheet.\n wp_enqueue_style('pulcherrimum-fonts', pulcherrimum_fonts_url(), array(), null);\n\n // Theme stylesheet.\n wp_enqueue_style('pulcherrimum-style', get_stylesheet_uri(), array(), '20190507');\n\n // Bootstrap & Fonts\n wp_enqueue_script('jquery', get_theme_file_uri('/assets/js/jquery.js'), array( 'jquery' ), null, true);\n wp_enqueue_style('bootstrap-css', get_theme_file_uri('/assets/css/bootstrap.min.css'), array( 'pulcherrimum-style' ), '1.0.0', 'all');\n wp_enqueue_style('font-css', get_theme_file_uri('/assets/css/fonts.css'), array( 'pulcherrimum-fonts' ), null);\n wp_enqueue_script('bootstrap-js', get_theme_file_uri('/assets/js/bootstrap.bundle.min.js'), array( 'jquery' ), null, true);\n wp_enqueue_script('jquery-easing', get_theme_file_uri('/assets/js/jquery.easing.min.js'), array( 'jquery' ), null, true);\n wp_enqueue_script('main-js', get_theme_file_uri('/assets/js/main.js'), array( 'jquery' ), null, true);\n }", "function naked_scripts() { \n\n\t// get the theme directory style.css and link to it in the header\n\twp_enqueue_style('bootstrap', get_stylesheet_directory_uri() . '/styles/bootstrap.css');\n\t// wp_enqueue_style('theme', get_stylesheet_directory_uri() . '/styles/bootstrap-theme.css');\n\twp_enqueue_style('chocolat', get_stylesheet_directory_uri() . '/styles/chocolat.css');\n\twp_enqueue_style('owl', get_stylesheet_directory_uri() . '/styles/owl.carousel.css');\n\twp_enqueue_style('waves', get_stylesheet_directory_uri() . '/styles/waves.min.css');\n\twp_enqueue_style('style.css', get_stylesheet_directory_uri() . '/style.css');\n\twp_enqueue_style('accademia', get_stylesheet_directory_uri() . '/styles/accademia.css');\n\t\n\t// add fitvid\n\t// wp_enqueue_script( 'naked-fitvid', get_template_directory_uri() . '/js/jquery.fitvids.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'chocolat', get_template_directory_uri() . '/js/chocolat.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'owl', get_template_directory_uri() . '/js/owl.carousel.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'waves', get_template_directory_uri() . '/js/waves.min.js', array( 'jquery' ), NAKED_VERSION, true );\n\twp_enqueue_script( 'accademia', get_template_directory_uri() . '/js/accademia.js', array( 'jquery' ), NAKED_VERSION, true );\n\t\n\t// add theme scripts\n\t// wp_enqueue_script( 'naked', get_template_directory_uri() . '/js/theme.min.js', array(), NAKED_VERSION, true );\n \n}", "function wpstarter_scripts() {\n\n\t// Set a dynamic version for cache busting\n\t$theme = wp_get_theme();\n\t$version = $theme['Version'];\n\n\twp_enqueue_style( 'wpstarter-style', get_template_directory_uri() . '/dist/css/main.css' );\n\n\twp_enqueue_script( 'wpstarter-vendorjs', get_template_directory_uri() . '/dist/js/vendor.min.js', array(), $version, true );\n\n wp_enqueue_script( 'wpstarter-customjs', get_template_directory_uri() . '/dist/js/main.js', array(), $version, true );\n\n}", "function add_theme_scripts(){\n\twp_enqueue_style('style',get_stylesheet_uri());\n\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri().'/bootstrap/css/bootstrap.css',false,'1.1','all');\n\n\t/*\n\twp_enqueue_style( 'bootstrap-theme', get_template_directory_uri().'/bootstrap/css/bootstrap-theme.css',false,'1.1','all');\n\t*/\n\n\twp_enqueue_style( 'font-awesome', get_template_directory_uri().'/font-awesome/css/font-awesome.css',false,'1.1','all');\n\n\t//scripts\n\twp_enqueue_script( 'detectmobilebrowser', get_template_directory_uri().'/js/detectmobilebrowser.js', array ( 'jquery' ), 1.1, true);\n\twp_enqueue_script( 'jquery-1.11.1.min', get_template_directory_uri().'/js/jquery-1.11.1.min.js', array ( 'jquery' ), 1.1, true);\n\n\twp_enqueue_script( 'jquery.easing.1.3', get_template_directory_uri().'/js/jquery.easing.1.3.js', array ( 'jquery' ), 1.1, true);\n\n\twp_enqueue_script( 'bootstrap.min', get_template_directory_uri().'/bootstrap/js/bootstrap.min.js', array ( 'jquery' ), 1.1, true);\n\twp_enqueue_script( 'open-close-mobile-nav', get_template_directory_uri().'/js/open-close-mobile-nav.js', array ( 'jquery' ), 1.1, true);\n\n}", "function mastertimecenter_scripts(){\n wp_enqueue_style('mastertimecenter-style', get_stylesheet_uri());\n}", "function theme_assets() {\n\t// load css\n\twp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/css/fontawesome.css' );\n\twp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' );\n\twp_enqueue_style( 'style-css', get_template_directory_uri() . '/style.css', false, time() );\n\n\t// load javascript\n\twp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '', true );\n wp_enqueue_script( 'waterfall-js', get_template_directory_uri() . '/js/waterfall.js', array(), '', true );\n\twp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', array(), '', true);\n}", "public function set_script_styling(){\r\n /**\r\n * enqueue css styling here\r\n */\r\n wp_enqueue_style('before-after-comparison-styling', plugin_dir_url( __FILE__ ) . 'css/before-after.css', array(), '1.0');\r\n\r\n /**\r\n * enqueue custom js / javascript library here\r\n */\r\n wp_enqueue_script('before-after-comparison-javascript', plugin_dir_url( __FILE__ ) . 'js/before-after.js', array('jquery'), '1.0' , false);\r\n\r\n \r\n }", "public function scripts_styles_footer() {\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$fa_ver = '4.7.0';\n\t\t$fa_url = \"//maxcdn.bootstrapcdn.com/font-awesome/$fa_ver/css/font-awesome.min.css\";\n\t\t$main_js_url = $theme_url . '/js/main.min.js';\n\t\t$main_js_path = get_template_directory() . '/js/main.min.js';\n\t\t$main_js_ver = file_exists( $main_js_path ) ? filemtime( $main_js_path ) : '';\n\n\t\twp_enqueue_style( 'fa-style', $fa_url, null, $fa_ver );\n\t\twp_enqueue_style( 'gfont', 'https://fonts.googleapis.com/css?family=Handlee' );\n\t\twp_enqueue_script( 'superiocity-script', $main_js_url, null, $main_js_ver, true );\n\t}", "function theme_scripts() {\n\twp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/index.js', array( 'jquery' ), '20150330', true );\n\n}", "function wptheme_script_enqueue () {\n //CSS\n wp_enqueue_style('bootstrap', get_template_directory_uri() . 'css/bootstrap.min.css', array() , '3.3.6', 'all');\n wp_enqueue_style('customstyle', get_template_directory_uri() . 'css/style.css', array() , '1.0.0', 'all');\n //JS\n wp_enqueue_script('jquery');\n wp_enqueue_script('bootstrapjs', get_template_directory_uri() . 'js/bootstrap.min.js', array(), '3.3.6', true); \n wp_enqueue_script('customjs', get_template_directory_uri() . 'js/wptheme.js', array(), '1.0.0', true);\n}", "function nightsky_user_scripts( ) {\n // enque your own stuff here. CSS should be added to the array above.\n // enqueue a script.\n // wp_enqueue_script( 'id', get_template_directory_uri() . 'path',array('dependencies'), filemtime(get_stylesheet_directory() . 'path'), header_or_footer );\n}", "function nuthemes_scripts() {\n\t// Load Bootstrap stylesheet.\n\twp_enqueue_style( 'nu-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array() );\n\n\t// Add Genericons font, used in the main stylesheet.\n\twp_enqueue_style( 'nu-genericons', get_template_directory_uri() . '/css/genericons.css', array() );\n\n\t// Add Open Sans and Bitter fonts, used in the main stylesheet.\n\twp_enqueue_style( 'nu-fonts', nuthemes_fonts_url(), array(), '20131010' );\n\n\t// Loads our main stylesheet.\n\twp_enqueue_style( 'nu-style', get_stylesheet_uri(), array() );\n\n\t// Load Bootstrap JavaScript.\n\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );\n\n\t// Adds JavaScript to support threaded comments.\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function athemes_scripts() {\n\n\t//Load the fonts\n\t$headings_font = esc_html(get_theme_mod('headings_fonts'));\n\t$body_font = esc_html(get_theme_mod('body_fonts'));\n\tif( $headings_font ) {\n\t\twp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family='. $headings_font );\t\n\t} else {\n\t\twp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:200,300,400,700');\n\t}\t\n\tif( $body_font ) {\n\t\twp_enqueue_style( 'athemes-body-fonts', '//fonts.googleapis.com/css?family='. $body_font );\t\n\t}\n\n\twp_enqueue_style( 'athemes-glyphs', get_template_directory_uri() . '/css/athemes-glyphs.css' );\n\n\twp_enqueue_style( 'athemes-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\twp_enqueue_style( 'athemes-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'athemes-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-supersubs', get_template_directory_uri() . '/js/supersubs.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-settings', get_template_directory_uri() . '/js/settings.js', array( 'jquery' ) );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "function theme_scripts() {\n\n\n\t// Load the Internet Explorer specific stylesheet.\n\twp_enqueue_style( 'theme-ie', get_template_directory_uri() . '/css/ie.css', array( 'theme-style' ), '20141010' );\n\twp_style_add_data( 'theme-ie', 'conditional', 'lt IE 9' );\n\n\t// Load the Internet Explorer 7 specific stylesheet.\n\twp_enqueue_style( 'theme-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'theme-style' ), '20141010' );\n\twp_style_add_data( 'theme-ie7', 'conditional', 'lt IE 8' );\n \n wp_enqueue_style( 'font-1', 'https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700');\n \n \n wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n wp_enqueue_style( 'bootstrap-theme', get_template_directory_uri() . '/css/bootstrap-theme.min.css');\n wp_enqueue_style('animation', get_bloginfo(\"template_url\") . \"/css/animation.css\");\n wp_enqueue_style('jqueryui', \"https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css\");\n wp_enqueue_style( 'selectbox', get_template_directory_uri() . '/js/selectbox/css/jquery.selectbox.css');\n wp_enqueue_style( 'swiper', get_template_directory_uri() . '/css/swiper.min.css');\n wp_enqueue_style( 'lightbox', get_template_directory_uri() . '/css/lightbox.css');\n \n \n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n \n\n\n wp_deregister_script('jquery');\n wp_enqueue_script('jquery', \"http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js\");\n\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js');\n \n wp_enqueue_script('waypoints', get_bloginfo(\"template_url\") . \"/js/waypoints/jquery.waypoints.min.js\");\n \n wp_enqueue_script('imagesloaded', get_bloginfo(\"template_url\") . \"/js/imagesloaded/imagesloaded.pkgd.min.js\");\n \n wp_enqueue_script( 'mousewheel', get_template_directory_uri() . '/js/jquery.mousewheel-3.0.6.min.js');\n wp_enqueue_script( 'selectbox', get_template_directory_uri() . '/js/selectbox/js/jquery.selectbox-0.2.js');\n wp_enqueue_script( 'swiper', get_template_directory_uri() . '/js/swiper.min.js');\n wp_enqueue_script( 'script', get_template_directory_uri() . '/js/custom.js?v='.date('Ymdhis'));\n\t\n}", "function forty_theme_assets() {\r\n\r\n\t$var = '1.0.0';\r\n\r\n\t/* CSS */\r\n\twp_enqueue_style( 'font-awesome', get_theme_file_uri('/assets/css/font-awesome.min.css'), null, $var );\r\n\twp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Merriweather:300,700,300italic,700italic|Source+Sans+Pro:900', null, $var );\r\n\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), null, $var );\r\n\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), null, $var );\r\n\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\r\n\r\n\t/* JavaScripts */\r\n\twp_enqueue_script( 'jquery' );\r\n\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), null, $var );\r\n\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), null, $var );\r\n\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), null, $var );\r\n\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), null, $var );\r\n\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), null, $var );\r\n\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\r\n\twp_enqueue_script( 'bootstrap-js', get_theme_file_uri('/assets/js/bootstrap.js'), array('jquery'), $var, true );\r\n\r\n\tif( is_singular() && comments_open() && ( get_option( 'thread_comments' ) == 1) ) {\r\n // Load comment-reply.js (into footer)\r\n wp_enqueue_script( 'comment-reply', 'wp-includes/js/comment-reply', array(), false, true );\r\n }\r\n}", "function wpi_theme_js() {\n\n global $wp_scripts;\n\n wp_register_script('html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false);\n wp_register_script('respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false);\n\n $wp_scripts->add_data('html5_shiv', 'conditional', 'lt IE 9');\n $wp_scripts->add_data('respond_js', 'conditional', 'lt IE 9');\n/**\n * Load javascripts used by the theme\n */\n\n\n\n \n wp_enqueue_script('main_js', get_template_directory_uri(). '/js/main.js', array('jquery'), '', true);\n wp_enqueue_script('bootstrap_js', get_template_directory_uri(). '/js/bootstrap.min.js', array('jquery'), '', true);\n \n \n \n \n\n }", "public function scripts()\n\t{\n\n\t\twp_enqueue_script('jquery');\n\n\t\t// If using the regular comments of wordpress\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t\t//put modernizr as late as possible\n\t\twp_enqueue_script('bootstrap',DION_THEME_URL.'/assets/js/bootstrap.min.js');\n\t\twp_enqueue_script('owl-carousel',DION_THEME_URL.'/assets/js/owl.carousel.min.js');\n\t\twp_enqueue_script('darkmode','https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js');\n\t\twp_enqueue_script('main',DION_THEME_URL.'/assets/js/main.min.js');\n\t}", "function ncsu_theme_scripts() {\n wp_deregister_script('jquery');\n \n // Register jQuery again from Google's CDN\n wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), null, true);\n \n wp_register_script('ncsu-bootstrap', 'https://cdn.ncsu.edu/brand-assets/bootstrap/js/bootstrap.min.js', array('jquery'), null, true);\n wp_enqueue_script('ncsu-bootstrap');\n \n /** \n * Uncomment to enqueue individual scripts (development)\n *\n */\n \n /*\n wp_register_script('theme-main-js', get_template_directory_uri() . '/js/main.js', array('jquery'), null, true);\n wp_enqueue_script('theme-main-js');\n \n wp_register_script('wp-mobile-nav', get_template_directory_uri() . '/js/ncstate-mobile-nav.js', array('jquery'), null, true);\n wp_enqueue_script('wp-mobile-nav');\n \n wp_register_script('picture-fill', get_template_directory_uri(). '/js/picturefill.min.js');\n wp_enqueue_script('picture-fill');\n\n */\n \n /**\n * Use minified js in production environments - \n * Uncomment the lines below if using non-minified scripts\n *\n */\n \n wp_register_script('minified-js', get_template_directory_uri() . '/js/main.min.js', array('jquery'), null, true);\n wp_enqueue_script('minified-js');\n }", "function _appthemes_register_theme_scripts() {\n\n\t// Minimize prod or show expanded in dev.\n\t$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\trequire_once APP_THEME_FRAMEWORK_DIR . '/js/localization.php';\n\n\twp_register_script( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/jquery.colorbox{$min}.js\", array( 'jquery' ), '1.6.1' );\n\twp_register_style( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/colorbox{$min}.css\", false, '1.6.1' );\n\twp_register_style( 'font-awesome', APP_THEME_FRAMEWORK_URI . \"/lib/font-awesome/css/font-awesome{$min}.css\", false, '4.7.0' );\n\n\twp_register_script( 'footable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable{$min}.js\", array( 'jquery' ), '2.0.3' );\n\twp_register_script( 'footable-grid', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.grid{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-sort', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.sort{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-filter', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.filter{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-striping', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.striping{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-paginate', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.paginate{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-bookmarkable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.bookmarkable{$min}.js\", array( 'footable' ), '2.0.3' );\n\n\t_appthemes_localize_theme_scripts();\n}", "function theme_name_scripts() { \nwp_enqueue_style( 'dsoble_theme_css', get_template_directory_uri() . '/css/jquery-ui-1.10.4.custom.min.css',array(),'1.1','all');\nwp_enqueue_style( 'dsoble_theme_css_one', get_template_directory_uri() . '/dist/css/bootstrap.css',array(),'1.1','all');\nwp_enqueue_style( 'dsoble_theme_css_two', get_template_directory_uri() . '/dist/css/bootstrap-theme.css',array(),'1.1','all');\nwp_enqueue_style( 'dsoble_theme_css_three', get_template_directory_uri() . '/css/style.css',array(),'1.1','all');\nwp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.css',array(),'1.1','all');\nwp_enqueue_script( 'query-10', get_template_directory_uri() . '/js/jquery-1.10.2.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/dist/js/bootstrap.min.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'query-ui', get_template_directory_uri() . '/js/jquery-ui-1.10.4.custom.min.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'bootstrap-paginator', get_template_directory_uri() . '/js/bootstrap-paginator.min.js', array('jquery'), '1.0.0', true );\t\nwp_enqueue_script( 'jquery.innerfade', get_template_directory_uri() . '/js/jquery.newsTicker.js', array('jquery'), '1.0.0', true );\nwp_enqueue_script( 'jquery-show', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.0', true );\t\t\t\n}", "function adelle_theme_styles() { \r\n wp_enqueue_script( 'jquery' );\r\n wp_enqueue_script( 'jquery-ui-widget' );\r\n wp_enqueue_style( 'adelle-style', get_stylesheet_uri(), '14.03', array(), 'all' );\r\n wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic|Muli:400,400italic|Montserrat:400,700', null, array(), 'all' );\r\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' );\r\n wp_enqueue_script( 'adelle-respond', get_template_directory_uri() . '/js/respond.min.js', array( 'jquery' ), '1.0.1', true );\r\n wp_enqueue_script( 'adelle-fitvids', get_template_directory_uri() . '/js/fitvids.min.js', array( 'jquery' ), '1.0', true );\r\n wp_enqueue_script( 'adelle-tinynav', get_template_directory_uri() . '/js/tinynav.min.js', array( 'jquery' ), null, true );\r\n wp_enqueue_script( 'adelle-scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ), null, true );\r\n}", "function detalhe_custom_styles_and_scripts() {\n // Check for common styles and scripts\n if(!wp_script_is('vendor-jquery')){\n wp_enqueue_script('vendor-jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js');\n } else {\n wp_dequeue_script('vendor-jquery');\n\n wp_enqueue_script('vendor-jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js');\n }\n if(!wp_style_is('bootstrap-js')){\n wp_enqueue_script( 'bootstrap-js', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', ['vendor-jquery']);\n } else {\n wp_dequeue_script('bootstrap-js');\n\n wp_enqueue_script( 'bootstrap-js', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', ['vendor-jquery']);\n }\n if(!wp_style_is('bootstrap-css')){\n wp_enqueue_style( 'bootstrap-css', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css');\n } else {\n wp_dequeue_style('bootstrap-css');\n\n wp_enqueue_style( 'bootstrap-css', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css');\n }\n if(!wp_style_is('ionicons')){\n wp_enqueue_style( 'ionicons', get_template_directory_uri() . '/assets/css/ionicons.min.css');\n } else {\n wp_dequeue_style('ionicons');\n\n wp_enqueue_style( 'ionicons', get_template_directory_uri() . '/assets/css/ionicons.min.css');\n }\n\n // Check for custom styles and scripts\n if(!wp_style_is('detalhe-css')){\n wp_enqueue_style( 'detalhe-css', get_template_directory_uri() . '/assets/sass/detalhe/detalhe.css', ['bootstrap-css']);\n }\n\n if(!wp_script_is('detalhe-js')){\n wp_enqueue_script('detalhe-js', get_template_directory_uri() . '/assets/js/detalhe.js', ['vendor-jquery']);\n }\n }", "function theme_scripts_styles() {\n// Adds JavaScript to pages with the comment form to support sites with\n// threaded comments (when in use).\n if (is_singular() && comments_open() && get_option('thread_comments'))\n wp_enqueue_script('comment-reply');\n// Adds Masonry to handle vertical alignment of footer widgets.\n if (is_active_sidebar('sidebar-1'))\n wp_enqueue_script('jquery-masonry');\n// Loads JavaScript file with functionality specific to Twenty Thirteen.\n wp_enqueue_script('theme-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '1.0', true);\n wp_enqueue_script('waypoints-sticky', get_template_directory_uri() . '/js/waypoints-sticky.js', array('jquery'), '1.2', true);\n wp_enqueue_script('bootstrap-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '1.0', true);\n wp_enqueue_script('maskedinput', get_template_directory_uri() . '/js/jquery.maskedinput.js', array('jquery'), '1.3', true);\n wp_enqueue_script('jquery-ddslick', get_template_directory_uri() . '/js/jquery.ddslick.min.js', array('jquery'), '1.0', true);\n// wp_enqueue_script('validate', get_template_directory_uri() . '/js/jquery.validate.js', array('jquery'), '1.2', true);\n wp_enqueue_script('validator', get_template_directory_uri() . '/js/validator.js', array('jquery'), '1.2', true);\n wp_enqueue_script('fileDownload', get_template_directory_uri() . '/js/jquery.fileDownload.js', array('jquery'), '1.2', true);\n\n\n// Loads our main stylesheet.\n wp_enqueue_style('theme-style', get_stylesheet_uri(), array(), '1.0');\n\n// Loads the stylesheet.\n\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array('theme-style'), '1.0');\n wp_enqueue_style('bootstrap-responsive', get_template_directory_uri() . '/css/bootstrap-responsive.css', array('theme-style'), '1.0');\n wp_enqueue_style('google-fonts', get_template_directory_uri() . '/googlefonts.php', array('theme-style'), '1.1');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/css/font-awesome.css', array('theme-style'), '1.0');\n// Loads the Internet Explorer specific stylesheet.\n wp_enqueue_style('theme-ie', get_template_directory_uri() . '/css/ie.css', array('theme-style'), '1.0');\n wp_style_add_data('theme-ie', 'conditional', 'lt IE 9');\n}", "public function load_admin_scripts_styles(){\n\t\t\n\t}", "public function scripts()\n {\n $scripts = array(\n array(\n 'handler' => 'yatri-google-fonts',\n 'style' => esc_url('//fonts.googleapis.com/css?family=Poppins:300,400,400i,500,600,700|Rubik:400,500,700,900'),\n 'absolute' => true\n ),\n\n array(\n 'handler' => 'yatri-style',\n 'style' => get_stylesheet_uri(),\n 'absolute' => true,\n ), array(\n 'handler' => 'yatri-main',\n 'style' => get_theme_file_uri('/assets/css/yatri.css'),\n 'absolute' => true,\n 'version' => YATRI_THEME_VERSION\n ),\n array(\n 'handler' => 'yatri-script',\n 'script' => get_theme_file_uri('/assets/js/yatri.js'),\n 'absolute' => true,\n 'prefix' => '',\n 'dependency' => array('jquery')\n )\n );\n\n\n Mantrabrain_Theme_Helper_Typo::render_fonts();\n\n $this->yatri_enqueue(apply_filters('yatri_scripts_styles', $scripts));\n\n $locale = apply_filters('yatri_localize_var', array(\n\n 'is_admin_bar' => is_admin_bar_showing() ? true : false,\n\n ));\n\n wp_localize_script('yatri-script', 'yatri_obj', $locale);\n\n if (is_singular() && comments_open()) {\n wp_enqueue_script('comment-reply');\n }\n }", "function mittencrate2014_scripts() {\n \n $mitten_theme = wp_get_theme();\n \n // Fonts\n $fontsUri ='http://fonts.googleapis.com/css?family=Montserrat:400,700|Pacifico|Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700';\n wp_enqueue_style( 'mittencrate2014-google-font', $fontsUri, array(), null );\n wp_enqueue_style( 'mittencrate2014-icon-font', get_stylesheet_directory_uri() . '/css/font-awesome.css', array(), null );\n \n // Slick carousel\n wp_enqueue_style( 'slick-caraousel-style', 'http://cdn.jsdelivr.net/jquery.slick/1.3.7/slick.css' );\n wp_enqueue_script( 'slick-caraousel-script', 'http://cdn.jsdelivr.net/jquery.slick/1.3.7/slick.min.js', array( 'jquery' ) );\n \n // Main stylesheet and script\n wp_enqueue_style( 'mittencrate2014-style', get_stylesheet_uri(), array(), $mitten_theme->get( 'Version' ) );\n wp_enqueue_style( 'mittencrate2014-home', get_stylesheet_directory_uri() . '/css/home.css', array(), $mitten_theme->get( 'Version' ) );\n wp_enqueue_style( 'mittencrate2014-shop', get_stylesheet_directory_uri() . '/css/shop.css', array(), $mitten_theme->get( 'Version' ) );\n wp_enqueue_style( 'mittencrate2014-blog', get_stylesheet_directory_uri() . '/css/blog.css', array(), $mitten_theme->get( 'Version' ) );\n \n wp_enqueue_script( 'mittencrate2014-functions', get_stylesheet_directory_uri() . '/js/functions.js', array( 'jquery' ) );\n \n // Menu script\n wp_enqueue_script( 'mittencrate2014-menu', get_stylesheet_directory_uri() . '/js/menu.js', array( 'jquery' ) );\n \n // blog javascript\n wp_enqueue_script( 'mittencrate2014-blog', get_stylesheet_directory_uri() . '/js/blog.js', array( 'jquery' ), '1.3' );\n wp_localize_script( 'mittencrate2014-blog', 'admin_ajax_url', admin_url( 'admin-ajax.php' ) );\n \n // home javascript\n wp_enqueue_script( 'mittencrate2014-home', get_stylesheet_directory_uri() . '/js/home.js', array( 'jquery' ), '1.4' );\n \n}" ]
[ "0.79306895", "0.7894831", "0.7872009", "0.78114784", "0.78007156", "0.778939", "0.7753214", "0.7753214", "0.7711944", "0.7658068", "0.765478", "0.76493424", "0.7612254", "0.76092017", "0.76031274", "0.7594466", "0.75871843", "0.7585172", "0.7578692", "0.7578647", "0.7561814", "0.7554072", "0.7543909", "0.7523274", "0.7519974", "0.7517001", "0.7506382", "0.74968743", "0.7486379", "0.74771166", "0.7476219", "0.7465644", "0.7458598", "0.7457993", "0.74574023", "0.7449084", "0.74485177", "0.7444063", "0.7443164", "0.7443163", "0.7436672", "0.7436483", "0.7433587", "0.7430438", "0.74162674", "0.7416151", "0.74142003", "0.7404712", "0.740045", "0.73991954", "0.7394557", "0.73926055", "0.7391555", "0.7391329", "0.7373105", "0.73493177", "0.73482573", "0.7341154", "0.7339073", "0.7332791", "0.7329171", "0.7325821", "0.7324014", "0.7318743", "0.7316112", "0.7315177", "0.7315149", "0.73151296", "0.73085797", "0.73007137", "0.72950774", "0.72858155", "0.72818685", "0.72817755", "0.7281754", "0.7268288", "0.7265038", "0.7263676", "0.72625726", "0.72577184", "0.7257037", "0.72559154", "0.72538406", "0.7246694", "0.72459495", "0.7241785", "0.72415024", "0.7232638", "0.7232273", "0.72301185", "0.7229498", "0.72281724", "0.7227879", "0.7225326", "0.7223943", "0.72229135", "0.7217836", "0.7216337", "0.7208907", "0.72077715", "0.7206768" ]
0.0
-1
================================================== Some helper functions and filters for theme
function default_menu(){ wp_nav_menu(array('menu' => 'Main Menu', 'fallback_cb' => 'default_page_menu', 'container' => 'nav', 'container_class' => 'mainmenu', 'menu_class' => 'menu clear')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _preview_theme_template_filter()\n {\n }", "function _preview_theme_stylesheet_filter()\n {\n }", "function get_themes()\n {\n }", "function display_themes()\n {\n }", "function ru_filter_styles(){\n $this->removestyle(\"bbp-default\");\n\n // download monitor is not used in the front-end.\n $this->removestyle(\"wp_dlmp_styles\");\n\n if( !is_singular( 'docs' ) ){\n // the table of contents plugin is being used on documentation pages only\n $this->removestyle(\"toc-screen\");\n }\n\n if ( !( is_page( 'account' ) || is_page( 'edit-profile' )) ){\n // this should not be like this. Need to look into it.\n $this->removestyle(\"wppb_stylesheet\");\n }\n\n if( !is_singular( array('docs', 'post' ) ) ){\n $this->removestyle(\"codebox\");\n }\n }", "function wp_filter_global_styles_post($data)\n {\n }", "function shell_theme_context_setup() {\r\n\r\n\t/* Additional Body class */\r\n\tadd_filter( 'body_class','shell_body_class');\r\n\r\n\t/* Additional css classes for widgets */\r\n\tadd_filter( 'dynamic_sidebar_params', 'shell_widget_classes' );\r\n\r\n\t/* Hybrid Core Context */\r\n\tadd_filter( 'hybrid_context', 'shell_hybrid_context' );\r\n\r\n\t/* Atomic Widget Plugin Context */\r\n\tadd_filter( 'atomic_widget_context', 'shell_atomic_widgets_context' );\r\n\r\n\t/* Post format singular template */\r\n\tadd_filter( 'single_template', 'shell_post_format_singular_template', 11 );\r\n}", "function get_allowed_themes()\n {\n }", "function preview_theme()\n {\n }", "private function setup_filters() {\n add_filter( 'timber/twig', function( $twig ) {\n\n // ped_icon()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'icon',\n [ __CLASS__, 'get_icon' ]\n ) );\n\n // ped_logo()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'logo',\n [ __CLASS__, 'get_logo' ]\n ) );\n\n return $twig;\n }, 99 );\n }", "function wp_render_duotone_filter_preset($preset)\n {\n }", "function wp_get_active_and_valid_themes()\n {\n }", "function wp_using_themes()\n {\n }", "function setup() {\n\tadd_filter( 'fl_builder_render_css', __NAMESPACE__ . '\\\\styles', 10, 3 );\n}", "function get_theme_mods()\n {\n }", "function get_broken_themes()\n {\n }", "public function theme()\n {\n }", "function get_site_allowed_themes()\n {\n }", "function attach_custom_css_filter() {\n\tif ( ! is_admin() && ! is_feed() && ! is_robots() && ! is_trackback() ) {\n\t\tglobal $publishthis;\n\n\t\tif( is_singular() ) echo $publishthis->utils->display_css();\n\t}\n}", "public function preApplyTheme()\n {\n //...\n }", "public function getTheme();", "function ti_custom_styling() { \nglobal $ti_option;\n?>\n<style type=\"text/css\">\n.main-menu > ul > li:hover > a {color:<?php echo $ti_option['main_menu_links_color']['hover']; ?>;}.secondary-menu ul > li:hover > a {color:<?php echo $ti_option['site_top_strip_links']['hover']; ?>;}.main-menu > ul > .link-arrow > a:after{border-color:transparent transparent <?php echo $ti_option['main_sub_menu_pointer']; ?>;}.main-menu > ul > li > .sub-menu{border-top-color:<?php echo $ti_option['main_sub_menu_pointer']; ?>;}.modern .content-over-image figure:before{opacity:<?php echo $ti_option['slider_tint_strength']; ?>;}.top-strip #searchform input, .top-strip #searchform button{color:<?php echo $ti_option['site_top_strip_links']['regular']; ?>}.modern .content-over-image:hover figure:before{opacity:<?php echo $ti_option['slider_tint_strength_hover']; ?>;}.main-menu .sub-menu .sub-links a:after{background-color:<?php echo $ti_option['main_sub_links_left']['regular']; ?>}.sidebar .widget{border-bottom:1px solid <?php echo $ti_option['sidebar_border']['border-color']; ?>;}.footer-sidebar .widget_rss li:after,.footer-sidebar .widget_pages li a:after,.footer-sidebar .widget_nav_menu li a:after,.footer-sidebar .widget_categories ul li:after, .footer-sidebar .widget_recent_entries li:after,.footer-sidebar .widget_recent_comments li:after{background-color:<?php echo $ti_option['footer_links']['regular']; ?>;}.footer-sidebar .widget_ti_latest_comments .comment-text:after{border-bottom-color:<?php echo $ti_option['footer_color']; ?>;}.footer-sidebar .widget_ti_latest_comments .comment-text:before{border-bottom-color:<?php echo $ti_option['footer_border']['border-color']; ?>;}.footer-sidebar .widget_ti_latest_comments .comment-text{border-color:<?php echo $ti_option['footer_border']['border-color']; ?>;}\n.sub-menu-columns .sub-menu .sub-links > .menu-item-has-children > a {color:<?php echo $ti_option['main_sub_links_left']['hover']; ?>;}\n<?php if ($ti_option['titles_background_switch'] == true && $ti_option['titles_background_image'] == true ){ ?>\n.title-with-sep{background:url(\"<?php echo get_template_directory_uri(); ?>/images/section-header.png\") repeat-x 0 50%;}\n<?php } ?>\n<?php if ($ti_option['titles_background_switch'] == true && $ti_option['titles_background_image'] == false ){ ?>\n.title-with-sep{background:url(\"<?php echo $ti_option['titles_background_upload']['url']; ?>\") repeat-x 50%;}\n<?php } ?>\n@media only screen and (min-width: 751px) {#gallery-carousel,#gallery-carousel .gallery-item{height:<?php echo $ti_option['site_carousel_height'] ?>px;}}\n<?php if ( $ti_option['custom_css'] != '' ) { ?>\n/* Custom CSS */\n<?php echo $ti_option['custom_css']; ?>\n<?php } ?>\n</style>\n<?php }", "function wp_get_global_styles_svg_filters()\n {\n }", "function dentario_clients_theme_setup() {\n\t\tadd_filter('dentario_filter_get_blog_type',\t\t\t'dentario_clients_get_blog_type', 9, 2);\n\t\tadd_filter('dentario_filter_get_blog_title',\t\t'dentario_clients_get_blog_title', 9, 2);\n\t\tadd_filter('dentario_filter_get_current_taxonomy',\t'dentario_clients_get_current_taxonomy', 9, 2);\n\t\tadd_filter('dentario_filter_is_taxonomy',\t\t\t'dentario_clients_is_taxonomy', 9, 2);\n\t\tadd_filter('dentario_filter_get_stream_page_title',\t'dentario_clients_get_stream_page_title', 9, 2);\n\t\tadd_filter('dentario_filter_get_stream_page_link',\t'dentario_clients_get_stream_page_link', 9, 2);\n\t\tadd_filter('dentario_filter_get_stream_page_id',\t'dentario_clients_get_stream_page_id', 9, 2);\n\t\tadd_filter('dentario_filter_query_add_filters',\t\t'dentario_clients_query_add_filters', 9, 2);\n\t\tadd_filter('dentario_filter_detect_inheritance_key','dentario_clients_detect_inheritance_key', 9, 1);\n\n\t\t// Extra column for clients lists\n\t\tif (dentario_get_theme_option('show_overriden_posts')=='yes') {\n\t\t\tadd_filter('manage_edit-clients_columns',\t\t\t'dentario_post_add_options_column', 9);\n\t\t\tadd_filter('manage_clients_posts_custom_column',\t'dentario_post_fill_options_column', 9, 2);\n\t\t}\n\n\t\t// Registar shortcodes [trx_clients] and [trx_clients_item] in the shortcodes list\n\t\tadd_action('dentario_action_shortcodes_list',\t\t'dentario_clients_reg_shortcodes');\n\t\tif (function_exists('dentario_exists_visual_composer') && dentario_exists_visual_composer())\n\t\t\tadd_action('dentario_action_shortcodes_list_vc','dentario_clients_reg_shortcodes_vc');\n\t\t\n\t\t// Add supported data types\n\t\tdentario_theme_support_pt('clients');\n\t\tdentario_theme_support_tx('clients_group');\n\t}", "private function filters() {\n\n\n\t}", "function display_theme($theme)\n {\n }", "public function setup_theme()\n {\n }", "protected function setup_filters() {\n\t\tadd_filter( 'cron_schedules', array( $this, 'cron_schedules' ) );\n\t\tadd_filter('blmd_social_classes_button', function($classes, $network=null) {\n\t\t\tif ($network == 'twitter') { $classes .= ' native'; }\n\t\t\treturn $classes;\n\t\t}, 10, 2);\n\t}", "public function off_canvas_applied_filters() {\n\t\t\tthe_widget( 'WC_Widget_Layered_Nav_Filters' );\n\t\t}", "function autodidact_theme_setup() {\n\n}", "function htmlconvertwordpresstheme($wp_customize){\n $wp_customize->add_panel('htmlconvertwordpresstheme_settings', array(\n\n 'title'=>__('htmlconvertwordpresstheme_settings'),\n 'description' =>'',\n 'priority'=>10,\n\n\n ));\n\n\n $wp_customize->add_section('htmlconvertwordpresstheme_colors', array(\n 'title'=>'color',\n 'panel'=> 'htmlconvertwordpresstheme_settings',\n\n\n ));\n\n\n $wp_customize->add_setting('htmlconvertwordpresstheme_nav_bg_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n ));\n\n\n $wp_customize->add_control('htmlconvertwordpresstheme_nav_bg_color', array(\n \n 'label'=>__('Menu Background'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n ));\n\n/* customize setting body background color*/\n$wp_customize->add_setting('htmlconvertwordpresstheme_body_background_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'#fff',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n));\n\n\n$wp_customize->add_control('htmlconvertwordpresstheme_body_background_color', array(\n\n 'label'=>__('Body Background color'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n));\n\n\n}", "function CustomThemeSupport(){\n // coloring\n if(!empty(SELF::$WPgutenberg_ColorPalette)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_ColorPalette as $colorkey => $color) {\n $newColors[] = array(\n 'name' => __( $color[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($color[\"key\"]),\n 'color'\t=> $color[\"value\"],\n );\n }\n add_theme_support( 'editor-color-palette', $newColors );\n endif;\n // font sizes\n if(!empty(SELF::$WPgutenberg_FontSizes)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_FontSizes as $sizekey => $size) {\n $newColors[] = array(\n 'name' => __( $size[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($size[\"key\"]),\n 'size'\t=> $size[\"value\"],\n );\n }\n add_theme_support( 'editor-font-sizes', $newColors );\n // disable custom color picker\n if(SELF::$WPgutenberg_ColorPalette_CP == 0):\n add_theme_support( 'disable-custom-colors');\n endif;\n endif;\n // disable default patterns\n if($this->WPgutenberg_DefaultPatterns == 0):\n remove_theme_support( 'core-block-patterns' );\n endif;\n\n }", "function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'i18n' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) );\n\tadd_action( 'wp_head', $n( 'header_meta' ) );\n\tadd_action( 'after_setup_theme', $n( 'additive_navmenus' ) );\n\tadd_action( 'widgets_init', $n( 'additive_widgets_init' ));\n add_action( 'init', $n( 'register_fablabs_post_type' ) );\n\n add_filter( 'post_gallery', \t\t\t$n('additive_gallery'), 10, 3);\n\t/*\n\t * Switch default core markup for search form, comment form, and comments\n\t * to output valid HTML5.\n\t */\n\tadd_theme_support( 'html5', array(\n\t\t'search-form',\n\t\t'gallery',\n\t\t'caption',\n\t) );\n\n\t/*\n\t * Enable support for Post Formats.\n\t *\n\t * See: https://codex.wordpress.org/Post_Formats\n\t */\n\tadd_theme_support( 'post-formats', array(\n\t\t'aside',\n\t\t'image',\n\t\t'video',\n\t\t'quote',\n\t\t'link',\n\t\t'gallery',\n\t\t'status',\n\t\t'audio',\n\t\t'chat',\n\t) );\n\n\tadd_theme_support('post-thumbnails', array('post', 'page', 'additive_fab_lab'));\n\n}", "function blogtemplate_theme_support(){\n add_theme_support('title-tag'); \n //add logo from customize \n add_theme_support('custom-logo');\n //add thumbnails to blog posts\n add_theme_support('post-thumbnails');\n}", "function adventure_inline_css() {\r\n \r\n //Favicon\r\n if ( get_theme_mod('favicon_setting') != '' ) {\r\n echo '<!-- Favicon Image -->' . \"\\n\";\r\n echo '<link rel=\"shortcut icon\" href=\"' . get_theme_mod('favicon_setting') . '\" />' . \"\\n\\n\";}\r\n\t\t\r\n\t\t// Convert Content from Hex to RGB\r\n\t\tif ( get_theme_mod('backgroundcolor_setting') != '#b4b09d' ) {\r\n\t\t\t$hex = str_replace(\"#\", \"\", get_theme_mod('backgroundcolor_setting'));\r\n\t\t\tif(strlen($hex) == 3) {\r\n\t\t\t\t$r = hexdec(substr($hex,0,1).substr($hex,0,1));\r\n\t\t\t\t$g = hexdec(substr($hex,1,1).substr($hex,1,1));\r\n\t\t\t\t$b = hexdec(substr($hex,2,1).substr($hex,2,1)); }\r\n\t\t\telse {\r\n\t\t\t\t$r = hexdec(substr($hex,0,2));\r\n\t\t\t\t$g = hexdec(substr($hex,2,2));\r\n\t\t\t\t$b = hexdec(substr($hex,4,2)); } }\r\n\r\n\t\t// Convert Sidebar from Hex to RGB\r\n\t\tif ( ( get_theme_mod('sidebarcolor_setting') != '#000000' ) ) {\r\n\t\t$hexs = str_replace(\"#\", \"\", get_theme_mod('sidebarcolor_setting'));\r\n\r\n\t\tif(strlen($hexs) == 3) {\r\n\t\t\t$rs = hexdec(substr($hexs,0,1).substr($hexs,0,1));\r\n\t\t\t$gs = hexdec(substr($hexs,1,1).substr($hexs,1,1));\r\n\t\t\t$bs = hexdec(substr($hexs,2,1).substr($hexs,2,1)); }\r\n\t\telse {\r\n\t\t\t$rs = hexdec(substr($hexs,0,2));\r\n\t\t\t$gs = hexdec(substr($hexs,2,2));\r\n\t\t\t$bs = hexdec(substr($hexs,4,2)); } }\r\n\t\t\r\n if ( ( get_theme_mod('titlefontstyle_setting') != 'Default') || (get_theme_mod('taglinefontstyle_setting') != 'Default') || (get_theme_mod('bodyfontstyle_setting') != 'Default') || (get_theme_mod('headerfontstyle_setting') != 'Default')) {\r\n echo '<!-- Custom Font Styles -->' . \"\\n\";\r\n if (get_theme_mod('titlefontstyle_setting') != 'Default') {echo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('titlefontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n if (get_theme_mod('taglinefontstyle_setting') != 'Default') {\techo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('taglinefontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n if (get_theme_mod('bodyfontstyle_setting') != 'Default') {\techo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('bodyfontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n if (get_theme_mod('headerfontstyle_setting') != 'Default') {\techo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('headerfontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n echo '<!-- End Custom Fonts -->' . \"\\n\\n\";}\r\n\r\n\t\techo '<!-- Custom CSS Styles -->' . \"\\n\";\r\n echo '<style type=\"text/css\" media=\"screen\">' . \"\\n\";\r\n if (is_page() || is_single()) $featured_background = get_post_meta( get_queried_object_ID(), 'featured-background', true ); if (!empty($featured_background)) echo ' body, body.custom-background {background-image:url(' . $featured_background . '); background-size:cover;}' . \"\\n\";\r\n\t\tif ( get_theme_mod('backgroundsize_setting') != 'auto' ) echo '\tbody, body.custom-background {background-size:' . get_theme_mod('backgroundsize_setting') . ';}' . \"\\n\";\r\n\t\tif ( get_theme_mod('backgroundcolor_setting') != '#b4b09d' ) echo '\t.contents {background: rgba(' . $r . ',' . $g . ', ' . $b . ', ' . get_theme_mod('contentbackground_setting') . ');}' . \"\\n\";\r\n if ( get_theme_mod('backgroundcolor_setting') != '#b4b09d' ) echo ' @media only screen and (max-width:55em) { .contents {background: rgba(' . $r . ',' . $g . ', ' . $b . ', .95 );} }' . \"\\n\";\r\n\t\tif ( ( get_theme_mod('sidebarcolor_setting') != '#000000' ) || ( get_theme_mod('sidebarbackground_setting') != '.50' ) ) echo '\taside {background: rgba(' . $rs . ',' . $gs . ', ' . $bs . ', ' . get_theme_mod('sidebarbackground_setting') . ');}' . \"\\n\";\r\n\t\tif ( get_theme_mod('titlecolor_setting') != '#eee2d6' ) echo '\t.header h1 a {color:' . get_theme_mod('titlecolor_setting') . ';}' . \"\\n\";\r\n\t\tif ( get_theme_mod('taglinecolor_setting') != '#066ba0' ) echo '\t.header h1 i {color:' . get_theme_mod('taglinecolor_setting') . ';}' . \"\\n\";\r\n\t\tif ( get_theme_mod('title_size_setting') != '4.0' ) echo '\t.header h1 {font-size:' . get_theme_mod('title_size_setting') . 'em;}' . \"\\n\"; \r\n\t\tif ( get_theme_mod('tagline_rotation_setting') != '-1.00' ) echo '\t.header h1 i {-moz-transform:rotate(' . get_theme_mod('tagline_rotation_setting') . 'deg); transform:rotate(' . get_theme_mod('tagline_rotation_setting') . 'deg);}' . \"\\n\";\r\n\t\tif ( (get_theme_mod('bannerimage_setting') != 'purple.png') && (get_theme_mod('bannerimage_setting') != '') ) echo '\t.header {background: bottom url(' . get_template_directory_uri() . '/images/' . get_theme_mod('bannerimage_setting') . ');}'. \"\\n\";\r\n\t\tif ( get_theme_mod('headerspacing_setting') != '18' ) echo '\t.spacing {height:' . get_theme_mod('headerspacing_setting') . 'em;}'. \"\\n\";\r\n\t\tif ( get_theme_mod('menu_setting') == 'notitle' ) { echo '\t.header {position: fixed;margin-top:0px;}' . \"\\n\" . '\t.admin-bar .header {margin-top:28px;}' . \"\\n\" . '.header h1:first-child, .header h1:first-child i, .header img:first-child {display: none;}' . \"\\n\"; }\r\n\t\tif ( get_theme_mod('menu_setting') == 'bottom' ) { echo '\t.header {position: fixed; bottom:0; top:auto;}' . \"\\n\" . '\t.header h1:first-child, .header h1:first-child i, .header img:first-child {display: none;}' . \"\\n\" . '.header li ul {bottom:2.78em; top:auto;}' . \"\\n\";}\r\n if ( get_theme_mod('border_setting') == 'hidden' ) { echo '\t.contents {border:none; box-shadow:0 0 3px #111;}' . \"\\n\";}\r\n if ( (get_theme_mod('border_setting') != '3px') && (get_theme_mod('border_setting') != 'hidden') ) { echo '\t.contents {border-width:' . get_theme_mod('border_setting') . ';}' . \"\\n\";}\r\n if ( get_theme_mod('bordercolor_setting') != '#4a4646') { echo '\t.contents {border-color:' . get_theme_mod('bordercolor_setting') . ';}' . \"\\n\";}\r\n if ( get_theme_mod('content_bg_setting') != '') { echo ' .contents {background-image:url(' . get_theme_mod('content_bg_setting') . ');}' . \"\\n\";}\r\n \r\n\t\t\r\n\t\tif ( get_theme_mod('titlefontstyle_setting') != 'Default' ) {\r\n\t\t\t$q = get_theme_mod('titlefontstyle_setting');\r\n\t\t\t$q = preg_replace('/[^a-zA-Z0-9]+/', ' ', $q);\r\n\t\t \techo\t\"\t.header h1 {font-family: '\" . $q . \"';}\" . \"\\n\"; }\r\n\r\n\t\tif ( get_theme_mod('taglinefontstyle_setting') != 'Default') {\r\n\t\t\t$x = get_theme_mod('taglinefontstyle_setting');\r\n\t\t\t$x = preg_replace('/[^a-zA-Z0-9]+/', ' ', $x);\r\n\t\t\techo\t\"\t.header h1 i {font-family: '\" . $x . \"';}\" . \"\\n\"; }\r\n\r\n\r\n if ( get_theme_mod('bodyfontstyle_setting') != 'Default' ) {\r\n $xs = get_theme_mod('bodyfontstyle_setting');\r\n $xs = preg_replace('/[^a-zA-Z0-9]+/', ' ', $xs);\r\n echo\t\"\tbody {font-family: '\" . $xs . \"';}\" . \"\\n\"; }\r\n \r\n if ( get_theme_mod('headerfontstyle_setting') != 'Default' ) {\r\n $xd = get_theme_mod('headerfontstyle_setting');\r\n $xd = preg_replace('/[^a-zA-Z0-9]+/', ' ', $xd);\r\n echo\t\"\t.contents h1, .contents h2, .contents h3, .contents h4, .contents h5, .contents h6, aside h1, aside h2, aside h3, aside h4, aside h5, aside h6 {font-family: '\" . $xd . \"';}\" . \"\\n\"; }\r\n \r\n if ( get_theme_mod('linkcolor_setting') != '#0b6492' ) echo '\ta {color:' . get_theme_mod('linkcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('linkcolorhover_setting') != '#FFFFFF' ) echo '\ta:hover {color:' . get_theme_mod('linkcolorhover_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('link_text_shadow_setting') != '' ) echo '\t.contents a {text-shadow:.1em .1em 0 ' . get_theme_mod('link_text_shadow_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('fontcolor_setting') != '#000000' ) echo '\tbody {color:' . get_theme_mod('fontcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('navcolor_setting') != '#CCCCCC' ) echo '\t.header li a {color:' . get_theme_mod('navcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('navcolorhover_setting') != '#0b6492' ) echo '\t.header li a:hover {color:' . get_theme_mod('navcolorhover_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('dropcolor_setting') != '#BBBBBB' ) echo '\t.header li ul li a {color:' . get_theme_mod('dropcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('dropcolorhover_setting') != '#0b6492' ) echo '\t.header li ul li a:hover {color:' . get_theme_mod('dropcolorhover_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('fontsizeadjust_setting') != '1' ) echo '\t.contents, aside {font-size:' . get_theme_mod('fontsizeadjust_setting') . 'em;}' . \"\\n\";\r\n if ( get_theme_mod('removefooter_setting') != 'visible' ) echo '\tfooter {visibility:' . get_theme_mod('removefooter_setting') . ';}' . \"\\n\";;\r\n if ( get_theme_mod('header_image_width_setting') != '20' ) {\r\n $header_margin_percentage = (100 - get_theme_mod('header_image_width_setting')) / 2;\r\n echo '\t.header li.website_logo {margin:0 ' . $header_margin_percentage . '%; width:' . get_theme_mod('header_image_width_setting') . '%;}' . \"\\n\";}\r\n if ( get_theme_mod('custombanner_setting') != '') echo '\t.header {background: bottom url(' . get_theme_mod('custombanner_setting') . ');}' . \"\\n\";\r\n\r\n\t\techo '</style>' . \"\\n\";\r\n\t\techo '<!-- End Custom CSS -->' . \"\\n\";\r\n\t\techo \"\\n\"; }", "function jacqueline_templates_theme_setup() {\n\t\tadd_filter( 'image_size_names_choose', 'jacqueline_show_thumb_sizes');\n\t}", "public function default_filters() {\n\t\tadd_filter( 'upload_mimes', array( $this, 'more_mimes' ) );\n\n\t\t// Live update when add new layouts (also their sidebars)\n\t\t// or add new positions into existed layouts\n\t\tadd_filter( 'kopa_get_option_layout_manager', array( $this, 'live_update_layout_manager' ), 10, 2 );\n\n\t\t/**\n\t\t * Disable help tab by default, determine its content later\n\t\t *\n\t\t * @see admin/class-kopa-admin.php\n\t\t * @since 1.0.0\n\t\t */\n\t\tadd_filter( 'kopa_enable_admin_help_tab', '__return_false' );\n\t}", "function current_theme_info()\n {\n }", "function dizzy7_gutenberg_features() {\n\t\t\n\n// Theme supports wide images, galleries and videos.\n add_theme_support( 'align-wide' );\n add_theme_support( 'align-full' );\n add_theme_support( 'wide-images' );\n \n add_theme_support(\n\t\t'editor-color-palette', array(\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Main Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'main-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-main-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Second Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'second-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-second-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Highlight Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'highlight-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-third-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Special Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'special-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-fourth-color'),\n\t\t\t)\n\t\t)\n\t);\n}", "function sec_conf() {\n\n // Head cleanup\n add_action( 'init', 'sec_head_cleanup' );\n\n // Menu\n add_action( 'init', 'sec_register_nav_menus' );\n add_filter( 'nav_menu_css_class', 'sec_toggle_nav_class', 10, 2 );\n\n // Remove wp version from rss\n add_filter( 'the_generator', 'sec_rss_version' );\n\n // Enqueue scripts & styles\n add_action( 'wp_enqueue_scripts', 'sec_scripts_and_styles', 999 );\n\n // theme support after theme setup\n sec_theme_support();\n\n // change post type query on home page\n add_filter( 'pre_get_posts', 'sec_get_posts' );\n\n // clean up random code around images\n add_filter( 'the_content', 'sec_filter_ptags_on_images' );\n\n add_action( 'admin_menu', 'remove_author_metabox' );\n add_action( 'post_submitbox_misc_actions', 'move_author_to_publish_metabox' );\n\n // ACF Options Page\n initThemeOptions();\n\n // Debugger\n add_filter( 'template_include', 'var_template_include', 1000 );\n}", "function preview_theme_ob_filter_callback($matches)\n {\n }", "function mu_themes_in_use(){$this->__construct();}", "function custom_theme_options()\n{\n\tif ( ! defined( 'UNCODE_SLIM' ) ) {\n\t\treturn;\n\t}\n\n\tglobal $wpdb, $uncode_colors, $uncode_post_types;\n\n\tif (!isset($uncode_post_types)) $uncode_post_types = uncode_get_post_types();\n\t/**\n\t * Get a copy of the saved settings array.\n\t */\n\t$saved_settings = get_option(ot_settings_id() , array());\n\n\t/**\n\t * Custom settings array that will eventually be\n\t * passes to the OptionTree Settings API Class.\n\t */\n\n\tif (!function_exists('ot_filter_measurement_unit_types'))\n\t{\n\t\tfunction ot_filter_measurement_unit_types($array, $field_id)\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'px' => 'px',\n\t\t\t\t'%' => '%'\n\t\t\t);\n\t\t}\n\t}\n\n\tadd_filter('ot_measurement_unit_types', 'ot_filter_measurement_unit_types', 10, 2);\n\n\tfunction run_array_to($array, $key = '', $value = '')\n\t{\n\t\t$array[$key] = $value;\n\t\treturn $array;\n\t}\n\n\t$stylesArrayMenu = array(\n\t\tarray(\n\t\t\t'value' => 'light',\n\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t'src' => ''\n\t\t) ,\n\t\tarray(\n\t\t\t'value' => 'dark',\n\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t'src' => ''\n\t\t)\n\t);\n\n\t$menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) );\n\t$menus_array = array();\n\t$menus_array[] = array(\n\t\t'value' => '',\n\t\t'label' => esc_html__('Inherit', 'uncode')\n\t);\n\tforeach ($menus as $menu)\n\t{\n\t\t$menus_array[] = array(\n\t\t\t'value' => $menu->slug,\n\t\t\t'label' => $menu->name\n\t\t);\n\t}\n\n\t$uncodeblock = array(\n\t\t'value' => 'header_uncodeblock',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t);\n\n\t$uncodeblocks = array(\n\t\tarray(\n\t\t\t'value' => '','label' => esc_html__('Inherit', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'none','label' => esc_html__('None', 'uncode')\n\t\t)\n\t);\n\n\t$blocks_query = new WP_Query( 'post_type=uncodeblock&posts_per_page=-1&post_status=publish&orderby=title&order=ASC' );\n\n\tforeach ($blocks_query->posts as $block) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => $block->ID,\n\t\t\t'label' => $block->post_title,\n\t\t\t'postlink' => get_edit_post_link($block->ID),\n\t\t);\n\t}\n\n\tif ($blocks_query->post_count === 0) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('No Content Blocks found', 'uncode')\n\t\t);\n\t}\n\n\t$uncodeblock_404 = array(\n\t\t'id' => '_uncode_404_body',\n\t\t'label' => esc_html__('404 content', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'body_uncodeblock',\n\t\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t),\n\t\t),\n\t\t'section' => 'uncode_404_section',\n\t);\n\n\t$uncodeblocks_404 = array(\n\t\t'id' => '_uncode_404_body_block',\n\t\t'label' => esc_html__('404 Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_404_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_404_body:is(body_uncodeblock)',\n\t);\n\n\tif ( class_exists( 'RevSliderFront' ) )\n\t{\n\n\t\t$revslider = array(\n\t\t\t'value' => 'header_revslider',\n\t\t\t'label' => esc_html__('Revolution Slider', 'uncode') ,\n\t\t);\n\n\t\t$rs = $wpdb->get_results(\"SELECT id, title, alias FROM \" . $wpdb->prefix . \"revslider_sliders WHERE type != 'template' ORDER BY id ASC LIMIT 999\");\n\t\t$revsliders = array();\n\t\tif ($rs)\n\t\t{\n\t\t\tforeach ($rs as $slider)\n\t\t\t{\n\t\t\t\t$revsliders[] = array(\n\t\t\t\t\t'value' => $slider->alias,\n\t\t\t\t\t'label' => $slider->title,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=revslider&view=slider&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$revsliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No Revolution Sliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $revslider = $revsliders = '';\n\n\tif ( class_exists( 'LS_Config' ) )\n\t{\n\n\t\t$layerslider = array(\n\t\t\t'value' => 'header_layerslider',\n\t\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t);\n\n\t\t$ls = $wpdb->get_results(\"SELECT id, name FROM \" . $wpdb->prefix . \"layerslider WHERE flag_deleted != '1' ORDER BY id ASC LIMIT 999\");\n\t\t$layersliders = array();\n\t\tif ($ls)\n\t\t{\n\t\t\tforeach ($ls as $slider)\n\t\t\t{\n\t\t\t\t$layersliders[] = array(\n\t\t\t\t\t'value' => $slider->id,\n\t\t\t\t\t'label' => $slider->name,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=layerslider&action=edit&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$layersliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No LayerSliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $layerslider = $layersliders = '';\n\n\t$title_size = array(\n\t\tarray(\n\t\t\t'value' => 'h1',\n\t\t\t'label' => esc_html__('h1', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h2',\n\t\t\t'label' => esc_html__('h2', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h3',\n\t\t\t'label' => esc_html__('h3', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h4',\n\t\t\t'label' => esc_html__('h4', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h5',\n\t\t\t'label' => esc_html__('h5', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h6',\n\t\t\t'label' => esc_html__('h6', 'uncode'),\n\t\t),\n\t);\n\n\t$font_sizes = ot_get_option('_uncode_heading_font_sizes');\n\tif (!empty($font_sizes)) {\n\t\tforeach ($font_sizes as $key => $value) {\n\t\t\t$title_size[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_size_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_size[] = array(\n\t\t'value' => 'bigtext',\n\t\t'label' => esc_html__('BigText', 'uncode'),\n\t);\n\n\t$title_height = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$font_heights = ot_get_option('_uncode_heading_font_heights');\n\tif (!empty($font_heights)) {\n\t\tforeach ($font_heights as $key => $value) {\n\t\t\t$title_height[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_height_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_spacing = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$btn_letter_spacing = $title_spacing;\n\t$btn_letter_spacing[] = array(\n\t\t'value' => 'uncode-fontspace-zero',\n\t\t'label' => esc_html__('Letter Spacing 0', \"uncode\")\n\t);\n\n\t$font_spacings = ot_get_option('_uncode_heading_font_spacings');\n\tif (!empty($font_spacings)) {\n\t\tforeach ($font_spacings as $key => $value) {\n\t\t\t$btn_letter_spacing[] = $title_spacing[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_spacing_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$fonts = get_option('uncode_font_options');\n\t$title_font = array();\n\n\tif (isset($fonts['font_stack']) && $fonts['font_stack'] !== '[]')\n\t{\n\t\t$font_stack_string = $fonts['font_stack'];\n\t\t$font_stack = json_decode(str_replace('&quot;', '\"', $font_stack_string) , true);\n\n\t\tforeach ($font_stack as $font)\n\t\t{\n\t\t\tif ($font['source'] === 'Font Squirrel')\n\t\t\t{\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$weight = array();\n\t\t\t\tforeach ($variants as $variant)\n\t\t\t\t{\n\t\t\t\t\tif (strpos(strtolower($variant) , 'hairline') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 100;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'light') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 200;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'regular') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'semibold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 500;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'bold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 600;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'black') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 800;\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$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $weight);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Google Web Fonts')\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ' . $font['variants'];\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Adobe Fonts' || $font['source'] === 'Typekit' )\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\tforeach ($variants as $key => $variant) {\n\t\t\t\t\tif ( $variants[$key] !== '' ) {\n\t\t\t\t\t\tpreg_match(\"|\\d+|\", $variants[$key], $weight);\n\t\t\t\t\t\t$variants[$key] = $weight[0] . '00';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $variants);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode(str_replace('\"', '', (string)$font['stub'])),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => (string)$font['family']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$title_font = array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No fonts activated.', \"uncode\"),\n\t\t\t)\n\t\t);\n\t}\n\n\t$title_font[] = array(\n\t\t'value' => 'manual',\n\t\t'label' => esc_html__('Manually entered','uncode')\n\t);\n\n\t$custom_fonts = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t)\n\t);\n\n\t$custom_fonts_array = ot_get_option('_uncode_font_groups');\n\tif (!empty($custom_fonts_array)) {\n\t\tforeach ($custom_fonts_array as $key => $value) {\n\t\t\t$custom_fonts[] = array(\n\t\t\t\t'value' => $value['_uncode_font_group_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_weight = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 100,\n\t\t\t'label' => '100',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 200,\n\t\t\t'label' => '200',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 300,\n\t\t\t'label' => '300',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 400,\n\t\t\t'label' => '400',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 500,\n\t\t\t'label' => '500',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 600,\n\t\t\t'label' => '600',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 700,\n\t\t\t'label' => '700',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 800,\n\t\t\t'label' => '800',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 900,\n\t\t\t'label' => '900',\n\t\t)\n\t);\n\n\t$menu_section_title = array(\n\t\t'id' => '_uncode_%section%_menu_block_title',\n\t\t'label' => ' <i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu = array(\n\t\t'id' => '_uncode_%section%_menu',\n\t\t'label' => esc_html__('Menu', 'uncode') ,\n\t\t'desc' => esc_html__('Override the primary menu created in \\'Appearance -> Menus\\'.','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $menus_array,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_width = array(\n\t\t'id' => '_uncode_%section%_menu_width',\n\t\t'label' => esc_html__('Menu width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the menu width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_opaque = array(\n\t\t'id' => '_uncode_%section%_menu_opaque',\n\t\t'label' => esc_html__('Remove transparency', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Override to remove the transparency eventually declared in \\'Customize -> Light/Dark skin\\'.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding',\n\t\t'label' => esc_html__('Remove menu content padding', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding_mobile = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding_mobile',\n\t\t'label' => esc_html__('Remove menu content padding on mobile', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header on mobile.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_activate = array(\n\t\t'id' => '_uncode_%section%_custom_title_activate',\n\t\t'label' => esc_html__('Activate custom title and subtitle', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate this to enable the custom title and subtitle.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_title_text',\n\t\t'label' => esc_html__('Custom title', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page title.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$subtitle_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_subtitle_text',\n\t\t'label' => esc_html__('Custom subtitle', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page subtitle.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$header_section_title = array(\n\t\t'id' => '_uncode_%section%_header_block_title',\n\t\t'label' => '<i class=\"fa fa-columns2\"></i> ' . esc_html__('Header', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_type = array(\n\t\t'id' => '_uncode_%section%_header',\n\t\t'label' => esc_html__('Type', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header type.', 'uncode'),\n\t\t'std' => 'none',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'none',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header_basic',\n\t\t\t\t'label' => esc_html__('Basic', 'uncode') ,\n\t\t\t) ,\n\t\t\t$uncodeblock,\n\t\t\t$revslider,\n\t\t\t$layerslider,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_uncode_block = array(\n\t\t'id' => '_uncode_%section%_blocks',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the Content Block.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'condition' => '_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_revslider = array(\n\t\t'id' => '_uncode_%section%_revslider',\n\t\t'label' => esc_html__('Revslider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the RevSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_revslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $revsliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_layerslider = array(\n\t\t'id' => '_uncode_%section%_layerslider',\n\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the LayerSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_layerslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $layersliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title = array(\n\t\t'label' => esc_html__('Title in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_title',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to show title in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_title_text = array(\n\t\t'id' => '_uncode_%section%_header_title_text',\n\t\t'label' => esc_html__('Custom text', 'uncode') ,\n\t\t'desc' => esc_html__('Add custom text for the header. Every newline in the field is a new line in the title.', 'uncode') ,\n\t\t'type' => 'textarea-simple',\n\t\t'rows' => '15',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_style = array(\n\t\t'id' => '_uncode_%section%_header_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header text skin.', 'uncode') ,\n\t\t'std' => 'light',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'choices' => $stylesArrayMenu\n\t);\n\n\t$header_width = array(\n\t\t'id' => '_uncode_%section%_header_width',\n\t\t'label' => esc_html__('Header width', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'desc' => esc_html__('Override the header width.', 'uncode') ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:contains(header)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_content_width = array(\n\t\t'id' => '_uncode_%section%_header_content_width',\n\t\t'label' => esc_html__('Content full width', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to expand the header content to full width.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_custom_width = array(\n\t\t'id' => '_uncode_%section%_header_custom_width',\n\t\t'label' => esc_html__('Custom inner width','uncode'),\n\t\t'desc' => esc_html__('Adjust the inner content width in %.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'type' => 'numeric-slider',\n\t\t'min_max_step' => '0,100,1',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_align = array(\n\t\t'id' => '_uncode_%section%_header_align',\n\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the text/content alignment.', 'uncode') ,\n\t\t'std' => 'center',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t)\n\t);\n\n\t$header_height = array(\n\t\t'id' => '_uncode_%section%_header_height',\n\t\t'label' => esc_html__('Height', 'uncode') ,\n\t\t'desc' => esc_html__('Define the height of the header in px or in % (relative to the window height).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'std' => array(\n\t\t\t'60',\n\t\t\t'%'\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_min_height = array(\n\t\t'id' => '_uncode_%section%_header_min_height',\n\t\t'label' => esc_html__('Minimal height', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a minimun height for the header in pixel.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'std' => '300',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_position = array(\n\t\t'id' => '_uncode_%section%_header_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the header content inside the container.', 'uncode') ,\n\t\t'std' => 'header-center header-middle',\n\t\t'type' => 'select',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-top',\n\t\t\t\t'label' => esc_html__('Left Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-center',\n\t\t\t\t'label' => esc_html__('Left Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-bottom',\n\t\t\t\t'label' => esc_html__('Left Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-top',\n\t\t\t\t'label' => esc_html__('Center Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-middle',\n\t\t\t\t'label' => esc_html__('Center Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-bottom',\n\t\t\t\t'label' => esc_html__('Center Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-top',\n\t\t\t\t'label' => esc_html__('Right Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-center',\n\t\t\t\t'label' => esc_html__('Right Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-bottom',\n\t\t\t\t'label' => esc_html__('Right Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_font = array(\n\t\t'id' => '_uncode_%section%_header_title_font',\n\t\t'label' => esc_html__('Title font family', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font for the title.', 'uncode') ,\n\t\t'std' => 'font-555555',\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $custom_fonts,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_size = array(\n\t\t'id' => '_uncode_%section%_header_title_size',\n\t\t'label' => esc_html__('Title font size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font size for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_size,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_height = array(\n\t\t'id' => '_uncode_%section%_header_title_height',\n\t\t'label' => esc_html__('Title line height', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the line height for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_height,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_spacing = array(\n\t\t'id' => '_uncode_%section%_header_title_spacing',\n\t\t'label' => esc_html__('Title letter spacing', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the letter spacing for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_spacing,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_weight = array(\n\t\t'id' => '_uncode_%section%_header_title_weight',\n\t\t'label' => esc_html__('Title font weight', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font weight for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_weight,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_italic = array(\n\t\t'id' => '_uncode_%section%_header_title_italic',\n\t\t'label' => esc_html__('Title italic', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the font style italic for the title.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_title_transform = array(\n\t\t'id' => '_uncode_%section%_header_title_transform',\n\t\t'label' => esc_html__('Title text transform', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the title text transformation.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default CSS', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'uppercase',\n\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'lowercase',\n\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'capitalize',\n\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t) ,\n\t\t)\n\t);\n\n\t$header_text_animation = array(\n\t\t'id' => '_uncode_%section%_header_text_animation',\n\t\t'label' => esc_html__('Text animation', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation of the title text.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'top-t-bottom',\n\t\t\t\t'label' => esc_html__('Top to bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left-t-right',\n\t\t\t\t'label' => esc_html__('Left to right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right-t-left',\n\t\t\t\t'label' => esc_html__('Right to left', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'bottom-t-top',\n\t\t\t\t'label' => esc_html__('Bottom to top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-in',\n\t\t\t\t'label' => esc_html__('Zoom in', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-out',\n\t\t\t\t'label' => esc_html__('Zoom out', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'alpha-anim',\n\t\t\t\t'label' => esc_html__('Alpha', 'uncode') ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_delay = array(\n\t\t'id' => '_uncode_%section%_header_animation_delay',\n\t\t'label' => esc_html__('Animation delay', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation delay of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1100',\n\t\t\t\t'label' => esc_html__('ms 1100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1200',\n\t\t\t\t'label' => esc_html__('ms 1200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1300',\n\t\t\t\t'label' => esc_html__('ms 1300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1400',\n\t\t\t\t'label' => esc_html__('ms 1400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1500',\n\t\t\t\t'label' => esc_html__('ms 1500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1600',\n\t\t\t\t'label' => esc_html__('ms 1600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1700',\n\t\t\t\t'label' => esc_html__('ms 1700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1800',\n\t\t\t\t'label' => esc_html__('ms 1800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1900',\n\t\t\t\t'label' => esc_html__('ms 1900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2000',\n\t\t\t\t'label' => esc_html__('ms 2000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_speed = array(\n\t\t'id' => '_uncode_%section%_header_animation_speed',\n\t\t'label' => esc_html__('Animation speed', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation speed of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default (400)', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_featured = array(\n\t\t'label' => esc_html__('Featured media in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_featured',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to use the featured image in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_background = array(\n\t\t'id' => '_uncode_%section%_header_background',\n\t\t'label' => esc_html__('Background', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the background media and color.', 'uncode') ,\n\t\t'type' => 'background',\n\t\t'std' => array(\n\t\t\t'background-color' => 'color-gyho',\n\t\t\t'background-repeat' => '',\n\t\t\t'background-attachment' => '',\n\t\t\t'background-position' => '',\n\t\t\t'background-size' => '',\n\t\t\t'background-image' => '',\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_parallax = array(\n\t\t'id' => '_uncode_%section%_header_parallax',\n\t\t'label' => esc_html__('Parallax', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate the background parallax effect.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_kburns = array(\n\t\t'id' => '_uncode_%section%_header_kburns',\n\t\t'label' => esc_html__('Zoom Effect', 'uncode') ,\n\t\t'desc' => esc_html__('Select the background zoom effect you prefer.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'on',\n\t\t\t\t'label' => esc_html__('Ken Burns', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom',\n\t\t\t\t'label' => esc_html__('Zoom Out', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color',\n\t\t'label' => esc_html__('Overlay color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the overlay background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color_alpha = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color_alpha',\n\t\t'label' => esc_html__('Overlay color opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Set the overlay opacity.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scroll_opacity = array(\n\t\t'id' => '_uncode_%section%_header_scroll_opacity',\n\t\t'label' => esc_html__('Scroll opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Activate alpha animation when scrolling down.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scrolldown = array(\n\t\t'id' => '_uncode_%section%_header_scrolldown',\n\t\t'label' => esc_html__('Scroll down arrow', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the scroll down arrow button.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:not(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_breadcrumb = array(\n\t\t'id' => '_uncode_%section%_breadcrumb',\n\t\t'label' => esc_html__('Show breadcrumb', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation breadcrumb.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$breadcrumb_align = array(\n\t\t'id' => '_uncode_%section%_breadcrumb_align',\n\t\t'label' => esc_html__('Breadcrumb align', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the breadcrumb alignment','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_breadcrumb:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_title = array(\n\t\t'id' => '_uncode_%section%_title',\n\t\t'label' => esc_html__('Show title', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the title in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$remove_pagination = array(\n\t\t'id' => '_uncode_%section%_remove_pagination',\n\t\t'label' => esc_html__('Remove pagination', 'uncode') ,\n\t\t'desc' => esc_html__('Activate this to remove the pagination (useful when you use a custom Content Block with Pagination or Load More options).', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$products_per_page = array(\n\t\t'id' => '_uncode_%section%_ppp',\n\t\t'label' => esc_html__('Number of products', 'uncode') ,\n\t\t'desc' => esc_html__('Set the number of items to display on product archives. \\'Inherit\\' inherits the WordPress Settings > Readings > Blog Number of Posts', 'uncode') ,\n\t\t'std' => '0',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_media = array(\n\t\t'id' => '_uncode_%section%_media',\n\t\t'label' => esc_html__('Show media', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the medias in the content area.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_featured_media = array(\n\t\t'id' => '_uncode_%section%_featured_media',\n\t\t'label' => esc_html__('Show featured image', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the featured image in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_media:not(on)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags = array(\n\t\t'id' => '_uncode_%section%_tags',\n\t\t'label' => esc_html__('Show tags', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the tags and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags_align = array(\n\t\t'id' => '_uncode_%section%_tags_align',\n\t\t'label' => esc_html__('Tags alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the tags alignment.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_tags:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_comments = array(\n\t\t'id' => '_uncode_%section%_comments',\n\t\t'label' => esc_html__('Show comments', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the comments and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_share = array(\n\t\t'id' => '_uncode_%section%_share',\n\t\t'label' => esc_html__('Show share', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the share module.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$image_layout = array(\n\t\t'id' => '_uncode_%section%_image_layout',\n\t\t'label' => esc_html__('Media layout', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the layout mode for the product images section.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'stack',\n\t\t\t\t'label' => esc_html__('Stack', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$media_size = array(\n\t\t'id' => '_uncode_%section%_media_size',\n\t\t'label' => esc_html__('Media layout size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the size of the media layout area.', 'uncode') ,\n\t\t'std' => '6',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$enable_sticky_desc = array(\n\t\t'id' => '_uncode_%section%_sticky_desc',\n\t\t'label' => esc_html__('Sticky content', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable sticky effect for product description.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is(stack)',\n\t);\n\n\t$enable_woo_zoom = array(\n\t\t'id' => '_uncode_%section%_enable_zoom',\n\t\t'label' => esc_html__('Zoom', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable drag zoom effect on product image.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$thumb_cols = array(\n\t\t'id' => '_uncode_%section%_thumb_cols',\n\t\t'label' => esc_html__('Thumbnails columns', 'uncode') ,\n\t\t'desc' => esc_html__('Specify how many columns to display for your product gallery thumbs.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => '3',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6',\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$enable_woo_slider = array(\n\t\t'id' => '_uncode_%section%_enable_slider',\n\t\t'label' => esc_html__('Thumbnails carousel', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable carousel slider when you click gallery thumbs.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$body_section_title = array(\n\t\t'id' => '_uncode_%section%_body_title',\n\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block = array(\n\t\t'id' => '_uncode_%section%_content_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use. NB. Select \"Inherit\" to use the default template.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_before = array(\n\t\t'id' => '_uncode_%section%_content_block_before',\n\t\t'label' => esc_html__('Content Block - Before Content', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after_pre = array(\n\t\t'id' => '_uncode_%section%_content_block_after_pre',\n\t\t'label' => esc_html__('After Content (ex: Author Profile)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after = array(\n\t\t'id' => '_uncode_%section%_content_block_after',\n\t\t'label' => esc_html__('After Content (ex: Related Posts)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width = array(\n\t\t'id' => '_uncode_%section%_layout_width',\n\t\t'label' => esc_html__('Content width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the content width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width_custom = array(\n\t\t'id' => '_uncode_%section%_layout_width_custom',\n\t\t'label' => esc_html__('Custom width', 'uncode') ,\n\t\t'desc' => esc_html__('Define the custom width for the content area in px or in %. This option takes effect with normal contents (not Page Builder).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'condition' => '_uncode_%section%_layout_width:is(limit)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_post_width = array(\n\t\t'id' => '_uncode_%section%_single_width',\n\t\t'label' => esc_html__('Single post width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the single post width from 1 to 12.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'std' => '4',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '1',\n\t\t\t\t'label' => '1' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '3',\n\t\t\t\t'label' => '3' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '7',\n\t\t\t\t'label' => '7' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '8',\n\t\t\t\t'label' => '8' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '9',\n\t\t\t\t'label' => '9' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '10',\n\t\t\t\t'label' => '10' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '11',\n\t\t\t\t'label' => '11' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '12',\n\t\t\t\t'label' => '12' ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_text_lenght = array(\n\t\t'id' => '_uncode_%section%_single_text_length',\n\t\t'label' => esc_html__('Single teaser text length', 'uncode') ,\n\t\t'desc' => esc_html__('Enter the number of words you want for the teaser. If nothing in entered the full content will be showed.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$sidebar_section_title = array(\n\t\t'id' => '_uncode_%section%_sidebar_title',\n\t\t'label' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_activate = array(\n\t\t'id' => '_uncode_%section%_activate_sidebar',\n\t\t'label' => esc_html__('Activate the sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_widget = array(\n\t\t'id' => '_uncode_%section%_sidebar',\n\t\t'label' => esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar.', 'uncode') ,\n\t\t'type' => 'sidebar-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_position = array(\n\t\t'id' => '_uncode_%section%_sidebar_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the sidebar.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_size = array(\n\t\t'id' => '_uncode_%section%_sidebar_size',\n\t\t'label' => esc_html__('Size', 'uncode') ,\n\t\t'desc' => esc_html__('Set the size of the sidebar.', 'uncode') ,\n\t\t'std' => '4',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_sticky = array(\n\t\t'id' => '_uncode_%section%_sidebar_sticky',\n\t\t'label' => esc_html__('Sticky sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to have a sticky sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_style = array(\n\t\t'id' => '_uncode_%section%_sidebar_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Override the sidebar text skin color.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'light',\n\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'dark',\n\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_bgcolor = array(\n\t\t'id' => '_uncode_%section%_sidebar_bgcolor',\n\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_fill = array(\n\t\t'id' => '_uncode_%section%_sidebar_fill',\n\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'std' => 'off',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_sidebar_bgcolor:not(),_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$navigation_section_title = array(\n\t\t'id' => '_uncode_%section%_navigation_title',\n\t\t'label' => '<i class=\"fa fa-location\"></i> ' . esc_html__('Navigation', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_activate = array(\n\t\t'id' => '_uncode_%section%_navigation_activate',\n\t\t'label' => esc_html__('Navigation bar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation bar.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_page_index = array(\n\t\t'id' => '_uncode_%section%_navigation_index',\n\t\t'label' => esc_html__('Navigation index', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the page you want to use as index.', 'uncode'),\n\t\t'type' => 'page-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_index_label = array(\n\t\t'id' => '_uncode_%section%_navigation_index_label',\n\t\t'label' => esc_html__('Index custom label', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a custom label for the index button.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_nextprev_title = array(\n\t\t'id' => '_uncode_%section%_navigation_nextprev_title',\n\t\t'label' => esc_html__('Navigation titles', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the next/prev post title.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$footer_section_title = array(\n\t\t'id' => '_uncode_%section%_footer_block_title',\n\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_uncode_block = array(\n\t\t'id' => '_uncode_%section%_footer_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Override the Content Block.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_width = array(\n\t\t'id' => '_uncode_%section%_footer_width',\n\t\t'label' => esc_html__('Footer width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the footer width.' ,'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_section_title = array(\n\t\t'id' => '_uncode_%section%_cf_title',\n\t\t'label' => '<i class=\"fa fa-pencil3\"></i> ' . esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_list = array(\n\t\t'id' => '_uncode_%section%_custom_fields',\n\t\t'class' => 'uncode-custom-fields-list',\n\t\t'label' => esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => esc_html__('Create here all the custom fields that can be used inside the posts module.', 'uncode') ,\n\t\t'type' => 'list-item',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'settings' => array(\n\t\t\tarray(\n\t\t\t\t'id' => '_uncode_cf_unique_id',\n\t\t\t\t'class' => 'unique_id',\n\t\t\t\t'std' => 'detail-',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__('Unique custom field ID','uncode') ,\n\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t),\n\t\t)\n\t);\n\n\t$portfolio_cpt_name = ot_get_option('_uncode_portfolio_cpt');\n\tif ($portfolio_cpt_name == '') $portfolio_cpt_name = 'portfolio';\n\n\t$cpt_single_sections = array();\n\t$cpt_index_sections = array();\n\t$cpt_single_options = array();\n\t$cpt_index_options = array();\n\n\tif (count($uncode_post_types) > 0) {\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_obj = get_post_type_object($value);\n\n\t\t\t\tif ( is_object($cpt_obj) ) {\n\t\t\t\t\t$cpt_name = $cpt_obj->labels->name;\n\t\t\t\t\t$cpt_sing_name = $cpt_obj->labels->singular_name;\n\t\t\t\t\t$cpt_single_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($cpt_sing_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($cpt_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t} elseif ( $value == 'author' ) {\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Authors', 'uncode') . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product' && $value !== 'author') {\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_opaque);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_type);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_revslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_layerslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_min_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_content_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_custom_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_font);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_spacing);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_weight);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_transform);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_italic);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_text_animation);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_speed);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_delay);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_featured);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_background);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_parallax);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_kburns);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color_alpha);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scroll_opacity);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scrolldown);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width_custom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_breadcrumb);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $breadcrumb_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, run_array_to($show_title, 'std', 'on'));\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_featured_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_comments);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_share);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $image_layout);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $media_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_sticky_desc);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_zoom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $thumb_cols);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_slider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after_pre);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_widget);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_sticky);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_bgcolor);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_fill);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_page_index);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_index_label);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_nextprev_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_list);\n\t\t\t}\n\t\t}\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_opaque);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($header_type, 'std', 'header_basic'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_revslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_layerslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_min_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_content_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_custom_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_font);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_spacing);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_weight);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_transform);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_italic);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_text_animation);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_speed);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_delay);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_featured);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_background);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_parallax);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_kburns);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color_alpha);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scroll_opacity);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scrolldown);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding_mobile);\n\t\t\t\tif ($value !== 'author') {\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_activate);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_text);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $subtitle_archive_custom_text);\n\t\t\t\t}\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_breadcrumb);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $breadcrumb_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_layout_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_post_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_text_lenght);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $remove_pagination);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($sidebar_activate, 'std', 'on'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_widget);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_sticky);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_bgcolor);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_fill);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_width);\n\t\t\t}\n\t\t}\n\t}\n\n\t$custom_settings_section_one = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_header_section',\n\t\t\t'title' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Navbar', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t\t'group_icon' => 'fa-layout'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_main_section',\n\t\t\t'title' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t) ,\n\t\t// array(\n\t\t// \t'id' => 'uncode_header_section',\n\t\t// \t'title' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode'),\n\t\t// \t'group' => esc_html__('General', 'uncode')\n\t\t// ) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_footer_section',\n\t\t\t'title' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_post_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Post', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t'group_icon' => 'fa-file2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Page', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($portfolio_cpt_name) . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_single_sections );\n\n\t$custom_settings_section_two = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_post_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Posts', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t'group_icon' => 'fa-archive2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Pages', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($portfolio_cpt_name) . 's</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_two );\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_index_sections );\n\n\t$custom_settings_section_three = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_search_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Search', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_404_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-help\"></i> ' . esc_html__('404', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_colors_section',\n\t\t\t'title' => '<i class=\"fa fa-drop\"></i> ' . esc_html__('Palette', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode'),\n\t\t\t'group_icon' => 'fa-eye2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_typography_section',\n\t\t\t'title' => '<i class=\"fa fa-font\"></i> ' . esc_html__('Typography', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_customize_section',\n\t\t\t'title' => '<i class=\"fa fa-box\"></i> ' . esc_html__('Customize', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_extra_section',\n\t\t\t'title' => esc_html__('Extra', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_sidebars_section',\n\t\t\t'title' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebars', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode'),\n\t\t\t'group_icon' => 'fa-cog2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_connections_section',\n\t\t\t'title' => '<i class=\"fa fa-share2\"></i> ' . esc_html__('Socials', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_gmaps_section',\n\t\t\t'title' => '<i class=\"fa fa-map-o\"></i> ' . esc_html__('Google Maps', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_redirect_section',\n\t\t\t'title' => '<i class=\"fa fa-reply2\"></i> ' . esc_html__('Redirect', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_cssjs_section',\n\t\t\t'title' => '<i class=\"fa fa-code\"></i> ' . esc_html__('CSS & JS', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_performance_section',\n\t\t\t'title' => '<i class=\"fa fa-loader\"></i> ' . esc_html__('Performance', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_three );\n\n\t$custom_settings_one = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'desc' => '',\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_width',\n\t\t\t'label' => esc_html__('Site width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter the width of your site.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\t'1200',\n\t\t\t\t'px'\n\t\t\t) ,\n\t\t\t'type' => 'measurement',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_align',\n\t\t\t'label' => esc_html__('Site layout align', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the alignment of the content area when is less then 100% width.', 'uncode') ,\n\t\t\t'std' => 'center',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_boxed',\n\t\t\t'label' => esc_html__('Boxed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate for the boxed layout.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border',\n\t\t\t'label' => esc_html__('Body frame', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the thickness of the frame around the body', 'uncode') ,\n\t\t\t'std' => '0',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border_color',\n\t\t\t'label' => esc_html__('Body frame color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body frame color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off),_uncode_body_border:not(0)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($header_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_header_full',\n\t\t\t'label' => esc_html__('Container full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the header container to full width.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($body_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_body_full',\n\t\t\t'label' => esc_html__('Content area full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the content area to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_logo_block_title',\n\t\t\t'label' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Logo', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_switch',\n\t\t\t'label' => esc_html__('Switchable logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for each skin.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo',\n\t\t\t'label' => esc_html__('Logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_light',\n\t\t\t'label' => esc_html__('Logo - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_dark',\n\t\t\t'label' => esc_html__('Logo - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_switch',\n\t\t\t'label' => esc_html__('Different Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for mobile devices.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile',\n\t\t\t'label' => esc_html__('Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for mobile. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_light',\n\t\t\t'label' => esc_html__('Logo Mobile - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_dark',\n\t\t\t'label' => esc_html__('Logo Mobile - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height',\n\t\t\t'label' => esc_html__('Logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height_mobile',\n\t\t\t'label' => esc_html__('Logo height mobile', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px for mobile version.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers',\n\t\t\t'desc' => esc_html__('Specify the menu layout.', 'uncode') ,\n\t\t\t'label' => '' ,\n\t\t\t'std' => 'hmenu-right',\n\t\t\t'type' => 'radio-image',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_hmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_v_position',\n\t\t\t'label' => esc_html__('Menu vertical alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the vertical alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'middle',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'top',\n\t\t\t\t\t'label' => esc_html__('Top', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'middle',\n\t\t\t\t\t'label' => esc_html__('Middle', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'bottom',\n\t\t\t\t\t'label' => esc_html__('Bottom', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_align',\n\t\t\t'label' => esc_html__('Menu horizontal alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_width',\n\t\t\t'label' => esc_html__('Vertical menu width','uncode') ,\n\t\t\t'desc' => esc_html__('Vertical menu width in px', 'uncode') ,\n\t\t\t'std' => '252',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'rows' => '',\n\t\t\t'post_type' => '',\n\t\t\t'taxonomy' => '',\n\t\t\t'min_max_step' => '108,504,12',\n\t\t\t'class' => '',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_accordion_active',\n\t\t\t'label' => esc_html__('Vertical menu open', 'uncode') ,\n\t\t\t'desc' => esc_html__('Open the accordion menu at the current item menu on page loading.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_full',\n\t\t\t'label' => esc_html__('Menu full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the menu to full width. (Only for the horizontal menus).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_visuals_block_title',\n\t\t\t'label' => '<i class=\"fa fa-eye2\"></i> ' . esc_html__('Visuals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shadows',\n\t\t\t'label' => esc_html__('Menu divider shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu divider shadow.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the shadow effect on menu dropdown on desktop view. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'std' => '',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xs',\n\t\t\t\t\t'label' => esc_html__('Extra Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sm',\n\t\t\t\t\t'label' => esc_html__('Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'std',\n\t\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lg',\n\t\t\t\t\t'label' => esc_html__('Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xl',\n\t\t\t\t\t'label' => esc_html__('Extra Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t),\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_darker_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown darker shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the dark shadow effect on menu dropdown on desktop view.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_submenu_shadows:not()',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_borders',\n\t\t\t'label' => esc_html__('Menu borders', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu borders.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_arrows',\n\t\t\t'label' => esc_html__('Hide dropdown arrows', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the dropdow arrows.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_transparency',\n\t\t\t'label' => esc_html__('Menu mobile transparency', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the menu transparency when possible.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding',\n\t\t\t'label' => esc_html__('Custom vertical padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate custom padding above and below the logo.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_desktop',\n\t\t\t'label' => esc_html__('Padding on desktop', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on desktop devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_mobile',\n\t\t\t'label' => esc_html__('Padding on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on mobile devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_animation_block_title',\n\t\t\t'label' => '<i class=\"fa fa-fast-forward2\"></i> ' . esc_html__('Animation', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t// 'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t// 'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky',\n\t\t\t'label' => esc_html__('Menu sticky', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky_mobile',\n\t\t\t'label' => esc_html__('Menu sticky mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu on mobile devices. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_centered',\n\t\t\t'label' => esc_html__('Menu centered mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the centered style for mobile menu. NB. You need to have the Menu Sticky Mobile active.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide',\n\t\t\t'label' => esc_html__('Menu hide', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide_mobile',\n\t\t\t'label' => esc_html__('Menu hide mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu on mobile devices. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shrink',\n\t\t\t'label' => esc_html__('Menu shrink', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the shrink menu. This is a menu where the logo shrinks after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_li_animation',\n\t\t\t'label' => esc_html__('Menu sub-levels animated', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the animation for menu sub-levels. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_animation',\n\t\t\t'label' => esc_html__('Menu open items animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu items animation when opening.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on),_uncode_menu_hide_mobile:is(on)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'scale',\n\t\t\t\t\t'label' => esc_html__('Scale', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_overlay_animation',\n\t\t\t'label' => esc_html__('Menu overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_min_logo',\n\t\t\t'label' => esc_html__('Minimum logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the minimal height of the shrinked logo in <b>px</b>.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_shrink:is(on),_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_secondary',\n\t\t\t'label' => esc_html__('Hide secondary menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the secondary menu.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_cta',\n\t\t\t'label' => esc_html__('Hide Call To Action menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the Call To Action menu.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_padding',\n\t\t\t'label' => esc_html__('Secondary menu padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to increase secondary menu padding.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_no_secondary:is(off)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_socials',\n\t\t\t'label' => esc_html__('Social icons', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the social connection icons in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search',\n\t\t\t'label' => esc_html__('Search icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the search icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search_animation',\n\t\t\t'label' => esc_html__('Search overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the search overlay animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t\t'condition' => '_uncode_menu_search:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart',\n\t\t\t'label' => esc_html__('Woocommerce cart', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Woocommerce icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_desktop',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on desktop mode (only for Overlay and Offcanvas menu).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_mobile',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar for mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on mobile mode.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bloginfo',\n\t\t\t'label' => esc_html__('Top line text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert additional text on top of the menu.','uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center),_uncode_headers:is(hmenu-center-split)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\t//////////////////////\n\t\t// Post Single\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post', $menu_section_title),\n\t\tstr_replace('%section%', 'post', $menu),\n\t\tstr_replace('%section%', 'post', $menu_width),\n\t\tstr_replace('%section%', 'post', $menu_opaque),\n\t\tstr_replace('%section%', 'post', $header_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post', $header_uncode_block),\n\t\tstr_replace('%section%', 'post', $header_revslider),\n\t\tstr_replace('%section%', 'post', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post', $header_width),\n\t\tstr_replace('%section%', 'post', $header_height),\n\t\tstr_replace('%section%', 'post', $header_min_height),\n\t\tstr_replace('%section%', 'post', $header_title),\n\t\tstr_replace('%section%', 'post', $header_style),\n\t\tstr_replace('%section%', 'post', $header_content_width),\n\t\tstr_replace('%section%', 'post', $header_custom_width),\n\t\tstr_replace('%section%', 'post', $header_align),\n\t\tstr_replace('%section%', 'post', $header_position),\n\t\tstr_replace('%section%', 'post', $header_title_font),\n\t\tstr_replace('%section%', 'post', $header_title_size),\n\t\tstr_replace('%section%', 'post', $header_title_height),\n\t\tstr_replace('%section%', 'post', $header_title_spacing),\n\t\tstr_replace('%section%', 'post', $header_title_weight),\n\t\tstr_replace('%section%', 'post', $header_title_transform),\n\t\tstr_replace('%section%', 'post', $header_title_italic),\n\t\tstr_replace('%section%', 'post', $header_text_animation),\n\t\tstr_replace('%section%', 'post', $header_animation_speed),\n\t\tstr_replace('%section%', 'post', $header_animation_delay),\n\t\tstr_replace('%section%', 'post', $header_featured),\n\t\tstr_replace('%section%', 'post', $header_background),\n\t\tstr_replace('%section%', 'post', $header_parallax),\n\t\tstr_replace('%section%', 'post', $header_kburns),\n\t\tstr_replace('%section%', 'post', $header_overlay_color),\n\t\tstr_replace('%section%', 'post', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'post', $body_section_title),\n\t\tstr_replace('%section%', 'post', $body_layout_width),\n\t\tstr_replace('%section%', 'post', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'post', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post', $breadcrumb_align),\n\t\t// str_replace('%section%', 'post', $body_uncode_block_before),\n\t\tstr_replace('%section%', 'post', $show_title),\n\t\tstr_replace('%section%', 'post', $show_media),\n\t\tstr_replace('%section%', 'post', $show_featured_media),\n\t\tstr_replace('%section%', 'post', $show_comments),\n\t\tstr_replace('%section%', 'post', $show_share),\n\t\tstr_replace('%section%', 'post', $show_tags),\n\t\tstr_replace('%section%', 'post', $show_tags_align),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after_pre),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'post', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post', $sidebar_widget),\n\t\tstr_replace('%section%', 'post', $sidebar_position),\n\t\tstr_replace('%section%', 'post', $sidebar_size),\n\t\tstr_replace('%section%', 'post', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post', $sidebar_style),\n\t\tstr_replace('%section%', 'post', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post', $sidebar_fill),\n\n\t\tstr_replace('%section%', 'post', $navigation_section_title),\n\t\tstr_replace('%section%', 'post', $navigation_activate),\n\t\tstr_replace('%section%', 'post', $navigation_page_index),\n\t\tstr_replace('%section%', 'post', $navigation_index_label),\n\t\tstr_replace('%section%', 'post', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'post', $footer_section_title),\n\t\tstr_replace('%section%', 'post', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post', $footer_width),\n\t\tstr_replace('%section%', 'post', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'post', $custom_fields_list),\n\t\t///////////////\n\t\t// Page\t\t///\n\t\t///////////////\n\t\tstr_replace('%section%', 'page', $menu_section_title),\n\t\tstr_replace('%section%', 'page', $menu),\n\t\tstr_replace('%section%', 'page', $menu_width),\n\t\tstr_replace('%section%', 'page', $menu_opaque),\n\t\tstr_replace('%section%', 'page', $header_section_title),\n\t\tstr_replace('%section%', 'page', $header_type),\n\t\tstr_replace('%section%', 'page', $header_uncode_block),\n\t\tstr_replace('%section%', 'page', $header_revslider),\n\t\tstr_replace('%section%', 'page', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page', $header_width),\n\t\tstr_replace('%section%', 'page', $header_height),\n\t\tstr_replace('%section%', 'page', $header_min_height),\n\t\tstr_replace('%section%', 'page', $header_title),\n\t\tstr_replace('%section%', 'page', $header_style),\n\t\tstr_replace('%section%', 'page', $header_content_width),\n\t\tstr_replace('%section%', 'page', $header_custom_width),\n\t\tstr_replace('%section%', 'page', $header_align),\n\t\tstr_replace('%section%', 'page', $header_position),\n\t\tstr_replace('%section%', 'page', $header_title_font),\n\t\tstr_replace('%section%', 'page', $header_title_size),\n\t\tstr_replace('%section%', 'page', $header_title_height),\n\t\tstr_replace('%section%', 'page', $header_title_spacing),\n\t\tstr_replace('%section%', 'page', $header_title_weight),\n\t\tstr_replace('%section%', 'page', $header_title_transform),\n\t\tstr_replace('%section%', 'page', $header_title_italic),\n\t\tstr_replace('%section%', 'page', $header_text_animation),\n\t\tstr_replace('%section%', 'page', $header_animation_speed),\n\t\tstr_replace('%section%', 'page', $header_animation_delay),\n\t\tstr_replace('%section%', 'page', $header_featured),\n\t\tstr_replace('%section%', 'page', $header_background),\n\t\tstr_replace('%section%', 'page', $header_parallax),\n\t\tstr_replace('%section%', 'page', $header_kburns),\n\t\tstr_replace('%section%', 'page', $header_overlay_color),\n\t\tstr_replace('%section%', 'page', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page', $header_scrolldown),\n\t\tstr_replace('%section%', 'page', $body_section_title),\n\t\tstr_replace('%section%', 'page', $body_layout_width),\n\t\tstr_replace('%section%', 'page', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'page', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'page', $show_media),\n\t\tstr_replace('%section%', 'page', $show_featured_media),\n\t\tstr_replace('%section%', 'page', $show_comments),\n\t\tstr_replace('%section%', 'page', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'page', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page', $sidebar_activate),\n\t\tstr_replace('%section%', 'page', $sidebar_widget),\n\t\tstr_replace('%section%', 'page', $sidebar_position),\n\t\tstr_replace('%section%', 'page', $sidebar_size),\n\t\tstr_replace('%section%', 'page', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page', $sidebar_style),\n\t\tstr_replace('%section%', 'page', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page', $sidebar_fill),\n\t\tstr_replace('%section%', 'page', $footer_section_title),\n\t\tstr_replace('%section%', 'page', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page', $footer_width),\n\t\tstr_replace('%section%', 'page', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'page', $custom_fields_list),\n\t\t///////////////////////////\n\t\t// Portfolio Single\t\t///\n\t\t///////////////////////////\n\t\tstr_replace('%section%', 'portfolio', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio', $menu),\n\t\tstr_replace('%section%', 'portfolio', $menu_width),\n\t\tstr_replace('%section%', 'portfolio', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio', $header_type),\n\t\tstr_replace('%section%', 'portfolio', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio', $header_width),\n\t\tstr_replace('%section%', 'portfolio', $header_height),\n\t\tstr_replace('%section%', 'portfolio', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title),\n\t\tstr_replace('%section%', 'portfolio', $header_style),\n\t\tstr_replace('%section%', 'portfolio', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio', $header_align),\n\t\tstr_replace('%section%', 'portfolio', $header_position),\n\t\tstr_replace('%section%', 'portfolio', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio', $header_featured),\n\t\tstr_replace('%section%', 'portfolio', $header_background),\n\t\tstr_replace('%section%', 'portfolio', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'portfolio', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'portfolio', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'portfolio', $show_media),\n\t\tstr_replace('%section%', 'portfolio', $show_featured_media),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_comments, 'std', 'off')),\n\t\tstr_replace('%section%', 'portfolio', $show_share),\n\t\tstr_replace('%section%', 'portfolio', $body_uncode_block_after),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . esc_html__('Details', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Create here all the %s details label that you need.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_portfolio_detail_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'detail-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => sprintf(esc_html__('Unique %s detail ID','uncode') , $portfolio_cpt_name) ,\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_position',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details layout', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Specify the layout template for all the %s posts.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_top',\n\t\t\t\t\t'label' => esc_html__('Details on the top', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t\t'label' => esc_html__('Details on the right', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_bottom',\n\t\t\t\t\t'label' => esc_html__('Details on the bottom', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t\t'label' => esc_html__('Details on the left', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_size',\n\t\t\t'label' => esc_html__('Sidebar size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set the sidebar size.', 'uncode') ,\n\t\t\t'std' => '4',\n\t\t\t'min_max_step' => '1,12,1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t) ,\n\t\tstr_replace('%section%', 'portfolio', run_array_to($sidebar_sticky, 'condition', '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar text skin color.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_bgcolor',\n\t\t\t'label' => esc_html__('Sidebar color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_fill',\n\t\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'std' => 'off',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_sidebar_bgcolor:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t),\n\t\tstr_replace('%section%', 'portfolio', $navigation_section_title),\n\t\tstr_replace('%section%', 'portfolio', $navigation_activate),\n\t\tstr_replace('%section%', 'portfolio', $navigation_page_index),\n\t\tstr_replace('%section%', 'portfolio', $navigation_index_label),\n\t\tstr_replace('%section%', 'portfolio', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $footer_width),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_list),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_single_options );\n\n\t$custom_settings_two = array(\n\t\t///////////////////\n\t\t// Page 404\t\t///\n\t\t///////////////////\n\t\tstr_replace('%section%', '404', $menu_section_title),\n\t\tstr_replace('%section%', '404', $menu),\n\t\tstr_replace('%section%', '404', $menu_width),\n\t\tstr_replace('%section%', '404', $menu_opaque),\n\t\tstr_replace('%section%', '404', $header_section_title),\n\t\tstr_replace('%section%', '404', $header_type),\n\t\tstr_replace('%section%', '404', $header_uncode_block),\n\t\tstr_replace('%section%', '404', $header_revslider),\n\t\tstr_replace('%section%', '404', $header_layerslider),\n\n\t\tstr_replace('%section%', '404', $header_width),\n\t\tstr_replace('%section%', '404', $header_height),\n\t\tstr_replace('%section%', '404', $header_min_height),\n\t\tstr_replace('%section%', '404', $header_title),\n\t\tstr_replace('%section%', '404', $header_title_text),\n\t\tstr_replace('%section%', '404', $header_style),\n\t\tstr_replace('%section%', '404', $header_content_width),\n\t\tstr_replace('%section%', '404', $header_custom_width),\n\t\tstr_replace('%section%', '404', $header_align),\n\t\tstr_replace('%section%', '404', $header_position),\n\t\tstr_replace('%section%', '404', $header_title_font),\n\t\tstr_replace('%section%', '404', $header_title_size),\n\t\tstr_replace('%section%', '404', $header_title_height),\n\t\tstr_replace('%section%', '404', $header_title_spacing),\n\t\tstr_replace('%section%', '404', $header_title_weight),\n\t\tstr_replace('%section%', '404', $header_title_transform),\n\t\tstr_replace('%section%', '404', $header_title_italic),\n\t\tstr_replace('%section%', '404', $header_text_animation),\n\t\tstr_replace('%section%', '404', $header_animation_speed),\n\t\tstr_replace('%section%', '404', $header_animation_delay),\n\t\tstr_replace('%section%', '404', $header_background),\n\t\tstr_replace('%section%', '404', $header_parallax),\n\t\tstr_replace('%section%', '404', $header_kburns),\n\t\tstr_replace('%section%', '404', $header_overlay_color),\n\t\tstr_replace('%section%', '404', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', '404', $header_scroll_opacity),\n\t\tstr_replace('%section%', '404', $header_scrolldown),\n\n\t\tstr_replace('%section%', '404', $body_section_title),\n\t\tstr_replace('%section%', '404', $body_layout_width),\n\t\tstr_replace('%section%', '404', $uncodeblock_404),\n\t\tstr_replace('%section%', '404', $uncodeblocks_404),\n\t\tstr_replace('%section%', '404', $footer_section_title),\n\t\tstr_replace('%section%', '404', $footer_uncode_block),\n\t\tstr_replace('%section%', '404', $footer_width),\n\t\t//////////////////////\n\t\t// Posts Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post_index', $menu_section_title),\n\t\tstr_replace('%section%', 'post_index', $menu),\n\t\tstr_replace('%section%', 'post_index', $menu_width),\n\t\tstr_replace('%section%', 'post_index', $menu_opaque),\n\t\tstr_replace('%section%', 'post_index', $header_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $header_revslider),\n\t\tstr_replace('%section%', 'post_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post_index', $header_width),\n\t\tstr_replace('%section%', 'post_index', $header_height),\n\t\tstr_replace('%section%', 'post_index', $header_min_height),\n\t\tstr_replace('%section%', 'post_index', $header_title),\n\t\tstr_replace('%section%', 'post_index', $header_style),\n\t\tstr_replace('%section%', 'post_index', $header_content_width),\n\t\tstr_replace('%section%', 'post_index', $header_custom_width),\n\t\tstr_replace('%section%', 'post_index', $header_align),\n\t\tstr_replace('%section%', 'post_index', $header_position),\n\t\tstr_replace('%section%', 'post_index', $header_title_font),\n\t\tstr_replace('%section%', 'post_index', $header_title_size),\n\t\tstr_replace('%section%', 'post_index', $header_title_height),\n\t\tstr_replace('%section%', 'post_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'post_index', $header_title_weight),\n\t\tstr_replace('%section%', 'post_index', $header_title_transform),\n\t\tstr_replace('%section%', 'post_index', $header_title_italic),\n\t\tstr_replace('%section%', 'post_index', $header_text_animation),\n\t\tstr_replace('%section%', 'post_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'post_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'post_index', $header_featured),\n\t\tstr_replace('%section%', 'post_index', $header_background),\n\t\tstr_replace('%section%', 'post_index', $header_parallax),\n\t\tstr_replace('%section%', 'post_index', $header_kburns),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'post_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'post_index', $body_section_title),\n\t\tstr_replace('%section%', 'post_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'post_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $body_layout_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'post_index', $show_title),\n\t\tstr_replace('%section%', 'post_index', $remove_pagination),\n\t\tstr_replace('%section%', 'post_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'post_index', $sidebar_position),\n\t\tstr_replace('%section%', 'post_index', $sidebar_size),\n\t\tstr_replace('%section%', 'post_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post_index', $sidebar_style),\n\t\tstr_replace('%section%', 'post_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'post_index', $footer_section_title),\n\t\tstr_replace('%section%', 'post_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $footer_width),\n\t\t//////////////////////\n\t\t// Pages Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'page_index', $menu_section_title),\n\t\tstr_replace('%section%', 'page_index', $menu),\n\t\tstr_replace('%section%', 'page_index', $menu_width),\n\t\tstr_replace('%section%', 'page_index', $menu_opaque),\n\t\tstr_replace('%section%', 'page_index', $header_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'page_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $header_revslider),\n\t\tstr_replace('%section%', 'page_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page_index', $header_width),\n\t\tstr_replace('%section%', 'page_index', $header_height),\n\t\tstr_replace('%section%', 'page_index', $header_min_height),\n\t\tstr_replace('%section%', 'page_index', $header_title),\n\t\tstr_replace('%section%', 'page_index', $header_style),\n\t\tstr_replace('%section%', 'page_index', $header_content_width),\n\t\tstr_replace('%section%', 'page_index', $header_custom_width),\n\t\tstr_replace('%section%', 'page_index', $header_align),\n\t\tstr_replace('%section%', 'page_index', $header_position),\n\t\tstr_replace('%section%', 'page_index', $header_title_font),\n\t\tstr_replace('%section%', 'page_index', $header_title_size),\n\t\tstr_replace('%section%', 'page_index', $header_title_height),\n\t\tstr_replace('%section%', 'page_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'page_index', $header_title_weight),\n\t\tstr_replace('%section%', 'page_index', $header_title_transform),\n\t\tstr_replace('%section%', 'page_index', $header_title_italic),\n\t\tstr_replace('%section%', 'page_index', $header_text_animation),\n\t\tstr_replace('%section%', 'page_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'page_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'page_index', $header_featured),\n\t\tstr_replace('%section%', 'page_index', $header_background),\n\t\tstr_replace('%section%', 'page_index', $header_parallax),\n\t\tstr_replace('%section%', 'page_index', $header_kburns),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding_mobile),\n\n\t\tstr_replace('%section%', 'page_index', $body_section_title),\n\t\tstr_replace('%section%', 'page_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $body_layout_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'page_index', $show_title),\n\t\tstr_replace('%section%', 'page_index', $remove_pagination),\n\t\tstr_replace('%section%', 'page_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'page_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'page_index', $sidebar_position),\n\t\tstr_replace('%section%', 'page_index', $sidebar_size),\n\t\tstr_replace('%section%', 'page_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page_index', $sidebar_style),\n\t\tstr_replace('%section%', 'page_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'page_index', $footer_section_title),\n\t\tstr_replace('%section%', 'page_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $footer_width),\n\t\t////////////////////////\n\t\t// Archive Index\t\t///\n\t\t////////////////////////\n\t\tstr_replace('%section%', 'portfolio_index', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $menu),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_width),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio_index', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'portfolio_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio_index', $header_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title),\n\t\tstr_replace('%section%', 'portfolio_index', $header_style),\n\t\tstr_replace('%section%', 'portfolio_index', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_align),\n\t\tstr_replace('%section%', 'portfolio_index', $header_position),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio_index', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio_index', $header_featured),\n\t\tstr_replace('%section%', 'portfolio_index', $header_background),\n\t\tstr_replace('%section%', 'portfolio_index', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio_index', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'portfolio_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'portfolio_index', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'portfolio_index', $show_title),\n\t\tstr_replace('%section%', 'portfolio_index', $remove_pagination),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_position),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_size),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_style),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_width),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_two );\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_index_options );\n\n\t$custom_settings_three = array(\n\t\t///////////////////////\n\t\t// Search Index\t\t///\n\t\t///////////////////////\n\t\tstr_replace('%section%', 'search_index', $menu_section_title),\n\t\tstr_replace('%section%', 'search_index', $menu),\n\t\tstr_replace('%section%', 'search_index', $menu_width),\n\t\tstr_replace('%section%', 'search_index', $menu_opaque),\n\t\tstr_replace('%section%', 'search_index', $header_section_title),\n\t\tstr_replace('%section%', 'search_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'search_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $header_revslider),\n\t\tstr_replace('%section%', 'search_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'search_index', $header_width),\n\t\tstr_replace('%section%', 'search_index', $header_height),\n\t\tstr_replace('%section%', 'search_index', $header_min_height),\n\t\tstr_replace('%section%', 'search_index', $header_title),\n\t\tstr_replace('%section%', 'search_index', $header_title_text),\n\t\tstr_replace('%section%', 'search_index', $header_style),\n\t\tstr_replace('%section%', 'search_index', $header_content_width),\n\t\tstr_replace('%section%', 'search_index', $header_custom_width),\n\t\tstr_replace('%section%', 'search_index', $header_align),\n\t\tstr_replace('%section%', 'search_index', $header_position),\n\t\tstr_replace('%section%', 'search_index', $header_title_font),\n\t\tstr_replace('%section%', 'search_index', $header_title_size),\n\t\tstr_replace('%section%', 'search_index', $header_title_height),\n\t\tstr_replace('%section%', 'search_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'search_index', $header_title_weight),\n\t\tstr_replace('%section%', 'search_index', $header_title_transform),\n\t\tstr_replace('%section%', 'search_index', $header_title_italic),\n\t\tstr_replace('%section%', 'search_index', $header_text_animation),\n\t\tstr_replace('%section%', 'search_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'search_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'search_index', $header_background),\n\t\tstr_replace('%section%', 'search_index', $header_parallax),\n\t\tstr_replace('%section%', 'search_index', $header_kburns),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'search_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'search_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'search_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'search_index', $body_section_title),\n\t\tstr_replace('%section%', 'search_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $body_layout_width),\n\t\tstr_replace('%section%', 'search_index', $remove_pagination),\n\t\tstr_replace('%section%', 'search_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'search_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'search_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'search_index', $sidebar_position),\n\t\tstr_replace('%section%', 'search_index', $sidebar_size),\n\t\tstr_replace('%section%', 'search_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'search_index', $sidebar_style),\n\t\tstr_replace('%section%', 'search_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'search_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'search_index', $footer_section_title),\n\t\tstr_replace('%section%', 'search_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $footer_width),\n\n\t\tarray(\n\t\t\t'id' => '_uncode_sidebars',\n\t\t\t'label' => esc_html__('Site sidebars', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the sidebars you will need. A default sidebar is already defined.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_sidebars_section',\n\t\t\t'class' => 'list-item',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_sidebar_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'sidebar-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique sidebar ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_groups',\n\t\t\t'label' => esc_html__('Custom fonts', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the fonts you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => 'Font Default',\n\t\t\t\t\t'_uncode_font_group_unique_id' => 'font-555555',\n\t\t\t\t\t'_uncode_font_group' => 'manual',\n\t\t\t\t\t'_uncode_font_manual' => '-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'font-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group',\n\t\t\t\t\t'label' => esc_html__('Uncode font', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify a font.', 'uncode') ,\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => $title_font,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_manual',\n\t\t\t\t\t'label' => esc_html__('Font family', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter a font family.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '_uncode_font_group:is(manual)',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_size',\n\t\t\t'label' => esc_html__('Default font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for p,li,dt,dd,dl,address,label,small,pre in px.', 'uncode') ,\n\t\t\t'std' => '15',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_large_text_size',\n\t\t\t'label' => esc_html__('Large text font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for large text in px.', 'uncode') ,\n\t\t\t'std' => '18',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h1',\n\t\t\t'label' => esc_html__('Font size H1', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H1 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '35',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h2',\n\t\t\t'label' => esc_html__('Font size H2', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H2 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '29',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h3',\n\t\t\t'label' => esc_html__('Font size H3', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H3 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '24',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h4',\n\t\t\t'label' => esc_html__('Font size H4', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H4 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h5',\n\t\t\t'label' => esc_html__('Font size H5', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H5 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '17',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h6',\n\t\t\t'label' => esc_html__('Font size H6', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H6 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '14',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_sizes',\n\t\t\t'label' => esc_html__('Custom font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font sizes you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontsize-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font size ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size',\n\t\t\t\t\t'label' => esc_html__('Font size', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Font size in <b>px</b>.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_heights',\n\t\t\t'label' => esc_html__('Custom line height', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font line heights you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontheight-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font height ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height',\n\t\t\t\t\t'label' => esc_html__('Font line height', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Insert a line height.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_spacings',\n\t\t\t'label' => esc_html__('Custom letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the letter spacings you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontspace-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique letter spacing ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing',\n\t\t\t\t\t'label' => esc_html__('Letter spacing', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Letter spacing with the unit (em or px). Ex. 0.2em', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_colors_list',\n\t\t\t'label' => esc_html__('Color palettes', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define all the colors you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Black','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-jevc',\n\t\t\t\t\t'_uncode_custom_color' => '#000000',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-nhtu',\n\t\t\t\t\t'_uncode_custom_color' => '#101213',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wayh',\n\t\t\t\t\t'_uncode_custom_color' => '#141618',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-rgdb',\n\t\t\t\t\t'_uncode_custom_color' => '#1b1d1f',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-prif',\n\t\t\t\t\t'_uncode_custom_color' => '#303133',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('White','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-xsdn',\n\t\t\t\t\t'_uncode_custom_color' => '#ffffff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-lxmt',\n\t\t\t\t\t'_uncode_custom_color' => '#f7f7f7',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-gyho',\n\t\t\t\t\t'_uncode_custom_color' => '#eaeaea',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-uydo',\n\t\t\t\t\t'_uncode_custom_color' => '#dddddd',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wvjs',\n\t\t\t\t\t'_uncode_custom_color' => '#777',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Cerulean','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-vyce',\n\t\t\t\t\t'_uncode_custom_color' => '#0cb4ce',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Blue Ribbon','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-210407',\n\t\t\t\t\t'_uncode_custom_color' => '#006cff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_colors_section',\n\t\t\t'class' => 'list-colors',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_unique_id',\n\t\t\t\t\t'std' => 'color-',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique color ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_regular',\n\t\t\t\t\t'label' => esc_html__('Monochrome', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to assign a monochromatic color, otherwise a gradient will be used.', 'uncode') ,\n\t\t\t\t\t'std' => 'on',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'section' => 'uncode_customize_section',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color',\n\t\t\t\t\t'label' => esc_html__('Colorpicker', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the color for this palette. You can also define a color with the alpha value.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(on)',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_gradient',\n\t\t\t\t\t'label' => esc_html__('Gradient', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the gradient color for this palette. NB. You can use a gradient color only as a background color.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'gradientpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(off)',\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_light_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-o\"></i> ' . esc_html__('Light skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_light',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_light',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_light',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-gyho',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_light',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_light',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_light',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-wvjs',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_light',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_dark_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square\"></i> ' . esc_html__('Dark skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_dark',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_dark',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-rgdb',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_dark',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_dark',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_dark',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_dark',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_background',\n\t\t\t'label' => esc_html__('HTML body background', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body background color and media.', 'uncode') ,\n\t\t\t'type' => 'background',\n\t\t\t'std' => array(\n\t\t\t\t'background-color' => 'color-lxmt',\n\t\t\t\t'background-repeat' => '',\n\t\t\t\t'background-attachment' => '',\n\t\t\t\t'background-position' => '',\n\t\t\t\t'background-size' => '',\n\t\t\t\t'background-image' => '',\n\t\t\t),\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_accent_color',\n\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the accent color.', 'uncode') ,\n\t\t\t'std' => 'color-210407',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_link_color',\n\t\t\t'label' => esc_html__('Links color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the color of links in page textual contents.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'accent',\n\t\t\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_family',\n\t\t\t'label' => esc_html__('Body font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_weight',\n\t\t\t'label' => esc_html__('Body font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font weight.', 'uncode') ,\n\t\t\t'std' => '400',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_family',\n\t\t\t'label' => esc_html__('UI font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_weight',\n\t\t\t'label' => esc_html__('UI font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_family',\n\t\t\t'label' => esc_html__('Headings font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_weight',\n\t\t\t'label' => esc_html__('Headings font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Headings font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Headings letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs.', 'uncode') ,\n\t\t\t'std' => '0.00',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_input_underline',\n\t\t\t'label' => esc_html__('Input text underlined', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to style all the input text with the underline.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_fallback_font',\n\t\t\t'label' => esc_html__('Fallback font', 'uncode') ,\n\t\t\t'desc' => esc_html__('Select a font to use as fallback when Google Fonts import is not available.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_overlay_menu_style',\n\t\t\t'label' => esc_html__('Overlay menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_hover',\n\t\t\t'label' => esc_html__('Menu highlight color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu active and hover effect color (If not specified an opaque version of the menu color will be used).', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_menu_style',\n\t\t\t'label' => esc_html__('Primary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_submenu_style',\n\t\t\t'label' => esc_html__('Primary submenu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_menu_style',\n\t\t\t'label' => esc_html__('Secondary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu skin.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_size',\n\t\t\t'label' => esc_html__('Menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size. NB: the Overlay menu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_font_size',\n\t\t\t'label' => esc_html__('Submenu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the submenu font size. NB: the Overlay submenu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_font_size',\n\t\t\t'label' => esc_html__('Mobile menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size for mobile (when the Navbar > Animation > is not Menu Centered Mobile).', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_family',\n\t\t\t'label' => esc_html__('Menu font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_weight',\n\t\t\t'label' => esc_html__('Menu font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Menu letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs (the default value is 0.05).', 'uncode') ,\n\t\t\t'std' => '0.05',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_first_uppercase',\n\t\t\t'label' => esc_html__('Menu first level uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform the first menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_other_uppercase',\n\t\t\t'label' => esc_html__('Menu other levels uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform all the others menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_bg_color',\n\t\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom content background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_buttons_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Buttons and Forms', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_family',\n\t\t\t'label' => esc_html__('Buttons font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_weight',\n\t\t\t'label' => esc_html__('Buttons font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_text_transform',\n\t\t\t'label' => esc_html__('Buttons text transform', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons text transform.', 'uncode') ,\n\t\t\t'std' => 'uppercase',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'initial',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'uppercase',\n\t\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lowercase',\n\t\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'capitalize',\n\t\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_letter_spacing',\n\t\t\t'label' => esc_html__('Buttons letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing value.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $btn_letter_spacing,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_border_width',\n\t\t\t'label' => esc_html__('Button and form fields border', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the width of the borders for buttons and form fields', 'uncode') ,\n\t\t\t'std' => '1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,5,1',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_button_hover',\n\t\t\t'label' => esc_html__('Button hover effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify an effect on hover state.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Outlined', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'full-colored',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_style',\n\t\t\t'label' => esc_html__('Copyright area skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the copyright area skin color.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_bg_color',\n\t\t\t'label' => esc_html__('Copyright area custom background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom copyright area background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_extra_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Scroll & Parallax', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant',\n\t\t\t'label' => esc_html__('ScrollTo constant speed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to always have a constant speed when scrolling to point.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant_factor',\n\t\t\t'label' => esc_html__('ScrollTo constant speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the constant scroll speed factor. Default 2', 'uncode') ,\n\t\t\t'std' => '2',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,15,0.25',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_speed_value',\n\t\t\t'label' => esc_html__('ScrollTo speed fixed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the scroll speed time in milliseconds.', 'uncode') ,\n\t\t\t'std' => '1000',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_parallax_factor',\n\t\t\t'label' => esc_html__('Parallax speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the parallax speed factor. Default 2.5', 'uncode') ,\n\t\t\t'std' => '2.5',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0.5,3,0.5',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_portfolio_block_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT label', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type label.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt_slug',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT slug', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type slug.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t)\n\t);\n\n\tif (class_exists('WooCommerce')) {\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_block_title',\n\t\t\t'label' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_cart_icon',\n\t\t\t'label' => esc_html__('Cart icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the cart icon', 'uncode') ,\n\t\t\t'std' => 'fa fa-bag',\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'button_icon_container',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_hooks',\n\t\t\t'label' => esc_html__('Enable Hooks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable default WooCommerce hooks on product loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_enhanced_atc',\n\t\t\t'label' => esc_html__('Enhance Add To Cart Button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable the enhanced Add To Cart button on loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\t}\n\n\t$custom_settings_four = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_admin_block_title',\n\t\t\t'label' => '<i class=\"fa fa-dashboard\"></i> ' . esc_html__('Admin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_admin_help',\n\t\t\t'label' => esc_html__('Help button in admin bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Uncode help button in the WP admin bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t);\n\n\t$custom_settings_five = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_layout_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_full',\n\t\t\t'label' => esc_html__('Footer full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Expand the footer to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-cog2\"></i> ' . esc_html__('Widget area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_block',\n\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Content Block to use as a footer content.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'custom-post-type-select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'post_type' => 'uncodeblock',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_block_title',\n\t\t\t'label' => '<i class=\"fa fa-copyright\"></i> ' . esc_html__('Copyright area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_copy_hide',\n\t\t\t'label' => esc_html__('Hide Copyright Area', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'desc' => esc_html__('Activate this to hide the Copyright Area.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_copyright',\n\t\t\t'label' => esc_html__('Automatic copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use an automatic copyright text.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_text',\n\t\t\t'label' => esc_html__('Custom copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert a custom text for the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_footer_copyright:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_position',\n\t\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the footer copyright text alignment.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_social',\n\t\t\t'label' => esc_html__('Social links', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to have the social icons in the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow',\n\t\t\t'label' => esc_html__('Scroll up button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow_mobile',\n\t\t\t'label' => esc_html__('Scroll up button on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer for mobile devices.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'condition' => '_uncode_footer_uparrow:is(on)',\n\t\t\t'operator' => 'and',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_social_list',\n\t\t\t'label' => esc_html__('Social Networks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the social networks you will need.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_connections_section',\n\t\t\t'class' => 'list-social',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'social-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique social ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social',\n\t\t\t\t\t'label' => esc_html__('Social Network Icon', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the social network icon.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'class' => 'button_icon_container',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_link',\n\t\t\t\t\t'label' => esc_html__('Social Network Link', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter your social network link.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_menu_hidden',\n\t\t\t\t\t'label' => esc_html__('Hide In The Menu', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to hide the social icon in the menu (if the social connections in the menu is active).', 'uncode') ,\n\t\t\t\t\t'std' => 'off',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_gmaps_api',\n\t\t\t'label' => esc_html__('Google Maps API KEY', 'uncode') ,\n\t\t\t'desc' => sprintf( wp_kses(__( 'To use Uncode custom styled Google Maps you need to create <a href=\"%s\" target=\"_blank\">here the Google API KEY</a> and paste it in this field.', 'uncode' ), array( 'a' => array( 'href' => array(),'target' => array() ) ) ), 'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key' ),\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_gmaps_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_css',\n\t\t\t'label' => esc_html__('CSS', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom CSS.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'css',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_js',\n\t\t\t'label' => esc_html__('Javascript', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Javacript code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_tracking',\n\t\t\t'label' => esc_html__('Tracking', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Tracking code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive',\n\t\t\t'label' => esc_html__('Adaptive images', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to take advantage of the Adaptive Images system. Adaptive Images detects your visitor\\'s screen size and automatically delivers device appropriate re-scaled images.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async',\n\t\t\t'label' => esc_html__('Asynchronous adaptive image system', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to load the adaptive images asynchronously, this will improve the loading performance and it\\'s necessary if using an aggresive caching system.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async_blur',\n\t\t\t'label' => esc_html__('Asynchronous loading blur effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use a bluring effect when loading the images.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_async:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_mobile_advanced',\n\t\t\t'label' => esc_html__('Mobile settings', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to set specific mobile options.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_use_orientation_width',\n\t\t\t'label' => esc_html__('Use current mobile orientation width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use the current mobile orientation width (portrait or landscape) instead of the max device\\'s width (landscape).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_limit_density',\n\t\t\t'label' => esc_html__('Limit device density', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to limit the pixel density to 2 when generating the most appropriate image for high pixel density displays.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_quality',\n\t\t\t'label' => esc_html__('Image quality', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the images compression quality.', 'uncode') ,\n\t\t\t'std' => '90',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '60,100,1',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_sizes',\n\t\t\t'label' => esc_html__('Image sizes range', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter all the image sizes you want use for the Adaptive Images system. NB. The values needs to be comma separated.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'std' => '258,516,720,1032,1440,2064,2880',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_htaccess',\n\t\t\t'label' => esc_html__('Apache Server Configs', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the enhanced .htaccess, this will improve the web site\\'s performance and security.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_production',\n\t\t\t'label' => esc_html__('Production mode', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to switch to production mode, the CSS and JS will be cached by the browser and the JS minified.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect',\n\t\t\t'label' => esc_html__('Activate page redirect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to redirect all the website calls to a specific page. NB. This can only be visible when the user is not logged in.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect_page',\n\t\t\t'label' => esc_html__('Redirect page', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the redirect page. NB. This page will be presented without menu and footer.', 'uncode') ,\n\t\t\t'type' => 'page_select',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t\t'post_type' => 'page',\n\t\t\t'condition' => '_uncode_redirect:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_three );\n\n\tif ( ! defined('ENVATO_HOSTED_SITE') )\n\t\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_four );\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_five );\n\n\t$custom_settings = array(\n\t\t'sections' => $custom_settings_section_one,\n\t\t'settings' => $custom_settings_one,\n\t);\n\n\tif (class_exists('WooCommerce'))\n\t{\n\n\t\t$woo_section = array(\n\t\t\t// array(\n\t\t\t// \t'id' => 'uncode_woocommerce_section',\n\t\t\t// \t'title' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode')\n\t\t\t// ),\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Product', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_index_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Products', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t) ,\n\t\t);\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Select…', 'uncode')\n\t\t);\n\t\t$menu_array = array();\n\t\t$nav_menus = get_registered_nav_menus();\n\n\t\tforeach ($nav_menus as $location => $description)\n\t\t{\n\n\t\t\t$menu_array['value'] = $location;\n\t\t\t$menu_array['label'] = $description;\n\t\t\t$menus_array[] = $menu_array;\n\t\t}\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => 'social',\n\t\t\t'label' => esc_html__('Social Menu', 'uncode')\n\t\t);\n\n\t\t$woocommerce_post = array(\n\t\t\t/////////////////////////\n\t\t\t// Product Single\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product', $menu),\n\t\t\tstr_replace('%section%', 'product', $menu_width),\n\t\t\tstr_replace('%section%', 'product', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product', $header_section_title),\n\t\t\tstr_replace('%section%', 'product', $header_type),\n\t\t\tstr_replace('%section%', 'product', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $header_revslider),\n\t\t\tstr_replace('%section%', 'product', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product', $header_width),\n\t\t\tstr_replace('%section%', 'product', $header_height),\n\t\t\tstr_replace('%section%', 'product', $header_min_height),\n\t\t\tstr_replace('%section%', 'product', $header_title),\n\t\t\tstr_replace('%section%', 'product', $header_style),\n\t\t\tstr_replace('%section%', 'product', $header_content_width),\n\t\t\tstr_replace('%section%', 'product', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product', $header_align),\n\t\t\tstr_replace('%section%', 'product', $header_position),\n\t\t\tstr_replace('%section%', 'product', $header_title_font),\n\t\t\tstr_replace('%section%', 'product', $header_title_size),\n\t\t\tstr_replace('%section%', 'product', $header_title_height),\n\t\t\tstr_replace('%section%', 'product', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product', $header_featured),\n\t\t\tstr_replace('%section%', 'product', $header_background),\n\t\t\tstr_replace('%section%', 'product', $header_parallax),\n\t\t\tstr_replace('%section%', 'product', $header_kburns),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product', $header_scrolldown),\n\n\t\t\tstr_replace('%section%', 'product', $body_section_title),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width_custom),\n\t\t\tstr_replace('%section%', 'product', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product', $show_title),\n\t\t\tstr_replace('%section%', 'product', $show_share),\n\t\t\tstr_replace('%section%', 'product', $image_layout),\n\t\t\tstr_replace('%section%', 'product', $media_size),\n\t\t\tstr_replace('%section%', 'product', $enable_sticky_desc),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_zoom),\n\t\t\tstr_replace('%section%', 'product', $thumb_cols),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_slider),\n\t\t\tstr_replace('%section%', 'product', $body_uncode_block_after),\n\t\t\tstr_replace('%section%', 'product', $navigation_section_title),\n\t\t\tstr_replace('%section%', 'product', $navigation_activate),\n\t\t\tstr_replace('%section%', 'product', $navigation_page_index),\n\t\t\tstr_replace('%section%', 'product', $navigation_index_label),\n\t\t\tstr_replace('%section%', 'product', $navigation_nextprev_title),\n\t\t\tstr_replace('%section%', 'product', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $footer_width),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_section_title),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_list),\n\t\t\t/////////////////////////\n\t\t\t// Products Index\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product_index', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $menu),\n\t\t\tstr_replace('%section%', 'product_index', $menu_width),\n\t\t\tstr_replace('%section%', 'product_index', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product_index', $header_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\t\tstr_replace('%section%', 'product_index', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $header_revslider),\n\t\t\tstr_replace('%section%', 'product_index', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product_index', $header_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_min_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title),\n\t\t\tstr_replace('%section%', 'product_index', $header_style),\n\t\t\tstr_replace('%section%', 'product_index', $header_content_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_align),\n\t\t\tstr_replace('%section%', 'product_index', $header_position),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_font),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_size),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product_index', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product_index', $header_featured),\n\t\t\tstr_replace('%section%', 'product_index', $header_background),\n\t\t\tstr_replace('%section%', 'product_index', $header_parallax),\n\t\t\tstr_replace('%section%', 'product_index', $header_kburns),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product_index', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product_index', $header_scrolldown),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding_mobile),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_activate),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_text),\n\t\t\tstr_replace('%section%', 'product_index', $subtitle_archive_custom_text),\n\n\t\t\tstr_replace('%section%', 'product_index', $body_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product_index', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product_index', $body_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product_index', $body_single_post_width),\n\t\t\tstr_replace('%section%', 'product_index', $show_title),\n\t\t\tstr_replace('%section%', 'product_index', $remove_pagination),\n\t\t\tstr_replace('%section%', 'product_index', $products_per_page),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_widget),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_position),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_size),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_sticky),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_style),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_bgcolor),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_fill),\n\t\t\tstr_replace('%section%', 'product_index', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $footer_width),\n\t\t);\n\n\t\t$custom_settings['sections'] = array_merge( $custom_settings['sections'], $woo_section );\n\t\t// array_push($custom_settings['settings'], $woocommerce_cart_icon);\n\t\t// array_push($custom_settings['settings'], $woocommerce_hooks);\n\t\t$custom_settings['settings'] = array_merge( $custom_settings['settings'], $woocommerce_post );\n\n\t}\n\n\t$custom_settings['settings'] = array_filter( $custom_settings['settings'], 'uncode_is_not_null' );\n\n\t/* allow settings to be filtered before saving */\n\t$custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);\n\n\t/* settings are not the same update the DB */\n\tif ($saved_settings !== $custom_settings)\n\t{\n\t\tupdate_option(ot_settings_id() , $custom_settings);\n\t}\n\n\t/**\n\t * Filter on layout images.\n\t */\n\tfunction filter_layout_radio_images($array, $layout)\n\t{\n\n\t\t/* only run the filter where the field ID is my_radio_images */\n\t\tif ($layout == '_uncode_headers')\n\t\t{\n\t\t\t$array = array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-right.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-justify',\n\t\t\t\t\t'label' => esc_html__('Justify', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-justify.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-left.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-split',\n\t\t\t\t\t'label' => esc_html__('Center Split', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-splitted.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-double',\n\t\t\t\t\t'label' => esc_html__('Center Double', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center-double.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu',\n\t\t\t\t\t'label' => esc_html__('Lateral', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/vmenu.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu-offcanvas',\n\t\t\t\t\t'label' => esc_html__('Offcanvas', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/offcanvas.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay',\n\t\t\t\t\t'label' => esc_html__('Overlay', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay-center',\n\t\t\t\t\t'label' => esc_html__('Overlay Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay-center.jpg'\n\t\t\t\t) ,\n\t\t\t);\n\t\t}\n\t\treturn $array;\n\t}\n\tadd_filter('ot_radio_images', 'filter_layout_radio_images', 10, 2);\n}", "public function add_theme_support() {\n\t}", "public function use_default_gallery_style_filter() {\n \treturn false;\n }", "function theme_setup() {\n\n add_theme_support('automatic-feed-links');\n// Switches default core markup for search form, comment form, and comments\n// to output valid HTML5.\n add_theme_support('html5', array('search-form', 'comment-form', 'comment-list'));\n\n// This theme uses wp_nav_menu() in one location.\n register_nav_menu('primary', __('Top Menu', 'law-firm'));\n register_nav_menu('secondary', __('Footer Menu', 'law-firm'));\n\n /*\n * This theme uses a custom image size for featured images, displayed on\n * \"standard\" posts and pages.\n */\n add_theme_support('post-thumbnails');\n set_post_thumbnail_size(604, 270, true);\n\n// This theme uses its own gallery styles.\n add_filter('use_default_gallery_style', '__return_false');\n}", "function acf_get_filters()\n{\n}", "function wpmu_get_blog_allowedthemes($blog_id = 0)\n {\n }", "public function my_front_end_stuff()\n {\n add_action('wp_enqueue_scripts', array($this, 'myScripts'));\n\n // Don't load the filters if the display option is toggled to NONE!\n if(get_option('grimage_display_options') != \"none\") {\n //add_filter('the_content', array($this, 'replaceImagesWithGrimages'));\n add_filter('the_content', array($this, 'replaceImagesWithGrimagesTwo'));\n add_action('wp_head', array($this, 'hook_js'));\n add_action('wp_head', array($this, 'hook_css'));\n add_action('wp_footer', array($this, 'grimage_modal'));\n }\n }", "function universityFeatures() {\n add_theme_support('title-tag');\n}", "function silvia_customizer_grid_styles() {\n\n\t// Theme prefix\n\t$prefix = 'silvia-';\n\t\n\t// Image grayscale\n\t$grayscale = silvia_mod( $prefix . 'grid-img-grayscale' );\n\n\tif ( $grayscale !== customizer_library_get_default( $prefix . 'grid-img-grayscale' ) ) {\n\n\t\t$gray = absint( $grayscale );\n\n\t\tCustomizer_Library_Styles()->add( array(\n\t\t\t'selectors' => array(\n\t\t\t\t'.thumbnail-link img'\n\t\t\t),\n\t\t\t'declarations' => array(\n\t\t\t\t'filter' => 'grayscale(' . $gray . '%)',\n\t\t\t\t'-webkit-filter' => 'grayscale(' . $gray . '%)'\n\t\t\t)\n\t\t) );\n\t}\n\n\t// Title color\n\t$title = silvia_mod( $prefix . 'grid-title-color' );\n\n\tif ( $title !== customizer_library_get_default( $prefix . 'grid-title-color' ) ) {\n\n\t\t$color = sanitize_hex_color( $title );\n\n\t\tCustomizer_Library_Styles()->add( array(\n\t\t\t'selectors' => array(\n\t\t\t\t'.thumbnail-detail .entry-title a'\n\t\t\t),\n\t\t\t'declarations' => array(\n\t\t\t\t'color' => $color\n\t\t\t)\n\t\t) );\n\t}\n\n\t// Title hover color\n\t$title_hover = silvia_mod( $prefix . 'grid-title-hover-color' );\n\n\tif ( $title_hover !== customizer_library_get_default( $prefix . 'grid-title-hover-color' ) ) {\n\n\t\t$color = sanitize_hex_color( $title_hover );\n\n\t\tCustomizer_Library_Styles()->add( array(\n\t\t\t'selectors' => array(\n\t\t\t\t'.thumbnail-detail .entry-title a:hover'\n\t\t\t),\n\t\t\t'declarations' => array(\n\t\t\t\t'color' => $color\n\t\t\t)\n\t\t) );\n\t}\n\n\t// Category color\n\t$cat = silvia_mod( $prefix . 'grid-cat-color' );\n\n\tif ( $cat !== customizer_library_get_default( $prefix . 'grid-cat-color' ) ) {\n\n\t\t$color = sanitize_hex_color( $cat );\n\n\t\tCustomizer_Library_Styles()->add( array(\n\t\t\t'selectors' => array(\n\t\t\t\t'.thumbnail-detail .cat-links a'\n\t\t\t),\n\t\t\t'declarations' => array(\n\t\t\t\t'color' => $color\n\t\t\t)\n\t\t) );\n\t}\n\n\t// Category hover color\n\t$cat_hover = silvia_mod( $prefix . 'grid-cat-hover-color' );\n\n\tif ( $cat_hover !== customizer_library_get_default( $prefix . 'grid-cat-hover-color' ) ) {\n\n\t\t$color = sanitize_hex_color( $cat_hover );\n\n\t\tCustomizer_Library_Styles()->add( array(\n\t\t\t'selectors' => array(\n\t\t\t\t'.thumbnail-detail .cat-links a:hover'\n\t\t\t),\n\t\t\t'declarations' => array(\n\t\t\t\t'color' => $color\n\t\t\t)\n\t\t) );\n\t}\n\n}", "protected function prepareTheme(): void\n {\n register_nav_menus([\n 'main' => 'Main Menu',\n 'footer' => 'Footer Menu',\n ]);\n \n add_theme_support('post-thumbnails', get_post_types(['public' => true]));\n }", "function alm_filters_color_callback() {\n\n\t $options = get_option( 'alm_settings' );\n\n\t\tif(!isset($options['_alm_filters_color']))\n\t\t $options['_alm_filters_color'] = '0';\n\n\t $color = $options['_alm_filters_color'];\n\n\t\t $selected0 = '';\n\t\t if($color == 'default') $selected0 = 'selected=\"selected\"';\n\n\t\t $selected1 = '';\n\t\t if($color == 'blue') $selected1 = 'selected=\"selected\"';\n\n\t\t $selected2 = '';\n\t\t if($color == 'red') $selected2 = 'selected=\"selected\"';\n\n\t\t $selected3 = '';\n\t\t if($color == 'green') $selected3 = 'selected=\"selected\"';\n\n\n\t $html = '<label for=\"alm_settings_filters_color\">'.__('Choose the color of your filter elements', 'ajax-load-more-filters').'.</label><br/>';\n\t $html .= '<select id=\"alm_settings_filters_color\" name=\"alm_settings[_alm_filters_color]\">';\n\t $html .= '<option value=\"default\" ' . $selected0 .'>'. __('Default', 'ajax-load-more-filters') .'</option>';\n\t $html .= '<option value=\"blue\" ' . $selected1 .'>'. __('Blue', 'ajax-load-more-filters') .'</option>';\n\t $html .= '<option value=\"red\" ' . $selected2 .'>'. __('Red', 'ajax-load-more-filters') .'</option>';\n\t $html .= '<option value=\"green\" ' . $selected3 .'>'. __('Green', 'ajax-load-more-filters') .'</option>';\n\t $html .= '</select>';\n\n\t $html .= '<div class=\"clear\"></div>';\n\n\t $html .= '<div class=\"ajax-load-more-wrap alm-filters alm-filters-container filters-'.$color.'\"><span class=\"pages\">'.__('Preview', ALM_NAME) .'</span>';\n\n \t\t// Checkbox\n\t \t\t$html .= '<div class=\"alm-filter\" style=\"padding: 5px 0 20px; margin: 0; clear: both;\">';\n\t \t\t\t$html .= '<li class=\"alm-filter--checkbox\"><div class=\"alm-filter--link field-checkbox active\" data-type=\"checkbox\" data-value=\"design\">'. __('Checked', 'ajax-load-more-filters') .'</div></li>';\n\t \t\t\t$html .= '<li class=\"alm-filter--checkbox\"><div class=\"alm-filter--link field-checkbox\" data-type=\"checkbox\" data-value=\"design\">'. __('Unchecked', 'ajax-load-more-filters') .'</div></li>';\n\t \t$html .= '</div>';\n\n \t\t// Radio\n\t \t\t$html .= '<div class=\"alm-filter\" style=\"padding: 10px 0 0; margin: 0; clear: both;\">';\n\t \t\t\t$html .= '<li class=\"alm-filter--radio\"><div class=\"alm-filter--link field-radio active\" data-type=\"radio\" data-value=\"design\">'. __('Checked', 'ajax-load-more-filters') .'</div></li>';\n\t \t\t\t$html .= '<li class=\"alm-filter--checkbox\"><div class=\"alm-filter--link field-radio\" data-type=\"radio\" data-value=\"design\">'. __('Unchecked', 'ajax-load-more-filters') .'</div></li>';\n\t \t$html .= '</div>';\n\n \t\t// Button\n\t \t\t$html .= '<div class=\"alm-filters\" style=\"padding: 20px 0 5px; margin: 0; clear: both; min-width: 240px;\">';\n\t \t\t\t$html .= '<div class=\"alm-filters--submit\" style=\"margin: 0;\"><button type=\"button\" class=\"alm-filters--button\" style=\"margin: 0;\">'. apply_filters('alm_filters_button_text', __('Submit', 'ajax-load-more')) .'</button></div>';\n\t \t$html .= '</div>';\n\n\t $html .= '</div>';\n\n\n\t echo $html;\n\t?>\n\n\t<script>\n\n \t// Filter Preview\n \tvar colorArrayFilters = \"filters-default filters-red filters-green filters-blue\";\n \tjQuery(\"select#alm_settings_filters_color\").change(function() {\n \t\tvar color = jQuery(this).val();\n\t\t\tjQuery('.ajax-load-more-wrap.alm-filters').removeClass(colorArrayFilters);\n\t\t\tjQuery('.ajax-load-more-wrap.alm-filters').addClass('filters-'+color);\n\t\t});\n\t\tjQuery(\"select#alm_settings_filters_color\").click(function(e){\n\t\t\te.preventDefault();\n\t\t});\n\n\t\t// Check if Disable CSS === true\n\t\tif(jQuery('input#alm_filters_disable_css_input').is(\":checked\")){\n\t jQuery('select#alm_settings_filters_color').parent().parent().hide(); // Hide button color\n \t}\n\n \t// On load\n \tjQuery('input#alm_filters_disable_css_input').change(function() {\n \t\tvar el = jQuery(this);\n\t if(el.is(\":checked\")) {\n\t \tel.parent().parent('tr').next('tr').hide(); // Hide color\n\t }else{\n\t \tel.parent().parent('tr').next('tr').show(); // show color\n\t }\n\t });\n\n </script>\n\n\t<?php\n\t}", "function rooney_theme_setup() {\n\t\t\n\t\t// Clean up the head:\n\t\tremove_action('wp_head','wp_generator');\n\t\tremove_action('wp_head', 'rsd_link');\n\t\tremove_action('wp_head', 'wlwmanifest_link'); // http://wordpress.org/support/topic/wlwmanifestxml-what-is-it\n\t\tremove_action('begin_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_add'); // http://stackoverflow.com/a/12266439/922323\n\t\t\n\t\t// Add theme support for post thumbnails (featured images):\n\t\tadd_theme_support('post-thumbnails');\n\t\t\n\t\t// Valid HTML5 markup:\n\t\t//add_theme_support( 'html5', array('search-form', 'comment-form', 'comment-list',));\n\t\t\n\t\t// Add your nav menus function to the 'init' action hook:\n\t\tadd_action('init', 'rooney_register_menus');\n\t\t\n\t\tadd_filter('user_can_richedit', 'octavo_user_can_richedit');\n\t\t\n\t\tremove_filter('the_content','wpautop');\n\t\tadd_filter('the_content', 'octavo_autop_fix');\n\t\t\n\t\tremove_all_filters('the_excerpt');\n\t\tremove_all_filters('get_the_excerpt');\n\t\tadd_filter('get_the_excerpt', 'octavo_trim_excerpt');\n\t\t\n\t}", "protected function setup_filters() {\n\n /*\n * Co-Authors Plus tweaks\n */\n add_filter( 'coauthors_guest_authors_enabled', '__return_false' );\n add_filter( 'coauthors_plus_should_query_post_author', '__return_false' );\n add_filter( 'coauthors_guest_author_avatar_sizes', '__return_empty_array' );\n add_filter( 'coauthors_guest_author_manage_cap', function() {\n // Allow editors and above\n return 'edit_others_posts';\n });\n\n add_filter( 'wp_mail_from', function( $original_var ) {\n if ( PEDESTAL_EMAIL_NEWS ) {\n return PEDESTAL_EMAIL_NEWS;\n }\n return $original_var;\n });\n\n add_filter( 'wp_mail_from_name', function( $original_var ) {\n if ( PEDESTAL_EMAIL_FROM_NAME ) {\n return PEDESTAL_EMAIL_FROM_NAME;\n }\n return $original_var;\n });\n\n add_filter( 'pre_option_blogdescription', function( $original_var ) {\n if ( PEDESTAL_BLOG_DESCRIPTION ) {\n return PEDESTAL_BLOG_DESCRIPTION;\n }\n return $original_var;\n });\n\n add_filter( 'pre_option_date_format', function( $date_format ) {\n if ( PEDESTAL_DATE_FORMAT ) {\n $date_format = PEDESTAL_DATE_FORMAT;\n }\n return $date_format;\n } );\n\n add_filter( 'pre_option_time_format', function( $time_format ) {\n if ( PEDESTAL_TIME_FORMAT ) {\n $time_format = PEDESTAL_TIME_FORMAT;\n }\n return $time_format;\n } );\n\n add_filter( 'pre_option_show_avatars', '__return_true' );\n add_filter( 'pre_option_blog_public', '__return_true' );\n add_filter( 'pre_option_timezone_string', function() {\n return PEDESTAL_SITE_TIMEZONE;\n });\n\n add_filter( 'pre_option_default_role', function() {\n return 'subscriber';\n });\n\n add_filter( 'pre_option_rss_use_excerpt', '__return_zero' );\n\n /**\n * Limit post revisions\n */\n add_filter( 'wp_revisions_to_keep', function( $num, $post ) {\n return 5;\n }, 10, 2 );\n\n // Override oEmbed with our embed shortcodes\n add_filter( 'oembed_result', [ $this, 'filter_oembed_result' ], 10, 3 );\n\n /**\n * Add image size where largest possible proportional size is generated\n *\n * @link http://wordpress.stackexchange.com/questions/212768/add-image-size-where-largest-possible-proportional-size-is-generated\n */\n add_filter( 'intermediate_image_sizes_advanced', function( $sizes, $metadata ) {\n if ( ! empty( $metadata['width'] ) && ! empty( $metadata['height'] ) ) {\n\n // Calculate the max width and height for the 4:3 ratio\n $ratio = new \\Pedestal\\Utils\\Image_Ratio( 4, 3 );\n list( $width, $height ) = $ratio->get_largest_size(\n $metadata['width'],\n $metadata['height']\n );\n\n // Add the new custom size\n $sizes['max-4-3'] = [\n 'width' => $width,\n 'height' => $height,\n 'crop' => true,\n ];\n }\n\n return $sizes;\n }, 10, 2 );\n\n // Serve static assets through a CDN, if available\n if ( $this->get_cdn_url() ) {\n add_filter( 'wp_resource_hints', [ $this, 'filter_resource_hints_for_cdn' ], 10, 2 );\n add_filter( 'style_loader_src', [ $this, 'filter_rewrite_url_for_cdn' ], 10, 1 );\n add_filter( 'script_loader_src', [ $this, 'filter_rewrite_url_for_cdn' ], 10, 1 );\n add_filter( 'template_directory_uri', [ $this, 'filter_rewrite_url_for_cdn' ], 10, 1 );\n add_filter( 'stylesheet_directory_uri', [ $this, 'filter_rewrite_url_for_cdn' ], 10, 1 );\n add_filter( 'compressed_emoji_url', [ $this, 'filter_rewrite_url_for_cdn' ], 10, 1 );\n add_filter( 'compressed_emoji_svg_url', [ $this, 'filter_rewrite_url_for_cdn' ], 10, 1 );\n }\n\n // Add some Twig functions and filters\n add_filter( 'timber/twig', [ $this, 'filter_timber_twig_add_basic_filters' ] );\n add_filter( 'timber/twig', [ $this, 'filter_timber_twig_add_markdown_support' ] );\n add_filter( 'timber/twig', [ $this, 'filter_timber_twig_add_functions' ], 99 );\n\n // Since we don't have comments, skip running the query to count all of the comments on every load\n add_filter( 'wp_count_comments', function( $count, $post_id ) {\n if ( 0 === $post_id ) {\n $stats = [\n 'approved' => 0,\n 'moderated' => 0,\n 'spam' => 0,\n 'trash' => 0,\n 'post-trashed' => 0,\n 'total_comments' => 0,\n 'all' => 0,\n ];\n return (object) $stats;\n }\n }, 10, 2 );\n }", "function gt_init() {\n add_theme_support('post-thumbnails');\n // title based on the page and General Settings\n add_theme_support('title-tag');\n // HTML support\n add_theme_support('html5', \n array('comment-list', 'comment-form', 'search-form'));\n}", "function okcdesign_theme() {\n $themes = array();\n theme_plugins_invoke(__FUNCTION__, $themes);\n return $themes;\n}", "function cpotheme_metadata_theme()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'download_title',\n 'std' => '',\n 'label' => 'Título del Producto',\n 'type' => 'text',\n 'desc' => 'Indica la etiqueta de título (H1) del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_cta_title',\n 'std' => '',\n 'label' => 'Call to action title',\n 'type' => 'text',\n 'desc' => 'Call to action title, right below the header'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_cta_text',\n 'std' => '',\n 'label' => 'Call to action text',\n 'type' => 'text',\n 'desc' => 'Call to action text, right below the header'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_demo_url',\n 'std' => '',\n 'label' => 'URL de la Demo',\n 'type' => 'text',\n 'desc' => 'Especifica la URL de la demo del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_url',\n 'std' => '',\n 'label' => 'External URL',\n 'type' => 'text',\n 'desc' => 'Especifica la URL del tema si es un archivo externo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_product',\n 'std' => '',\n 'label' => 'ID de Producto',\n 'type' => 'select',\n 'option' => cpotheme_metadata_productlist_optional(),\n 'desc' => 'Indica la ID del producto para enlazarlo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_features',\n 'label' => 'Funcionalidades',\n 'type' => 'collection',\n 'option' => cpotheme_metadata_theme_features(),\n 'desc' => ''\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_smartphone',\n 'label' => 'Imagen Movil (250x425)',\n 'type' => 'upload',\n 'desc' => ''\n );\n\n return $cpotheme_data;\n}", "function wp_global_styles_render_svg_filters()\n {\n }", "function filter_theme_options( $args ) {\r\n $args['settings'] = array_merge($args['settings'], $this->get_theme_option_args());\r\n \r\n return $args;\r\n }", "public function postApplyTheme()\n {\n //...\n }", "function retrieve_widgets($theme_changed = \\false)\n {\n }", "public function add_filters() {\n\n\t\tadd_filter( 'bbp_user_can_view_forum', array( $this, 'bbp_user_can_view_forum__associated_users_view_only' ), 99, 3 );\n\n\t\tadd_filter( 'bbp_get_template_part', array( $this, 'bbp_get_template_part__forum_archive_associated_users_view_only' ), 99, 3 );\n\n\t\tadd_filter( 'body_class', array( $this, 'body_class__add_body_class_for_those_who_can_see_forums' ), 10, 2 );\n\n\t\treturn null;\n\n\t}", "function followrizky_theme_support(){\n add_theme_support('title-tag');\n add_theme_support('custom-logo');\n add_theme_support('post-thumbnails');\n}", "function get_current_theme()\n {\n }", "function _filter_do_shortcode_context()\n {\n }", "function theme($tipo=\"link\"){\n\t\n\t$theme_encontrado=0;\n\tif($theme_encontrado>=1){\n\t}else{\n\t\t$theme=\"default\";\n\t}\n\t\t\n\tglobal $AYV;\t\n\t\n\tif($tipo==\"dir\"){\n\t\treturn DIR_WEB.'/themes/'.$theme;\t\t\n\t}else{\n\t\treturn URL_WEB.'/themes/'.$theme;\t\t\n\t}\n\n}", "function add_filters()\n {\n }", "function dunkdog_template_filter( $template_path ) { \n\tif(is_search()){\n\t\treturn $template_path;\n\t}\n\n\t$type = get_post_type(); \n if ( ( $type == 'dd-player' ) || ( $type == 'dd-team' ) || ( $type == 'dd-player-ranking' ) || ($type == 'dd-team-ranking' ) ){\n if ( is_single() ) {\n \t$prefix = 'single';\n }\n if ( is_archive()){\n \t$prefix = 'archive';\n }\n if ( is_tax()){\n \t$prefix = 'taxonomy';\n\n \t// if(get_query_var('taxonomy')=='dd-conference'){\n \t// \t$type = 'dd-team';\n \t// }else{\n \t\t$type = 'dd-player'; // forcing tax to be player; no other need for team or ranking taxonomy\n \t// }\n }\n\n $template_path = dunkdog_template_function($prefix . '-' . $type, false);\n \n }\n \n if(DD_DEBUG){global $wp_query; krumo('template_path', $template_path, $prefix, $type, $wp_query);}\n\treturn $template_path;\n}", "function get_registered_theme_features()\n {\n }", "function theme_support(){\n add_theme_support('title-tag');\n //adds logo dynamically\n add_theme_support('custom-logo');\n //adds post thumbnails\n add_theme_support('post-thumbnails');\n}", "function wp_init_targeted_link_rel_filters()\n {\n }", "function MicroBuilder_Theme_Factory () {}", "function schechter_setup() {\r\n add_editor_style();\r\n\r\n // Grab Image_Text_WIdget.\r\n require( dirname( __FILE__ ) . '/inc/widgets.php' );\r\n\r\n // Add default posts and comments RSS feed links to <head>.\r\n add_theme_support( 'automatic-feed-links' );\r\n\r\n // This theme uses wp_nav_menu() sidebar.\r\n register_nav_menu( 'primary', __( 'Primary Menu', 'schechterthemeprivate' ) );\r\n \r\n // This theme uses Featured Images for attach image to logo and photo\r\n add_theme_support( 'post-thumbnails' );\r\n\t\r\n}", "function harvest_style_override(){\n\t$primary = harvest_option( 'accent', '#006f7c' );\n\t$secondary = harvest_option( 'secondary_accent', '#b4b2b1' );\n\t$logo_css = harvest_option( 'logo_name_css', '');\n\t$style = \".logo_name { $logo_css }\";\n\twp_add_inline_style( 'harvest-stylesheet', $style );\t\n\t\n\t$style = \".accent-background, \n\t\t.r-tabs .r-tabs-state-active {\n\t\t\tbackground: $primary;\n\t\t}\n\t\t.secondary-accent-background,\n\t\t.recent-sermon h2, \n\t\t.weekly-calendar h2 {\n\t\t\tbackground: $secondary;\n\t\t}\n\t\t.r-tabs a,\n\t\t.r-tabs .r-tabs-anchor {\n\t\t\tcolor: $primary;\n\t\t}\n\t\t.r-tabs .r-tabs-tab {\n\t\t\tborder-bottom-color: $secondary;\n\t\t\tborder-top-color: $secondary;\n\t\t}\n\t\t.r-tabs .r-tabs-accordion-title{\n\t\t\tborder-bottom-color: $secondary;\n\t\t}\n\t\t.content a:not(.button),\n\t\t.content a:hover {\n\t\t\tcolor: $primary;\n\t\t}\n\t\t.content a.button:hover {\n\t\t\tcolor: $primary;\n\t\t\tborder-color: $primary;\n\t\t}\";\n\t\twp_add_inline_style( 'harvest-stylesheet', $style );\t\n}", "function charity_is_hope_team_theme_setup() {\n add_filter('trx_utils_filter_override_options',\t\t\t\t\t\t'charity_is_hope_team_add_override_options');\n\n\t\t// Save data from override options\n\t\tadd_action('save_post',\t\t\t\t\t\t\t\t'charity_is_hope_team_save_data');\n\t\t\n\t\t// Detect current page type, taxonomy and title (for custom post_types use priority < 10 to fire it handles early, than for standard post types)\n\t\tadd_filter('charity_is_hope_filter_get_blog_type',\t\t\t'charity_is_hope_team_get_blog_type', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_get_blog_title',\t\t'charity_is_hope_team_get_blog_title', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_get_current_taxonomy',\t'charity_is_hope_team_get_current_taxonomy', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_is_taxonomy',\t\t\t'charity_is_hope_team_is_taxonomy', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_get_stream_page_title',\t'charity_is_hope_team_get_stream_page_title', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_get_stream_page_link',\t'charity_is_hope_team_get_stream_page_link', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_get_stream_page_id',\t'charity_is_hope_team_get_stream_page_id', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_query_add_filters',\t\t'charity_is_hope_team_query_add_filters', 9, 2);\n\t\tadd_filter('charity_is_hope_filter_detect_inheritance_key','charity_is_hope_team_detect_inheritance_key', 9, 1);\n\n\t\t// Extra column for team members lists\n\t\tif (charity_is_hope_get_theme_option('show_overriden_posts')=='yes') {\n\t\t\tadd_filter('manage_edit-team_columns',\t\t\t'charity_is_hope_post_add_options_column', 9);\n\t\t\tadd_filter('manage_team_posts_custom_column',\t'charity_is_hope_post_fill_options_column', 9, 2);\n\t\t}\n\n\t\t// Register shortcodes [trx_team] and [trx_team_item]\n\t\tadd_action('charity_is_hope_action_shortcodes_list',\t\t'charity_is_hope_team_reg_shortcodes');\n\t\tif (function_exists('charity_is_hope_exists_visual_composer') && charity_is_hope_exists_visual_composer())\n\t\t\tadd_action('charity_is_hope_action_shortcodes_list_vc','charity_is_hope_team_reg_shortcodes_vc');\n\n\t\t// Meta box fields\n\t\tcharity_is_hope_storage_set('team_override_options', array(\n\t\t\t'id' => 'team-override-options',\n\t\t\t'title' => esc_html__('Team Member Details', 'trx_utils'),\n\t\t\t'page' => 'team',\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'high',\n\t\t\t'fields' => array(\n\t\t\t\t\"team_member_position\" => array(\n\t\t\t\t\t\"title\" => esc_html__('Position', 'trx_utils'),\n\t\t\t\t\t\"desc\" => wp_kses_data( __(\"Position of the team member\", 'trx_utils') ),\n\t\t\t\t\t\"class\" => \"team_member_position\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\"),\n\t\t\t\t\"team_member_bday\" => array(\n\t\t\t\t\t\"title\" => esc_html__(\"Birthday\", 'trx_utils'),\n\t\t\t\t\t\"desc\" => wp_kses_data( __(\"Birthday of the team member\", 'trx_utils') ),\n\t\t\t\t\t\"class\" => \"team_member_email\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\"),\n\t\t\t\t\"team_member_email\" => array(\n\t\t\t\t\t\"title\" => esc_html__(\"E-mail\", 'trx_utils'),\n\t\t\t\t\t\"desc\" => wp_kses_data( __(\"E-mail of the team member - need to take Gravatar (if registered)\", 'trx_utils') ),\n\t\t\t\t\t\"class\" => \"team_member_email\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\"),\n\t\t\t\t\"team_member_link\" => array(\n\t\t\t\t\t\"title\" => esc_html__('Link to profile', 'trx_utils'),\n\t\t\t\t\t\"desc\" => wp_kses_data( __(\"URL of the team member profile page (if not this page)\", 'trx_utils') ),\n\t\t\t\t\t\"class\" => \"team_member_link\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\"),\n\t\t\t\t\"team_member_socials\" => array(\n\t\t\t\t\t\"title\" => esc_html__(\"Social links\", 'trx_utils'),\n\t\t\t\t\t\"desc\" => wp_kses_data( __(\"Links to the social profiles of the team member\", 'trx_utils') ),\n\t\t\t\t\t\"class\" => \"team_member_email\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"social\"),\n\t\t\t\t\"team_member_brief_info\" => array(\n\t\t\t\t\t\"title\" => esc_html__(\"Brief info\", 'trx_utils'),\n\t\t\t\t\t\"desc\" => wp_kses_data( __(\"Brief info about the team member\", 'trx_utils') ),\n\t\t\t\t\t\"class\" => \"team_member_brief_info\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\"),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t// Add supported data types\n\t\tcharity_is_hope_theme_support_pt('team');\n\t\tcharity_is_hope_theme_support_tx('team_group');\n\t}", "function shell_theme_setup() {\r\n\r\n\t/* Get action/filter hook prefix. */\r\n\t$prefix = hybrid_get_prefix();\r\n\r\n\t/* === HYBRID CORE FEATURES === */\r\n\r\n\t/* Register Navigation Menus */\r\n\tadd_theme_support( 'hybrid-core-menus', array( 'primary', 'secondary', 'subsidiary' ) );\r\n\r\n\t/* Register Sidebars */\r\n\tadd_theme_support( 'hybrid-core-sidebars', array( 'primary', 'secondary', 'header', 'subsidiary', 'after-singular' ) );\r\n\r\n\t/* Widgets Reloaded */\r\n\tadd_theme_support( 'hybrid-core-widgets' );\r\n\r\n\t/* Template Shortcodes */\r\n\tadd_theme_support( 'hybrid-core-shortcodes' );\r\n\r\n\t/* Theme Settings */\r\n\tadd_theme_support( 'hybrid-core-theme-settings', array( 'about', 'footer' ) );\r\n\r\n\t/* Better Template Hierarchy */\r\n\tadd_theme_support( 'hybrid-core-template-hierarchy' );\r\n\r\n\r\n\t/* === HYBRID CORE EXTENSIONS === */\r\n\r\n\t/* Loop Pagination */\r\n\tadd_theme_support( 'loop-pagination' );\r\n\r\n\t/* Get The Image */\r\n\tadd_theme_support( 'get-the-image' );\r\n\r\n\t/* Breadcrumb Trail */\r\n\tadd_theme_support( 'breadcrumb-trail' );\r\n\r\n\t/* Cleaner Gallery */\r\n\tadd_theme_support( 'cleaner-gallery' );\r\n\r\n\r\n\t/* === WORDPRESS FEATURES === */\r\n\r\n\t/* RSS Feed */\r\n\tadd_theme_support( 'automatic-feed-links' );\r\n\r\n\r\n\t/* === DEFAULT FILTERS === */\r\n\r\n\t/* Avatar size in comments: Hybrid Core - Comments Args */\r\n\tadd_filter( \"shell_list_comments_args\", 'shell_comments_args' );\r\n\r\n\r\n\t/* === THEME UPDATER === */\r\n\r\n\t/* Updater args */\r\n\t$updater_args = array(\r\n\t\t'repo_uri' => 'http://repo.shellcreeper.com/',\r\n\t\t'repo_slug' => 'shell',\r\n\t);\r\n\r\n\t/* Add support for updater */\r\n\tadd_theme_support( 'auto-hosted-theme-updater', $updater_args );\r\n}", "function helper()\n{\n return TFThemeHelper::getInstance();\n}", "function spreadshop_designer()\n{\ninclude(plugin_dir_path(__FILE__).'/spreaddesigner.php');\nadd_filter('wp_head', 'sources');\n}", "function ltthe_setup()\r\n{\r\n\tadd_theme_support('post-thumbnails');\r\n\r\n\tremove_action('wp_head','wp_generator');\r\n\r\n\tremove_filter('the_content','wptexturize');\r\n\tremove_filter('the_excerpt','wptexturize');\r\n\r\n\tadd_theme_support('title-tag');\r\n\r\n\trequire_once('includes/wp-bootstrap-navwalker.php');\r\n\r\n\tregister_nav_menus( array('primary' =>__('principal')) );\r\n}", "function hocwp_theme_custom_widgets_init() {\r\n\r\n}", "function clea_base_social_sanitize( $setting, $object ) {\n\n\t/* Get the theme prefix. */\n\t$prefix = hybrid_get_prefix();\n\n\t/* ALL settings of the Logo & Favicon and section\n\t{$prefix}_theme_settings[facebook]\n\t{$prefix}_theme_settings[twitter]\n\t{$prefix}_theme_settings[pinterest]\n\t{$prefix}_theme_settings[rss]\n\t{$prefix}_theme_settings[google+]\n\t{$prefix}_theme_settings[linkedin]\n\t{$prefix}_theme_settings[viadeo]\n\t*/\n\t\n\t/* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */\n\t\n\tif ( \"{$prefix}_theme_settings[facebook]\" == $object->id && !current_user_can( 'unfiltered_html' ) )\n\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\n\tif ( \"{$prefix}_theme_settings[twitter]\" == $object->id && !current_user_can( 'unfiltered_html' ) )\n\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\t\n\tif ( \"{$prefix}_theme_settings[pinterest]\" == $object->id && !current_user_can( 'unfiltered_html' ) )\n\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\n\tif ( \"{$prefix}_theme_settings[rss]\" == $object->id && !current_user_can( 'unfiltered_html' ) )\n\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\t\n\tif ( \"{$prefix}_theme_settings[google+]\" == $object->id && !current_user_can( 'unfiltered_html' ) )\n\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\n\tif ( \"{$prefix}_theme_settings[linkedin]\" == $object->id && !current_user_can( 'unfiltered_html' ) )\n\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\n\tif ( \"{$prefix}_theme_settings[viadeo]\" == $object->id && !current_user_can( 'unfiltered_html' ) )\n\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\n\t\n\t/* Return the sanitized setting and apply filters. */\n\treturn apply_filters( \"{$prefix}_customize_sanitize\", $setting, $object );\n}", "function wp_hooks() \n {\n // Wordpress actions & filters \n add_action( 'admin_menu', array(&$this,'admin_menu_link') );\n add_action( 'admin_head', array(&$this, 'remove_mediabuttons') );\n add_action( 'init', array(&$this, 'add_custom_post_type') );\n add_action( 'admin_init', array(&$this, 'add_metaboxes') );\n add_action( 'save_post', array(&$this, 'save_source_metabox'), 10, 2 );\n add_action( 'manage_posts_custom_column', array(&$this, 'add_custom_columns') ); // sets the row value\n \n $filter = 'manage_edit-' . $this->custom_post_type_name . '_columns';\n add_filter( $filter, array(&$this, 'add_header_columns') );\n add_filter( 'body_class', array(&$this, 'body_classes') );\n add_action('wp_print_styles', array(&$this, 'add_css') );\n\n add_filter( 'enter_title_here', array(&$this, 'change_title_text'), 10, 1 );\n add_filter( 'post_row_actions', array(&$this, 'remove_row_actions'), 10, 1 );\n add_filter( 'post_updated_messages', array(&$this, 'bbquotations_updated_messages') );\n\n add_action( 'admin_print_footer_scripts', array(&$this, 'remove_preview_button') );\n\n // add shortcode\n add_shortcode( 'bbquote', array(&$this, 'shortcode') );\n }", "function custom_colors() {\n\tglobal $user_level;\n\tif ($user_level != '10' ) {\n\t echo '<style type=\"text/css\">\nli#menu-appearance.wp-has-submenu li a[href=\"themes.php\"] { display:none; } \nli#menu-appearance.wp-has-submenu li a[href=\"widgets.php\"] { }\nli#menu-appearance.wp-has-submenu li a[href=\"customize.php\"] { display:none; }\nli#menu-appearance.wp-has-submenu li a[href=\"themes.php?page=custom-background\"] { display:none; }\nli#menu-appearance.wp-has-submenu li a[href=\"themes.php?page=custom-header\"] { display:none; } \n</style>';\n }\n}", "function alm_filters_flatpickr_theme_callback(){\n\t\t$options = get_option( 'alm_settings' );\n\t\tif(!isset($options['_alm_filters_flatpickr_theme'])){\n\t\t $options['_alm_filters_flatpickr_theme'] = 'default';\n\t\t}\n\t\t$selected = $options['_alm_filters_flatpickr_theme'];\n\n\t\t$themes = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'Default',\n\t\t\t\t'slug' => 'default'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'AirBnB',\n\t\t\t\t'slug' => 'airbnb'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Confetti',\n\t\t\t\t'slug' => 'confetti'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Dark',\n\t\t\t\t'slug' => 'dark'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Light',\n\t\t\t\t'slug' => 'light'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Material Blue',\n\t\t\t\t'slug' => 'material_blue'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Material Green',\n\t\t\t\t'slug' => 'material_green'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Material Orange',\n\t\t\t\t'slug' => 'material_orange'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Material Red',\n\t\t\t\t'slug' => 'material_red'\n\t\t\t)\n\t\t);\n\n\t\t$html = '<label for=\"_alm_filters_flatpickr_theme\">';\n\t\t\t$html .= __('Select a <a href=\"https://flatpickr.js.org/themes/\" target=\"blank\">Theme</a> for the Datepicker Field Type.', 'ajax-load-more-filters');\n\t\t$html .= '</label>';\n\n\t\t$html .= '<select id=\"_alm_filters_flatpickr_theme\" name=\"alm_settings[_alm_filters_flatpickr_theme]\">';\n\t\t\tforeach($themes as $theme){\n\t\t\t\t$select_text = ($selected === $theme['slug']) ? ' selected=\"selected\"' : '';\n\t\t\t\t$html .= '<option value=\"'. $theme['slug'] .'\"'. $select_text .'>'. $theme['name'] .'</option>';\n\t\t\t}\n\t\t$html .= '</select>';\n\n\t\techo $html;\n\n\t}", "function _add_themes_utility_last()\n {\n }", "private function _add_filters() {\n\t\t\tadd_filter('wp_setup_nav_menu_item', array($this, 'add_custom_options'));\n\n\t\t\t# Update custom menu options\n\t\t\tadd_action('wp_update_nav_menu_item', array($this, 'update_custom_options'), 10, 3);\n\n\t\t\t# Set edit menu walker\n\t\t\tadd_filter('wp_edit_nav_menu_walker', array($this, 'apply_edit_walker_class'), 10, 2);\n\t\t\t\n\t\t\t# Addition style\n\t\t\tadd_action('admin_enqueue_scripts', array( $this, 'add_menu_css' ));\n\t\t\t\n\t\t\t# Addition js\n\t\t\tadd_action('admin_head-nav-menus.php', array( $this, 'add_icon_js' ));\n\n\t\t\t# Mega menu javascript\n\t\t\tadd_action('admin_enqueue_scripts', array( $this, 'wtbx_mega_menu_admin_scripts' ), 80);\n\t\t}", "function myplugin_custom_walker( $args ) {\n if($args['theme_location']==\"\")\n {\n return array_merge( $args, array(\n 'container_class'=>\"menu_list\",\n 'menu_class'=>'',\n ) );\n } else {\n return array_merge( $args, array(\n 'theme_location' => 'primary',\n 'menu_class' => 'nav navbar-nav',\n ) );\n }\n}", "public function getDesignTheme();", "function portfolio_hl_setup() {\n add_theme_support('title-tag');\n\n\n\n\n /*\n * menu par default wordpress\n */\n register_nav_menus( array(\n 'primary' => esc_html__('Primary','portfolio_hl'),\n ));\n\n\n /*\n * Switch default core markup for search form, comment form, and comments\n * to output valid HTML5.\n */\n add_theme_support( 'html5', array(\n 'search-form',\n 'comment-form',\n 'comment-list',\n 'gallery',\n 'caption',\n ) );\n\n /*\n * Enable support for Post Thumbnails on posts and pages.\n *\n * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\n */\n add_theme_support( 'post-thumbnails' );\n add_image_size( 'portfolio_hl-home-small', 200);\n add_image_size( 'portfolio_hl-home-large', 280, 280, true );\n add_image_size( 'portfolio_hl-blog-image', 690 );\n add_image_size( 'portfolio_hl-blog-thumb', 470);\n add_image_size( 'portfolio_hl-blog-header', 1920);\n\n /*\n * custum background wordpress function\n */\n add_theme_support('custum-background', apply_filters('portfolio_hl_custum_bakground_arg', array(\n 'default-color' =>'ffffff',\n 'default-image' => '',\n )));\n\n\n\n\n\n /**\n * Register widget area.\n *\n * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar\n */\nfunction portfolio_hl_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Sidebar', 'portfolio_hl' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => esc_html__( 'Add widgets here.', 'portfolio_hl' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\n\n\n}\nadd_action( 'widgets_init', 'portfolio_hl_widgets_init' );\n /*\n * logo custum\n */\n add_theme_support('custom-logo',array(\n 'height' => 55,\n 'width' => 200,\n 'flex-height' => true,\n ));\n\n }", "function cardealer_init_theme() {\r\n\tadd_action( 'init', 'cardealer_head_cleanup' ); // launching operation cleanup\r\n\tadd_filter( 'the_generator', 'cardealer_rss_version' ); // remove WP version from RSS\r\n\tadd_action( 'wp_enqueue_scripts', 'cardealer_load_style_script', 9 ); // enqueue base scripts and styles\r\n\tcardealer_theme_support(); // launching this stuff after theme setup\r\n\tcardealer_add_image_sizes(); // add additional image sizes\r\n\tadd_action( 'widgets_init', 'cardealer_register_sidebars' ); // adding sidebars to Wordpress (these are created in functions.php)\r\n\tadd_filter( 'get_search_form', 'cardealer_wpsearch' ); // adding the search form\r\n\tadd_filter( 'the_content', 'cardealer_filter_ptags_on_images' ); // cleaning up random code around images\t\r\n\t\r\n\t// Hide Revolution Slider notice\r\n\tupdate_option('revslider-valid-notice', 'false');\r\n\t\r\n\t// Set transient for welcome loader.\r\n\tset_transient( '_cardealer_welcome_screen_activation_redirect', true, 30 );\r\n}", "public function theme() {\n // Do nothing by default\n }", "function premise_homehero_services(){\n\t if( get_theme_mod( 'premise_homehero_services') != \"\" ) {\n\t\techo get_theme_mod( 'premise_homehero_services');\n\t }\n}", "function find_all_themes($full_details = false)\n{\n if ($GLOBALS['IN_MINIKERNEL_VERSION']) {\n return $full_details ? array('default' => array()) : array('default' => do_lang('DEFAULT'));\n }\n\n require_code('files');\n\n $themes = array();\n $_dir = @opendir(get_file_base() . '/themes/');\n if ($_dir !== false) {\n while (false !== ($file = readdir($_dir))) {\n $ini_file = get_file_base() . '/themes/' . $file . '/theme.ini';\n if ((strpos($file, '.') === false) && (is_dir(get_file_base() . '/themes/' . $file)) && (file_exists($ini_file))) {\n $details = better_parse_ini_file($ini_file);\n if (!array_key_exists('title', $details)) {\n $details['title'] = '?';\n }\n if (!array_key_exists('description', $details)) {\n $details['description'] = '?';\n }\n if (!array_key_exists('author', $details)) {\n $details['author'] = '?';\n }\n $themes[$file] = $full_details ? $details : $details['title'];\n }\n }\n closedir($_dir);\n }\n if (get_custom_file_base() != get_file_base()) {\n $_dir = @opendir(get_custom_file_base() . '/themes/');\n if ($_dir !== false) {\n while (false !== ($file = readdir($_dir))) {\n $ini_file = get_custom_file_base() . '/themes/' . $file . '/theme.ini';\n if ((strpos($file, '.') === false) && (is_dir(get_custom_file_base() . '/themes/' . $file)) && (file_exists($ini_file))) {\n $details = better_parse_ini_file($ini_file);\n if (!array_key_exists('title', $details)) {\n $details['title'] = '?';\n }\n if (!array_key_exists('description', $details)) {\n $details['description'] = '?';\n }\n if (!array_key_exists('author', $details)) {\n $details['author'] = '?';\n }\n $themes[$file] = $full_details ? $details : $details['title'];\n }\n }\n closedir($_dir);\n }\n }\n if (!array_key_exists('default', $themes)) {\n $details = better_parse_ini_file(get_file_base() . '/themes/default/theme.ini');\n if (!array_key_exists('title', $details)) {\n $details['title'] = '?';\n }\n if (!array_key_exists('description', $details)) {\n $details['description'] = '?';\n }\n if (!array_key_exists('author', $details)) {\n $details['author'] = '?';\n }\n $themes['default'] = $full_details ? $details : $details['title'];\n }\n\n // Sort\n if ($full_details) {\n sort_maps_by($themes, 'title');\n } else {\n natsort($themes);\n }\n\n // Default theme should go first\n if (isset($themes['default'])) {\n $temp = $themes['default'];\n $temp_2 = $themes;\n $themes = array('default' => $temp) + $temp_2;\n }\n\n // Admin theme should go last\n if (isset($themes['admin'])) {\n $temp = $themes['admin'];\n unset($themes['admin']);\n $themes['admin'] = $temp;\n }\n\n return $themes;\n}", "function action_date()\n{\n\n\t// Return the rendered theme.\n\treturn theme('test_theme');\n}", "function bones_ahoy() {\n // launching operation cleanup\n add_action( 'init', 'bones_head_cleanup' );\n // A better title\n add_filter( 'wp_title', 'rw_title', 10, 3 );\n // remove WP version from RSS\n add_filter( 'the_generator', 'bones_rss_version' );\n // remove pesky injected css for recent comments widget\n add_filter( 'wp_head', 'bones_remove_wp_widget_recent_comments_style', 1 );\n // clean up comment styles in the head\n add_action( 'wp_head', 'bones_remove_recent_comments_style', 1 );\n // clean up gallery output in wp\n add_filter( 'gallery_style', 'bones_gallery_style' );\n\n // enqueue base scripts and styles\n add_action( 'wp_enqueue_scripts', 'bones_scripts_and_styles', 999 );\n\n // launching this stuff after theme setup\n bones_theme_support();\n\n // cleaning up random code around images\n add_filter( 'the_content', 'bones_filter_ptags_on_images' );\n // cleaning empty paragraphs\n add_filter( 'the_content', 'remove_empty_paragraph' );\n \n // cleaning up excerpt\n //add_filter( 'excerpt_more', 'bones_excerpt_more' );\n\n}", "function bootstrap() {\n\tadd_filter( 'jetpack_implode_frontend_css', __NAMESPACE__ . '\\\\maybe_implode_css' );\n}", "function julia_kaya_customizer_styles(){\n\t$text_logo_color = get_theme_mod('text_logo_color') ? get_theme_mod('text_logo_color') : '#353535';\n\t$text_logo_tagline_color = get_theme_mod('text_logo_tagline_color') ? get_theme_mod('text_logo_tagline_color') : '#757575';\n\n\t// Header Color Section\n\t$header_left_bg_color = get_theme_mod('header_left_bg_color') ? get_theme_mod('header_left_bg_color') : '#000';\n\t$header_bg_color = get_theme_mod('header_bg_color') ? get_theme_mod('header_bg_color') : '#fff';\n\t\n\t// Menu Section\n\t$menu_link_color = get_theme_mod('menu_link_color') ? get_theme_mod('menu_link_color') : '#000';\n\t$menu_link_hover_color = get_theme_mod('menu_link_hover_color') ? get_theme_mod('menu_link_hover_color') : '#ff3333';\n\t$menu_active_link_color = get_theme_mod('menu_active_link_color') ? get_theme_mod('menu_active_link_color') : '#ff3333';\n\t$child_menu_bg_color = get_theme_mod('child_menu_bg_color') ? get_theme_mod('child_menu_bg_color') : '#ff3333';\n\t$child_menu_link_color = get_theme_mod('child_menu_link_color') ? get_theme_mod('child_menu_link_color') : '#fff';\n\t$child_menu_link_hover_color = get_theme_mod('child_menu_link_hover_color') ? get_theme_mod('child_menu_link_hover_color') : '#fff';\n\t$child_menu_hover_bg_color = get_theme_mod('child_menu_hover_bg_color') ? get_theme_mod('child_menu_hover_bg_color') : '#ff0000';\n\t$child_menu_active_bg_color = get_theme_mod('child_menu_active_bg_color') ? get_theme_mod('child_menu_active_bg_color') : '#ff0000';\n\t$child_menu_active_link_color = get_theme_mod('child_menu_active_link_color') ? get_theme_mod('child_menu_active_link_color') : '#fff';\n\t$child_menu_border_bottom_color = get_theme_mod('child_menu_border_bottom_color') ? get_theme_mod('child_menu_border_bottom_color') : '#ff3333';\n $search_toggle_bar_BG_color = get_theme_mod('search_toggle_bar_BG_color') ? get_theme_mod('search_toggle_bar_BG_color') : '#ff3333';\n $search_toggle_bar_icon_color = get_theme_mod('search_toggle_bar_icon_color') ? get_theme_mod('search_toggle_bar_icon_color') : '#fff';\n\t\n\t// page title Section\n\t$page_titlebar_bg_color = get_theme_mod('page_titlebar_bg_color') ? get_theme_mod('page_titlebar_bg_color') : '#f2f2f2';\n\t$page_titlebar_color = get_theme_mod('page_titlebar_color') ? get_theme_mod('page_titlebar_color') : '#353535';\n\t$page_titlebar_padding_tb = get_theme_mod('page_titlebar_padding_tb') ? get_theme_mod('page_titlebar_padding_tb') : '30';\n\t$title_position = get_theme_mod('title_position') ? get_theme_mod('title_position') : 'left';\n\t$bread_crumb_font_size = get_theme_mod('bread_crumb_font_size') ? get_theme_mod('bread_crumb_font_size') : '15';\n\t$page_titlebar_font_size = get_theme_mod('page_titlebar_font_size') ? get_theme_mod('page_titlebar_font_size') : '38';\n\t$bread_crumb_link_color = get_theme_mod('bread_crumb_link_color') ? get_theme_mod('bread_crumb_link_color') : '#000000';\n\n\t// Page mid content Section\n\t$page_mid_contant_bg_color = get_theme_mod('page_mid_contant_bg_color') ? get_theme_mod('page_mid_contant_bg_color') : '#fff';\n\t$page_mid_content_title_color = get_theme_mod('page_mid_content_title_color') ? get_theme_mod('page_mid_content_title_color') : '';\n\t$page_mid_content_color = get_theme_mod('page_mid_content_color') ? get_theme_mod('page_mid_content_color') : '#868686';\n\t$page_mid_contant_links_color = get_theme_mod('page_mid_contant_links_color') ? get_theme_mod('page_mid_contant_links_color') : '#333';\n\t$page_mid_contant_links_hover_color = get_theme_mod('page_mid_contant_links_hover_color') ? get_theme_mod('page_mid_contant_links_hover_color') : '#000000';\n\n\t//Single-Page\n\t$single_page_tabs_active_BG_color =get_theme_mod('single_page_tabs_active_BG_color') ? get_theme_mod('single_page_tabs_active_BG_color') : '#ff3333';\n\t$single_page_tabs_active_color =get_theme_mod('single_page_tabs_active_color') ? get_theme_mod('single_page_tabs_active_color') : '#fff';\n\t$single_page_tabs_active_border_color =get_theme_mod('single_page_tabs_active_border_color') ? get_theme_mod('single_page_tabs_active_border_color') : '#ff3333';\n\t$single_page_tabs_BG_color =get_theme_mod('single_page_tabs_BG_color') ? get_theme_mod('single_page_tabs_BG_color') : '#f2f2f2';\n\t$single_page_tabs_color =get_theme_mod('single_page_tabs_color') ? get_theme_mod('single_page_tabs_color') : '#7a7a7a';\n\t$single_page_tabs_border_color =get_theme_mod('single_page_tabs_border_color') ? get_theme_mod('single_page_tabs_border_color') : '#e5e5e5';\n\t$shortlist_tab_BG_color = get_theme_mod('shortlist_tab_BG_color') ? get_theme_mod('shortlist_tab_BG_color') : '#f2f2f2';\n\t$single_page_tabs_border_bottom_color = get_theme_mod('single_page_tabs_border_bottom_color') ? get_theme_mod('single_page_tabs_border_bottom_color') : '#ff3333';\n\t$shortlist_tab_color = get_theme_mod('shortlist_tab_color') ? get_theme_mod('shortlist_tab_color') : '#000';\n $shortlist_tab_border_color = get_theme_mod('shortlist_tab_border_color') ? get_theme_mod('shortlist_tab_border_color') : '#f2f2f2';\n $compcard_tab_BG_color = get_theme_mod('compcard_tab_BG_color') ? get_theme_mod('compcard_tab_BG_color') : '#ff3333';\n $compcard_tab_color = get_theme_mod('compcard_tab_color') ? get_theme_mod('compcard_tab_color') : '#fff';\n $compcard_tab_border_color = get_theme_mod('compcard_tab_border_color') ? get_theme_mod('compcard_tab_border_color') : '#ff3333';\n $single_page_post_title_color = get_theme_mod('single_page_post_title_color') ? get_theme_mod('single_page_post_title_color') : '#353535';\n $single_page_category_link_color = get_theme_mod('single_page_category_link_color') ? get_theme_mod('single_page_category_link_color') : '#ff3333';\n\n //Talent Post Color Settings\n $post_title_color = get_theme_mod('post_title_color') ? get_theme_mod('post_title_color') : '#000000';\n $post_title_hover_color = get_theme_mod('post_title_hover_color') ? get_theme_mod('post_title_hover_color') : '#ff3333';\n $post_meta_fields_text_hover_color = get_theme_mod('post_meta_fields_text_hover_color') ? get_theme_mod('post_meta_fields_text_hover_color') : '#ffffff';\n $post_meta_fields_text_hover_BG_color = get_theme_mod('post_meta_fields_text_hover_BG_color') ? get_theme_mod('post_meta_fields_text_hover_BG_color') : '#ff3333';\n\n\t// page sidebar Section\n\t$sidebar_title_color = get_theme_mod('sidebar_title_color') ? get_theme_mod('sidebar_title_color') : '#353535';\n\t$sidebar_title_border_color = get_theme_mod('sidebar_title_border_color') ? get_theme_mod('sidebar_title_border_color') : '#000000';\n\t$sidebar_content_color = get_theme_mod('sidebar_content_color') ? get_theme_mod('sidebar_content_color') : '#717171';\n\t$sidebar_links_color = get_theme_mod('sidebar_links_color') ? get_theme_mod('sidebar_links_color') : '#ff3333';\n\t$sidebar_links_hover_color = get_theme_mod('sidebar_links_hover_color') ? get_theme_mod('sidebar_links_hover_color') : '#000000';\n\t$sidebar_list_border_color = get_theme_mod('sidebar_list_border_color') ? get_theme_mod('sidebar_list_border_color') : '#e5e5e5';\n\t$sidebar_tagcloud_bg_color = get_theme_mod('sidebar_tagcloud_bg_color') ? get_theme_mod('sidebar_tagcloud_bg_color') : '#f9f9f9';\n\t$sidebar_tagcloud_font_color = get_theme_mod('sidebar_tagcloud_font_color') ? get_theme_mod('sidebar_tagcloud_font_color') : '#353535';\n\t$sidebar_tagcloud_border_color = get_theme_mod('sidebar_tagcloud_border_color') ? get_theme_mod('sidebar_tagcloud_border_color') : '#eeeeee';\n\t$sidebar_tagcloud_hover_bg_color = get_theme_mod('sidebar_tagcloud_hover_bg_color') ? get_theme_mod('sidebar_tagcloud_hover_bg_color') : '#ff3333';\n\t$sidebar_tagcloud_hover_font_color = get_theme_mod('sidebar_tagcloud_hover_font_color') ? get_theme_mod('sidebar_tagcloud_hover_font_color') : '#ffffff';\n\t$sidebar_tagcloud_hover_border_color = get_theme_mod('sidebar_tagcloud_hover_border_color') ? get_theme_mod('sidebar_tagcloud_hover_border_color') : '#ff3333';\n\t$sidebar_default_search_btn_BG_color = get_theme_mod('sidebar_default_search_btn_BG_color') ? get_theme_mod('sidebar_default_search_btn_BG_color') : '#ff3333';\n\t$sidebar_default_search_btn_color = get_theme_mod('sidebar_default_search_btn_color') ? get_theme_mod('sidebar_default_search_btn_color') : '#ffffff';\n \n\t// Footer Section\n\n \t/* Font Sizes */\n /* Title Font sizes H1 */\n $h1_title_fontsize=get_theme_mod( 'h1_title_fontsize', '' ) ? get_theme_mod( 'h1_title_fontsize', '' ) : '30'; // H1\n $h2_title_fontsize=get_theme_mod( 'h2_title_fontsize', '' ) ? get_theme_mod( 'h2_title_fontsize', '' ) : '27'; // H2\n $h3_title_fontsize=get_theme_mod( 'h3_title_fontsize', '' ) ? get_theme_mod( 'h3_title_fontsize', '' ) : '25'; // H3\n $h4_title_fontsize=get_theme_mod( 'h4_title_fontsize', '' ) ? get_theme_mod( 'h4_title_fontsize', '' ) : '18'; // H4\n $h5_title_fontsize=get_theme_mod( 'h5_title_fontsize', '' ) ? get_theme_mod( 'h5_title_fontsize', '' ) : '16'; // H5\n $h6_title_fontsize=get_theme_mod( 'h6_title_fontsize', '' ) ? get_theme_mod( 'h6_title_fontsize', '' ) : '12'; // H6\n // Letter Spaceing\n $h1_font_letter_space=get_theme_mod( 'h1_font_letter_space') ? get_theme_mod( 'h1_font_letter_space') : '0'; // H1\n $h2_font_letter_space=get_theme_mod( 'h2_font_letter_space') ? get_theme_mod( 'h2_font_letter_space') : '0'; // H2\n $h3_font_letter_space=get_theme_mod( 'h3_font_letter_space') ? get_theme_mod( 'h3_font_letter_space') : '0'; // H3\n $h4_font_letter_space=get_theme_mod( 'h4_font_letter_space') ? get_theme_mod( 'h4_font_letter_space') : '0'; // H4\n $h5_font_letter_space=get_theme_mod( 'h5_font_letter_space') ? get_theme_mod( 'h5_font_letter_space') : '0'; // H5\n $h6_font_letter_space=get_theme_mod( 'h6_font_letter_space') ? get_theme_mod( 'h6_font_letter_space') : '0'; // H6\n // Font Weight\n $h1_font_weight_bold=get_theme_mod( 'h1_font_weight_bold') ? get_theme_mod( 'h1_font_weight_bold') : 'normal'; // H1\n $h2_font_weight_bold=get_theme_mod( 'h2_font_weight_bold') ? get_theme_mod( 'h2_font_weight_bold') : 'normal'; // H2\n $h3_font_weight_bold=get_theme_mod( 'h3_font_weight_bold') ? get_theme_mod( 'h3_font_weight_bold') : 'normal'; // H3\n $h4_font_weight_bold=get_theme_mod( 'h4_font_weight_bold') ? get_theme_mod( 'h4_font_weight_bold') : 'normal'; // H4\n $h5_font_weight_bold=get_theme_mod( 'h5_font_weight_bold') ? get_theme_mod( 'h5_font_weight_bold') : 'normal'; // H5\n $h6_font_weight_bold=get_theme_mod( 'h6_font_weight_bold') ? get_theme_mod( 'h6_font_weight_bold') : 'normal'; // H6\n // Body & Menu\n $body_font_weight_bold=get_theme_mod( 'body_font_weight_bold') ? get_theme_mod( 'body_font_weight_bold') : 'normal'; // body\n $menu_font_weight=get_theme_mod( 'menu_font_weight') ? get_theme_mod( 'menu_font_weight') : 'normal'; // Menu\n $child_menu_font_weight=get_theme_mod( 'child_menu_font_weight') ? get_theme_mod( 'child_menu_font_weight') : 'normal'; // Child Menu\n // Menu Latter Sapcing\n $body_font_letter_space=get_theme_mod( 'body_font_letter_space') ? get_theme_mod( 'body_font_letter_space') : '0'; // H4\n $menu_font_letter_space=get_theme_mod( 'menu_font_letter_space') ? get_theme_mod( 'menu_font_letter_space') : '0'; // H5\n $child_menu_font_letter_space=get_theme_mod( 'child_menu_font_letter_space') ? get_theme_mod( 'child_menu_font_letter_space') : '0'; // H6\n $body_font_size=get_theme_mod( 'body_font_size', '' ) ? get_theme_mod( 'body_font_size', '' ) : '15'; // Body Font Size\n $menu_font_size=get_theme_mod( 'menu_font_size', '' ) ? get_theme_mod( 'menu_font_size', '' ) : '13'; // Body Font Size\n $child_menu_font_size=get_theme_mod( 'child_menu_font_size', '' ) ? get_theme_mod( 'child_menu_font_size', '' ) : '13'; // Body Font Size\n\n // Font family Names\n $google_body_font=get_theme_mod( 'google_body_font' ) ? get_theme_mod( 'google_body_font') : 'Open Sans';\n $google_bodyfont= ( $google_body_font == '0' ) ? 'arial' : $google_body_font;\n $google_menu_font=get_theme_mod( 'google_menu_font' ) ? get_theme_mod( 'google_menu_font' ) : 'Open Sans';\n $google_menufont= ( $google_menu_font == '0' ) ? 'arial' : $google_menu_font;\n $google_general_titlefont=get_theme_mod( 'google_heading_font') ? get_theme_mod( 'google_heading_font' ) : 'Crete Round';\n $google_generaltitlefont= ( $google_general_titlefont == '0' ) ? 'arial' : $google_general_titlefont;\t\n\n // Top Header Section\n\n\t// Pagination Section\n\t$pagination_bg_color = get_theme_mod('pagination_bg_color') ? get_theme_mod('pagination_bg_color') : '#e5e5e5';\n\t$pagination_link_color = get_theme_mod('pagination_link_color') ? get_theme_mod('pagination_link_color') : '#353535';\n\t$pagination_active_bg_color = get_theme_mod('pagination_active_bg_color') ? get_theme_mod('pagination_active_bg_color') : '#353535';\n\t$pagination_active_link_color = get_theme_mod('pagination_active_link_color') ? get_theme_mod('pagination_active_link_color') : '#353535';\n\n\t/* Body & Menu & Title's Font Line Height */\n\t$lineheight_body = round((1.9 * $body_font_size));\n\t$lineheight_h1 = round((1.6 * $h1_title_fontsize));\n\t$lineheight_h2 = round((1.6 * $h2_title_fontsize));\n\t$lineheight_h3 = round((1.6 * $h3_title_fontsize));\n\t$lineheight_h4 = round((1.6 * $h4_title_fontsize)); \n\t$lineheight_h5 = round((1.6 * $h5_title_fontsize));\n\t$lineheight_h6 = round((1.6 * $h6_title_fontsize));\n\n\t$css = '';\n $css .= 'body, p{\n\t\t\tfont-family:'.esc_attr( $google_bodyfont ).';\n\t\t\tline-height:'.$lineheight_body.'px;\n\t\t\tfont-size:'.$body_font_size.'px;\n\t\t\tletter-spacing:'.$body_font_letter_space.'px;\n\t\t\tfont-weight:'.$body_font_weight_bold.';\n\t\t\tfont-style:normal;\n }\n .menu ul li a, .shortlist-align a{\n\t\t\tfont-family:'.$google_menufont.';\n\t\t\tfont-size:'.$menu_font_size.'px !important;\n\t\t\tletter-spacing:'.$menu_font_letter_space.'px;\n\t\t\tfont-weight:'.$menu_font_weight.';\n }\n .menu ul ul li a{\n\t font-size:'.$child_menu_font_size.'px;\n\t font-weight:'.$child_menu_font_weight.';\n }\n \ta, span{\n \tfont-family:'.esc_attr( $google_bodyfont ).';\n }\n p{\n padding-bottom:'.$lineheight_body.'px;\n }\n /* Heading Font Family */\n h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a{\n \tfont-family:'.$google_generaltitlefont.';\n }\n h1{\n font-size:'.$h1_title_fontsize.'px;\n line-height:'.$lineheight_h1.'px;\n letter-spacing:'.$h1_font_letter_space.'px;\n font-weight: '.$h1_font_weight_bold.';\n }\n h2{\n font-size:'.$h2_title_fontsize.'px;\n line-height:'.$lineheight_h2.'px;\n letter-spacing:'.$h2_font_letter_space.'px;\n font-weight: '.$h2_font_weight_bold.';\n }\n h3, .grid-view-container h3:before{\n font-size:'.$h3_title_fontsize.'px;\n line-height:'.$lineheight_h3.'px;\n letter-spacing:'.$h3_font_letter_space.'px;\n font-weight: '.$h3_font_weight_bold.'!important;\n }\n h4{\n font-size:'.$h4_title_fontsize.'px;\n line-height:'.$lineheight_h4.'px;\n letter-spacing:'.$h4_font_letter_space.'px;\n font-weight: '.$h4_font_weight_bold.';\n }\n h5{\n font-size:'.$h5_title_fontsize .'px;\n line-height:'. $lineheight_h5 .'px;\n letter-spacing:'.$h5_font_letter_space.'px;\n font-weight: '.$h5_font_weight_bold.';\n }\n h6{\n font-size:'.$h6_title_fontsize.'px;\n line-height:'.$lineheight_h6.'px;\n letter-spacing:'.$h6_font_letter_space.'px;\n font-weight: '.$h6_font_weight_bold.';\n }';\n\n\t// Text Logo Settings\n\t$css .= '#logo h1.site-title a{\n\t\t\tcolor:'.$text_logo_tagline_color.';\n\t\t}\n\t\t#logo p{\n\t\t\tcolor:'.$text_logo_color.';\n\t\t}';\n\t// Header Color Section\n\t$css .='#kaya-header-content-wrapper, #kaya-header-content-wrapper .header-section{\n\t\t\tbackground:'.$header_bg_color.';\n\t\t}';\n\n\t// Menu Color settings\t\n\t$css .= '#header-navigation ul li a, .shortlist-align a{\n\t\t\t\tcolor:'.$menu_link_color.';\n\t\t\t}\n\t\t\t#header-navigation ul li a:hover, .shortlist-align a:hover{\n\t\t\t\tcolor:'.$menu_link_hover_color.';\n\t\t\t}\n\t\t\t#header-navigation ul li.current-menu-item.current_page_item a{\n\t\t\t\tcolor:'.$menu_active_link_color.';\n\t\t\t}\n\t\t\t.sub-menu li a, .user-account .sub-menu li a{\n\t\t\t\tbackground:'.$child_menu_bg_color.';\n\t\t\t\tcolor:'.$child_menu_link_color.'!important;\n\t\t\t}\n\t\t\t.sub-menu li a:hover{\n\t\t\t\tbackground:'.$child_menu_hover_bg_color.';\n\t\t\t\tcolor:'.$child_menu_link_hover_color.'!important;\n\t\t\t}\n\t\t\t.sub-menu li.current-menu-item a{\n\t\t\t\tbackground:'.$child_menu_active_bg_color.';\n\t\t\t\tcolor:'.$child_menu_active_link_color.';\n\t\t\t}\n\t\t\t.sub-menu li a{\n\t\t\t\tborder-bottom:1px solid '.$child_menu_border_bottom_color.';\n\t\t\t}\n .toggle_search_icon{\n border-top:50px solid '.$search_toggle_bar_BG_color.'; \n }\n .toggle_search_icon i{\n color:'.$search_toggle_bar_icon_color.';\n }';\n\t\t\t//Talent Single-page Settings\n $css .= '.single_tabs_content_wrapper li.tab-active a{\n \t\t\tbackground:'.$single_page_tabs_active_BG_color.'!important;\n \t\t\tcolor:'.$single_page_tabs_active_color.'!important;\n \t\t\tborder: 1px solid '.$single_page_tabs_active_border_color.'!important;\n \t} \n \tul.tabs_content_wrapper li a{\n \t\tbackground:'.$single_page_tabs_BG_color.'!important;\n \t\t\tcolor:'.$single_page_tabs_color.'!important;\n \t\t\tborder: 1px solid '.$single_page_tabs_border_color.'!important;\n \t}\n \tul.tabs_content_wrapper{\n \t\tborder-bottom: 3px solid '.$single_page_tabs_border_bottom_color.';\n \t}\n \t.cpt_posts_add_remove{\n \t\tbackground:'.$shortlist_tab_BG_color.';\n border:1px solid '.$shortlist_tab_border_color.';\n \t}\n \t.cpt_posts_add_remove a{\n \t\tcolor:'.$shortlist_tab_color.';\n \t}\n .pods_cpt_single_compcard a{\n background:'.$compcard_tab_BG_color.';\n border:1px solid '.$compcard_tab_border_color.';\n color:'.$compcard_tab_color.';\n }\n .post_single_page_img_details h2{\n\t color:'.$single_page_post_title_color.';\n\t }\n\t .post_single_page_img_details .one_fourth h4 a, .post_single_page_img_details .one_fourth h4{\n\t \tcolor:'.$single_page_category_link_color.';\n\t }\n ';\n\n //Talent Post Color Settings\n\n $css .='.post-content-wrapper h3, .grid-view-container h3{\n \tcolor:'.$post_title_color.'!important;\n }\n .post-content-wrapper .grid-view-container h3:before, .grid-view-container h3:before{\n \tbackground:'.$post_title_color.'!important;\n }\n .post-content-wrapper .grid-view-container:hover h3, .grid-view-container:hover h3{\n \tcolor:'.$post_title_hover_color.'!important;\n }\n .post-content-wrapper .grid-view-container a:hover h3:before, .grid-view-container a:hover h3:before{\n \tbackground:'.$post_title_hover_color.'!important;\n }\n .post-content-wrapper .title-meta-data-wrapper .general-meta-fields-info-wrapper .post-meta-general-info span, .grid-view-container .title-meta-data-wrapper{\n \tcolor:'.$post_meta_fields_text_hover_color.'!important;\n }\n .post-content-wrapper .grid-view-container .grid-view-image .title-meta-data-wrapper, .grid-view-container .title-meta-data-wrapper{\n \tbackground:'.$post_meta_fields_text_hover_BG_color.'!important;\n }';\n\t// Page title Color settings\t\t\t\n\t $css .= '.kaya-page-titlebar-wrapper{\n background:'.$page_titlebar_bg_color.';\n padding:'.$page_titlebar_padding_tb.'px 0px;\n }\n .kaya-page-titlebar-wrapper .page-title, .kaya-page-titlebar-wrapper a, .kaya-page-titlebar-wrapper, .page-title a{\n color:'.$page_titlebar_color.';\n }\n .kaya-page-titlebar-wrapper{\n \ttext-align:'.$title_position.';\n }\n .kaya-page-titlebar-wrapper .page-title{\n font-size:'.$page_titlebar_font_size.'px;\n margin-bottom: 10px;\n }\n .kaya-page-titlebar-wrapper a, .kaya-page-titlebar-wrapper{\n font-size:'.$bread_crumb_font_size.'px;\n }\n .kaya-page-titlebar-wrapper a {\n\t\t\t color: '.$bread_crumb_link_color.';\n\t\t\t}';\n\n\t// Page Mid Content\t Color settings\t\t\n\t$css .= 'body{\n\t\t\t\tbackground:'.$page_mid_contant_bg_color.';\n\t\t\t\tcolor:'.$page_mid_content_color.';\n\t\t\t}\n\t\t\tbody h1, body h2, body h3, body h4, body h5, body h6,\n\t\t\tbody h1 a, body h2 a, body h3 a, body h4 a, body h5 a,body h6 a{\n\t\t\t\tcolor:'.$page_mid_content_title_color.';\n\t\t\t}\n\t\t\tbody a{\n\t\t\t\tcolor:'.$page_mid_contant_links_color.';\n\t\t\t}\n\t\t\tbody a:hover{\n\t\t\t\tcolor:'.$page_mid_contant_links_hover_color.';\n\t\t\t}';\n\n\t// Page sidebar Color settings\t\n\t$css .= 'button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"]{\n\t\t\t\tcolor:'.$sidebar_default_search_btn_color.';\n\t\t\t\tbackground:'.$sidebar_default_search_btn_BG_color.';\n\t\t\t}\n\t\t\t#sidebar{\n\t\t\t\tcolor:'.$sidebar_content_color.';\n\t\t\t}\n\t\t\t#sidebar h1, #sidebar h2, #sidebar h3, #sidebar h4, #sidebar h5, #sidebar h6{\n\t\t\t\tcolor:'.$sidebar_title_color.';\n\t\t\t}\n\t\t\t#sidebar .widget-title:before{\n\t\t\t\tbackground:'.$sidebar_title_border_color.';\n\t\t\t}\n\t\t\t#sidebar a{\n\t\t\t\tcolor:'.$sidebar_links_color.';\n\t\t\t}\n\t\t\t#sidebar a:hover{\n\t\t\t\tcolor:'.$sidebar_links_hover_color.';\n\t\t\t}\n\t\t\t#sidebar li{\n\t\t\t\tborder-bottom:1px solid '.$sidebar_list_border_color.';\n\t\t\t}\n\t\t\t.tagcloud a{\n\t\t\t\tcolor:'.$sidebar_tagcloud_font_color.'!important;\n\t\t\t}\n\t\t\t.tagcloud a:hover{\n\t\t\t\tcolor:'.$sidebar_tagcloud_hover_font_color.'!important;\n\t\t\t\tbackground:'.$sidebar_tagcloud_hover_bg_color.';\n\t\t\t\tborder-right:3px solid'.$sidebar_tagcloud_hover_border_color.';\n\t\t\t}';\n\t// Footer Color settings\t\n\n\t// Footer Footer Color settings\t\n\t//pagination Color Settings\t\t\n\t$css .= 'ul.page-numbers li a, .page-links a{\n\t\t\t\tbackground:'.$pagination_bg_color.'!important;\n\t\t\t\tcolor:'.$pagination_link_color.'!important;\n\t\t\t}\n\t\t\t .pagination .current, #kaya-mid-content-wrapper .page-links > span, ul.page-numbers li a:hover, .page-links a:hover{\n\t\t\t\tbackground:'.$pagination_active_bg_color.'!important;\n\t\t\t\tcolor:'.$pagination_active_link_color.'!important;\n\t\t\t}';\t\t\t\t\t\n\t// End Styles\n\t\t\t\n\t$css = preg_replace( '/\\s+/', ' ', $css ); \n echo \"<style>\\n\" .wp_kses($css, true). \"\\n</style>\";\t\n}", "function svl_gallery_func() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Gallery Filter', 'Post Type General Name', 'devvn' ),\n\t\t'singular_name' => _x( 'Gallery Filter', 'Post Type Singular Name', 'devvn' ),\n\t\t'menu_name' => __( 'Gallery Filter', 'devvn' ),\n\t\t'name_admin_bar' => __( 'Gallery Filter', 'devvn' ),\n\t\t'archives' => __( 'Gallery', 'devvn' ),\n\t\t'attributes' => __( 'Item Attributes', 'devvn' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'devvn' ),\n\t\t'all_items' => __( 'All Items', 'devvn' ),\n\t\t'add_new_item' => __( 'Add New Item', 'devvn' ),\n\t\t'add_new' => __( 'Add New', 'devvn' ),\n\t\t'new_item' => __( 'New Item', 'devvn' ),\n\t\t'edit_item' => __( 'Edit Item', 'devvn' ),\n\t\t'update_item' => __( 'Update Item', 'devvn' ),\n\t\t'view_item' => __( 'View Item', 'devvn' ),\n\t\t'view_items' => __( 'View Items', 'devvn' ),\n\t\t'search_items' => __( 'Search Item', 'devvn' ),\n\t\t'not_found' => __( 'Not found', 'devvn' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'devvn' ),\n\t\t'featured_image' => __( 'Featured Image', 'devvn' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'devvn' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'devvn' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'devvn' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'devvn' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'devvn' ),\n\t\t'items_list' => __( 'Items list', 'devvn' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'devvn' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'devvn' ),\n\t);\n\t$rewrite = array(\n\t\t'slug' => 'exhibitor-catalogue',\n\t\t'with_front' => true,\n\t\t'pages' => true,\n\t\t'feeds' => false,\n\t);\n\t$args = array(\n\t\t'label' => __( 'Gallery Filter', 'devvn' ),\n\t\t'description' => __( 'Post Type Description', 'devvn' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'thumbnail', ),\n\t\t'taxonomies' => array( 'gallery-country', ' gallery-company' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-images-alt',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\t\t\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'rewrite' => $rewrite,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'gallery', $args );\n\n}", "function showMeThePage(){\n//return apply_filters('themify_after_post_title', '<h1 style=\"color:blue;background-color:green;\">got here</h1>');\n//echo \"doggie 2\";\n}", "public function private_theme_functions()\n {\n // Adds plus button\n add_action('in_admin_header', [ & $this, 'addParallaxBlock'], -200);\n\n // Replace the common scripts\n add_action('wp_default_scripts', [$this, 'changeCommonScript'], 11);\n }" ]
[ "0.7392021", "0.71606", "0.6860981", "0.6654382", "0.6636914", "0.6632607", "0.6622213", "0.6515376", "0.64941436", "0.64453655", "0.64236516", "0.64127254", "0.637817", "0.63553226", "0.6341442", "0.63135827", "0.63041884", "0.6301728", "0.6277704", "0.62491447", "0.62195325", "0.61988485", "0.61829364", "0.61421096", "0.61400247", "0.61318976", "0.6116416", "0.6081461", "0.60634696", "0.60616827", "0.6055809", "0.6050517", "0.6049216", "0.60433835", "0.6038401", "0.60356", "0.60286295", "0.6012079", "0.5999054", "0.59933394", "0.5988923", "0.5986821", "0.5973491", "0.59685504", "0.59649557", "0.5957947", "0.5947489", "0.59428537", "0.5942747", "0.59254307", "0.59232676", "0.5918534", "0.5917182", "0.59156555", "0.59128267", "0.5907145", "0.59007025", "0.58961177", "0.5895704", "0.5894847", "0.5890637", "0.58796", "0.58749515", "0.5860153", "0.58575934", "0.5855785", "0.5850696", "0.5848309", "0.58478564", "0.5845498", "0.5842392", "0.5838636", "0.5827543", "0.58258057", "0.58232427", "0.58231795", "0.58219874", "0.5817893", "0.58168805", "0.5809427", "0.5806587", "0.58065814", "0.5799787", "0.5798347", "0.57947546", "0.57920814", "0.57917666", "0.5791508", "0.578473", "0.57801515", "0.5771374", "0.57675767", "0.5766147", "0.5764187", "0.57627815", "0.57624024", "0.5761984", "0.5759313", "0.57534355", "0.5752304", "0.574874" ]
0.0
-1
Some custom styles for slides in Revolution Slider admin
function aitRevSliderAdminStyles(){ wp_enqueue_style('ait-revolution-slider-admin-css', THEME_URL . '/design/admin-plugins/revslider.css'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sb_slideshow_edit_admin_style() {\n\tif (!sb_verify_post_type('slideshow')) return; // verify post type\n?>\n\t<style type=\"text/css\">\n\t\tth.column-id { width:50px; }\n\t\tth.column-shortcode { width:180px; }\n\t\tinput.urlfield { width:155px; }\n\t</style>\n<?php\n}", "function create_slider() {\n $labels = array(\n 'name' => 'Slides',\n 'singular_name' => 'Slide',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Slide',\n 'edit_item' => 'Edit Slide',\n 'new_item' => 'New Slide',\n 'all_items' => 'All Slides',\n 'view_item' => 'View Slide',\n 'search_items' => 'Search Slides',\n 'not_found' => 'No Slides found',\n 'not_found_in_trash' => 'No Slides found in Trash',\n 'parent_item_colon' => '',\n 'menu_name' => 'Slider'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'slides' ),\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'yarpp_support' => true,\n 'supports' => array( 'title', 'thumbnail' )\n );\n\n register_post_type( 'slide', $args );\n}", "function criar_custom_post_slides(){\n\n\t$args_slides_post_type = array(\n\t\t'labels' => array('name' => 'Slides'),\n\t\t'public' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'supports' => array('title','excerpt','thumbnail'),\n\t\t'register_meta_box_cb' => 'slides_meta_box' );\n\n\tregister_post_type( 'slide_tornese' , $args_slides_post_type );\n}", "function carousel_slider_inline_style( $carousel_id ) {\n\t\t$id = $carousel_id;\n\t\t$_nav_color = get_post_meta( $id, '_nav_color', true );\n\t\t$_nav_active_color = get_post_meta( $id, '_nav_active_color', true );\n\t\t$_post_height = get_post_meta( $id, '_post_height', true );\n\t\t$_product_title_color = get_post_meta( $id, '_product_title_color', true );\n\t\t$_product_btn_bg_color = get_post_meta( $id, '_product_button_bg_color', true );\n\t\t$_product_btn_text_color = get_post_meta( $id, '_product_button_text_color', true );\n\t\t$content_sliders = get_post_meta( $id, '_content_slider', true );\n\n\t\t$slide_type = get_post_meta( $id, '_slide_type', true );\n\t\t$slide_type = in_array( $slide_type, carousel_slider_slide_type() ) ? $slide_type : 'image-carousel';\n\n\t\t$_arrow_size = get_post_meta( $id, '_arrow_size', true );\n\t\t$_arrow_size = empty( $_arrow_size ) ? 48 : absint( $_arrow_size );\n\n\t\t$_bullet_size = get_post_meta( $id, '_bullet_size', true );\n\t\t$_bullet_size = empty( $_bullet_size ) ? 10 : absint( $_bullet_size );\n\n\t\techo \"<style type=\\\"text/css\\\">\";\n\n\t\t// Arrows Nav\n\t\techo \"\n #id-{$id} .necoyoad-carousel-slider-nav-icon {\n fill: {$_nav_color}\n }\n #id-{$id} .necoyoad-carousel-slider-nav-icon:hover {\n fill: {$_nav_active_color}\n }\n #id-{$id} .owl-prev,\n #id-{$id} .owl-next,\n #id-{$id} .necoyoad-carousel-slider-nav-icon {\n height: {$_arrow_size}px;\n width: {$_arrow_size}px\n }\n #id-{$id}.arrows-outside .owl-prev {\n left: -{$_arrow_size}px\n }\n #id-{$id}.arrows-outside .owl-next {\n right: -{$_arrow_size}px\n }\n \";\n\n\t\t// Dots Nav\n\t\techo \"\n\t\t #id-{$id} .owl-dots .owl-dot span {\n background-color: {$_nav_color};\n width: {$_bullet_size}px;\n height: {$_bullet_size}px;\n }\n #id-{$id} .owl-dots .owl-dot.active span,\n #id-{$id} .owl-dots .owl-dot:hover span {\n background-color: {$_nav_active_color}\n }\n\t\t\";\n\n\t\t// Product Carousel Slider\n\t\tif ( $slide_type == 'product-carousel' ) {\n\t\t\techo \"\n\t\t #id-{$id} .necoyoad-carousel-slider__product h3,\n #id-{$id} .necoyoad-carousel-slider__product .price {\n color: {$_product_title_color};\n }\n\n #id-{$id} .necoyoad-carousel-slider__product a.add_to_cart_button,\n #id-{$id} .necoyoad-carousel-slider__product a.added_to_cart,\n #id-{$id} .necoyoad-carousel-slider__product a.quick_view,\n #id-{$id} .necoyoad-carousel-slider__product .onsale {\n background-color: {$_product_btn_bg_color};\n color: {$_product_btn_text_color};\n }\n\n #id-{$id} .necoyoad-carousel-slider__product .star-rating span:before {\n color: {$_product_btn_bg_color};\n }\n\t\t \";\n\t\t}\n\n\t\t// Content Carousel\n\t\tif ( $slide_type == 'hero-banner-slider' && $content_sliders ) {\n\t\t\tforeach ( $content_sliders as $slide_id => $slide ) {\n\t\t\t\t// Title Style\n\t\t\t\t$heading_font_size = ! empty( $slide['heading_font_size'] ) ? esc_attr( $slide['heading_font_size'] ) : 40;\n\t\t\t\t$heading_gutter = ! empty( $slide['heading_gutter'] ) ? esc_attr( $slide['heading_gutter'] ) : '30px';\n\t\t\t\t$heading_color = ! empty( $slide['heading_color'] ) ? esc_attr( $slide['heading_color'] ) : '#ffffff';\n\t\t\t\techo \"#id-{$id} .hero__cell-{$slide_id} .necoyoad-carousel-slider-hero__cell__heading {\n\t\t\t\t\tfont-size: {$heading_font_size}px;\n\t\t\t\t\tmargin-bottom: {$heading_gutter};\n\t\t\t\t\tcolor: {$heading_color};\n\t\t\t\t}\";\n\t\t\t\t// Description Style\n\t\t\t\t$description_font_size = ! empty( $slide['description_font_size'] ) ? esc_attr( $slide['description_font_size'] ) : 20;\n\t\t\t\t$description_gutter = ! empty( $slide['description_gutter'] ) ? esc_attr( $slide['description_gutter'] ) : '30px';\n\t\t\t\t$description_color = ! empty( $slide['description_color'] ) ? esc_attr( $slide['description_color'] ) : '#ffffff';\n\t\t\t\techo \"#id-{$id} .hero__cell-{$slide_id} .necoyoad-carousel-slider-hero__cell__description{\n\t\t\t\t\tfont-size: {$description_font_size}px;\n\t\t\t\t\tmargin-bottom: {$description_gutter};\n\t\t\t\t\tcolor: {$description_color};\n\t\t\t\t}\";\n\t\t\t\t// Button Style\n\t\t\t\tif ( isset( $slide['link_type'] ) && ( $slide['link_type'] == 'button' ) ) {\n\n\t\t\t\t\t$_btn_1_type = ! empty( $slide['button_one_type'] ) ? esc_attr( $slide['button_one_type'] ) : 'normal';\n\t\t\t\t\t$_btn_1_bg_color = ! empty( $slide['button_one_bg_color'] ) ? carousel_slider_sanitize_color( $slide['button_one_bg_color'] ) : '#00d1b2';\n\t\t\t\t\t$_btn_1_color = ! empty( $slide['button_one_color'] ) ? carousel_slider_sanitize_color( $slide['button_one_color'] ) : '#ffffff';\n\t\t\t\t\t$_btn_1_border_width = ! empty( $slide['button_one_border_width'] ) ? esc_attr( $slide['button_one_border_width'] ) : '0px';\n\t\t\t\t\t$_btn_1_border_radius = ! empty( $slide['button_one_border_radius'] ) ? esc_attr( $slide['button_one_border_radius'] ) : '3px';\n\n\t\t\t\t\tif ( $_btn_1_type == 'stroke' ) {\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t#id-{$id} .cs-hero-button-{$slide_id}-1 {\n\t\t\t\t\t\t\tborder: {$_btn_1_border_width} solid {$_btn_1_bg_color};\n\t\t\t\t\t\t\tborder-radius: {$_btn_1_border_radius};\n\t\t\t\t\t\t\tbackground-color: transparent;\n\t\t\t\t\t\t\tcolor: {$_btn_1_bg_color};\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#id-{$id} .cs-hero-button-{$slide_id}-1:hover {\n\t\t\t\t\t\t\tborder: {$_btn_1_border_width} solid {$_btn_1_bg_color};\n\t\t\t\t\t\t\tbackground-color: {$_btn_1_bg_color};\n\t\t\t\t\t\t\tcolor: {$_btn_1_color};\n\t\t\t\t\t\t}\n\t\t\t\t\t\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t#id-{$id} .cs-hero-button-{$slide_id}-1 {\n\t\t\t\t\t\t\tbackground-color: {$_btn_1_bg_color};\n\t\t\t\t\t\t\tborder: {$_btn_1_border_width} solid {$_btn_1_bg_color};\n\t\t\t\t\t\t\tborder-radius: {$_btn_1_border_radius};\n\t\t\t\t\t\t\tcolor: {$_btn_1_color};\n\t\t\t\t\t\t}\n\t\t\t\t\t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$_btn_2_type = ! empty( $slide['button_two_type'] ) ? esc_attr( $slide['button_two_type'] ) : 'normal';\n\t\t\t\t\t$_btn_2_bg_color = ! empty( $slide['button_two_bg_color'] ) ? carousel_slider_sanitize_color( $slide['button_two_bg_color'] ) : '#00d1b2';\n\t\t\t\t\t$_btn_2_color = ! empty( $slide['button_two_color'] ) ? carousel_slider_sanitize_color( $slide['button_two_color'] ) : '#ffffff';\n\t\t\t\t\t$_btn_2_border_width = ! empty( $slide['button_two_border_width'] ) ? esc_attr( $slide['button_two_border_width'] ) : '0px';\n\t\t\t\t\t$_btn_2_border_radius = ! empty( $slide['button_two_border_radius'] ) ? esc_attr( $slide['button_two_border_radius'] ) : '3px';\n\t\t\t\t\tif ( $_btn_2_type == 'stroke' ) {\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t#id-{$id} .cs-hero-button-{$slide_id}-2 {\n\t\t\t\t\t\t\tborder: {$_btn_2_border_width} solid {$_btn_2_bg_color};\n\t\t\t\t\t\t\tborder-radius: {$_btn_2_border_radius};\n\t\t\t\t\t\t\tbackground-color: transparent;\n\t\t\t\t\t\t\tcolor: {$_btn_2_bg_color};\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#id-{$id} .cs-hero-button-{$slide_id}-2:hover {\n\t\t\t\t\t\t\tborder: {$_btn_2_border_width} solid {$_btn_2_bg_color};\n\t\t\t\t\t\t\tbackground-color: {$_btn_2_bg_color};\n\t\t\t\t\t\t\tcolor: {$_btn_2_color};\n\t\t\t\t\t\t}\n\t\t\t\t\t\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t#id-{$id} .cs-hero-button-{$slide_id}-2 {\n\t\t\t\t\t\t\tbackground-color: {$_btn_2_bg_color};\n\t\t\t\t\t\t\tborder: {$_btn_2_border_width} solid {$_btn_2_bg_color};\n\t\t\t\t\t\t\tborder-radius: {$_btn_2_border_radius};\n\t\t\t\t\t\t\tcolor: {$_btn_2_color};\n\t\t\t\t\t\t}\n\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo \"</style>\";\n\t}", "public function my_add_styles_admin() {\n\t\t//get the list of sliders\n\t\t$shortcode_list = get_option( 'slider_type' );\n\t\tif ( ! $shortcode_list || empty( $shortcode_list ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$shortcode_list = json_encode( $shortcode_list );\n\n\t\tglobal $current_screen;\n\t\t$type = $current_screen->post_type;\n\n\t\tif ( is_admin() && 'post' == $type || 'page' == $type ) {\n\n\t\t\tglobal $post;\n\t\t\tif ( ! is_object( $post ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//if any slider is already selected get the value\n\t\t\t$value = get_post_meta( $post->ID, '_slider_meta_value', true );\n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar shortcodes = '<?php echo $shortcode_list; ?>';\n\t\t\t\tvar posts = '<?php global $post;echo $post->ID;?>';\n\t\t\t\tvar old_value = '<?php echo $value; ?>'; \n\t\t\t</script>\n\t\t\t<?php\n\n\t\t}\n\t}", "function vdtestim_style_preview () {\n\n\t$vdtestim_options = get_option( 'vdtestim_global_settings' );\n\t$vdtestim_style_options = get_option( 'vdtestim_style_settings' );\n\t$default_gravatar_url = $vdtestim_options['default_gravatar_url'];\n\n\t$slide_testimonials = $vdtestim_style_options['slide'];\n\t$num_testimonials = $vdtestim_style_options['num_testimonials'];\n\t\n\t?>\n\n\n\t<div id=\"testimonials\" class=\"<?php if ( $slide_testimonials === 'yes' ) echo \"slider\" ?> testimonials\">\n\n\n\n\t\t<?php\n\n\n\n\t\t\t// WP_Query arguments\n\t\t\t$args = array (\n\t\t\t\t'post_type' => 'testimonials',\n\t\t\t\t'posts_per_page' => $num_testimonials\n\t\t\t);\n\n\t\t\t// The Query\n\t\t\t$query = new WP_Query( $args );\n\n\t\t\t// The Loop\n\t\t\t$i = 0;\n\t\t\tif ( $query->have_posts() ) {\n\t\t\t\twhile ( $query->have_posts() ) {\n\t\t\t\t\t$query->the_post();\n\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"testimonial <?php if ( $slide_testimonials == 'yes' ) { echo 'slide'; } else { echo 'no-slide'; } if ($i === $num_testimonials -1 ) { echo ' last'; } ?> \">\n\n\t\t\t\t\t\t<?php\n\n\n\t\t\t\t\t\t$vdtestim_company = get_post_meta( get_the_id(), 'vdtestim_company', true );\n\t\t\t\t\t\t$vdtestim_website = get_post_meta( get_the_id(), 'vdtestim_website', true );\n\t\t\t\t\t\t$vdtestim_position = get_post_meta( get_the_id(), 'vdtestim_position', true );\n\t\t\t\t\t\t$vdtestim_email = get_post_meta( get_the_id(), 'vdtestim_email', true );\n\t\t\t\t\t\t$vdtestim_wpautop = get_post_meta( get_the_id(), 'vdtestim_testimonial', true );\n\t\t\t\t\t\t$vdtestim_text = wpautop( $vdtestim_wpautop );\n\t\t\t\t\t\t$size = 50;\n\t\t\t\t\t\t$default = plugins_url( 'vertusdl-testimonials/images/defaultavatar-green.png' );\n\t\t\t\t\t\t$grav_url = \"http://www.gravatar.com/avatar/\" . md5( strtolower( trim( $vdtestim_email ) ) ) . \"?d=\" . urlencode( $default_gravatar_url ) . \"&s=\" . $size;\n\n\t\t\t\t\t\t// To Do - Change gravatar default back to pluginurl in production!!!!!!!!\n\n\t\t\t\t\t\t?>\n\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t<blockquote><p><?php echo vdtestim_shorten_testimonial( $vdtestim_text ); ?>\n\t\t\t\t\t\t<a href=\"<?php echo get_permalink(); ?>\">Read More</a></p></blockquote>\n\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<img src=\"<?php echo $grav_url; ?>\" alt=\"\" height=\"50\" width=\"50\"/>\n\t\t\t\t\t\t\t<span class=\"testimonials-before\">by: </span><span class=\"testimonials-name\"><?php the_title(); ?></span><br />\n\t\t\t\t\t\t\t<span class=\"testimonials-before\">from: </span><a href=\"<?php echo $vdtestim_website; ?>\" target=\"_blank\" rel=\"nofollow\" title=\"Link to <?php echo $vdtestim_company;?> Website.\"><span class=\"testimonials-company\"><?php echo $vdtestim_company; ?></span></a>\n\t\t\t\t\t\t</p>\t\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php\n\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t} \n\t\t?>\n\n\t\t<?php if ( $slide_testimonials == 'yes' ) { ?>\n\n\t\t\t<div class=\"slider_controls\">\n\t\t <div class=\"prev testimonial_slide\" data-target=\"prev\" >&lsaquo;</div>\n\t\t <div class=\"next testimonial_slide\" data-target=\"next\" >&rsaquo;</div>\n\t\t <ul class=\"pager_list\"></ul>\n\t\t </div>\n\n\t\t<?php } ?> \n\n\t</div>\n\n\n\t<?php\n}", "function auxin_metabox_fields_general_slider(){\n $slider_ids = array( 'none' => __( 'Choose ..', 'phlox') );\n\n $args = array(\n 'post_type' => 'slider',\n 'orderby' => \"date\",\n 'post_status' => 'publish',\n 'posts_per_page' => -1\n );\n\n $th_query = null;\n $th_query = new WP_Query( $args );\n if( $th_query->have_posts() ): while ( $th_query->have_posts() ) : $th_query->the_post();\n $opts = get_post_meta( $th_query->post->ID, 'slider-data', true );\n if( ! isset( $opts ) || ! is_array( $opts ) ) continue;\n $type = $opts[\"type\"];\n $slider_ids[ $th_query->post->ID ] = '['.$type.' ] '. get_the_title();\n unset( $args, $opts, $type );\n endwhile; endif;\n wp_reset_postdata();\n\n\n // Get all revslider aliases----------------------------------------\n\n if ( class_exists('RevSlider') ) { // if revSlider is active\n\n $slider = new RevSlider();\n $arrSliders = $slider->getArrSliders();\n\n foreach ($arrSliders as $slider) {\n $slider_ids[ $slider->getAlias() ] = '[revo ] '.$slider->getTitle();\n }\n\n unset( $slider, $arrSliders );\n }\n\n // Get all layeslider items ----------------------------------------\n\n // Check if the file is available to prevent warnings\n if( class_exists('LS_Sliders') ) {\n\n // Get WPDB Object\n global $wpdb;\n\n // Table name\n $table_name = $wpdb->prefix . \"layerslider\";\n\n // Get sliders\n $sliders = $wpdb->get_results( \"SELECT * FROM $table_name\n WHERE flag_hidden = '0' AND flag_deleted = '0'\n ORDER BY date_c ASC LIMIT 100\" );\n\n // Iterate over the sliders\n foreach($sliders as $key => $item) {\n $slider_ids['ls_'.$item->id] = '[layer] '. $item->name;\n }\n\n }\n\n // Get all cute slider items ---------------------------------------\n\n // Check if the file is available to prevent warnings\n if( function_exists('cuteslider_init') ) {\n\n // Get WPDB Object\n global $wpdb;\n\n // Table name\n $table_name = $wpdb->prefix . \"cuteslider\";\n\n // Get sliders\n $sliders = $wpdb->get_results( \"SELECT * FROM $table_name\n WHERE flag_hidden = '0' AND flag_deleted = '0'\n ORDER BY date_c ASC LIMIT 100\" );\n\n // Iterate over the sliders\n foreach($sliders as $key => $item) {\n $slider_ids['cs_'.$item->id] = '[cute ] '. $item->name;\n }\n\n }\n\n if ( defined( 'MSWP_AVERTA_VERSION' ) ) {\n\n $ms_sliders = get_masterslider_names( true );\n foreach ($ms_sliders as $ms_id => $ms_label ) {\n $slider_ids['ms_'.$ms_id] = '[Master] '. $ms_label;\n }\n }\n\n $slider_ids = apply_filters( 'auxin_page_header_slider_ids', $slider_ids );\n\n /*==================================================================================================\n\n Add Page Option meta box\n\n *=================================================================================================*/\n\n $model = new Auxin_Metabox_Model();\n $model->title = __( 'Slider Options', 'phlox');\n $model->type = array('page');\n $model->fields= array(\n\n array(\n 'title' => __('Page Slider', 'phlox'),\n 'description' => __('Please select the slider you want to display at top of the page.', 'phlox'),\n 'id' => 'top_slider_id',\n 'id_deprecated' => 'top_slider_id',\n 'type' => 'select',\n 'choices' => $slider_ids\n ),\n array(\n 'title' => __('Slider top margin', 'phlox'),\n 'description' => __('The height of empty space above page slider in pixel.', 'phlox'),\n 'id' => 'top_slider_margin_top',\n 'type' => 'text',\n 'default' =>''\n ),\n array(\n 'title' => __('Slider bottom margin', 'phlox'),\n 'description' => __('The height of empty space below page slider in pixel.', 'phlox'),\n 'id' => 'top_slider_margin_bottom',\n 'type' => 'text',\n 'default' =>''\n )\n // array(\n // 'title' => __('Slider Width', 'phlox'),\n // 'description' => __('If you choose \"Full\", the slider fits to the page width.<br/>', 'phlox'),\n // 'id' => 'top_slider_width',\n // 'id_deprecated' => 'top_slider_width',\n // 'type' => 'select',\n // 'default' => 'full',\n // 'choices' => array(\n // 'full' => __('Full' , 'phlox'),\n // 'boxed' => __('Boxed', 'phlox')\n // )\n // ),\n );\n\n return $model;\n}", "public function add_inline_styles() {\n\n\t\t// echo '<div class=\"revsliderstyles\">';\n\t\techo '<style scoped>';\n\n\t\t$db = new UniteDBRev();\n\n\t\t$styles = $db->fetch( GlobalsRevSlider::$table_css );\n\t\tforeach ( $styles as $key => $style ) {\n\t\t\t$handle = str_replace( '.tp-caption', '', $style['handle'] );\n\t\t\tif ( ! isset( $this->class_include[ $handle ] ) ) { unset( $styles[ $key ] ); }\n\t\t}\n\n\t\t$styles = UniteCssParserRev::parseDbArrayToCss( $styles, \"\\n\" );\n\t\t$styles = UniteCssParserRev::compress_css( $styles );\n\t\techo $styles;\n\n\t\techo '</style>' . \"\\n\";\n\t\t// echo '</div>';\n\t}", "private function putResponsitiveStyles() {\n\n\t\t$bannerWidth = $this->slider->getParam( 'width' );\n\t\t$bannerHeight = $this->slider->getParam( 'height' );\n\n\t\t$arrItems = $this->getResponsitiveValues();\n\n\t\t?>\n\t\t<style type='text/css'>\n\t\t\t#<?php echo $this->sliderHtmlID?>, #<?php echo $this->sliderHtmlID_wrapper?> { width:<?php echo $bannerWidth?>px; height:<?php echo $bannerHeight?>px;}\n\t\t\t<?php\n\t\t\tforeach ( $arrItems as $item ) :\n\t\t\t\t$strMaxWidth = '';\n\n\t\t\t\tif ( $item['maxWidth'] >= 0 ) {\n\t\t\t\t\t$strMaxWidth = 'and (max-width: ' . $item['maxWidth'] . 'px)'; }\n\n\t\t\t?>\n\n\t\t\t @media only screen and (min-width: <?php echo $item['minWidth']?>px) <?php echo $strMaxWidth?> {\n\t\t\t \t\t #<?php echo $this->sliderHtmlID?>, #<?php echo $this->sliderHtmlID_wrapper?> { width:<?php echo $item['sliderWidth']?>px; height:<?php echo $item['sliderHeight']?>px;}\n\t\t\t }\n\n\t\t\t<?php\n\t\t\tendforeach;\n\t\t\techo '</style>';\n\t}", "function redart_slider( $id = false ){\r\n\r\n\t$slider = false;\r\n\r\n\tif( $id || is_home() || get_post_type() == 'page' ) {\r\n\r\n\t\tif( is_home() ) $id = get_option('page_for_posts');\r\n\t\telseif( is_page() ) $id = redart_ID();\r\n\r\n\t\t$slider_key = get_post_meta( $id, '_tpl_default_settings', true );\r\n\t\t\r\n\t\tif( is_array( $slider_key) && array_key_exists('slider_type', $slider_key) ) {\r\n\t\t\t\r\n\t\t\tif( ( $slider_key['slider_type'] == 'revolutionslider' ) && ( array_key_exists( 'revolutionslider_id', $slider_key ) ) && ( array_key_exists( 'show_slider', $slider_key ) ) ) {\r\n\t\t\t\t\r\n\t\t\t\t// revolution slider\r\n\t\t\t\t$slider = '<div id=\"slider\"><div class=\"dt-sc-main-slider\" id=\"dt-sc-rev-slider\">';\r\n\t\t\t\t\t$slider .= do_shortcode('[rev_slider '. $slider_key['revolutionslider_id'] .']');\r\n\t\t\t\t$slider .= '</div></div>';\r\n\t\t\t\r\n\t\t\t} elseif( ( $slider_key['slider_type'] == 'layerslider' ) && ( array_key_exists('layerslider_id', $slider_key) ) && ( array_key_exists( 'show_slider', $slider_key ) ) ) {\r\n\r\n\t\t\t\t// layer slider\r\n\t\t\t\t$slider = '<div id=\"slider\"><div class=\"dt-sc-main-slider\" id=\"dt-sc-layer-slider\">';\r\n\t\t\t\t\t$slider .= do_shortcode('[layerslider id=\"'. $slider_key['layerslider_id'] .'\"]');\r\n\t\t\t\t$slider .= '</div></div>';\r\n\r\n\t\t\t} elseif( ( $slider_key['slider_type'] == 'customslider' ) && ( array_key_exists('customslider_sc', $slider_key) ) && ( array_key_exists( 'show_slider', $slider_key ) ) ) {\r\n\t\r\n\t\t\t\t// Custom Slider\r\n\t\t\t\t$slider = '<div id=\"slider\"><div class=\"dt-sc-main-slider\" id=\"dt-sc-custom-slider\">';\r\n\t\t\t\t\t$slider .= redart_wp_kses(do_shortcode( $slider_key['customslider_sc'] ));\r\n\t\t\t\t$slider .= '</div></div>';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $slider;\r\n}", "function soliloquy_custom_css_output( $slider, $data ) {\n\n // If there is no style, return the default slider HTML.\n $instance = Soliloquy_Shortcode::get_instance();\n if ( ! $instance->get_config( 'custom_css', $data ) ) {\n \treturn $slider;\n }\n\n // Build out the custom CSS.\n $style = '<style type=\"text/css\">' . $instance->minify( html_entity_decode( $data['config']['custom_css'] ) ) . '</style>';\n\n // Return the style prepended to the slider.\n return $style . $slider;\n\n}", "function nirvana_ppslider_output( $slides ) {\n\t$nirvanas = nirvana_get_theme_options();\n\textract($nirvanas);\n\n\tif (count($slides)>0): ?>\n\t<div class=\"slider-wrapper theme-default <?php if($nirvana_fpsliderarrows==\"Visible on Hover\") echo \"slider-navhover\"; ?> slider-<?php echo preg_replace(\"/[^a-z0-9]/i\",\"\", strtolower($nirvana_fpslidernav)); ?>\">\n\t\t <div class=\"ribbon\"></div>\n\t\t <div id=\"slider\" class=\"nivoSlider\">\n\t\t<?php foreach( $slides as $id => $slide ):\n\t\t\t\tif ( $slide['image'] ) { ?>\n\t\t\t\t<a href=\"<?php echo ($slide['link'] ? $slide['link'] : '#'); ?>\">\n\t\t\t\t\t<img src=\"<?php echo $slide['image']; ?>\" data-thumb=\"<?php echo $slide['image']; ?>\" alt=\"<?php echo ( $slide['title'] ? esc_attr($slide['title']) : '' ); ?>\" <?php if ($slide['title'] || $slide['text']) : ?>title=\"#caption<?php echo $id;?>\" <?php endif; ?> />\n\t\t\t\t</a><?php } ?>\n\t\t <?php endforeach; ?>\n\t\t </div>\n\t\t <?php foreach( $slides as $id => $slide ): ?>\n\t\t\t\t<div id=\"caption<?php echo $id;?>\" class=\"nivo-html-caption\">\n\t\t\t\t\t<h2> <?php echo $slide['title'] ?></h2>\n\t\t\t\t\t<div class=\"slider-text-separator\"></div>\n\t\t\t\t\t<div class=\"slide-text\"> <div class=\"inline-slide-text\"> <?php echo $slide['text'] ?></div> </div>\n\t\t\t\t\t<?php if($nirvana_slidereadmore && $slide['link'] ) { ?>\n\t\t\t\t\t<div class=\"readmore\">\n\t\t\t\t\t\t<a href=\"<?php echo esc_url($slide['link']) ?>\"><?php echo esc_attr($nirvana_slidereadmore) ?> <i class=\"column-arrow\"></i> </a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</div>\n\n\t\t<?php endforeach; ?>\n\t\t </div>\n\t<?php endif;\n}", "function klippe_core_set_full_screen_image_slider_custom_style_for_vc_shortcodes( $style ) {\n\t\t$current_style = '.wpb_content_element.wpb_mkdf_full_screen_image_slider_item > .wpb_element_wrapper {\n\t\t\tbackground-color: #f4f4f4;\n\t\t}';\n\t\t\n\t\t$style .= $current_style;\n\t\t\n\t\treturn $style;\n\t}", "public function render()\n {\n return view('gallery::components.slider.'.$this->theme);\n }", "function _sp_custom_box_slide_settings() {\n\tglobal $post;\n\n\t// bail if not correct post type\n\tif ( get_post_type() != 'sp-slider' )\n\t\treturn;\n\n\twp_nonce_field( '_sp_process_meta_slide_settings', '_sp_meta_slide_settings_nonce' );\n\n\t$output = '';\n\n\t$output .= '<div class=\"slide-settings-container\">' . PHP_EOL;\n\t$output .= '<h3 class=\"header\">' . __( 'Slide Settings', 'sp-theme' ) . '<small>' . __( 'Please use the \"Save\" button below to save the settings in this box.', 'sp-theme' ) . '</small></h3>' . PHP_EOL;\n\t$output .= '<div class=\"inner-container postbox\">' . PHP_EOL;\n\n\t$output .= '</div><!--close .inner-container-->' . PHP_EOL;\n\t$output .= '<div class=\"alert\"><i class=\"icon-ok\" aria-hidden=\"true\"></i><i class=\"icon-ban-circle\" aria-hidden=\"true\"></i></div>' . PHP_EOL;\n\t$output .= '</div><!--close .slide-settings-container-->' . PHP_EOL;\n\n\techo $output;\n}", "private function get_flex_slider_markup( $slide ) {\n\n $image_attributes = array(\n 'src' => $slide['src'],\n 'height' => $slide['height'],\n 'width' => $slide['width'],\n 'alt' => $slide['alt'],\n 'rel' => $slide['rel'],\n 'class' => $slide['class'],\n 'title' => $slide['title']\n );\n\n if ( $this->settings['smartCrop'] == 'disabled_pad') {\n\n $image_attributes['style'] = $this->flex_smart_pad( $image_attributes, $slide );\n\n }\n\n $attributes = apply_filters( 'metaslider_flex_slider_image_attributes', $image_attributes, $slide, $this->slider->ID );\n\n $html = $this->build_image_tag( $attributes );\n\n $anchor_attributes = apply_filters( 'metaslider_flex_slider_anchor_attributes', array(\n 'href' => $slide['url'],\n 'target' => $slide['target']\n ), $slide, $this->slider->ID );\n\n if ( strlen( $anchor_attributes['href'] ) ) {\n $html = $this->build_anchor_tag( $anchor_attributes, $html );\n }\n\n // add caption\n if ( strlen( $slide['caption'] ) ) {\n $html .= '<div class=\"caption-wrap\"><div class=\"caption\">' . $slide['caption'] . '</div></div>';\n }\n\n $attributes = apply_filters( 'metaslider_flex_slider_list_item_attributes', array(\n 'data-thumb' => isset($slide['data-thumb']) ? $slide['data-thumb'] : \"\",\n 'style' => \"display: none; width: 100%;\",\n 'class' => \"slide-{$this->slide->ID} ms-image\"\n ), $slide, $this->slider->ID );\n\n $li = \"<li\";\n\n foreach ( $attributes as $att => $val ) {\n if ( strlen( $val ) ) {\n $li .= \" \" . $att . '=\"' . esc_attr( $val ) . '\"';\n }\n }\n\n $li .= \">\" . $html . \"</li>\";\n\n $html = $li;\n\n\n return apply_filters( 'metaslider_image_flex_slider_markup', $html, $slide, $this->settings );\n\n }", "function thirdtheme_custom_slider()\n {\n add_theme_support('post-thumbnails');\n $args = array(\n 'labels' => array('name' =>__(' custom slider'),\n 'add_new' =>__('add new slider')),\n \n 'public' => true,\n 'menu_icon' => 'dashicons-format-image',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'thumbnail' )); \n register_post_type('slider',$args);\n }", "function qodef_core_set_clients_carousel_custom_style_for_vc_shortcodes( $style ) {\n\t\t$current_style = '.wpb_content_element.wpb_qodef_clients_carousel_item > .wpb_element_wrapper { \n\t\t\tbackground-color: #f4f4f4; \n\t\t}';\n\t\t\n\t\t$style .= $current_style;\n\t\t\n\t\treturn $style;\n\t}", "static function add_slides(): void {\r\n self::add_acf_field(self::slides, [\r\n 'label' => 'Slides',\r\n 'min' => 1,\r\n 'max' => 4,\r\n 'layout' => 'row',\r\n 'collapsed' => '',\r\n 'type' => 'repeater',\r\n 'instructions' => 'These are the slides on the front page. These will only display if the slider is set to Medium Big Grid Slide. You can choose one or two slides.',\r\n 'required' => 1,\r\n 'conditional_logic' => 0,\r\n 'button_label' => 'Add slide',\r\n 'wrapper' => [\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n ]);\r\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}", "function em_slider_cpt() {\n\t// Bonne pratique : le type de Post doit être préfixé, au singulier, et ne devrait pas dépasser 20 caractères\n\tregister_post_type( \n\t\t'slider', \t\t\t\t\t\t\t\n\t\tarray(\n\t\t\t'label' => 'Sliders', \t\t\t\n\t\t\t'labels' => array( \t\t\t\n\t\t\t\t'name' => 'Sliders',\n\t\t\t\t'singular-name' => 'Slider',\n\t\t\t\t'all_items' => 'Tous les sliders',\n\t\t\t\t'add_new_item' => 'Ajouter un slider',\n\t\t\t\t'edit_item' => 'Editer le slider',\n\t\t\t\t'new_item' => 'Nouveau slider',\n\t\t\t\t'view_item' => 'Voir le slider',\n\t\t\t\t'search_item' => 'Rechercher parmis les sliders',\n\t\t\t\t'not_found' => 'Pas de slider trouvé',\n\t\t\t\t'not_found_in_trash' => 'Pas de slider dans la corbeille'\n\t\t\t),\n\t\t\t'public' => true, \t\t\t\t\n\t\t\t'show_in_rest' => true, \n\t\t\t'capability_type' => 'post',\t\n\t\t\t'supports' => array(\t\t\t\n\t\t\t\t'title',\n\t\t\t\t'thumbnail',\n\t\t\t\t'editor'\t\n\t\t\t),\n\t\t\t'has_archive' => true, \n\t\t\t// Url vers une icone ou à choisir parmi celles de WP : https://developer.wordpress.org/resource/dashicons/.\n\t\t\t'menu_icon' => 'dashicons-images-alt2'\n\t\t) \n\t);\n}", "function vslider_admin_styles() {\r\n wp_enqueue_style('thickbox');\r\n wp_register_style('colorpicker-css', WP_PLUGIN_URL.'/vslider/picker/colorpicker.css');\r\n wp_enqueue_style( 'colorpicker-css');\r\n wp_register_style('tooltip-css', WP_PLUGIN_URL.'/vslider/css/tooltip.css');\r\n wp_enqueue_style( 'tooltip-css');\r\n}", "function vantage_metaslider_filter_flex_slide($html, $slide, $settings){\n\tif( is_admin() && !empty($GLOBALS['vantage_is_main_slider']) ) return $html;\n\n\tif(!empty($slide['caption']) && function_exists('filter_var') && filter_var($slide['caption'], FILTER_VALIDATE_URL) !== false) {\n\n\t\t$settings['height'] = round( $settings['height'] / 1080 * $settings['width'] );\n\t\t$settings['width'] = 1080;\n\n\t\t$html = sprintf(\"<img src='%s' class='ms-default-image' width='%d' height='%d' />\", $slide['thumb'], intval($settings['width']), intval($settings['height']));\n\n\t\tif (strlen($slide['url'])) {\n\t\t\t$html = '<a href=\"' . esc_url( $slide['url'] ) . '\" target=\"' . esc_attr( $slide['target'] ) . '\">' . $html . '</a>';\n\t\t}\n\n\t\t$caption = '<div class=\"content\">';\n\t\tif (strlen($slide['url'])) $caption .= '<a href=\"' . $slide['url'] . '\" target=\"' . $slide['target'] . '\">';\n\t\t$caption .= sprintf('<img src=\"%s\" width=\"%d\" height=\"%d\" />', esc_url($slide['caption']), intval($settings['width']), intval($settings['height']));\n\t\tif (strlen($slide['url'])) $caption .= '</a>';\n\t\t$caption .= '</div>';\n\n\t\t$html = $caption . $html;\n\n\t\t$thumb = isset($slide['data-thumb']) && strlen($slide['data-thumb']) ? \" data-thumb=\\\"{$slide['data-thumb']}\\\"\" : \"\";\n\n\t\t$html = '<li style=\"display: none;\"' . $thumb . ' class=\"vantage-slide-with-image\">' . $html . '</li>';\n\t}\n\n\treturn $html;\n}", "function tmpl_tevolution_single_slider_script(){\r\n\t$is_edit=(isset($_REQUEST['action']) && $_REQUEST['action']=='edit')?'1':'';\t\r\n\tif(is_single() && $is_edit==''){\r\n\t\tglobal $post;\r\n\t\t$post_id = $post->ID;\r\n\t\tif(get_post_meta($post_id,'_event_id',true)){\r\n\t\t\t$post_id=get_post_meta($post_id,'_event_id',true);\r\n\t\t}\r\n\t\t$slider_more_listing_img = bdw_get_images_plugin($post_id,'tevolution_thumbnail');\r\n\t\t\r\n\t\t/*get the theme setting option*/\r\n\t\t$supreme2_theme_settings = (function_exists('supreme_prefix')) ? get_option(supreme_prefix().'_theme_settings'):'';\r\n\t\t\r\n\t\t/*Slider div id */\r\n\t\t$silde_gallery_id=apply_filters('tmpl_detail_slider_gallery_id','silde_gallery');\r\n\t\t$slider_id=apply_filters('tmpl_detail_slider_id','slider');\r\n\t\t/*tmpl_detail_slider_options filter hook for change any slider option */\r\n\t\t$slider_options = apply_filters('tmpl_detail_slider_options',array('animation'=>'slide','slideshow'=>'false','direction'=>'horizontal','slideshowSpeed'=>7000,'animationLoop'=>'true','startAt'=> 0,'smoothHeight'=> 'true','easing'=> \"swing\",'pauseOnHover'=> 'true','video'=> 'true','controlNav'=> 'true','directionNav'=> 'true','prevText'=> '','nextText'=> '','animationLoop'=>'true','itemWidth'=>'60','itemMargin'=>'20'));\r\n\t\t?>\r\n <script type=\"text/javascript\" async >\r\n\t\t\tjQuery(window).load(function()\r\n\t\t\t{ \r\n\t\t\t\tjQuery('#<?php echo $silde_gallery_id?>').flexslider({\r\n\t\t\t\t\tanimation: '<?php echo $slider_options['animation'];?>',\r\n\t\t\t\t\t<?php if(!empty($slider_more_listing_img) && (count($slider_more_listing_img) < apply_filters('tmpl_slider_image_count',4))):?>\r\n\t\t\t\t\tcontrolNav: false,\r\n\t\t\t\t\tdirectionNav: false,\r\n\t\t\t\t\tprevText: '<?php echo $slider_options['prevText'];?>',\r\n\t\t\t\t\tnextText: '<?php echo $slider_options['nextText'];?>',\r\n\t\t\t\t\t<?php \r\n\t\t\t\t\telse: ?>\r\n\t\t\t\t\tcontrolNav: <?php echo $slider_options['controlNav'];?>,\r\n\t\t\t\t\tdirectionNav: <?php echo $slider_options['directionNav'];?>,\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\tanimationLoop: false,\r\n\t\t\t\t\tslideshow: <?php echo $slider_options['slideshow'];?>,\r\n\t\t\t\t\titemWidth: <?php echo $slider_options['itemWidth'];?>,\r\n\t\t\t\t\titemMargin: <?php echo $slider_options['itemMargin'];?>,\r\n\t\t\t\t\t <?php if($supreme2_theme_settings['rtlcss'] ==1 || is_rtl() || (isset($_SESSION['rtlcss']) && $_SESSION['rtlcss']==1)){ ?>\r\n\t\t\t\t\trtl: true,\r\n\t\t\t\t\t<?php } ?>\r\n\t\t\t\t\ttouch:true,\r\n\t\t\t\t\tasNavFor: '#slider'\r\n\t\t\t\t });\r\n\t\t\t\tjQuery('#<?php echo $slider_id;?>').flexslider(\r\n\t\t\t\t{\r\n\t\t\t\t\tanimation: '<?php echo $slider_options['animation'];?>',\r\n\t\t\t\t\tslideshow: <?php echo $slider_options['slideshow'];?>,\r\n\t\t\t\t\tdirection: '<?php echo $slider_options['direction'];?>',\r\n\t\t\t\t\tslideshowSpeed: 7000,\r\n\t\t\t\t\tanimationLoop: <?php echo $slider_options['animationLoop'];?>,\r\n\t\t\t\t\tstartAt: 0,\r\n\t\t\t\t\tsmoothHeight: <?php echo $slider_options['smoothHeight'];?>,\r\n\t\t\t\t\teasing: '<?php echo $slider_options['easing'];?>',\r\n\t\t\t\t\tpauseOnHover: <?php echo $slider_options['pauseOnHover'];?>,\r\n\t\t\t\t\tvideo: <?php echo $slider_options['video'];?>,\r\n\t\t\t\t\tcontrolNav: <?php echo $slider_options['controlNav'];?>,\r\n\t\t\t\t\tdirectionNav: <?php echo $slider_options['directionNav'];?>,\t\r\n\t\t\t\t\ttouch:true,\t\t\t\t\t\r\n\t\t\t\t\tstart: function(slider)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjQuery('body').removeClass('loading');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t <?php if($supreme2_theme_settings['rtlcss'] ==1 || is_rtl() || (isset($_SESSION['rtlcss']) && $_SESSION['rtlcss']==1)){ ?>\r\n\t\t\t\t\t,rtl: true,\r\n\t\t\t\t\t<?php } ?>\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t/*FlexSlider: Default Settings*/\r\n\t\t</script>\r\n <?php\r\n\t\t\r\n\t}\r\n}", "protected function get_admin_slide() {\n\n // get some slide settings\n $thumb = $this->get_thumb();\n $slide_label = apply_filters(\"metaslider_image_slide_label\", __(\"Image Slide\", \"ml-slider\"), $this->slide, $this->settings);\n $attachment_id = $this->get_attachment_id();\n\n // slide row HTML\n $row = \"<tr id='slide-{$this->slide->ID}' class='slide image flex responsive nivo coin' data-attachment-id='{$attachment_id}'>\n <td class='col-1'>\n <div class='metaslider-ui-controls ui-sortable-handle'>\n <h4 class='slide-details'>{$slide_label}</h4>\";\n if (metaslider_this_is_trash($this->slide)) {\n $row .= '<div class=\"row-actions trash-btns\">';\n $row .= \"<span class='untrash'>{$this->get_undelete_button_html()}</span>\";\n // $row .= ' | ';\n // $row .= \"<span class='delete'>{$this->get_perminant_delete_button_html()}</span>\";\n $row .= '</div>';\n } else {\n $row .= $this->get_delete_button_html();\n $row .= $this->get_update_image_button_html();\n }\n $row .= \"</div>\n <div class='metaslider-ui-inner'>\n <button class='update-image image-button' data-button-text='\" . __(\"Update slide image\", \"ml-slider\") . \"' title='\" . __(\"Update slide image\", \"ml-slider\") . \"' data-slide-id='{$this->slide->ID}' data-attachment-id='{$attachment_id}'>\n <div class='thumb' style='background-image: url({$thumb})'></div>\n </button>\n </div>\n </td>\n <td class='col-2'>\n <div class='metaslider-ui-inner'>\n \" . $this->get_admin_slide_tabs_html() . \"\n <input type='hidden' name='attachment[{$this->slide->ID}][type]' value='image' />\n <input type='hidden' class='menu_order' name='attachment[{$this->slide->ID}][menu_order]' value='{$this->slide->menu_order}' />\n <input type='hidden' name='resize_slide_id' data-slide_id='{$this->slide->ID}' data-width='{$this->settings['width']}' data-height='{$this->settings['height']}' />\n </div>\n </td>\n </tr>\";\n\n return $row;\n\n }", "public function get_admin_tabs() {\n\n $slide_id = absint($this->slide->ID);\n $attachment_id = $this->get_attachment_id();\n $attachment = get_post($attachment_id);\n\n $url = esc_attr(get_post_meta($slide_id, 'ml-slider_url', true));\n $target = get_post_meta($slide_id, 'ml-slider_new_window', true) ? 'checked=checked' : '';\n \n // TODO: make this DRY\n // caption\n $caption = esc_textarea($this->slide->post_excerpt);\n $image_caption = html_entity_decode($attachment->post_excerpt, ENT_NOQUOTES, 'UTF-8');\n\t\t$inherit_image_caption_check = '';\n\t\t$inherit_image_caption_class = '';\n\t\tif ($this->is_field_inherited('caption')) {\n\t\t\t$inherit_image_caption_check = 'checked=checked';\n\t\t\t$inherit_image_caption_class = ' inherit-from-image';\n\t\t}\n // alt\n $alt = esc_attr(get_post_meta($slide_id, '_wp_attachment_image_alt', true));\n $image_alt = esc_attr(get_post_meta($attachment_id, '_wp_attachment_image_alt', true ));\n\t\t$inherit_image_alt_check = ''; \n\t\t$inherit_image_alt_class = '';\n\t\tif ($this->is_field_inherited('alt')) {\n\t\t\t$inherit_image_alt_check = 'checked=checked';\n\t\t\t$inherit_image_alt_class = ' inherit-from-image';\t\n\t\t}\n // title\n $title = esc_attr(get_post_meta($slide_id, 'ml-slider_title', true));\n\t\t$image_title = esc_attr($attachment->post_title);\n\t\t$inherit_image_title_check = '';\n $inherit_image_title_class = '';\n\t\tif ($this->is_field_inherited('title')) {\n\t\t\t$inherit_image_title_check = 'checked=checked';\n\t\t\t$inherit_image_title_class = ' inherit-from-image';\n\t\t}\n\n ob_start();\n include(METASLIDER_PATH . 'admin/views/slides/tabs/general.php');\n $general_tab = ob_get_clean();\n\n if (!$this->is_valid_image()) {\n $message = __(\"Warning: The image data does not exist. Please re-upload the image.\", \"ml-slider\");\n\n $general_tab = \"<div class='warning'>{$message}</div>\" . $general_tab;\n }\n\n ob_start();\n include(METASLIDER_PATH .'admin/views/slides/tabs/seo.php');\n $seo_tab = ob_get_clean();\n\n $tabs = array(\n 'general' => array(\n 'title' => __(\"General\", \"ml-slider\"),\n 'content' => $general_tab\n ),\n 'seo' => array(\n 'title' => __(\"SEO\", \"ml-slider\"),\n 'content' => $seo_tab\n )\n );\n\n if (version_compare(get_bloginfo('version'), 3.9, '>=')) {\n\n $crop_position = get_post_meta($slide_id, 'ml-slider_crop_position', true); \n\n if (!$crop_position) {\n $crop_position = 'center-center';\n }\n\n ob_start();\n include(METASLIDER_PATH .'admin/views/slides/tabs/crop.php');\n $crop_tab = ob_get_clean();\n \n $tabs['crop'] = array(\n 'title' => __(\"Crop\", \"ml-slider\"),\n 'content' => $crop_tab\n );\n\n }\n\n return apply_filters(\"metaslider_image_slide_tabs\", $tabs, $this->slide, $this->slider, $this->settings);\n\n }", "public function ghostpool_post_type_slides() {\t\n\t\n\t\t\tregister_post_type( 'gp_slide', array( \n\t\t\t\t'labels' => array( \n\t\t\t\t\t'name' => esc_html__( 'Slides', 'socialize-plugin' ),\n\t\t\t\t\t'singular_name' => esc_html__( 'Slide', 'socialize-plugin' ),\n\t\t\t\t\t'menu_name' => esc_html__( 'Slides', 'socialize-plugin' ),\n\t\t\t\t\t'all_items' => esc_html__( 'All Slides', 'socialize-plugin' ),\n\t\t\t\t\t'add_new' => _x( 'Add New', 'portfolio', 'socialize-plugin' ),\n\t\t\t\t\t'add_new_item' => esc_html__( 'Add New Slide', 'socialize-plugin' ),\n\t\t\t\t\t'edit_item' => esc_html__( 'Edit Slide', 'socialize-plugin' ),\n\t\t\t\t\t'new_item' => esc_html__( 'New Slide', 'socialize-plugin' ),\n\t\t\t\t\t'view_item' => esc_html__( 'View Slide', 'socialize-plugin' ),\n\t\t\t\t\t'search_items' => esc_html__( 'Search Slides', 'socialize-plugin' ),\n\t\t\t\t\t'not_found' => esc_html__( 'No slides found', 'socialize-plugin' ),\n\t\t\t\t\t'not_found_in_trash' => esc_html__( 'No slides found in Trash', 'socialize-plugin' ),\n\t\t\t\t ),\n\t\t\t\t'public' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'_builtin' => false,\n\t\t\t\t'_edit_link' => 'post.php?post=%d',\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'rewrite' => array( 'slug' => 'slide' ),\n\t\t\t\t'menu_position' => 20,\n\t\t\t\t'with_front' => true,\n\t\t\t\t'has_archive' => 'gp_slides',\n\t\t\t\t'supports' => array( 'title', 'thumbnail' )\n\t\t\t ) );\n\t\n\t\n\t\t\t/*--------------------------------------------------------------\n\t\t\tSlide Categories Taxonomy\n\t\t\t--------------------------------------------------------------*/\n\t\t\t\n\t\t\tregister_taxonomy( 'gp_slides', 'gp_slide', array( \n\t\t\t\t'labels' => array( \n\t\t\t\t\t'name' => esc_html__( 'Slide Categories', 'socialize-plugin' ),\n\t\t\t\t\t'singular_name' => esc_html__( 'Slide Category', 'socialize-plugin' ),\n\t\t\t\t\t'all_items' => esc_html__( 'All Slide Categories', 'socialize-plugin' ),\n\t\t\t\t\t'add_new' => _x( 'Add New', 'portfolio', 'socialize-plugin' ),\n\t\t\t\t\t'add_new_item' => esc_html__( 'Add New Slide Category', 'socialize-plugin' ),\n\t\t\t\t\t'edit_item' => esc_html__( 'Edit Slide Category', 'socialize-plugin' ),\n\t\t\t\t\t'new_item' => esc_html__( 'New Slide Category', 'socialize-plugin' ),\n\t\t\t\t\t'view_item' => esc_html__( 'View Slide Category', 'socialize-plugin' ),\n\t\t\t\t\t'search_items' => esc_html__( 'Search Slide Categories', 'socialize-plugin' ),\n\t\t\t\t\t'menu_name' => esc_html__( 'Slide Categories', 'socialize-plugin' )\n\t\t\t\t ),\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array( 'slug' => 'slides' )\n\t\t\t ) );\n\n\n\t\t\tregister_taxonomy_for_object_type( 'gp_slides', 'gp_slide' );\n\n\n\t\t\t/*--------------------------------------------------------------\n\t\t\tSlide Admin Columns\n\t\t\t--------------------------------------------------------------*/\n\n\t\t\tif ( ! function_exists( 'ghostpool_slide_edit_columns' ) ) { \n\t\t\t\tfunction ghostpool_slides_edit_columns( $columns ) {\n\t\t\t\t\t$columns = array( \n\t\t\t\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t\t\t\t'title' => esc_html__( 'Title', 'socialize-plugin' ),\t\n\t\t\t\t\t\t'slide_categories' => esc_html__( 'Categories', 'socialize-plugin' ),\n\t\t\t\t\t\t'slide_image' => esc_html__( 'Image', 'socialize-plugin' ),\t\t\t\t\n\t\t\t\t\t\t'date' => esc_html__( 'Date', 'socialize-plugin' )\n\t\t\t\t\t );\n\t\t\t\t\treturn $columns;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tadd_filter( 'manage_edit-gp_slide_columns', 'ghostpool_slides_edit_columns' );\n\t\t\n\t\t}", "function __construct() {\r\n parent::__construct(\r\n 'st_slider', // Base ID\r\n esc_html__( 'WPCoupon Slider', 'wp-coupon' ), // Name\r\n array(\r\n 'description' => esc_html__( 'Display a Slider', 'wp-coupon' ),\r\n 'classname' => 'st-slider-widget'\r\n ), // Args\r\n array(\r\n 'width' => 530\r\n )\r\n );\r\n }", "function vslider_defaults() {\r\n $default = array(\r\n 'slideNr' => 3,\r\n \t'width' => 630,\r\n \t'height' => 280,\r\n \t'spw' => 7,\r\n \t'sph' => 5,\r\n \t'delay' => 3000,\r\n \t'sDelay' => 30,\r\n \t'opacity' => '0.7',\r\n \t'titleSpeed' => 1500,\r\n \t'effect' => '',\r\n \t'navigation' => 'true',\r\n 'stickynav' => 'false',\r\n \t'links' => 'true',\r\n 'buttons' => 'true',\r\n \t'hoverPause' => 'false',\r\n \t'fontFamily' => 'Arial, Helvetica, sans-serif',\r\n \t'titleFont' => 16,\r\n \t'fontSize' => 12,\r\n \t'textColor' => 'FFFFFF',\r\n \t'bgColor' => '222222',\r\n \t'customImg' => 'true',\r\n 'catchimage' => 'true',\r\n \t'chars' => 200,\r\n \t'excerpt' => 'true',\r\n \t'slide1' => WP_PLUGIN_URL.'/vslider/images/slide1.jpg',\r\n \t'slide2' => WP_PLUGIN_URL.'/vslider/images/slide2.jpg',\r\n \t'slide3' => WP_PLUGIN_URL.'/vslider/images/slide3.jpg',\r\n 'target' => 'none',\r\n 'navstyle' => 'none',\r\n 'arrstyle' => 'none',\r\n 'navplace' => '10px 0 10px 100px',\r\n 'layout' => 'stripe-bottom',\r\n 'borderWidth' => '5',\r\n 'borderRadius' => '0',\r\n 'borderColor' => 'FFFFFF',\r\n 'holdermar' => '10px 10px 10px 10px',\r\n 'holderfloat' => 'none',\r\n 'timthumb' => 1,\r\n 'quality' => '80',\r\n 'vnavenable' => 0,\r\n 'randimg' => 0\r\n );\r\nreturn $default;\r\n}", "function _cute_slider($options)\n\t{\n\t\tglobal $meta_fields;\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\n\t?>\n\t\t<div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n\t\t\t<div class=\"bgback\"></div>\n\t\t\t\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\t\t<div class=\"container zn_slideshow\">\n\t\t\t\t\t<?php echo do_shortcode('[cuteslider id=\"'.$options['cuteslider_id'].'\"]'); ?>\n\t\t\t\t</div>\n\t\t\t<div class=\"zn_header_bottom_style\"></div>\n\t\t</div><!-- end page_header -->\n\t<?php\t\n\t}", "function ge_custom_slider_scripts_and_style() {\n wp_enqueue_script( 'flex-slider-js', plugins_url( 'ge-custom-product-slider/assets/js/jquery.flexslider-min.js' ), array('jquery'), '', false );\n wp_enqueue_script( 'slider', plugins_url( 'ge-custom-product-slider/assets/js/slider.js' ), array('jquery'), '', false );\n\n wp_enqueue_style( 'flex-slider-css', plugins_url( 'ge-custom-product-slider/assets/css/flexslider.css' ) );\n wp_enqueue_style( 'slider-style-css', plugins_url( 'ge-custom-product-slider/assets/css/slider-style.css' ) );\n\n}", "function rps_activate()\n{\n $width = '460';\n $height = '470';\n $post_per_slide = '1';\n $total_posts = '8';\n $slider_content = '3';\n rps_post_img_thumb();\n}", "function zp_custom_post_type() {\n\n if ( ! class_exists( 'Super_CPT' ) )\n\n return;\n\n\n\t\t\n/*----------------------------------------------------*/\n// Add Slide Custom Post Type\n/*---------------------------------------------------*/\n \n \t$slide_custom_default = array(\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt'),\n\t\t'rewrite' => array('with_front' => false,\n \t\t\t\t\t\t'slug' => 'slide'),\n\t\t'menu_icon' => get_stylesheet_directory_uri().'/include/cpt/images/slide.png',\n\t);\n \t$slideshow_custom_default = array(\n\t\t'rewrite' => array('with_front' => false,\n \t\t\t\t\t\t'slug' => 'slideshow'),\n\t);\n\t// register slide post type\n\t$slide = new Super_Custom_Post_Type( 'slide', 'Slide', 'Slides', $slide_custom_default );\n\t$slideshow = new Super_Custom_Taxonomy( 'slideshow' ,'Slideshow', 'Slideshows', 'cat',$slideshow_custom_default);\n\tconnect_types_and_taxes( $slide, array( $slideshow ) );\n\n\t// Slide meta boxes\n\t$slide->add_meta_box( array(\n\t\t'id' => 'slider-settings',\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'fields' => array(\n\t\t\t'video_type_value' => array( 'label' => __( 'Video Type','novo'), 'type' => 'select', 'options' => array('youtube' => 'Youtube','vimeo' => 'Vimeo') , 'data-zp_desc' => __( 'Select appropriate video type','novo') ),\n\t\t\t'video_id_value' => array( 'label' => __( 'Video ID','novo'), 'type' => 'text', 'data-zp_desc' => __( 'Enter video ID. Example: VdvEdMMtNMY','novo') ),\n\t\t\t'slider_button_value' => array( 'label' => __( 'Slide Button','novo'), 'type' => 'text' , 'data-zp_desc' => __( 'Enter Button Name','novo') ),\t\t\t\t\n\t\t\t'slider_link_value' => array( 'label' => __( 'Slide Link','novo' ), 'type' => 'text' , 'data-zp_desc' => __( 'Put slide link here','novo') ),\t\t\n\t\t)\n\t) );\t\n\n\t$slide->add_meta_box( array(\n\t\t'id' => 'slide-order',\n\t\t'context' => 'side',\n\t\t'fields' => array(\n\t\t\t'slide_number_value' => array( 'type' => 'text', 'data-zp_desc' => __( 'Define slide order. Ex. 1,2,3,4,...','novo') ),\t\t\n\t\t)\n\t) );\t\t\n\n\t// manage slide columns \n\tfunction zp_add_slide_columns($columns) {\n\t\treturn array(\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'title' => __('Title', 'novo'),\n\t\t\t'slideshow' => __('Slideshow', 'novo'),\n\t\t\t'slide_order' =>__( 'Slide Order', 'novo'),\n\t\t\t'date' => __('Date', 'novo'),\t\t\t\n\t\t);\n\t}\n\tadd_filter('manage_slide_posts_columns' , 'zp_add_slide_columns');\n\n\tfunction zp_custom_slide_columns( $column, $post_id ) {\n\t\tswitch ( $column ) {\n\t\tcase 'slideshow' :\n\t\t\t$terms = get_the_term_list( $post_id , 'slideshow' , '' , ',' , '' );\n\t\t\tif ( is_string( $terms ) )\n\t\t\t\techo $terms;\n\t\t\telse\n\t\t\t\t_e( 'Unable to get author(s)', 'novo' );\n\t\t\tbreak;\n\t\n\t\tcase 'slide_order' :\n\t\t\techo get_post_meta( $post_id , 'slide_number_value' , true ); \n\t\t\tbreak;\n\t\t}\n\t}\n\tadd_action( 'manage_posts_custom_column' , 'zp_custom_slide_columns', 10, 2 );\n\t\n\t\n/*----------------------------------------------------*/\n\n// Add Portfolio Custom Post Type\n\n/*---------------------------------------------------*/\n\n\n\n\t$portfolio_custom_default = array(\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'excerpt'),\n\t\t'rewrite' => array('with_front' => false,\n \t\t\t\t\t\t'slug' => 'portfolio'),\n\t\t'menu_icon' => get_stylesheet_directory_uri().'/include/cpt/images/portfolio.png',\n\t);\n\t$portfolio_category_custom_default = array(\n\t\t'rewrite' => array('with_front' => false,\n \t\t\t\t\t\t'slug' => 'portfolio-category'),\t\n\t);\n\n\n\n\t// register portfolio post type\n\n\t$portfolio = new Super_Custom_Post_Type( 'portfolio', 'Portfolio', 'Portfolio', $portfolio_custom_default );\n\t$portfolio_category = new Super_Custom_Taxonomy( 'portfolio-category' ,'Portfolio Category', 'Portfolio Categories', 'cat',$portfolio_category_custom_default );\n\tconnect_types_and_taxes( $portfolio, array( $portfolio_category ) );\n\n\n\n\t// Portfolio meta boxes\n\t/*This if statement is to determine if lmseo_content_value has been checked or not. If I just use the \"checked\" option then it wont remember if if checked or not, it will always display checked. This way it will remember.*/\n\tglobal $post;\n\tif(get_post_meta( $post->ID, 'lmseo_content_value', true )){\n\t\t$lmseo_content_value_checked=array( 'label' => __( 'Portfolio Content','novo'),'type' => 'checkbox','data-zp_desc' => __( 'Define whether to display content or not','novo'), 'checked'=>'checked' );\n\t}else{\n\t\t$lmseo_content_value_checked=array( 'label' => __( 'Portfolio Content','novo'),'type' => 'checkbox','data-zp_desc' => __( 'Define whether to display content or not','novo'));\n\t}\n\n\t$portfolio->add_meta_box( array(\n\t\t'id' => 'portfolio-metaItem',\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'fields' => array(\n\t\t\t'lmseo_content_value'=>$lmseo_content_value_checked,\n\t\t\t'zp_project_label_value' => array( 'label' => __( 'Project Label','novo'), 'type' => 'text', 'data-zp_desc' => __( 'Define project label','novo') ),\n\t\t\t'zp_project_link_value' => array( 'label' => __( 'Project Link','novo'), 'type' => 'text', 'data-zp_desc' => __( 'Define project link','novo') ),\t\n\t\t)\n\t) );\n\n\n\t$portfolio->add_meta_box( array(\n\n\t\t'id' => 'portfolio-images',\n\n\t\t'context' => 'normal',\n\n\t\t'priority' => 'high',\n\n\t\t'fields' => array(\n\n\t\t\t'zp_image_1_value' => array( 'label' => __( 'Image 1','novo'), 'type' => 'text' , 'data-zp_desc' => __( 'Place here the full image path','novo' )),\t\t\n\n\t\t\t'zp_image_2_value' => array( 'label' => __( 'Image 2','novo'), 'type' => 'text' , 'data-zp_desc' => __( 'Place here the full image path','novo' ) ),\t\n\n\t\t\t'zp_image_3_value' => array( 'label' => __( 'Image 3','novo'), 'type' => 'text' , 'data-zp_desc' => __( 'Place here the full image path','novo' )),\t\n\n\t\t\t'zp_image_4_value' => array( 'label' => __( 'Image 4','novo'), 'type' => 'text' , 'data-zp_desc' => __( 'Place here the full image path','novo' )),\t\n\n\t\t\t'zp_image_5_value' => array( 'label' => __( 'Image 5','novo'), 'type' => 'text' , 'data-zp_desc' => __( 'Place here the full image path','novo' )),\t\n\t\t)\n\n\t) );\n\n\n\n\t$portfolio->add_meta_box( array(\n\n\t\t'id' => 'portfolio-videos',\n\n\t\t'context' => 'normal',\n\n\t\t'priority' => 'high',\n\n\t\t'fields' => array(\n\n\t\t\t'zp_video_url_value' => array( 'label' => __( 'Youtube or Vimeo URL','novo'), 'type' => 'text', 'data-zp_desc' => __( 'Place here the video url. Example video url: YOUTUBE: http://www.youtube.com/watch?v=Sv5iEK-IEzw and VIMEO: http://vimeo.com/7585127','novo') ),\t\t\n\n\t\t\t'zp_video_embed_value' => array( 'label' => __( 'Embed Code','novo'), 'type' => 'text' , 'data-zp_desc' => __( 'If you are using anything else other than YouTube or Vimeo, paste the embed code here. This field will override anything from the above.','novo' )),\n\t\t)\n\n\t) );\t\t\n\n\t\n\n\t\n\n\t// manage portfolio columns \n\n\tfunction zp_add_portfolio_columns($columns) {\n\n\t\treturn array(\n\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\n\t\t\t'title' => __('Title', 'novo'),\n\n\t\t\t'portfolio-category' => __('Portfolio Category', 'novo'),\n\n\t\t\t'author' =>__( 'Author', 'novo'),\n\n\t\t\t'date' => __('Date', 'novo'),\n\t\t);\n\t}\n\n\tadd_filter('manage_portfolio_posts_columns' , 'zp_add_portfolio_columns');\n\n\n\n\tfunction zp_custom_portfolio_columns( $column, $post_id ) {\n\n\t\tswitch ( $column ) {\n\n\t\tcase 'portfolio-category' :\n\n\t\t\t$terms = get_the_term_list( $post_id , 'portfolio-category' , '' , ',' , '' );\n\n\t\t\tif ( is_string( $terms ) )\n\n\t\t\t\techo $terms;\n\n\t\t\telse\n\n\t\t\t\t_e( 'Unable to get author(s)', 'novo' );\n\n\t\t\tbreak;\n\t\t}\n\t}\n\tadd_action( 'manage_posts_custom_column' , 'zp_custom_portfolio_columns', 10, 2 );\n\n\n\n\n/*----------------------------------------------------*/\n// Add Post Custom Meta\n/*---------------------------------------------------*/\t\n\n\t$post_meta = new Super_Custom_Post_Meta( 'post' );\n\n\t$post_meta->add_meta_box( array(\n\n\t\t'id' => 'audio-settings',\n\n\t\t'context' => 'side',\n\n\t\t'priority' => 'high',\n\n\t\t'fields' => array(\n\n\t\t\t'zp_audio_mp3_url' => array( 'label' => __( 'Audio .mp3 URL','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The URL to the .mp3 audio file','novo') ),\n\t\t\t'zp_audio_ogg_url' => array( 'label' => __( 'Audio .ogg, .oga URL','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The URL to the .oga, .ogg audio file','novo') ),\n\t\t\t'zp_audio_prieview_image_url' => array( 'label' => __( 'Preview Image','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The preview image for this audio track','novo') ),\n\t\t\t'zp_audio_prieview_image_height' => array( 'label' => __( 'Preview Image Height','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The height of the poster image. Example: 300','novo') )\n\t\t)\n\n\t) );\n\n\t$post_meta->add_meta_box( array(\n\n\t\t'id' => 'link-settings',\n\n\t\t'context' => 'side',\n\n\t\t'priority' => 'high',\n\n\t\t'fields' => array(\n\t\t\t'zp_link_format' => array( 'label' => __( 'Enter link. E.g., http://www.yourlink.com','novo'), 'type' => 'text', 'data-zp_desc' => __( 'Input your link. e.g., http://www.yourlink.com','novo') )\n\t\t)\n\n\t) );\n\n\t$post_meta->add_meta_box( array(\n\n\t\t'id' => 'video-settings',\n\n\t\t'context' => 'side',\n\n\t\t'priority' => 'high',\n\n\t\t'fields' => array(\n\t\t\t'zp_video_m4v_url' => array( 'label' => __( 'Video File (.m4v)','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The URL to the .m4v video file','novo') ),\n\t\t\t'zp_video_ogv_url' => array( 'label' => __( 'Video File (.ogv)','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The URL to the .ogv video file','novo') ),\n\t\t\t'zp_video_prieview_image_height' => array( 'label' => __( 'Video Height','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The video height (e.g. 500).','novo') ),\n\t\t\t'zp_video_prieview_image_url' => array( 'label' => __( 'Preview Image','novo'), 'type' => 'text', 'data-zp_desc' => __( 'The preview image for this video.','novo') ),\n\t\t\t'zp_video_format_embed' => array( 'label' => __( 'Embed Video','novo'), 'type' => 'textarea', 'data-zp_desc' => __( 'If you are using something other than self hosted video such as Youtube or Vimeo, paste the embed code here. Width is best at 600px with any height. This field will override the above.','novo') ),\n\t\t)\n\n\t) );\t\t\t\n\n\n}", "function _sp_custom_box_slider_settings() {\n\tglobal $post;\n\n\t// bail if not correct post type\n\tif ( get_post_type() != 'sp-slider' )\n\t\treturn;\n\n\twp_nonce_field( '_sp_process_meta_slider_settings', '_sp_meta_slider_settings_nonce' );\t\n\n\tif ( $post->ID ) {\n\n\t\t$output = '';\n\t\t$output .= '<div class=\"slider-settings-container accordion\">' . PHP_EOL;\n\t\t$output .= '<h3 class=\"header\"><span class=\"caret-closed\"></span>' . __( 'Carousel Settings', 'sp-theme' ) . '<small>' . __( 'Please use the \"Publish/Update\" button to your right sidebar to save the settings in this box.', 'sp-theme' ) . '</small></h3>' . PHP_EOL;\n\t\t$output .= '<div class=\"accordion-container postbox\">' . PHP_EOL;\n\n\t\t$slider_array = sp_get_slider_settings( $post->ID );\n\n\t\t$output .= '<div class=\"options-container inner-container\">' . PHP_EOL; \n\n\t\tforeach( $slider_array as $key => $value ) {\n\t\t\t$context = '';\n\n\t\t\tif ( isset( $value['context'] ) )\n\t\t\t\t$context = $value['context'];\n\n\t\t\t$output .= '<div class=\"row ' . $context . '\">' . PHP_EOL;\n\t\t\t$output .= '<div class=\"' . sp_column_css( '', '', '5', '', '' ) . '\">' . PHP_EOL;\n\t\t\t$output .= '<label>' . $value['label'] . '</label><br />' . PHP_EOL;\n\t\t\t\n\t\t\t// check if setting is found if not use standard\n\t\t\tif ( isset( $value['saved_setting'] ) && $value['saved_setting'] != '' )\n\t\t\t\t$setting = $value['saved_setting'];\n\t\t\telse\n\t\t\t\t$setting = $value['std'];\n\n\t\t\tswitch( $value['field_type'] ) {\n\t\t\t\tcase 'radio':\n\t\t\t\t\t$output .= '<label>' . PHP_EOL;\n\t\t\t\t\t$output .= '<input type=\"radio\" name=\"' . esc_attr( $key ) . '\" value=\"on\" ' . checked( $setting, 'on', false ) . '/> ' . __( 'On', 'sp-theme' ) . '</label>' . PHP_EOL;\n\t\t\t\t\t$output .= '<label>' . PHP_EOL;\n\t\t\t\t\t$output .= '<input type=\"radio\" name=\"' . esc_attr( $key ) . '\" value=\"off\" ' . checked( $setting, 'off', false ) . '/> ' . __( 'Off', 'sp-theme' ) . '</label>' . PHP_EOL;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'text':\n\t\t\t\t\t$output .= '<input type=\"text\" name=\"' . esc_attr( $key ) . '\" value=\"' . esc_attr( $setting ) . '\" class=\"widefat\" />' . PHP_EOL;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'select':\n\t\t\t\t\t$output .= '<select name=\"' . esc_attr( $key ) . '\" class=\"select2-select\" data-no_results_text=\"' . __( 'No results match', 'sp-theme' ) . '\">' . PHP_EOL;\n\n\t\t\t\t\t// loop through the select options\n\t\t\t\t\tforeach( $value['attr'] as $v ) {\n\t\t\t\t\t\t$output .= '<option value=\"' . esc_attr( $v ) . '\" ' . selected( $v, $setting, false ) . '>' . $v . '</option>' . PHP_EOL;\n\t\t\t\t\t}\n\t\t\t\t\t$output .= '</select>' . PHP_EOL;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'colorpicker':\n\t\t\t\t\t$output .= '<input type=\"text\" value=\"' . esc_attr( $setting ) . '\" class=\"sp-colorpicker widefat\" name=\"' . esc_attr( $key ) . '\" />' . PHP_EOL;\n\t\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t\tcase 'font':\n\t\t\t\t\t$fonts = sp_get_google_fonts();\n\t\t\t\t\t$output .= '<select name=\"' . esc_attr( $key ) . '\" class=\"select2-select font-select\" data-no_results_text=\"' . __( 'No results match', 'sp-theme' ) . '\">' . PHP_EOL;\n\t\t\t\t\t$output .= '<option value=\"none\">' . __( '--Please Select--', 'sp-theme' ) . '</option>' . PHP_EOL;\n\n\t\t\t\t\t// loop through the select options\n\t\t\t\t\tforeach( $fonts as $font ) {\n\t\t\t\t\t\t$output .= '<option value=\"' . esc_attr( $font['family'] ) . '\" ' . selected( $setting, $font['family'], false ) . '>' . $font['family'] . '</option>' . PHP_EOL;\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '</select>' . PHP_EOL;\n\t\t\t\t\tbreak;\t\n\n\t\t\t\tcase 'font-variant':\n\t\t\t\t\t$output .= '<select name=\"' . esc_attr( $key ) . '\" class=\"select2-select font-variant-select\" data-no_results_text=\"' . __( 'No results match', 'sp-theme' ) . '\">' . PHP_EOL;\n\t\t\t\t\t$output .= '<option value=\"none\">' . __( '--Please Select--', 'sp-theme' ) . '</option>' . PHP_EOL;\n\n\t\t\t\t\t$font = sp_get_font( get_post_meta( $post->ID, '_sp_slider_title_font', true ) );\n\n\t\t\t\t\tif ( isset( $font ) && is_array( $font ) ) {\n\t\t\t\t\t\tforeach( $font['variants'] as $variant ) {\n\t\t\t\t\t\t\t$output .= '<option value=\"' . esc_attr( $variant ) . '\" ' . selected( $setting, $variant, false ) . '>' . $variant . '</option>' . PHP_EOL;\n\t\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\t\t\n\t\t\t\t\t$output .= '</select>' . PHP_EOL;\n\t\t\t\t\tbreak;\t\n\n\t\t\t\tcase 'font-subsets':\n\t\t\t\t\t$output .= '<select name=\"' . esc_attr( $key ) . '[]\" class=\"select2-select font-subset-select\" multiple data-placeholder=\"' . __( '--Please Select--', 'sp-theme' ) . '\">' . PHP_EOL;\n\t\t\t\t\t$output .= '<option value=\"none\">' . __( '--Please Select--', 'sp-theme' ) . '</option>' . PHP_EOL;\n\n\t\t\t\t\t$font = sp_get_font( get_post_meta( $post->ID, '_sp_slider_title_font', true ) );\n\n\t\t\t\t\tif ( isset( $font ) && is_array( $font ) ) {\n\t\t\t\t\t\tforeach( $font['subsets'] as $subset ) {\n\t\t\t\t\t\t\tif ( is_array( $setting ) && in_array( $subset, $setting ) )\n\t\t\t\t\t\t\t\t$selected = 'selected=\"selected\"';\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t$selected = '';\n\n\t\t\t\t\t\t\t$output .= '<option value=\"' . esc_attr( $subset ) . '\" ' . $selected . '>' . $subset . '</option>' . PHP_EOL;\n\t\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\t\t\n\t\t\t\t\t$output .= '</select>' . PHP_EOL;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'text-size':\n\t\t\t\t\t$output .= '<div class=\"size-slider\">' . PHP_EOL;\n\t\t\t\t\t$output .= '<div class=\"values\">' . PHP_EOL;\n\t\t\t\t\t$output .= '<span class=\"min\">1px</span>' . PHP_EOL;\n\t\t\t\t\t$output .= '<span class=\"max\">50px</span>' . PHP_EOL;\n\t\t\t\t\t$output .= '<span class=\"value\">1px</span>' . PHP_EOL;\n\t\t\t\t\t$output .= '</div>' . PHP_EOL;\n\t\t\t\t\t$output .= '<input type=\"hidden\" name=\"' . esc_attr( $key ) . '\" value=\"' . esc_attr( $setting ) . '\" />' . PHP_EOL;\n\t\t\t\t\t$output .= '<div class=\"slider\"></div>' . PHP_EOL;\n\t\t\t\t\t$output .= '<a href=\"#\" title=\"' . esc_attr__( 'Default', 'sp-theme' ) . '\" data-default=\"' . esc_attr( $value['std'] ) . '\" class=\"default-size button button-small\">' . __( 'Default', 'sp-theme' ) . '</a>' . PHP_EOL;\n\t\t\t\t\t$output .= '</div>' . PHP_EOL;\n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\n\t\t\t$output .= '</div><!--close .column-->' . PHP_EOL;\n\n\t\t\t$output .= '<div class=\"' . sp_column_css( '', '', '7', '', '' ) . '\">' . PHP_EOL;\n\t\t\t$output .= '<p class=\"howto\">' . $value['desc'] . '</p>' . PHP_EOL;\n\t\t\t$output .= '</div><!--close .column-->' . PHP_EOL;\n\n\t\t\t$output .= '</div><!--close .row-->' . PHP_EOL;\n\t\t}\n\n\t\t$output .= '</div><!--close .inner-container-->' . PHP_EOL;\n\n\t\t$output .= '</div><!--close .accordion-container-->' . PHP_EOL;\n\t\t$output .= '</div><!--close .slider-settings-container-->' . PHP_EOL;\n\n\t\techo $output;\n\t}\n}", "function thirdtheme_blog_slider()\n {\n add_theme_support('post-thumbnails');\n add_image_size('small',102,102);\n $args = array(\n 'labels' => array('name' =>__('blog slider'),\n 'add_new' =>__('add new blog')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-buddicons-buddypress-logo',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor','thumbnail',)); \n register_post_type('blogslider',$args);\n }", "public function changeSlider(){\n $slider = $this->appearance->getAllSlider();\n return view('dashboard.slider',['slider' => $slider]);\n }", "function template_preprocess_views_lazy_slider(&$variables) {\n $options = $variables['options'] = $variables['view']->style_plugin->options;\n $page = 0;\n $col = 0;\n $items = [];\n $page_attributes_status = TRUE;\n foreach ($variables['rows'] as $result_index => $item) {\n $items[$page]['content'][$col]['content'] = $item;\n if ($page_attributes_status) {\n $page_attributes = [];\n if ($options['page_class_custom']) {\n $page_attributes['class'][] = $options['page_class_custom'];\n }\n $items[$page]['attributes'] = new Attribute($page_attributes);\n $page_attributes_status = FALSE;\n }\n $col_attributes = [];\n if ($options['col_class_custom']) {\n $col_attributes['class'][] = $options['col_class_custom'];\n }\n $items[$page]['content'][$col]['attributes'] = new Attribute($col_attributes);\n if ($col + 1 >= $options['items_per_page']) {\n $col = 0;\n $page_attributes_status = TRUE;\n $page++;\n }\n else {\n $col++;\n }\n }\n if (count($variables['rows']) % $options['items_per_page']) {\n $page++;\n }\n $roles = \\Drupal::currentUser()->getRoles();\n if ($options['page_block'] && (empty($roles) || array_intersect($roles, $variables['options']['show_page_block_roles']))) {\n /** @var \\Drupal\\Core\\Block\\BlockPluginInterface $block_instance */\n $block_instance = $variables['view']->style_plugin->getBlockInstance($options['page_block']);\n if ($block_instance && $block_instance->access(\\Drupal::currentUser())) {\n $items[$page]['content'][0]['content'] = [\n '#theme' => 'block',\n '#attributes' => [],\n '#configuration' => $block_instance->getConfiguration(),\n '#plugin_id' => $block_instance->getPluginId(),\n '#base_plugin_id' => $block_instance->getBaseId(),\n '#derivative_plugin_id' => $block_instance->getDerivativeId(),\n '#id' => $options['page_block'],\n 'content' => $block_instance->build(),\n ];\n $page_attributes = [];\n $page_block_attributes = [];\n if ($options['page_class_custom']) {\n $page_attributes['class'][] = $options['page_class_custom'];\n }\n if ($options['page_block_class_custom']) {\n $page_block_attributes['class'][] = $options['page_block_class_custom'];\n }\n $items[$page]['attributes'] = new Attribute($page_attributes);\n $items[$page]['content'][0]['attributes'] = new Attribute($page_block_attributes);\n }\n }\n $variables['items'] = $items;\n}", "function collection_css() {\n\tif ( is_singular( WPM_PREFIX . 'collection' ) ) {\n\t\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\t\t$styles = [];\n\n\t\tif ( ! $display_options['list_color_1'] ) {\n\t\t\t$display_options['list_color_1'] = 'transparent';\n\t\t}\n\t\tif ( ! $display_options['list_color_2'] ) {\n\t\t\t$display_options['list_color_2'] = 'transparent';\n\t\t}\n\t\tif ( $display_options['alternate_list_color'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'object-row:nth-child(odd)' ]['background-color'] = $display_options['list_color_1'];\n\t\t\t$styles[ '.' . WPM_PREFIX . 'object-row:nth-child(even)' ]['background-color'] = $display_options['list_color_2'];\n\t\t} else {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'object-row' ]['background-color'] = $display_options['list_color_1'];\n\t\t}\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row a' ]['text-decoration'] = 'none !important';\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row a' ]['color'] = 'inherit !important';\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row-thumbnail' ]['float'] = $display_options['list_thumbnail_position'];\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row-thumbnail' ]['max-width'] = $display_options['list_image_max_width'] . 'px';\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row-thumbnail' ]['max-height'] = $display_options['list_image_max_height'] . 'px';\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row-thumbnail' ]['margin'] = '20px';\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row-textwrapper' ]\n\t\t\t\t[ 'margin-' . $display_options['list_thumbnail_position'] ] =\n\t\t\t\t\t( $display_options['list_image_max_width'] + 20 ) . 'px';\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row h4' ]['clear'] = 'none';\n\t\tif ( $display_options['excerpt_line_height'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'object-row-excerpt' ]['line-height'] = $display_options['excerpt_line_height'] . 'em';\n\t\t}\n\t\tif ( $display_options['excerpt_font_size'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'object-row-excerpt' ]['font-size'] = $display_options['excerpt_font_size'] . 'em';\n\t\t}\n\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row' ]['padding'] = '10px';\n\t\t$styles[ '.' . WPM_PREFIX . 'object-row' ]['min-height'] = ( $display_options['list_image_max_height'] + 40 ) . 'px';\n\n\t\techo '<style type=\"text/css\">';\n\t\techo esc_html( css_from_array( $styles ) );\n\t\techo '</style>';\n\t}\n}", "function custom_shortcode_slider() \n {\n require_once(TEMPLATEPATH.'/shortcode/shortcode.php');\n }", "public function customize_preview_settings()\n {\n }", "function fr_carousel_slider(){\r\n\tregister_post_type('fr_slider', array(\r\n\t\t\t'supports' => array('title', 'editor', 'excerpt'),\r\n\t\t\t'rewrite' => array('slug' => 'fr_slider'),\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'public' => true,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => 'FR_Slider',\r\n\t\t\t\t'add_new_item' => 'FR Add New Slider',\r\n\t\t\t\t'edit_item' => 'FR Edit Slider',\r\n\t\t\t\t'singular_name' => 'FR Slider'\r\n\t\t\t),\r\n\t\t\t'menu_icon' => 'dashicons-images-alt'));\r\n}", "function mount_slider_post_type()\n{\n $labels = array(\n 'name' => _x('Sliders', 'Post Type General Name', 'mount'),\n 'singular_name' => _x('Slider', 'Post Type Singular Name', 'mount'),\n 'menu_name' => __('Sliders', 'mount'),\n 'parent_item_colon' => __('Parent Slider', 'mount'),\n 'all_items' => __('All Sliders', 'mount'),\n 'view_item' => __('View Slider', 'mount'),\n 'add_new_item' => __('Add New Slider', 'mount'),\n 'add_new' => __('Add New Slider', 'mount'),\n 'edit_item' => __('Edit Slider', 'mount'),\n 'update_item' => __('Update Slider', 'mount'),\n 'search_items' => __('Search Slider', 'mount'),\n 'not_found' => __('No sliders found', 'mount'),\n 'not_found_in_trash' => __('Not found in trash', 'mount'),\n );\n // Another Customizations\n $args = array(\n 'label' => __('Sliders', 'mount'),\n 'description' => __('Sliders for Mount', 'mount'),\n 'labels' => $labels,\n 'supports' => array('title', 'thumbnail',),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menus' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-images-alt2',\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'capability_type' => 'page',\n );\n // register the post Type\n register_post_type('sliders', $args);\n}", "function fa_post_type_slider(){\n\tglobal $fa_pro;\n\treturn $fa_pro->post_type_slider();\n}", "function etheme_create_slider($args, $title = false, $image_width = 215, $image_height = 215, $crop = false, $enable_slider_from = 4, $last_offset = 3){\n\tglobal $wpdb;\n\n\t$product_per_row = etheme_get_option('prodcuts_per_row');\n\t$box_id = rand(1000,10000);\n\t$multislides = new WP_Query( $args );\n\n\tif ( $multislides->have_posts() ) :\n\t\tif ($title) {\n\t\t\t$title_output = '<h4 class=\"slider-title\">'.$title.'</h4>';\n\t\t}\n\t\techo '<div class=\"home-product-grid slider\">';\n\t\t\techo $title_output;\n\t\t\techo '<div>';\n\n\t\t\t$_i=0;\n\n\t\t\twhile ($multislides->have_posts()) : $multislides->the_post();\n\t\t\t\t\t$_i++;\n\n\t\t\t\t\tif(class_exists('Woocommerce')) {\n\t\t\t\t\t\t\tglobal $product;\n\t\t\t\t\t\t\tif (!$product->is_visible()) continue;\n\t\t\t\t\t\t\twoocommerce_get_template_part( 'content', 'product' );\n\t\t\t\t\t}\n\t\t\tendwhile;\n\n\t\t\techo '</div><!-- carousel -->';\n\n\t\t\tif($_i > $enable_slider_from):\n\t\t\t\techo '<div class=\"prev arrow'.$box_id.'\" style=\"cursor: pointer; \">&nbsp;</div>';\n\t\t\t\techo '<div class=\"next arrow'.$box_id.'\" style=\"cursor: pointer; \">&nbsp;</div>';\n\t\t\tendif;\n\t\techo '</div><!-- product-slider -->';\n\tendif;\n\n\twp_reset_query();\n\n\tif ($_i>$enable_slider_from) {\n\n\t\tif(etheme_get_option('touch_carusels')) {\n\t\t\t\t$desktopClickDrag = 'true';\n\t\t} else {\n\t\t\t\t$desktopClickDrag = 'false';\n\t\t}\n\n\t\techo '\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\tjQuery(\".slider-'.$box_id.'\").iosSlider({\n\t\t\t\t\t\t\t\t\t\tdesktopClickDrag: '.$desktopClickDrag.',\n\t\t\t\t\t\t\t\t\t\tsnapToChildren: true,\n\t\t\t\t\t\t\t\t\t\tinfiniteSlider: false,\n\t\t\t\t\t\t\t\t\t\tnavNextSelector: \".arrow'.$box_id.'.next\",\n\t\t\t\t\t\t\t\t\t\tnavPrevSelector: \".arrow'.$box_id.'.prev\",\n\t\t\t\t\t\t\t\t\t\tlastSlideOffset: '.$last_offset.',\n\t\t\t\t\t\t\t\t\t\tonFirstSlideComplete: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonLastSlideComplete: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.next\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonSlideChange: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.next\").removeClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").removeClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t';\n\t}\n}", "public function customize_preview_loading_style()\n {\n }", "function add_custome_post_home_slider() {\n\n $labels = array(\n 'name' => 'Slides',\n 'singular_name' => 'Slide',\n 'menu_name' => 'Home Slider',\n 'name_admin_bar' => 'Home Slider',\n 'parent_item_colon' => 'Parent Slide',\n 'all_items' => 'All Slides',\n 'add_new_item' => 'Add New Slide',\n 'add_new' => 'Add New',\n 'new_item' => 'New Slide',\n 'edit_item' => 'Edit Slide',\n 'update_item' => 'Update Slide',\n 'view_item' => 'View Slide',\n 'search_items' => 'Search Slide',\n 'not_found' => 'Slide Not found',\n 'not_found_in_trash' => 'Slide Not found in Trash',\n );\n $rewrite = array(\n 'slug' => 'sliders',\n 'with_front' => true,\n 'pages' => true,\n 'feeds' => false,\n );\n $capabilities = array(\n 'edit_post' => 'edit_slide',\n 'read_post' => 'read_slide',\n 'delete_post' => 'delete_slide',\n 'edit_posts' => 'edit_slides',\n 'edit_others_posts' => 'edit_others_slides',\n 'publish_posts' => 'publish_slides',\n 'read_private_posts' => 'read_private_slides',\n );\n $args = array(\n 'label' => 'home_slider',\n 'description' => 'Home Page Slider',\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'page-attributes', ),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'rewrite' => $rewrite,\n // 'capabilities' => $capabilities,\n 'menu_icon' => 'dashicons-images-alt2',\n );\n register_post_type( 'home_slider', $args );\n\n}", "function _testimonial_slider($options)\n\t{\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\t\n\t\t$new_size = $element_size['sizer'];\n\t\t\n\t\tif ( !empty ( $options['tf_title'] ) || !empty ( $options['tf_desc'] ) ) {\n\t\t\tpreg_match('|\\d+|', $element_size['sizer'] , $new_size);\n\t\t\t$new_size = $new_size[0]-3;\n\t\t\t$new_size = 'span'.$new_size;\n\t\t\t\n\t\t\techo '<div class=\"span3 testimonials_fader\">';\n\t\t\t\n\t\t\t\tif ( !empty ( $options['tf_title'] ) ) {\n\t\t\t\t\techo '<h3 class=\"m_title\">'.$options['tf_title'].'</h3>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !empty ( $options['tf_desc'] ) ) {\n\t\t\t\t\techo '<p>'.$options['tf_desc'].'</p>';\n\t\t\t\t}\n\t\t\t\n\t\t\techo '</div>';\n\n\t\t}\n\t\t\n\t\techo '<div class=\"'.$new_size.' testimonials_fader\">';\n\t\t\techo '<ul id=\"testimonials_fader\" class=\"fixclear\">';\n\t\t\t\tforeach ( $options['testimonials_single'] as $test ) {\n\t\t\t\t\techo '<li>';\n\t\t\t\t\t\n\t\t\t\t\t\techo '<blockquote>'.$test['tf_single_test'].'</blockquote>';\n\t\t\t\t\t\techo '<h6>'.$test['tf_single_author'].'</h6>';\n\t\t\t\t\t\n\t\t\t\t\techo '</li>';\n\t\t\t\t}\n\t\techo '</div>';\n\t\techo '</ul>';\n\n\t}", "public static function get_preset_settings(){\r\n\t\t/**\r\n\t\t * List of Elements based on version 5.0 (may be incomplete)\r\n\t\t\tarrows_always_on \"true\"\r\n\t\t\tauto_height \"off\"\r\n\t\t\tbackground_color \"#333\"\r\n\t\t\tbackground_dotted_overlay \"none\"\r\n\t\t\tbackground_image \"http://server.local/revslider/wp-content/uploads/\"\r\n\t\t\tbg_fit \"cover\"\r\n\t\t\tbg_position \"center center\"\r\n\t\t\tbg_repeat \"no-repeat\"\r\n\t\t\tbullets_align_hor \"center\"\r\n\t\t\tbullets_align_vert \"bottom\"\r\n\t\t\tbullets_always_on \"true\"\r\n\t\t\tbullets_direction \"horizontal\"\r\n\t\t\tbullets_offset_hor \"0\"\r\n\t\t\tbullets_offset_vert \"20\"\r\n\t\t\tbullets_space \"5\"\r\n\t\t\tcarousel_borderr \"0\"\r\n\t\t\tcarousel_borderr_unit \"px\"\r\n\t\t\tcarousel_fadeout \"off\"\r\n\t\t\tcarousel_hposition \"center\"\r\n\t\t\tcarousel_infinity false\r\n\t\t\tcarousel_maxitems \"3\"\r\n\t\t\tcarousel_maxrotation \"0\"\r\n\t\t\tcarousel_rotation \"off\"\r\n\t\t\tcarousel_scale \"off\"\r\n\t\t\tcarousel_scaledown \"50\"\r\n\t\t\tcarousel_space \"0\"\r\n\t\t\tcarousel_stretch \"off\"\r\n\t\t\tcarousel_varyrotate \"off\"\r\n\t\t\tcarousel_varyscale \"off\"\r\n\t\t\tcarousel_vposition \"center\"\r\n\t\t\tclient_action \"import_slider\"\r\n\t\t\tcustom_css \"\"\r\n\t\t\tcustom_javascript \"jQuery(window).on('scrol...return ismobile;\\n }\"\r\n\t\t\tdelay \"9000\"\r\n\t\t\tdisable_kenburns_on_mobile \"off\"\r\n\t\t\tdisable_on_mobile \"off\"\r\n\t\t\tdisable_parallax_mobile \"off\"\r\n\t\t\tdrag_block_vertical \"off\"\r\n\t\t\tenable_arrows \"on\"\r\n\t\t\tenable_bullets \"on\"\r\n\t\t\tenable_progressbar \"off\"\r\n\t\t\tenable_tabs \"off\"\r\n\t\t\tenable_thumbnails \"off\"\r\n\t\t\texport_dummy_images false\r\n\t\t\tfirst_transition_active \"on\"\r\n\t\t\tfirst_transition_duration \"300\"\r\n\t\t\tfirst_transition_slot_amount \"7\"\r\n\t\t\tfirst_transition_type \"fade\"\r\n\t\t\tfull_screen_align_force \"off\"\r\n\t\t\tfullscreen_min_height \"\"\r\n\t\t\tfullscreen_offset_container \"\"\r\n\t\t\tfullscreen_offset_size \"\"\r\n\t\t\thide_all_layers_under \"0\"\r\n\t\t\thide_arrows \"200\"\r\n\t\t\thide_arrows_on_mobile \"off\"\r\n\t\t\thide_bullets \"200\"\r\n\t\t\thide_bullets_on_mobile \"off\"\r\n\t\t\thide_defined_layers_under \"0\"\r\n\t\t\thide_slider_under \"0\"\r\n\t\t\thide_tabs \"200\"\r\n\t\t\thide_thumbs \"200\"\r\n\t\t\thide_thumbs_delay_mobile \"1500\"\r\n\t\t\thide_thumbs_on_mobile \"off\"\r\n\t\t\thide_thumbs_under_resolution \"0\"\r\n\t\t\timage_source_type \"full\"\r\n\t\t\tjquery_noconflict \"on\"\r\n\t\t\tjs_to_body \"true\"\r\n\t\t\tkeyboard_navigation \"off\"\r\n\t\t\tlazy_load_type \"none\"\r\n\t\t\tleftarrow_align_hor \"left\"\r\n\t\t\tleftarrow_align_vert \"center\"\r\n\t\t\tleftarrow_offset_hor \"10\"\r\n\t\t\tleftarrow_offset_vert \"0\"\r\n\t\t\tloop_slide \"off\"\r\n\t\t\tmargin_bottom \"0\"\r\n\t\t\tmargin_left \"0\"\r\n\t\t\tmargin_right \"0\"\r\n\t\t\tmargin_top \"0\"\r\n\t\t\tmin_height \"0\"\r\n\t\t\tnavigation_arrow_style \"round\"\r\n\t\t\tnavigation_bullets_style \"round\"\r\n\t\t\tnext_slide_on_window_focus \"off\"\r\n\t\t\tnonce \"a638dbd494\"\r\n\t\t\toutput_type \"none\"\r\n\t\t\tpadding \"0\"\r\n\t\t\tparallax_bg_freeze \"off\"\r\n\t\t\tparallax_level_1 \"5\"\r\n\t\t\tparallax_level_10 \"50\"\r\n\t\t\tparallax_level_2 \"10\"\r\n\t\t\tparallax_level_3 \"15\"\r\n\t\t\tparallax_level_4 \"20\"\r\n\t\t\tparallax_level_5 \"25\"\r\n\t\t\tparallax_level_6 \"30\"\r\n\t\t\tparallax_level_7 \"35\"\r\n\t\t\tparallax_level_8 \"40\"\r\n\t\t\tparallax_level_9 \"45\"\r\n\t\t\tparallax_type \"mouse\"\r\n\t\t\tposition \"center\"\r\n\t\t\tprogress_height \"5\"\r\n\t\t\tprogress_opa \"15\"\r\n\t\t\tprogressbar_color \"#000000\"\r\n\t\t\trightarrow_align_hor \"right\"\r\n\t\t\trightarrow_align_vert \"center\"\r\n\t\t\trightarrow_offset_hor \"10\"\r\n\t\t\trightarrow_offset_vert \"0\"\r\n\t\t\tshadow_type \"0\"\r\n\t\t\tshow_alternate_image \"\"\r\n\t\t\tshow_alternative_type \"off\"\r\n\t\t\tshow_background_image \"on\"\r\n\t\t\tshow_timerbar \"top\"\r\n\t\t\tshuffle \"on\"\r\n\t\t\tsimplify_ie8_ios4 \"off\"\r\n\t\t\tsliderid \"56\"\r\n\t\t\tspan_tabs_wrapper \"off\"\r\n\t\t\tspan_thumbnails_wrapper \"off\"\r\n\t\t\tspinner_color \"#FFFFFF\"\r\n\t\t\tstart_js_after_delay \"0\"\r\n\t\t\tstart_with_slide \"1\"\r\n\t\t\tstop_after_loops \"0\"\r\n\t\t\tstop_at_slide \"2\"\r\n\t\t\tstop_on_hover \"on\"\r\n\t\t\tstop_slider \"on\"\r\n\t\t\tswipe_min_touches \"1\"\r\n\t\t\tswipe_velocity \"75\"\r\n\t\t\ttabs_align_hor \"center\"\r\n\t\t\ttabs_align_vert \"bottom\"\r\n\t\t\ttabs_always_on \"true\"\r\n\t\t\ttabs_amount \"5\"\r\n\t\t\ttabs_direction \"horizontal\"\r\n\t\t\ttabs_height \"50\"\r\n\t\t\ttabs_inner_outer \"inner\"\r\n\t\t\ttabs_offset_hor \"0\"\r\n\t\t\ttabs_offset_vert \"20\"\r\n\t\t\ttabs_padding \"5\"\r\n\t\t\ttabs_space \"5\"\r\n\t\t\ttabs_style \"custom\"\r\n\t\t\ttabs_width \"100\"\r\n\t\t\ttabs_wrapper_color \"transparent\"\r\n\t\t\ttabs_wrapper_opacity \"5\"\r\n\t\t\tthumb_amount \"4\"\r\n\t\t\tthumb_height \"75\"\r\n\t\t\tthumb_width \"120\"\r\n\t\t\tthumbnail_direction \"horizontal\"\r\n\t\t\tthumbnails_align_hor \"center\"\r\n\t\t\tthumbnails_align_vert \"bottom\"\r\n\t\t\tthumbnails_inner_outer \"inner\"\r\n\t\t\tthumbnails_offset_hor \"0\"\r\n\t\t\tthumbnails_offset_vert \"20\"\r\n\t\t\tthumbnails_padding \"5\"\r\n\t\t\tthumbnails_space \"5\"\r\n\t\t\tthumbnails_wrapper_color \"transparent\"\r\n\t\t\tthumbnails_wrapper_opacity \"5\"\r\n\t\t\tthumbs_always_on \"true\"\r\n\t\t\ttouchenabled \"on\"\r\n\t\t\tupdate_animations \"true\"\r\n\t\t\tupdate_static_captions \"true\"\r\n\t\t\tuse_parallax \"off\"\r\n\t\t\tuse_spinner \"0\"\r\n\t\t\tuse_wpml false\r\n\t\t **/\r\n\t\t \r\n\t\t$presets = array();\r\n\t\t\r\n\t\t//ThemePunch default presets are added here directly\r\n\t\t\r\n\t\t//preset -> standardpreset || heropreset || carouselpreset\r\n\r\n$presets[] = array (\r\n 'settings' => array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/slideshow_auto_layout.png', 'name' => 'Slideshow-Auto', 'preset' => 'standardpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'on',\r\n 'stop_slider' => 'off',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'round',\r\n 'arrows_always_on' => 'true',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'on',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'round',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '100',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '100',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '20',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'auto',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '500',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n \r\n$presets[] = array (\r\n 'settings' => \r\n array ( 'class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/slideshow_auto_layout.png', 'name' => 'Slideshow-Full-Width', 'preset' => 'standardpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'on',\r\n 'stop_slider' => 'off',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'round',\r\n 'arrows_always_on' => 'true',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'on',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'round',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '100',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '100',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '20',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '500',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/slideshow_auto_layout.png', 'name' => 'Slideshow-Full-Screen', 'preset' => 'standardpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'on',\r\n 'stop_slider' => 'off',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'round',\r\n 'arrows_always_on' => 'true',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'on',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'round',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '100',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '100',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '20',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullscreen',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '500',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n \r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/thumb_auto1.png', 'name' => 'Thumbs-Bottom-Auto', 'preset' => 'standardpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'on',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '20',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'auto',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '500',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n \r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/thumbs_left_auto.png', 'name' => 'Thumbs-Left-Auto', 'preset' => 'standardpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'right',\r\n 'leftarrow_align_vert' => 'bottom',\r\n 'leftarrow_offset_hor' => '40',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'bottom',\r\n 'rightarrow_offset_hor' => '0',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'on',\r\n 'thumbs_under_hidden' => '778',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'left',\r\n 'thumbnails_align_vert' => 'center',\r\n 'thumbnails_offset_hor' => '20',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'auto',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '500',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n \r\n$presets[] = array (\r\n 'settings' => array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/thumbs_right_auto.png', 'name' => 'Thumbs-Right-Auto', 'preset' => 'standardpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'bottom',\r\n 'leftarrow_offset_hor' => '0',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'left',\r\n 'rightarrow_align_vert' => 'bottom',\r\n 'rightarrow_offset_hor' => '40',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'on',\r\n 'thumbs_under_hidden' => '778',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'right',\r\n 'thumbnails_align_vert' => 'center',\r\n 'thumbnails_offset_hor' => '20',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'auto',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '500',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/scroll_fullscreen.png', 'name' => 'Vertical-Bullet-Full-Screen', 'preset' => 'standardpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'off',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'bottom',\r\n 'leftarrow_offset_hor' => '0',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'left',\r\n 'rightarrow_align_vert' => 'bottom',\r\n 'rightarrow_offset_hor' => '40',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'vertical',\r\n 'bullets_always_on' => 'false',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'right',\r\n 'bullets_align_vert' => 'center',\r\n 'bullets_offset_hor' => '30',\r\n 'bullets_offset_vert' => '0',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'on',\r\n 'thumbs_under_hidden' => '778',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'right',\r\n 'thumbnails_align_vert' => 'center',\r\n 'thumbnails_offset_hor' => '20',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullscreen',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '500',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/wide_fullscreen.png', 'name' => 'Wide-Full-Screen', 'preset' => 'heropreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'off',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'bottom',\r\n 'leftarrow_offset_hor' => '0',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'left',\r\n 'rightarrow_align_vert' => 'bottom',\r\n 'rightarrow_offset_hor' => '40',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'vertical',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'right',\r\n 'bullets_align_vert' => 'center',\r\n 'bullets_offset_hor' => '30',\r\n 'bullets_offset_vert' => '0',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'on',\r\n 'thumbs_under_hidden' => '778',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'right',\r\n 'thumbnails_align_vert' => 'center',\r\n 'thumbnails_offset_hor' => '20',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullscreen',\r\n 'width' => '1400',\r\n 'width_notebook' => '1240',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '868',\r\n 'height_notebook' => '768',\r\n 'height_tablet' => '960',\r\n 'height_mobile' => '720',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/wide_fullscreen.png', 'name' => 'Wide-Full-Width', 'preset' => 'heropreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'off',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'bottom',\r\n 'leftarrow_offset_hor' => '0',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'left',\r\n 'rightarrow_align_vert' => 'bottom',\r\n 'rightarrow_offset_hor' => '40',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'vertical',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'right',\r\n 'bullets_align_vert' => 'center',\r\n 'bullets_offset_hor' => '30',\r\n 'bullets_offset_vert' => '0',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'on',\r\n 'thumbs_under_hidden' => '778',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'right',\r\n 'thumbnails_align_vert' => 'center',\r\n 'thumbnails_offset_hor' => '20',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '1400',\r\n 'width_notebook' => '1240',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '500',\r\n 'height_tablet' => '400',\r\n 'height_mobile' => '400',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/wide_fullscreen.png', 'name' => 'Regular-Full-Screen', 'preset' => 'heropreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'off',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'bottom',\r\n 'leftarrow_offset_hor' => '0',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'left',\r\n 'rightarrow_align_vert' => 'bottom',\r\n 'rightarrow_offset_hor' => '40',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'vertical',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'right',\r\n 'bullets_align_vert' => 'center',\r\n 'bullets_offset_hor' => '30',\r\n 'bullets_offset_vert' => '0',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'on',\r\n 'thumbs_under_hidden' => '778',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'right',\r\n 'thumbnails_align_vert' => 'center',\r\n 'thumbnails_offset_hor' => '20',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullscreen',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '868',\r\n 'height_notebook' => '768',\r\n 'height_tablet' => '960',\r\n 'height_mobile' => '720',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/wide_fullscreen.png', 'name' => 'Regular-Full-Width', 'preset' => 'heropreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'off', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'off',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'bottom',\r\n 'leftarrow_offset_hor' => '0',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'left',\r\n 'rightarrow_align_vert' => 'bottom',\r\n 'rightarrow_offset_hor' => '40',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'on',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'vertical',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'right',\r\n 'bullets_align_vert' => 'center',\r\n 'bullets_offset_hor' => '30',\r\n 'bullets_offset_vert' => '0',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '5',\r\n 'span_thumbnails_wrapper' => 'off',\r\n 'thumbnails_wrapper_color' => 'transparent',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '5',\r\n 'thumbnails_space' => '5',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '50',\r\n 'thumb_height' => '50',\r\n 'thumb_width_min' => '50',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'on',\r\n 'thumbs_under_hidden' => '778',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'right',\r\n 'thumbnails_align_vert' => 'center',\r\n 'thumbnails_offset_hor' => '20',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'off',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'off',\r\n 'carousel_maxrotation' => '0',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '50',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '1240',\r\n 'width_notebook' => '1024',\r\n 'width_tablet' => '778',\r\n 'width_mobile' => '480',\r\n 'height' => '600',\r\n 'height_notebook' => '500',\r\n 'height_tablet' => '400',\r\n 'height_mobile' => '300',\r\n 'enable_custom_size_notebook' => 'on',\r\n 'enable_custom_size_tablet' => 'on',\r\n 'enable_custom_size_iphone' => 'on',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_javascript' => '',\r\n 'custom_css' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/cover_carousel_thumbs.png', 'name' => 'Cover-Flow-Thumbs', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'navbar-old',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#000000',\r\n 'thumbnails_wrapper_opacity' => '15',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'outer-bottom',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'off',\r\n 'carousel_space' => '-150',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '5',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'on',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'on',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '600',\r\n 'width_notebook' => '600',\r\n 'width_tablet' => '600',\r\n 'width_mobile' => '600',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '600',\r\n 'height_mobile' => '600',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/cover_carousel_endless.png', 'name' => 'Cover-Flow-Infinite', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'round',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#000000',\r\n 'thumbnails_wrapper_opacity' => '15',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'outer-bottom',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'on',\r\n 'carousel_space' => '-150',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'on',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'on',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '600',\r\n 'width_notebook' => '600',\r\n 'width_tablet' => '600',\r\n 'width_mobile' => '600',\r\n 'height' => '600',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '600',\r\n 'height_mobile' => '600',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/flat_carousel_thumbs.png', 'name' => 'Flat-Infinite-Thumbs', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => '#111111',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'navbar',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#222222',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'outer-bottom',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'on',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '720',\r\n 'width_notebook' => '720',\r\n 'width_tablet' => '720',\r\n 'width_mobile' => '720',\r\n 'height' => '405',\r\n 'height_notebook' => '405',\r\n 'height_tablet' => '405',\r\n 'height_mobile' => '405',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/flat_carousel.png', 'name' => 'Flat-Infinite', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => '#111111',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'uranus',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'off',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#222222',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'outer-bottom',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'on',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '720',\r\n 'width_notebook' => '720',\r\n 'width_tablet' => '720',\r\n 'width_mobile' => '720',\r\n 'height' => '405',\r\n 'height_notebook' => '405',\r\n 'height_tablet' => '405',\r\n 'height_mobile' => '405',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/flat_carousel_thumbs_left.png', 'name' => 'Flat-Thumbs-Left', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => '#111111',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'uranus',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#222222',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'outer-left',\r\n 'thumbnails_align_hor' => 'left',\r\n 'thumbnails_align_vert' => 'top',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'on',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '720',\r\n 'width_notebook' => '720',\r\n 'width_tablet' => '720',\r\n 'width_mobile' => '720',\r\n 'height' => '405',\r\n 'height_notebook' => '405',\r\n 'height_tablet' => '405',\r\n 'height_mobile' => '405',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/carousel_thumbs_right_fullscreen.png', 'name' => 'Full-Screen-Thumbs-Right', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1', \r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => '#111111',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'uranus',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#222222',\r\n 'thumbnails_wrapper_opacity' => '100',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'vertical',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'outer-right',\r\n 'thumbnails_align_hor' => 'right',\r\n 'thumbnails_align_vert' => 'top',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'on',\r\n 'carousel_space' => '0',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => 'px',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '3',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'off',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullscreen',\r\n 'width' => '900',\r\n 'width_notebook' => '720',\r\n 'width_tablet' => '720',\r\n 'width_mobile' => '720',\r\n 'height' => '720',\r\n 'height_notebook' => '405',\r\n 'height_tablet' => '405',\r\n 'height_mobile' => '405',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/cover_carousel_thumbs.png', 'name' => 'Cover-Flow-Full-Screen', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1',\r\n 'first_transition_active' => 'on',\r\n 'first_transition_type' => 'fade',\r\n 'first_transition_duration' => '1500',\r\n 'first_transition_slot_amount' => '7',\r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'navbar-old',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#000000',\r\n 'thumbnails_wrapper_opacity' => '15',\r\n 'thumbnails_style' => 'navbar',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'on',\r\n 'carousel_space' => '-150',\r\n 'carousel_borderr' => '0',\r\n 'carousel_borderr_unit' => '%',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '5',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'on',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'on',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullscreen',\r\n 'width' => '800',\r\n 'width_notebook' => '600',\r\n 'width_tablet' => '600',\r\n 'width_mobile' => '600',\r\n 'height' => '800',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '600',\r\n 'height_mobile' => '600',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n$presets[] = array (\r\n 'settings' => \r\n array ('class' => '', 'image' => RS_PLUGIN_URL.'admin/assets/images/sliderpresets/carousel_full_rounded.png', 'name' => 'Cover-Flow-Rounded', 'preset' => 'carouselpreset' ),\r\n 'values' => \r\n array (\r\n 'next_slide_on_window_focus' => 'off',\r\n 'delay' => '9000',\r\n 'start_js_after_delay' => '0',\r\n 'image_source_type' => 'full',\r\n 0 => 'revapi39.bind(\\\\\"revolution.slide.layeraction\\\\\",function (e) {\r\n\t//data.eventtype - Layer Action (enterstage, enteredstage, leavestage,leftstage)\r\n\t//data.layertype - Layer Type (image,video,html)\r\n\t//data.layersettings - Default Settings for Layer\r\n\t//data.layer - Layer as jQuery Object\r\n});',\r\n 'start_with_slide' => '1',\r\n 'first_transition_active' => 'on',\r\n 'first_transition_type' => 'fade',\r\n 'first_transition_duration' => '1500',\r\n 'first_transition_slot_amount' => '7',\r\n 'stop_on_hover' => 'off',\r\n 'stop_slider' => 'on',\r\n 'stop_after_loops' => '0',\r\n 'stop_at_slide' => '1',\r\n 'shuffle' => 'off', \r\n 'viewport_start' => 'wait',\r\n 'viewport_area' => '80',\r\n 'enable_progressbar' => 'on', \r\n 'background_dotted_overlay' => 'none',\r\n 'background_color' => 'transparent',\r\n 'padding' => '0',\r\n 'show_background_image' => 'off',\r\n 'background_image' => '',\r\n 'bg_fit' => 'cover',\r\n 'bg_repeat' => 'no-repeat',\r\n 'bg_position' => 'center center',\r\n 'position' => 'center', \r\n 'use_spinner' => '-1',\r\n 'spinner_color' => '#FFFFFF',\r\n 'enable_arrows' => 'on',\r\n 'navigation_arrow_style' => 'round',\r\n 'arrows_always_on' => 'false',\r\n 'hide_arrows' => '200',\r\n 'hide_arrows_mobile' => '1200',\r\n 'hide_arrows_on_mobile' => 'off',\r\n 'arrows_under_hidden' => '600',\r\n 'hide_arrows_over' => 'off',\r\n 'arrows_over_hidden' => '0',\r\n 'leftarrow_align_hor' => 'left',\r\n 'leftarrow_align_vert' => 'center',\r\n 'leftarrow_offset_hor' => '30',\r\n 'leftarrow_offset_vert' => '0',\r\n 'rightarrow_align_hor' => 'right',\r\n 'rightarrow_align_vert' => 'center',\r\n 'rightarrow_offset_hor' => '30',\r\n 'rightarrow_offset_vert' => '0',\r\n 'enable_bullets' => 'off',\r\n 'navigation_bullets_style' => 'round-old',\r\n 'bullets_space' => '5',\r\n 'bullets_direction' => 'horizontal',\r\n 'bullets_always_on' => 'true',\r\n 'hide_bullets' => '200',\r\n 'hide_bullets_mobile' => '1200',\r\n 'hide_bullets_on_mobile' => 'on',\r\n 'bullets_under_hidden' => '600',\r\n 'hide_bullets_over' => 'off',\r\n 'bullets_over_hidden' => '0',\r\n 'bullets_align_hor' => 'center',\r\n 'bullets_align_vert' => 'bottom',\r\n 'bullets_offset_hor' => '0',\r\n 'bullets_offset_vert' => '30',\r\n 'enable_thumbnails' => 'on',\r\n 'thumbnails_padding' => '20',\r\n 'span_thumbnails_wrapper' => 'on',\r\n 'thumbnails_wrapper_color' => '#000000',\r\n 'thumbnails_wrapper_opacity' => '0',\r\n 'thumbnails_style' => 'preview1',\r\n 'thumb_amount' => '9',\r\n 'thumbnails_space' => '10',\r\n 'thumbnail_direction' => 'horizontal',\r\n 'thumb_width' => '60',\r\n 'thumb_height' => '60',\r\n 'thumb_width_min' => '60',\r\n 'thumbs_always_on' => 'false',\r\n 'hide_thumbs' => '200',\r\n 'hide_thumbs_mobile' => '1200',\r\n 'hide_thumbs_on_mobile' => 'off',\r\n 'thumbs_under_hidden' => '0',\r\n 'hide_thumbs_over' => 'off',\r\n 'thumbs_over_hidden' => '0',\r\n 'thumbnails_inner_outer' => 'inner',\r\n 'thumbnails_align_hor' => 'center',\r\n 'thumbnails_align_vert' => 'bottom',\r\n 'thumbnails_offset_hor' => '0',\r\n 'thumbnails_offset_vert' => '0',\r\n 'enable_tabs' => 'off',\r\n 'tabs_padding' => '5',\r\n 'span_tabs_wrapper' => 'off',\r\n 'tabs_wrapper_color' => 'transparent',\r\n 'tabs_wrapper_opacity' => '5',\r\n 'tabs_style' => '',\r\n 'tabs_amount' => '5',\r\n 'tabs_space' => '5',\r\n 'tabs_direction' => 'horizontal',\r\n 'tabs_width' => '100',\r\n 'tabs_height' => '50',\r\n 'tabs_width_min' => '100',\r\n 'tabs_always_on' => 'false',\r\n 'hide_tabs' => '200',\r\n 'hide_tabs_mobile' => '1200',\r\n 'hide_tabs_on_mobile' => 'off',\r\n 'tabs_under_hidden' => '0',\r\n 'hide_tabs_over' => 'off',\r\n 'tabs_over_hidden' => '0',\r\n 'tabs_inner_outer' => 'inner',\r\n 'tabs_align_hor' => 'center',\r\n 'tabs_align_vert' => 'bottom',\r\n 'tabs_offset_hor' => '0',\r\n 'tabs_offset_vert' => '20',\r\n 'touchenabled' => 'on',\r\n 'drag_block_vertical' => 'off',\r\n 'swipe_velocity' => '75',\r\n 'swipe_min_touches' => '50',\r\n 'swipe_direction' => 'horizontal',\r\n 'keyboard_navigation' => 'off',\r\n 'keyboard_direction' => 'horizontal',\r\n 'mousescroll_navigation' => 'off',\r\n 'carousel_infinity' => 'on',\r\n 'carousel_space' => '-150',\r\n 'carousel_borderr' => '50',\r\n 'carousel_borderr_unit' => '%',\r\n 'carousel_padding_top' => '0',\r\n 'carousel_padding_bottom' => '0',\r\n 'carousel_maxitems' => '5',\r\n 'carousel_stretch' => 'off',\r\n 'carousel_fadeout' => 'on',\r\n 'carousel_varyfade' => 'on',\r\n 'carousel_rotation' => 'off',\r\n 'carousel_varyrotate' => 'on',\r\n 'carousel_maxrotation' => '65',\r\n 'carousel_scale' => 'on',\r\n 'carousel_varyscale' => 'off',\r\n 'carousel_scaledown' => '55',\r\n 'carousel_hposition' => 'center',\r\n 'carousel_vposition' => 'center',\r\n 'use_parallax' => 'on',\r\n 'disable_parallax_mobile' => 'off',\r\n 'parallax_type' => 'mouse',\r\n 'parallax_origo' => 'slidercenter',\r\n 'parallax_speed' => '2000',\r\n 'parallax_level_1' => '2',\r\n 'parallax_level_2' => '3',\r\n 'parallax_level_3' => '4',\r\n 'parallax_level_4' => '5',\r\n 'parallax_level_5' => '6',\r\n 'parallax_level_6' => '7',\r\n 'parallax_level_7' => '12',\r\n 'parallax_level_8' => '16',\r\n 'parallax_level_9' => '10',\r\n 'parallax_level_10' => '50',\r\n 'lazy_load_type' => 'smart',\r\n 'seo_optimization' => 'none',\r\n 'simplify_ie8_ios4' => 'off',\r\n 'show_alternative_type' => 'off',\r\n 'show_alternate_image' => '',\r\n 'jquery_noconflict' => 'off',\r\n 'js_to_body' => 'false',\r\n 'output_type' => 'none',\r\n 'jquery_debugmode' => 'off',\r\n 'slider_type' => 'fullwidth',\r\n 'width' => '800',\r\n 'width_notebook' => '600',\r\n 'width_tablet' => '600',\r\n 'width_mobile' => '600',\r\n 'height' => '800',\r\n 'height_notebook' => '600',\r\n 'height_tablet' => '600',\r\n 'height_mobile' => '600',\r\n 'enable_custom_size_notebook' => 'off',\r\n 'enable_custom_size_tablet' => 'off',\r\n 'enable_custom_size_iphone' => 'off',\r\n 'main_overflow_hidden' => 'off',\r\n 'auto_height' => 'off',\r\n 'min_height' => '',\r\n 'custom_css' => '',\r\n 'custom_javascript' => '',\r\n ),\r\n );\r\n\t\t\r\n\t\t//add the presets made from customers\r\n\t\t$customer_presets = get_option('revslider_presets', array());\r\n\t\t\r\n\t\t\r\n\t\t$presets = array_merge($presets, $customer_presets);\r\n\t\t\r\n\t\t$presets = apply_filters('revslider_slider_presets', $presets);\r\n\t\t\r\n\t\tforeach($presets as $key => $preset){\r\n\t\t\tif(intval($preset['settings']['image']) > 0){\r\n\t\t\t\t$img = wp_get_attachment_image_src(esc_attr($preset['settings']['image']), 'medium');\r\n\t\t\t\t$presets[$key]['settings']['image'] = ($img !== false) ? $img['0'] : '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $presets;\r\n\t\t\r\n\t}", "function tfuse_slideshow($atts, $content) {\n global $slide;\n $slide = array();\n extract(shortcode_atts(array('type_size' => ''), $atts));\n $get_slideshow = do_shortcode($content);\n $uniq = rand(1, 400);\n $i = 0;\n $output = '<div class=\"slider slider_'.$type_size.'\">\n <div class=\"slider_container clearfix\" id=\"slider'.$uniq.'\">';\n while (isset($slide['type'][$i])) {\n if( $slide['type'][$i]=='image' )\n {\n if($type_size=='medium'){\n $width = 600;\n $height = 338;\n }\n elseif($type_size=='small'){\n $width = 430;\n $height = 242;\n }\n else{\n $width = 240;\n $height = 135;\n }\n $getimage = new TF_GET_IMAGE();\n $img = $getimage->width($width)->height($height)->src($slide['content'][$i])->get_img();\n $output .= '<div class=\"slider-item\">'.$img .'</div>';\n }\n else $output .= ' <div class=\"slider-item\"><div class=\"inner\">'.$slide['content'][$i].'</div></div>';\n $i++;\n }\n $output .= '</div>\n <div class=\"slider_pagination\" id=\"slider'.$uniq.'_pag\"></div>\n </div>\n <script>\n jQuery(document).ready(function($) {\n $(\"#slider'.$uniq.'\").carouFredSel({\n pagination : \"#slider'.$uniq.'_pag\",\n infinite: false,\n auto: false,\n height: \"auto\",\n items: 1,\n scroll: {\n fx: \"fade\",\n duration: 200\n }\n });\n });\n </script>';\n return $output;\n}", "function get_slider_view()\r\n\t{\r\n\t\t$sort = get_option('sort'); if(empty($sort)){\r\n\t\t\t$sort = \"post_date\";\r\n\t\t}\r\n\t\t$order = get_option('order'); if(empty($order)){\r\n\t\t\t$order = \"DESC\";\r\n\t\t} // Non utilise\r\n\t\t$limit = get_option('limit'); if(empty($limit)){\r\n\t\t\t$limit = 350;\r\n\t\t} // Non utilise\r\n\t\t$points = get_option('points'); if(empty($points)){\r\n\t\t\t$points = \"...\";\r\n\t\t}\r\n\t\t$post_limit = get_option('limit_posts'); if(empty($limit_posts)){\r\n\t\t\t$limit_posts = \"-1\";\r\n\t\t}\r\n\t\t$auto_switch = get_option('auto_switch'); if(empty($auto_switch)){\r\n\t\t\t$auto_switch = \"1\";\r\n\t\t} // 1 = true, 0 = false\r\n\t\t$timeout = get_option('timeout'); if(empty($timeout)){\r\n\t\t\t$timeout = 5000;\r\n\t\t} // temps de transition par defaut\r\n\r\n\t\t$img_width = get_option('img_width');\r\n\t\tif(empty($img_width)) {\r\n\t\t\t$img_width = 580;\r\n\t\t}\r\n\r\n\t\t$img_height = get_option('img_height');\r\n\t\tif(empty($img_height)) {\r\n\t\t\t$img_height = 300;\r\n\t\t}\r\n\r\n\t\t// Get the slider content\r\n\t\tglobal $wpdb;\r\n\t\tglobal $post;\r\n\r\n\t\t$args = array( 'meta_key' => 'fading_slider',\r\n\t\t\t\t'meta_value'=> '1', // Seulement les objets dont la case est cochée dans le back\r\n\t\t\t\t'suppress_filters' => 0,\r\n\t\t\t\t'post_type' => array('post', 'page'),\r\n\t\t\t\t'orderby' => $sort,\r\n\t\t\t\t'order' => 'DESC', \t// DESC = Show last post first\r\n\t\t\t\t'numberposts'=> 4); // HTML Markup only allows 4 slides\r\n\r\n\t\t$myposts = get_posts( $args );\r\n\r\n\t\tif (function_exists('add_image_size')) {\r\n\t\t\tadd_image_size( 'fading_slider', $img_width, $img_height, true ); // Miniatures des archives\r\n\t\t}\r\n\r\n\t\t/* PHP Generated Styles here */\r\n\t\t?>\r\n\t\t<style type=\"text/css\">\r\n\r\n\t\t\t#fading_slider {\r\n\t\t\t\tbackground-color: #<?php $bg = get_option('fading_slider_bg'); if(!empty($bg)) {echo $bg;} else {echo \"FFF\";}?>;\r\n\t\t\t\tborder: 8px solid #<?php $border = get_option('fading_slider_border'); if(!empty($border)) {echo $border;} else {echo \"CCC\";}?>;\r\n\t\t\t\twidth: <?php $width = get_option('fading_slider_width'); if(!empty($width)) {echo $width;} else {echo \"580\";}?>px;\r\n\t\t\t}\r\n\t\t<?php\r\n\r\n\t\t\t$i = 1;\r\n\t\t\tforeach( $myposts as $post ) : setup_postdata($post);\r\n\r\n\t\t\t\t$custom = get_post_custom($post->ID);\r\n\t\t\t\techo \"/* ID POST : \" . $post->ID . \"*/\";\r\n\t\t\t\t$thumb = $this->get_wp_generated_thumb( get_the_post_thumbnail( $post->ID ) );\r\n\t\t\t\t// $thumb = $this->get_wp_generated_thumb( get_the_post_thumbnail($post->ID, \"fading_slider\") );\r\n\r\n\t\t\t\techo \".cr-container input.cr-selector-img-\".$i.\":checked ~ .cr-bgimg,\r\n\t\t.cr-bgimg div span:nth-child(\".$i.\"){\r\n\t\t background-image: url(\".$thumb.\");\r\n\t\t}\\n\";\r\n\r\n\t\t\t\t$i++;\r\n\t\t\tendforeach; wp_reset_postdata();\r\n\r\n\t\t?>\r\n\t\t</style>\r\n\r\n\t\t<div id=\"fading_slider\">\r\n\r\n <section class=\"cr-container\">\r\n\r\n <!-- boutons cliquables -->\r\n <input id=\"select-img-1\" name=\"radio-set-1\" type=\"radio\" class=\"cr-selector-img-1 current\" checked/>\r\n <label for=\"select-img-1\" class=\"cr-label-img-1\">1</label>\r\n\r\n \t<input id=\"select-img-2\" name=\"radio-set-1\" type=\"radio\" class=\"cr-selector-img-2\" />\r\n <label for=\"select-img-2\" class=\"cr-label-img-2\">2</label>\r\n\r\n \t<input id=\"select-img-3\" name=\"radio-set-1\" type=\"radio\" class=\"cr-selector-img-3\" />\r\n <label for=\"select-img-3\" class=\"cr-label-img-3\">3</label>\r\n\r\n \t<input id=\"select-img-4\" name=\"radio-set-1\" type=\"radio\" class=\"cr-selector-img-4\" />\r\n <label for=\"select-img-4\" class=\"cr-label-img-4\">4</label>\r\n\r\n\t <div class=\"clr\"></div>\r\n\r\n\t\t<!-- images (tranches) -->\r\n\t\t<div class=\"cr-bgimg\">\r\n\t\t\t<div>\r\n\t\t\t\t<span>Tranche 1 - Image 1</span>\r\n\t\t\t\t<span>Tranche 1 - Image 2</span>\r\n\t\t\t\t<span>Tranche 1 - Image 3</span>\r\n\t\t\t\t<span>Tranche 1 - Image 4</span>\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<span>Tranche 2 - Image 1</span>\r\n\t\t\t\t<span>Tranche 2 - Image 2</span>\r\n\t\t\t\t<span>Tranche 2 - Image 3</span>\r\n\t\t\t\t<span>Tranche 2 - Image 4</span>\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<span>Tranche 3 - Image 1</span>\r\n\t\t\t\t<span>Tranche 3 - Image 2</span>\r\n\t\t\t\t<span>Tranche 3 - Image 3</span>\r\n\t\t\t\t<span>Tranche 3 - Image 4</span>\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<span>Tranche 4 - Image 1</span>\r\n\t\t\t\t<span>Tranche 4 - Image 2</span>\r\n\t\t\t\t<span>Tranche 4 - Image 3</span>\r\n\t\t\t\t<span>Tranche 4 - Image 4</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<!-- titles -->\r\n\t\t<div class=\"cr-titles\">\r\n\r\n<?php\r\n\t$i = 1;\r\n\tforeach( $myposts as $post ) :\tsetup_postdata($post);\r\n\r\n\t\t\t// $custom = get_post_custom($post->ID);\r\n\t\t\t$thumb = $this->get_wp_generated_thumb( get_the_post_thumbnail($post->ID, \"fading_slider\") );\r\n?>\r\n\r\n\t\t\t<h3>\r\n\t\t\t\t<?php\r\n\t\t\t\t\t$category = get_the_category();\r\n\t\t\t\t\techo \"<span>\".$category[0]->cat_name.\"</span>\\n\";\r\n\t\t\t\t?>\r\n\t\t\t\t<span><a class=\"lienArticle\" href=\"<?php the_permalink();?>\" title=\"<?php _e(\"Read post\", \"wp-fading-content-slider-locale\");?>\"><?php the_title();?></a></span>\r\n \t<a class=\"lienImage\" href=\"<?php the_permalink();?>\" title=\"<?php _e(\"Read post\", \"wp-fading-content-slider-locale\");?>\"></a>\r\n\t\t\t</h3>\r\n\r\n<?php\r\n\t$i++;\r\n\tendforeach; wp_reset_postdata();\r\n?>\r\n\r\n </div>\r\n\r\n </section>\r\n\r\n</div>\r\n\r\n<script type=\"text/javascript\">\r\n\tvar $j = jQuery.noConflict();\r\n\tvar i = 2; // premier switch vers image 2\r\n\r\n\tfunction switchImage()\r\n\t{\r\n\t\t$j(\".current\").removeAttr('checked');\r\n\t\t$j(\".current\").removeClass('current');\r\n\r\n\t\t$j(\"#select-img-\"+i).addClass('current');\r\n\t\t$j(\"#select-img-\"+i).attr('checked', true);\r\n\r\n\t\tif (i==4)\r\n\t\t{\r\n\t\t\ti=1; // retour au debut sur image 1\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ti++; // image suivante\r\n\t\t}\r\n\t}\r\n\r\n\t$j(document).ready(function(){ //on lance l'annimation en boucle toute les 5 secondes (5000 miliseconde)\r\n\t\t<?php if ($auto_switch == \"1\") echo \"setInterval('switchImage();', \".$timeout.\");\\n\"; ?>\r\n\t});\r\n\r\n</script>\r\n\r\n\t\t<?php\r\n\r\n\t\t// TODO This should be prettier in the next version\r\n\t\t// include ( plugins_url() . '/wp-fading-content-slider/views/display.php' );\r\n\t}", "function soliloquy_custom_css_plugin_init() {\n\n add_action( 'soliloquy_updater', 'soliloquy_custom_css_updater' );\n add_filter( 'soliloquy_defaults', 'soliloquy_custom_css_defaults', 10, 2 );\n add_action( 'soliloquy_misc_box', 'soliloquy_custom_css_setting', 999 );\n add_filter( 'soliloquy_save_settings', 'soliloquy_custom_css_save', 10, 2 );\n\n // Metabox - Single Slide\n add_filter( 'soliloquy_meta_defaults', 'soliloquy_custom_css_meta_defaults', 10, 3 );\n add_action( 'soliloquy_after_image_meta_settings', 'soliloquy_custom_css_meta', 10, 3 );\n add_action( 'soliloquy_after_video_meta_settings', 'soliloquy_custom_css_meta', 10, 3 );\n add_filter( 'soliloquy_ajax_save_meta', 'soliloquy_custom_css_save_meta', 10, 4 );\n\n // Frontend\n add_filter( 'soliloquy_output_start', 'soliloquy_custom_css_output', 0, 2 );\n add_filter( 'soliloquy_output_item_classes', 'soliloquy_custom_css_classes_output', 10, 4 );\n\n\n}", "function civ_slider_options_page(){\n add_options_page('Civ Slider Options', 'Civ Slider Options', 8, 'civ_slider', 'civ_slider_options');\n}", "function carousel_slider(){\r\n\tregister_post_type('slider', array(\r\n\t\t\t'supports' => array('title', 'editor', 'excerpt'),\r\n\t\t\t'rewrite' => array('slug' => 'slider'),\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'public' => true,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => 'Slider',\r\n\t\t\t\t'add_new_item' => 'Add New Slider',\r\n\t\t\t\t'edit_item' => 'Edit Slider',\r\n\t\t\t\t'singular_name' => 'Slider'\r\n\t\t\t),\r\n\t\t\t'menu_icon' => 'dashicons-images-alt'));\r\n}", "public function get_slides_for_slider() {\n return $this->slides_to_include;\n }", "public static function wp_slim_styles(){\r\n\t echo '<style> \r\n\t .slim-btn-edit {\r\n\t background-image: url(\"'.plugin_dir_url(__FILE__).'assets/images/edit.png'.'\");\r\n\t } \r\n\t </style>';\r\n\t}", "protected function render() {\r\n $settings = $this->get_settings_for_display(); \r\n\r\n if ( $settings['list'] ) { ?>\r\n\r\n <div class=\"DSMCA__slide swiper-container\">\r\n <div class=\"swiper-wrapper\"> \r\n <?php foreach ( $settings['list'] as $item ) : ?>\r\n <div class=\"DSMCA__item_slide swiper-slide\">\r\n <img class=\"DSMCA__item-image\" src=\" <?php echo $item['imagen']['url'] ?> \">\r\n <h5 class=\"DSMCA__item-title\"><?php echo $item['titulo'] ?></h5>\r\n </div>\r\n <?php endforeach; ?> \r\n </div>\r\n <div class=\"swiper-button-prev\"></div>\r\n <div class=\"swiper-button-next\"></div>\r\n </div>\r\n\r\n\r\n <?php }\r\n\t}", "static function add_slides_small(): void {\r\n self::add_acf_inner_field(self::slides, self::slides_small, [\r\n 'label' => 'Small articles',\r\n 'type' => 'repeater',\r\n 'instructions' => '',\r\n 'required' => 1,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => [\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n 'collapsed' => self::qualify_field(self::slides_small_post),\r\n 'min' => 3,\r\n 'max' => 3,\r\n 'layout' => 'row',\r\n 'button_label' => 'Add article',\r\n 'sub_fields' => [],\r\n ]);\r\n }", "function wpsight_sylt_image_slider( $post_id = '', $args = array() ) {\n\techo wpsight_sylt_get_image_slider( $post_id, $args );\n}", "function svs_css_customizer() {\n\t?>\n\t<style type = \"text/css\">\n\t\n\t\tbody { background-color: #<?php echo get_theme_mod('background_color'); ?>;}\n\t\t\n\t\th1,h2,h3,h4,h5,h6,h7,h8 {color: <?php echo get_theme_mod('headers_color'); ?>;}\n\t\t\n\t\ta {\tcolor: <?php echo get_theme_mod('link_color'); ?>;}\n\t\t\n\t\ta:hover, a:focus { color: <?php echo get_theme_mod('link_hover_color'); ?>;}\n\t\n\t<?php\n\t$content_layout = get_theme_mod('content_layout_setting');\n\n\tif ($content_layout == 'compressed') : ?>\n\t\t\n\t\t.the-post {\n\t\t\twidth: 95%;\n\t\t\theight: 100%; <!-- important!!! -->\n\t\t\tmargin: 5px 0 15px 0;\n\t\t\tborder-bottom: 1px solid #eee;\n\t\t}\n\t\t\n\t\t.vid-col {\n\t\t\twidth: 100%;\n\n\t\t}\n\t\t\n\t\t.vid-title {\n\t\t\tmargin-bottom: 5px;\n\t\t}\n\t\t\n\t\t.content-show, .content-hide {\n\t\t\tfont-size: 11px;\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.content-layout{ display: none;}\n\t\t\n\t\n\t<?php endif;?>\n\t\t\n\t</style>\n\t\n\t<?php\n}", "function nirvana_pp_slider() {\n\t$nirvanas = nirvana_get_theme_options(); ?>\n\t<script type=\"text/javascript\">\n\tjQuery(document).ready(function() {\n\t\tjQuery('#slider').nivoSlider({\n\t\t\teffect: '<?php echo esc_html($nirvanas['nirvana_fpslideranim']); ?>',\n\t\t\tanimSpeed: <?php echo esc_html($nirvanas['nirvana_fpslidertime']); ?>,\n\t\t\t<?php if ($nirvanas['nirvana_fpsliderarrows']==\"Hidden\"): ?>directionNav: false,<?php endif;\n\t\t\tif ($nirvanas['nirvana_fpsliderarrows']==\"Always Visible\"): ?>directionNavHide: false,<?php endif; ?>\n\t\t\t//controlNavThumbs: true,\n\t\t\tbeforeChange: function(){\n\t\t\t\tjQuery('.nivo-caption h2').addClass('nivo-caption-mate');\n\t\t\t\tjQuery('.inline-slide-text').fadeOut(500);\n\t\t\t\tjQuery('.inline-slide-text').css({'opacity':'100','display':'inline'});\n\t\t\t\tjQuery('.readmore').fadeOut(500);\n\t\t\t\tjQuery('.readmore').css({'opacity':'100','display':'table'});\n\t\t\t},\n\t\t\tpauseTime: <?php echo esc_html($nirvanas['nirvana_fpsliderpause']); ?>\n\t\t});\n\t});\n\t</script>\n\t<?php\n}", "function cseas_simple_slider_enqueue_scripts_styles() {\n\t\twp_enqueue_script( 'cseas-simple-slider-js', plugins_url( 'slider.js', __FILE__ ), array( 'jquery' ) ); // slider.js\n\t\twp_enqueue_style( 'cseas-simple-slider-css', plugins_url( 'slider.css', __FILE__ ) );\n\t}", "public function slide(){\r\n\t\t\r\n\t}", "function slider_post_type() {\n\t$labels = array(\n\t\t'name' => _x( 'slider', 'Post Type General Name', 'resturant' ),\n\t\t'singular_name' => _x( 'slider', 'Post Type Singular Name', 'resturant' ),\n\t\t'menu_name' => __( 'slider', 'resturant' ),\n\t\t'parent_item_colon' => __( 'Parent slider', 'resturant' ),\n\t\t'all_items' => __( 'All slider', 'resturant' ),\n\t\t'view_item' => __( 'View slider', 'resturant' ),\n\t\t'add_new_item' => __( 'Add New slider', 'resturant' ),\n\t\t'add_new' => __( 'Add New', 'resturant' ),\n\t\t'edit_item' => __( 'Edit slider', 'resturant' ),\n\t\t'update_item' => __( 'Update slider', 'resturant' ),\n\t\t'search_items' => __( 'Search slider', 'resturant' ),\n\t\t'not_found' => __( 'Not Found', 'resturant' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'resturant' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'slider', 'resturant' ),\n\t\t'description' => __( 'slider news and reviews', 'resturant' ),\n\t\t'labels' => $labels,\n\t\t'menu_icon' => 'dashicons-slides\n',\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', ),\n\t\t'taxonomies' => array( 'genres' ),\t\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t\t'taxonomies' => array( 'category' ),\n\t);\n\tregister_post_type( 'slider', $args );\n}", "static public function slider_config() {\n ?>\n\n /**\n * J'ai simplement recopié le script du plugin pour pouvoir modifier les\n * caractéristiques du slider car aucun moyen de le configurer n'est \n * mis à dispo dans le backoffice...\n *\n * source https://github.com/sayful1/filterable-portfolio/blob/master/assets/src/frontend/slider.js\n */\n if (tns) {\n var sliders,\n i,\n slider,\n sliderOuter,\n controls,\n showDots,\n showArrows,\n autoplay,\n autoplayHoverPause,\n autoplayTimeout,\n speed,\n gutter,\n loop,\n lazyload,\n slideBy,\n mobile,\n tablet,\n desktop,\n wideScreen,\n fullHD,\n highScreen;\n\n sliders = document.querySelectorAll('.fp-tns-slider');\n for(i=0;i<sliders.length;i++){\n slider=sliders[i];\n\n sliderOuter = slider.parentNode;\n controls = sliderOuter.querySelector('.fp-tns-slider-controls');\n\n mobile = parseInt(slider.getAttribute('data-mobile'));\n tablet = parseInt(slider.getAttribute('data-tablet'));\n desktop = parseInt(slider.getAttribute('data-desktop'));\n wideScreen = parseInt(slider.getAttribute('data-wide-screen'));\n fullHD = parseInt(slider.getAttribute('data-full-hd'));\n highScreen = parseInt(slider.getAttribute('data-high-screen'));\n\n showDots = slider.getAttribute('data-dots') === 'true';\n showArrows = slider.getAttribute('data-arrows') === 'true';\n\n autoplay = slider.getAttribute('data-autoplay') === 'true';\n autoplayHoverPause = slider.getAttribute('data-autoplay-hover-pause') === 'true';\n // Default is 5000\n autoplayTimeout = 10000;\n // Default is 500\n speed = 1000;\n\n gutter = parseInt(slider.getAttribute('data-gutter'));\n loop = slider.getAttribute('data-loop') === 'true';\n lazyload = slider.getAttribute('data-lazyload') === 'true';\n\n slideBy = slider.getAttribute('data-slide-by');\n slideBy = (slideBy === 'page') ? 'page' : parseInt(slideBy);\n\n tns({\n container: slider,\n slideBy: slideBy,\n loop: loop,\n lazyload: lazyload,\n autoplay: autoplay,\n autoplayTimeout: autoplayTimeout,\n autoplayHoverPause: autoplayHoverPause,\n speed: speed,\n gutter: gutter,\n nav: showDots,\n controls: showArrows,\n controlsContainer: controls ? controls : false,\n edgePadding: 0,\n items: mobile,\n responsive: {\n 600: {items: tablet},\n 1000: {items: desktop},\n 1200: {items: wideScreen},\n 1500: {items: fullHD},\n 1921: {items: highScreen}\n }\n });\n }\n }\n\n\n <?php\n }", "function sb_slideshow_options_meta() {\n\tglobal $post, $sb_slideshow_interface;\n\n\t$pause = get_post_meta( $post->ID, 'pause', true );\n\t$opacity = get_post_meta( $post->ID, 'opacity', true );\n\t$effect = get_post_meta( $post->ID, 'effect', true );\n\t$control = get_post_meta( $post->ID, 'control', true );\n\t$size = get_post_meta( $post->ID, 'size', true );\n\t\n\t$size_custom = get_post_meta( $post->ID, 'size_custom', true );\n\t$size_custom = ( is_array( $size_custom ) ) ? $size_custom : array( 'width' => 0, 'height' => 0 );\n\t\n\t$ssorri = get_post_meta($post->ID, 'ssorri', true);\n\t?>\n\n <p><strong><?php _e('Shortcode Output', 'startbox'); ?></strong></p>\n <p><?php _e('Should slides be used for a slideshow or single, random image?', 'startbox'); ?></p>\n <p id=\"slideshow_radio_buttons\">\n <?php //foreach($slideshow_or_random_image as $key => $value) { echo sb_slideshow_radio($key, $value, 'ssorri', ($ssorri == '' ? 'slideshow_on' : $ssorri)); } ?>\n <?php foreach ($sb_slideshow_interface['ssorris'] as $key => $value) echo sb_slideshow_radio( $key, $value, 'ssorri', ($ssorri == '' ? 'slideshow_on' : $ssorri) ); ?>\n </p>\n\n\t<p><strong><?php _e( 'Slideshow Size', 'startbox' ); ?></strong></p>\n\t<p id=\"size_radio_buttons\">\n\t<?php foreach ($sb_slideshow_interface['sizes'] as $key => $value) echo sb_slideshow_radio( $key, $value, 'size', ($size == '' ? 'min' : $size) ); ?>\n\t<span id=\"custom_size\" class=\"hide-if-js\">\n\t<label for=\"custom_width\"><?php _e( 'Width', 'startbox' ); ?></label>\n\t\t<input type=\"text\" id=\"custom_width\" class=\"pixelfield\" name=\"sb_size_custom[width]\"\n\t\t\tvalue=\"<?php echo esc_attr( $size_custom['width'] ); ?>\" /> <code>px</code>\n\t<label for=\"custom_height\"><?php _e( 'Height', 'startbox' ); ?></label>\n\t\t<input type=\"text\" id=\"custom_height\" class=\"pixelfield\" name=\"sb_size_custom[height]\"\n\t\t\tvalue=\"<?php echo esc_attr( $size_custom['height'] ); ?>\" /> <code>px</code>\n\t</span>\n\t</p>\n\t<div id=\"slideshow_on_options\">\n\t<p><strong><?php _e( 'Pause Timer', 'startbox' ); ?></strong></p>\n\t<p><?php _e( 'How long, in miliseconds, to pause on a slide before transitioning.', 'startbox' ); ?></p>\n\t<p><input type=\"text\" size=\"4\" name=\"sb_pause\"\n\t\tvalue=\"<?php echo esc_attr( ($pause == '' ? $sb_slideshow_interface['pause'] : $pause) ); ?>\" /> <code><?php _e( 'miliseconds', 'startbox' ); ?></code></p>\n\n\t<p><strong><?php _e( 'Caption Opacity', 'startbox' ); ?></strong></p>\n\t<p><?php _e( 'How opaque to make the slide caption.', 'startbox' ); ?></p>\n\t<p><input type=\"text\" size=\"4\" name=\"sb_opacity\"\n\t\tvalue=\"<?php echo esc_attr( ($opacity == '' ? $sb_slideshow_interface['opacity'] : $opacity) ); ?>\" /> <code><?php _e( '1 = 100%. Default: 0.8.', 'startbox' ); ?></code></p>\n<?php\n\tif( isset( $sb_slideshow_interface['transitions'] ) &&\n\t\tis_array( $sb_slideshow_interface['transitions'] ) &&\n\t\tcount( $sb_slideshow_interface['transitions'] ) > 0 ) :\n?>\n\t\t<p><strong><?php _e( 'Transition Effects', 'startbox' ); ?></strong></p>\n\t\t<p><?php _e( 'If no transition effect is checked, all effects will be used at random.', 'startbox' ); ?></p>\n\t\t<p><?php foreach ($sb_slideshow_interface['transitions'] as $option) echo sb_slideshow_checkbox( $option, $option, 'effect', $effect ); ?></p>\n<?php\n\tendif;\n\n\tif( isset( $sb_slideshow_interface['controls'] ) &&\n\t\tis_array( $sb_slideshow_interface['controls'] ) &&\n\t\tcount( $sb_slideshow_interface['controls'] ) > 0 ) :\n?>\n\t\t<p><strong><?php _e( 'Show', 'startbox' ); ?></strong></p>\n\t\t<p><?php foreach ($sb_slideshow_interface['controls'] as $key => $value)\n\t\t\techo sb_slideshow_checkbox( $key, $value, 'control', $control ); ?></p>\n </div>\n<?php\n\tendif;\n}", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\n $nav = $settings['nav'];\n $dots = $settings['dots'];\n $autoplay = $settings['autoplay'];\n $loop = $settings['loop'];\n $autoplayTimeout = $settings['autoplayTimeout'];\n $mouseDrag = $settings['mouseDrag'];\n $touchDrag = $settings['touchDrag'];\n\n $this->add_render_attribute(\n 'slider-wrapper',\n [\n 'class' => 'pnw-slider-wrapper',\n 'data-nav' => $nav,\n 'data-dots' => $dots,\n 'data-autoplay' => $autoplay,\n 'data-loop' => $loop,\n 'data-autoplay-timeout' => $autoplayTimeout,\n 'data-mouse-drag' => $mouseDrag,\n 'data-touch-drag' => $touchDrag\n ]\n );\n\n $args = array(\n\t\t\t'numberposts' => $settings['item_per_page'],\n\t\t\t'post_type' => 'listing'\n\t\t);\n \n ?>\n\t\t\t<div <?php echo $this->get_render_attribute_string('slider-wrapper'); ?>>\n\t\t\t\t<?php\n\t\t\t\t\t$recents = wp_get_recent_posts($args);\n\n if (is_array($recents) || is_object($recents) ) {\n\n\t\t\t\t\tforeach($recents as $recent) { \n $price = get_post_meta( $recent['ID'], 'lcf_PriceList', true );\n\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"listing-cont\">\n <a href=\"<?php echo get_post_permalink( $recent['ID'] ); ?>\">\n <img src=\"<?php echo get_the_post_thumbnail_url( $recent['ID'] ); ?>\" alt=\"<?php echo get_the_title( $recent['ID'] ); ?>\"></a>\n <a href=\"<?php echo get_post_permalink( $recent['ID'] ); ?>\">\n <h3 class=\"list-address\"><?php echo get_the_title( $recent['ID'] ); ?></h3></a>\n <a href=\"<?php echo get_post_permalink( $recent['ID'] ); ?>\">\n <h4 class=\"list-price\"> <?php echo $price; ?></h4></a>\n </div>\n\t\t\t\t\t<?php } \n } ?>\n\t\t\t</div>\n\n \t\t<?php\t\n\t}", "function getDefaultSlideshow($width, $height) \n {\n $options = $this->_options['slideshow']['advanced'];\n $options['slideshow'] = get_option('home').'/?theme-constructor=slideshow&w='.$width.'&h='.$height;\n// $options['thumbPath'] = CONSTRUCTOR_DIRECTORY_URI.\"/libs/timthumb.php?src=\";\n $options = json_encode($options);\n \n echo '<div class=\"wp-sl\"></div>';\n wp_enqueue_script('constructor-slideshow', CONSTRUCTOR_DIRECTORY_URI.'/js/jquery.wp-slideshow.js', array('jquery'));\n wp_print_scripts('constructor-slideshow');\n echo \"\n <script type='text/javascript'>\n /* <![CDATA[ */\n var wpSl = $options;\n /* ]]> */\n </script>\";\n }", "function theme_views_slideshow_thumbnailhover_controls($vss_id, $view, $options) {\n $classes = array(\n 'views_slideshow_thumbnailhover_controls',\n 'views_slideshow_controls',\n );\n\n $attributes['class'] = implode(' ', $classes);\n\n $attributes['id'] = \"views_slideshow_thumbnailhover_controls_\" . $vss_id;\n $attributes = drupal_attributes($attributes);\n\n $output = \"<div$attributes>\";\n $output .= theme('views_slideshow_thumbnailhover_control_previous', $vss_id, $view, $options);\n if ($options['views_slideshow_thumbnailhover']['timeout']) {\n $output .= theme('views_slideshow_thumbnailhover_control_pause', $vss_id, $view, $options);\n }\n $output .= theme('views_slideshow_thumbnailhover_control_next', $vss_id, $view, $options);\n $output .= \"</div>\\n\";\n return $output;\n}", "function mySlider(){\n\t// $slider['images'] = ['glavnii' => [\n\t// ['img' => '1.jpg', 'title' => 'Праздник дня рождения', 'text' => 'Веселые ребята и их родители с нашими аниматорами'],\n\t// ['img' => '2.jpg', 'title' => 'Праздник дня рождения', 'text' => 'Веселые ребята и их родители с нашими аниматорами'],\n\t// ['img' => '3.jpg', 'title' => 'Праздник дня рождения', 'text' => 'Веселые ребята и их родители с нашими аниматорами'],\n\t// ]];\n\t// setOption('MySliders', $slider, true);\n\tinclude 'settings.php';\n}", "function ud_update_woo_flexslider_options($options) {\n\n\t// $options['sync'] = '.flex-control-thumbs';\n\n\t// $options['animation'] = 'slide';\n\t// $options['animationLoop'] = true;\n\n\t// $options['controlNav'] = 'thumbnails';\n\t// // show arrows\n\t// $options['directionNav'] = true;\n\t// $options['animation'] = \"slide\";\n\n\t// autoplay (work with only slideshow too)\n\t// $options['slideshow'] = true;\n\t// $options['autoplay'] = true;\n\n\t// control par texte (boolean) ou bien par vignettes\n\t// $options['controlNav'] = true;\n\t// $options['controlNav'] = \"thumbnails\";\n\n\t// $options['mousewheel'] = true;\n\t// $columns = 5; // change this to 2, 3, 5, etc. Default is 4.\n\t// $wrapper_classes[2] = 'woocommerce-product-gallery--columns-' . absint($columns);\n\n\t// return $options;\n\t// show arrows\n\t$options['directionNav'] = true;\n\t// $options['animation'] = \"slide\";\n\n\t// infinite loop\n\t// $options['animationLoop'] = true;\n\n\t// autoplay (work with only slideshow too)\n\t// $options['slideshow'] = false;\n\t// $options['autoplay'] = false;\n\n\t// control par texte (boolean) ou bien par vignettes\n\t// $options['controlNav'] = true;\n\t// $options['controlNav'] = \"thumbnails\";\n\n\t// $options['mousewheel'] = true;\n\n\t// $options['itemWidth'] = 350;\n\t// $options['itemHeight'] = 350;\n\n\t$options['prevText'] = '<i class=\"fal fa-arrow-right\"></i>';\n\t$options['nextText'] = '<i class=\"fal fa-arrow-left\"></i>';\n\n\treturn $options;\n}", "function add_slider_settings() {\n\t\t?>\n\t\t<script type=\"text/html\" id=\"tw-sliders-gallery-settings\">\n\t\t\t<div class=\"tw-sliders-slider-settings\">\n\t\t\t\t<h3><?php _e('Slider Settings','tw-sliders'); ?></h3>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\t\t\t\t\t\n\t\t\t\t\t<input type=\"hidden\" class=\"uid\" data-setting=\"uid\" value=\"0\" />\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Image width','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"width\" data-setting=\"width\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-image-width'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Image height','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"height\" data-setting=\"height\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-image-height'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<?php if($this->transitions) { ?>\n\t\t\t\t\t<label class=\"setting\">\n\n\t\t\t\t\t\t<span><?php _e('Transition','tw-sliders'); ?></span>\n\n\t\t\t\t\t\t<select class=\"transition\" data-setting=\"transition\">\n\t\t\t\t\t\t\t<option value=\"inherit\" selected><?php _e( 'Current setting', 'tw-sliders' ); ?></option>\n\n\t\t\t\t\t\t\t<?php foreach( $this->transitions as $transition => $label ) { ?>\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $transition; ?>\">\n\t\t\t\t\t\t\t\t\t<?php echo $label; ?>\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t\t</select>\n\n\t\t\t\t\t</label>\n\t\t\t\t<?php } ?>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Speed (ms)','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"speed\" data-setting=\"speed\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-speed'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Timeout (ms)','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"timeout\" data-setting=\"timeout\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-timeout'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<?php if($this->navigation) : ?>\n\t\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t\t<span><?php _e('Navigation','tw-sliders'); ?></span>\n\t\t\t\t\t\t<select class=\"navigation\" data-setting=\"navigation\">\n\t\t\t\t\t\t\t<option value=\"inherit\" selected><?php _e('Current setting','tw-sliders'); ?></option>\n\t\t\t\t\t\t\t<?php foreach($this->navigation as $navigate=>$meta) : ?>\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $navigate; ?>\"><?php echo $meta['name']; ?></option>\n\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</label>\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\t\t</script>\n\t\t<?php\n\t}", "public function builder_additional_styles() { ?>\n\n <style id=\"cv-builder-cv_section-module\">\n .cv-module-cv_section .cv-sidebar-representation {\n display: none;\n }\n @media (min-width: 800px) {\n .cv-module-cv_section:not(.sidebar_layout-no-sidebar) > .cv-sidebar-representation {\n display: block;\n position: absolute;\n top: 0; bottom: 0;\n margin: auto 0;\n height: 35px;\n line-height: 35px;\n width: 125px;\n text-align: center;\n font-weight: 400;\n font-size: 14px;\n color: #999;\n }\n .cv-module-cv_section:not(.sidebar_layout-no-sidebar) > .cv-module-content {\n min-height: 185px;\n }\n .cv-module-cv_section.sidebar_layout-sidebar-left > .cv-module-content {\n border-left: 125px solid #eee !important;\n }\n .cv-module-cv_section.sidebar_layout-sidebar-left > .cv-sidebar-representation {\n left: 0;\n }\n .cv-module-cv_section.sidebar_layout-sidebar-right > .cv-module-content {\n border-right: 125px solid #eee !important;\n }\n .cv-module-cv_section.sidebar_layout-sidebar-right > .cv-sidebar-representation {\n right: 0;\n }\n html:not([dir=\"rtl\"]) .cv-module-cv_section.sidebar_layout-sidebar-right > .cv-module-content {\n -webkit-border-radius: 0px 3px 3px 0px;\n border-radius: 0px 3px 3px 0px;\n }\n html:not([dir=\"rtl\"]) .cv-module-cv_section.sidebar_layout-sidebar-left > .cv-sidebar-representation {\n left: 35px;\n }\n html[dir=\"rtl\"] .cv-module-cv_section.sidebar_layout-sidebar-left > .cv-module-content {\n -webkit-border-radius: 3px 0px 0px 3px;\n border-radius: 3px 0px 0px 3px;\n }\n html[dir=\"rtl\"] .cv-module-cv_section.sidebar_layout-sidebar-right > .cv-sidebar-representation {\n right: 35px;\n }\n }\n </style>\n\n <?php }", "function frontpageSlideshow_CSS($options,$fslast) {\n/*?>\n<!-- added by plugin FrontpageSlideshow -->\n<!--[if IE]>\n\t<style type=\"text/css\">\n\t\t#fs-text { filter: alpha(opacity=<?php echo str_replace('%','',$options['values']['fs_text_opacity'])?>); }\n\t</style>\n<![endif]-->\n<?php*/ ob_start(); ?>\n#fs-main {\n\twidth: <?php echo $options['values']['fs_main_width']?>!important;\n\theight: <?php echo $options['values']['fs_main_height']?>!important;\n\tborder: 1px solid <?php echo $options['values']['fs_main_border_color']?>;\n<?php\nif ($options['values']['fs_rounded']) {\n?>\n\t-moz-border-radius: 5px;\n\t-khtml-border-radius: 5px;\n\t-webkit-border-radius: 5px;\n\tborder-radius: 5px;\n<?php\n}\n?>\n\toverflow: hidden;\n\tbackground: <?php echo $options['values']['fs_main_color']?> <?php \n\t\t\t\tif ($options['values']['fs_main_background_image'] != '' && $options['values']['fs_main_background_image'] != 'none') {\n\t\t\t\t\t$url = $options['values']['fs_main_background_image'];\n\t\t\t\t\t(is_ssl()) ? $url = str_replace('http://','https://',$url) : $url = str_replace('https://','http://',$url); echo 'url('.$url.')';\n\t\t\t\t} else {\n\t\t\t\t\techo 'none';\n\t\t\t\t}\n\t\t\t ?> repeat scroll center center!important;\n\tcolor: <?php echo $options['values']['fs_font_color']?>;\n\tfont-family: Verdana, Sans, Helvetica, Arial, sans-serif!important;\n\ttext-align: left;\n}\n\n#fs-slide {\n\tfloat: <?php if ($options['values']['fs_buttons_position']=='right') echo 'left'; else echo 'right'; ?>;\n\twidth: <?php if ($options['values']['fs_show_buttons']) echo $options['values']['fs_slide_width']; else echo '100%'; ?>;\n\theight: 100%;\n<?php\nif ($options['values']['fs_rounded']) {\n?>\n\t-moz-border-radius: 5px;\n\t-khtml-border-radius: 5px;\n\t-webkit-border-radius: 5px;\n\tborder-radius: 5px;\n<?php\n}\n?>}\n#fs-picture {\n\twidth: 100%;\n\theight: 100%;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-image: url(<?php\n\t\t\t\t\tif ($options['values']['fs_loader_image'] != '') {\n\t\t\t\t\t\t$url = $options['values']['fs_loader_image'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$url = get_bloginfo('url').'/wp-content/plugins/frontpage-slideshow/images/loading_black.gif';\n\t\t\t\t\t}\n\t\t\t\t\t(is_ssl()) ? $url = str_replace('http://','https://',$url) : $url = str_replace('https://','http://',$url); echo $url ?>);\n<?php\nif ($options['values']['fs_rounded']) {\n?>\n\t-moz-border-radius: 5px;\n\t-khtml-border-radius: 5px;\n\t-webkit-border-radius: 5px;\n\tborder-radius: 5px;\n<?php\n}\n?>}\n#fs-placeholder {\n\theight: <?php echo $options['values']['fs_placeholder_height']?>;\n}\n#fs-placeholder a {\n\tdisplay: block;\n\theight: 100%;\n\twidth: 100%;\n\ttext-decoration: none;\n\tcolor: transparent;\n\tborder: none;\n}\n#fs-placeholder a:hover {\n\ttext-decoration: none;\n}\n#fs-text {\n<?php if ($options['values']['fs_show_comment']) {?>\n\topacity: <?php echo intval(str_replace('%','',$options['values']['fs_text_opacity'])) / 100; ?>;\n\tbackground-color: <?php echo $options['values']['fs_text_bgcolor']?>;\n\t/*margin-top: 10px;*/\n\tpadding: 10px;\n<?php } else { ?>\n\tdisplay: none;\n<?php } ?>\n}\n#fs-text a {\n\tcolor: #c0e7f8;\n\ttext-decoration: underline;\n}\n#fs-text a:visited {\n\tcolor: #99fbac;\n\ttext-decoration: underline;\n}\n#fs-title {\n\tfont-weight: bold;\n\tfont-size: 14px!important;\n\tline-height: 1.1em;\n\tmargin-bottom: 0.25em;\n\tfont-family: Verdana, Sans, Helvetica, Arial, sans-serif!important;\n}\n#fs-title a , #fs-title a:visited {\n\tcolor: <?php echo $options['values']['fs_font_color']?>;\n\ttext-decoration: none;\n}\n#fs-title a:hover {\n\ttext-decoration: underline;\n}\n.fs-title {\n\tfont-weight: bold;\n\tfont-size: 11px!important;\n\tline-height: 1.4em;\n\tmargin: 0!important;\n\tpadding: 5px 5px 0!important;\n\tmargin-bottom: 0.25em;\n\tfont-family: Verdana, Sans, Helvetica, Arial, sans-serif!important;\n}\n#fs-excerpt {\n\tfont-size: 14px!important;\n\tpadding-left: 10px;\n\tline-height: 1.4em;\n}\n.fs-comment {\n\tfont-size: 8px!important;\n\tline-height: 1.2em;\n\tfont-family: Verdana, Sans, Helvetica, Arial, sans-serif!important;\n\tpadding: 0 5px 5px!important;\n}\n#fs-main ul {\n\tdisplay: block;\n\tfloat: <?php echo $options['values']['fs_buttons_position']?>!important;\n\tclear: none!important;\n\tmargin: 0!important;\n\tpadding: 0!important;\n\twidth: <?php if ($options['values']['fs_slide_width']=='100%' || !$options['values']['fs_show_buttons']) echo '0'; else echo $options['values']['fs_buttons_width']?>!important;\n\theight: 100%;\n\tlist-style: none!important;\n\tbackground: <?php echo $options['values']['fs_ul_background_color']?> <?php \n\t\t\t\tif ($options['values']['fs_ul_background_image'] != '' && $options['values']['fs_ul_background_image'] != 'none') {\n\t\t\t\t\t$url = $options['values']['fs_ul_background_image'];\n\t\t\t\t\t(is_ssl()) ? $url = str_replace('http://','https://',$url) : $url = str_replace('https://','http://',$url); echo 'url('.$url.')';\n\t\t\t\t} else {\n\t\t\t\t\techo 'none';\n\t\t\t\t}\n\t\t\t ?> repeat scroll center center!important;\n<?php\nif ($options['values']['fs_rounded']) {\n?>\n\t-moz-border-radius: 5px;\n\t-khtml-border-radius: 5px;\n\t-webkit-border-radius: 5px;\n\tborder-radius: 5px;\n<?php\n}\n?>\tz-index: 99999;\n}\n#fs-main li {\n\tdisplay: block!important;\n\tpadding: 0!important;\n\tmargin: 0!important;\n\twidth: 100%!important;\n\theight: <?php\n\t// auto calculate the height of buttons\n\t$number = str_replace('px','',str_replace('%','',$fslast));\n\t$height = str_replace('px','',str_replace('%','',trim($options['values']['fs_main_height'])));\n\t\n\t$h = floor($height/$number);\n\t\n\techo $h.'px';\n\t?>!important;\n<?php\nif ($options['values']['fs_rounded']) {\n?>\n\t-moz-border-radius: 3px;\n\t-khtml-border-radius: 3px;\n\t-webkit-border-radius: 3px;\n\tborder-radius: 3px;\n<?php\n}\n?>\n\tcursor: pointer;\n}\n#fs-main li:before { content:\"\"; }\n#fs-main li:after { content:\"\"; }\n\n.fs-entry {\n\tbackground: <?php echo $options['values']['fs_button_normal_color']?> <?php \n\t\t\t\tif ($options['values']['fs_button_background_image'] != '' && $options['values']['fs_button_background_image'] != 'none') {\n\t\t\t\t\t$url = $options['values']['fs_button_background_image'];\n\t\t\t\t\t(is_ssl()) ? $url = str_replace('http://','https://',$url) : $url = str_replace('https://','http://',$url); echo 'url('.$url.')';\n\t\t\t\t} else {\n\t\t\t\t\techo 'none';\n\t\t\t\t}\n\t\t\t ?> repeat scroll center center!important;\n\tmargin: 0!important;\n\toverflow: hidden!important;\n}\n.fs-entry:hover {\n\tbackground: <?php echo $options['values']['fs_button_hover_color']?> <?php \n\t\t\t\tif ($options['values']['fs_button_hover_background_image'] != '' && $options['values']['fs_button_hover_background_image'] != 'none') {\n\t\t\t\t\t$url = $options['values']['fs_button_hover_background_image'];\n\t\t\t\t\t(is_ssl()) ? $url = str_replace('http://','https://',$url) : $url = str_replace('https://','http://',$url); echo 'url('.$url.')';\n\t\t\t\t} else {\n\t\t\t\t\techo 'none';\n\t\t\t\t}\n\t\t\t ?> repeat scroll center center!important;\n}\n.fs-current {\n\tbackground: <?php echo $options['values']['fs_button_current_color']?> <?php \n\t\t\t\tif ($options['values']['fs_current_button_background_image'] != '' && $options['values']['fs_current_button_background_image'] != 'none') {\n\t\t\t\t\t$url = $options['values']['fs_current_button_background_image'];\n\t\t\t\t\t(is_ssl()) ? $url = str_replace('http://','https://',$url) : $url = str_replace('https://','http://',$url); echo 'url('.$url.')';\n\t\t\t\t} else {\n\t\t\t\t\techo 'none';\n\t\t\t\t}\n\t\t\t ?> repeat scroll center center!important;\n}\n.fs-skip {\n\tposition: absolute!important;\n\ttop: -300000px!important;\n\twidth: 0!important;\n\theight: 0!important;\n}\n<?php\n$css = ob_get_contents();\ndefine('FS_CSS',$css);\nob_end_clean();\n}", "public function set_slider_slides($slides) {\n $this->slides_to_include = $slides;\n }", "public function sliders()\n {\n \n $this->data['main_title']='Sliders';\n $this->data['url_title']='Sliders';\n $param=[];\n $this->data['slider_details']=$this->settings->sliderList($param);\n $this->load->view('slider/manage_slider',$this->data);\n }", "function register_non_admin_styles(){\r\n\t\r\n\t\t$cp_page_xml = '';\r\n\t\t$slider_type = '';\r\n\t\r\n\t\tglobal $post,$post_id,$cp_page_xml,$slider_type;\r\n\t\t\r\n\t\t$cp_page_xml = get_post_meta($post_id,'page-option-item-xml', true);\r\n\t\t$slider_type = get_post_meta ( $post_id, \"page-option-top-slider-types\", true );\r\n\t\t\r\n\t\t\r\n\t\twp_enqueue_style( 'default-style', get_stylesheet_uri() ); //Default Stylesheet\r\n\t\t\r\n\t\t//Woo-commerce Required 2 Files\r\n\t\twp_enqueue_style('woocommerce_frontend_styles',CP_PATH_URL.'/frontend/css/woocommerce.css');\r\n\t\twp_enqueue_style('cp-woocommerce',CP_PATH_URL.'/frontend/css/wp-commerce.css');\r\n\t\t\r\n\t\t// Politicize Update Responsive file\r\n\t\twp_enqueue_style('cp-woocommerce',CP_PATH_URL.'/frontend/css/update-responsive.css');\r\n\r\n\t\t\r\n\t\t//Bx-slider scripts\r\n\t\twp_register_script('cp-bx-slider', CP_PATH_URL.'/frontend/js/bxslider.min.js', false, '1.0', true);\r\n\t\twp_enqueue_script('cp-bx-slider');\t\r\n\t\twp_register_script('jquery.bxslider', CP_PATH_URL.'/frontend/js/jquery.bxslider.js', false, '1.0', true);\r\n\t\twp_enqueue_script('jquery.bxslider');\t\r\n\t\t\r\n\t\t//wp_enqueue_style('cp_default',CP_PATH_URL.'/frontend/css/cp_default.css'); //Include Default Widgets and Other settings\r\n\t\twp_enqueue_style('cp-bootstrap',CP_PATH_URL.'/frontend/css/bootstrap.css'); //Bootstrap Grid\r\n\t\twp_enqueue_style('cp-bootstrap-res',CP_PATH_URL.'/frontend/css/bootstrap-responsive.css'); //Bootstrap responsive\r\n\t\twp_enqueue_style('cp-jplayer-res',CP_PATH_URL.'/frontend/css/jplayer.css'); //Bootstrap responsive\r\n\t\r\n\t\twp_enqueue_style('cp-fontAW',CP_PATH_URL.'/frontend/cp_font/css/font-awesome.css');\r\n\t\twp_enqueue_style('cp-fontAW',CP_PATH_URL.'/frontend/cp_font/css/font-awesome-ie7.css');\r\n\t\r\n\t\t$rtl_layout = '';\r\n\t\t$site_loader = '';\r\n\t\t$element_loader = '';\r\n\t\t//General Settings Values\r\n\t\t$cp_general_settings = get_option('general_settings');\r\n\t\tif($cp_general_settings <> ''){\r\n\t\t\t$cp_logo = new DOMDocument ();\r\n\t\t\t$cp_logo->loadXML ( $cp_general_settings );\r\n\t\t\t$rtl_layout = find_xml_value($cp_logo->documentElement,'rtl_layout');\r\n\t\t\t$site_loader = find_xml_value($cp_logo->documentElement,'site_loader');\r\n\t\t\t$element_loader = find_xml_value($cp_logo->documentElement,'element_loader');\r\n\t\t}\r\n\t\t\r\n\t\t//Responsive stylesheet\r\n\t\t\r\n\t\t\r\n\t\twp_deregister_style('woocommerce-general');\r\n\t\twp_deregister_style('woocommerce-layout');\r\n\t\twp_deregister_style('woocommerce_frontend_styles');\t\t\r\n\t\twp_deregister_style('events-manager');\t\t\r\n\t\r\n\t\t\r\n\t\twp_enqueue_style('cp-event-manager',CP_PATH_URL.'/frontend/css/event-manager.css'); //Event Manager\r\n\t\twp_enqueue_style('woocommerce_frontend_styles',CP_PATH_URL.'/frontend/css/woocommerce.css');\t\t\t\r\n\t\t//Call own css for prayer box\r\n\t\tif(function_exists('pb_includePublicCSS')){\r\n\t\t\twp_enqueue_style('cp-prayer-box',CP_PATH_URL.'/frontend/css/gd-praybox-sc.css'); //prayer Manager\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//RTL Layouts\r\n\t\tif($rtl_layout == 'enable'){\r\n\t\t\twp_enqueue_style('cp-rtl',CP_PATH_URL.'/rtl.css');\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Facebook Fan Page Script\r\n\t\tif(isset($post->ID)){\r\n\t\t\t$facebook_fan = '';\r\n\t\t\t$facebook_fan = get_post_meta ( $post->ID, \"page-option-item-facebook-selection\", true );\r\n\t\t\tif($facebook_fan == 'Yes'){$facebook_fan = 'facebook_fan';\r\n\t\t\t\twp_enqueue_style('style_810',CP_PATH_URL.'/frontend/css/style810.css');\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\t$maintenance_mode = get_themeoption_value('maintenance_mode','general_settings');\t\t\t\t\r\n\t\tif($maintenance_mode == 'enable'){\t\t\r\n\t\t\twp_enqueue_style('cp-countdown',CP_PATH_URL.'/frontend/css/jquery.countdown.css');\r\n\t\t}\r\n\r\n\t\t$twitter_feed = get_themeoption_value('twitter_feed','general_settings');\r\n\t\tif($twitter_feed == 'enable'){ \r\n\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/css/bxslider.css');\r\n\t\t}\r\n\r\n\t\tif(isset($post)){\r\n\t\t\t$content = strip_tags(get_the_content());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif ( has_shortcode( $post->post_content, 'event_counter_box' ) ) { \t\t\r\n\t\t\t\twp_enqueue_style('cp-countdown',CP_PATH_URL.'/frontend/css/jquery.countdown.css');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( has_shortcode( $post->post_content, 'slider' ) ) { \t\t\r\n\t\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/shortcodes/bxslider.css');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( has_shortcode( $post->post_content, 'counter_circle' ) ) { \t\t\r\n\t\t\t\twp_enqueue_style('cp-easy-chart',CP_PATH_URL.'/frontend/shortcodes/chart.css');\r\n\t\t\t}\r\n\r\n\t\t\tif ( has_shortcode( $post->post_content, 'counters_circle' ) ) { \t\t\r\n\t\t\t\twp_enqueue_style('cp-easy-chart',CP_PATH_URL.'/frontend/shortcodes/chart.css');\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Widget Active\r\n\t\tif(is_active_widget( '', '', 'twitter_widget')){\t\t\t\r\n\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/shortcodes/bxslider.css');\r\n\t\t}\r\n\t\r\n\t\tif( is_search() || is_archive() ){\r\n\t\t\r\n\t\t\twp_enqueue_style('cp-anything-slider',CP_PATH_URL.'/frontend/anythingslider/css/anythingslider.css');\r\n\t\r\n\t\t\r\n\t\r\n\t\t// Post post_type\r\n\t\t}else if( isset($post) && $post->post_type == 'post' || \r\n\t\t\tisset($post) && $post->post_type == 'event' ){\r\n\t\t\r\n\t\t\t\t// If using slider (flex slider)\t\r\n\t\t\t\tif(!is_home()){\r\n\t\t\t\t\t$thumbnail_types = '';\r\n\t\t\t\t\t$post_detail_xml = get_post_meta($post->ID, 'post_detail_xml', true);\r\n\t\t\t\t\tif($post_detail_xml <> ''){\r\n\t\t\t\t\t\t$cp_post_xml = new DOMDocument ();\r\n\t\t\t\t\t\t$cp_post_xml->loadXML ( $post_detail_xml );\r\n\t\t\t\t\t\t$thumbnail_types = find_xml_value($cp_post_xml->documentElement,'post_thumbnail');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif( $thumbnail_types == 'Slider'){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/css/bxslider.css');\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$event_detail_xml = get_post_meta($post->ID, 'event_detail_xml', true);\r\n\t\t\t\t\tif($event_detail_xml <> ''){\r\n\t\t\t\t\t\t$cp_event_xml = new DOMDocument ();\r\n\t\t\t\t\t\t$cp_event_xml->loadXML ( $event_detail_xml );\r\n\t\t\t\t\t\t$event_thumbnail = find_xml_value($cp_event_xml->documentElement,'event_thumbnail');\r\n\t\t\t\t\t\t//Call the CountDown Style\r\n\t\t\t\t\t\twp_enqueue_style('cp-countdown',CP_PATH_URL.'/frontend/css/jquery.countdown.css'); //Load Style\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t// Page post_type\r\n\t\t}else if( isset($post) && $post->post_type == 'page' ){\r\n\t\t\r\n\t\t\tglobal $post,$cp_page_xml, $slider_type, $cp_top_slider_type;\r\n\t\t\t$cp_page_xml = get_post_meta($post->ID,'page-option-item-xml', true);\r\n\t\t\t$cp_top_slider_switch = get_post_meta($post->ID,'page-option-top-slider-on', true);\r\n\t\t\t$slider_type = get_post_meta ( $post->ID, \"page-option-top-slider-types\", true );\r\n\t\t\t$cp_top_slider_type = get_post_meta($post->ID,'page-option-top-slider-types', true);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Layer Slider\r\n\t\t\tif(strpos($cp_page_xml,'<slider-type>Layer-Slider</slider-type>') > -1 || $slider_type == 'Layer-Slider'){\r\n\t\t\t\t//wp_enqueue_style('layerslider_js', CP_PATH_URL.'/frontend/css/layerslider.css');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If using carousel slider\r\n\t\t\tif(\tstrpos($cp_page_xml,'<slider-type>Flex-Slider</slider-type>') > -1 || $slider_type == 'Flex-Slider'){\r\n\t\t\t\t\r\n\t\t\t\twp_enqueue_style('cp-flex-slider',CP_PATH_URL.'/frontend/css/flexslider.css');\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t//Bx Slider Condition\r\n\t\t\tif(strpos($cp_page_xml,'<slider-type>Bx-Slider</slider-type>') > -1 || $slider_type == 'Bx-Slider' ){\r\n\t\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/css/bxslider.css');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strpos($cp_page_xml,'<Column>') > -1){\r\n\t\t\t\twp_enqueue_style('cp-easy-chart',CP_PATH_URL.'/frontend/shortcodes/chart.css');\r\n\t\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/shortcodes/bxslider.css');\r\n\t\t\t\twp_enqueue_style('cp-countdown',CP_PATH_URL.'/frontend/css/jquery.countdown.css');\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif( strpos($cp_page_xml,'<eventview>Calendar View</eventview>') > -1 ){\r\n\t\t\r\n\t\t\t\twp_enqueue_style('cp-calender-view', CP_PATH_URL.'/framework/javascript/fullcalendar/fullcalendar.css');\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t// If using filterable plugin\r\n\t\t\tif( strpos($cp_page_xml,'<show-filterable>') > -1 ){\r\n\t\t\t\r\n\t\t\t\twp_enqueue_style('cp-style-view', CP_PATH_URL.'/frontend/css/style_animate.css');\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If using filterable plugin\r\n\t\t\tif( strpos($cp_page_xml,'<filterable>Yes</filterable>') > -1 ){\r\n\t\t\t\r\n\t\t\t\twp_register_script('filterable', CP_PATH_URL.'/frontend/shortcodes/jquery-filterable.js', false, '1.0', true);\r\n\t\t\t\twp_enqueue_script('filterable');\r\n\t\t\t\t\r\n\t\t\t\twp_register_script('jquery-easing-1.3', CP_PATH_URL.'/frontend/js/jquery-easing-1.3.js', false, '1.0', true);\r\n\t\t\t\twp_enqueue_script('jquery-easing-1.3');\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If using Services\r\n\t\t\tif( strpos($cp_page_xml,'<service-widget-style>Circle-Icon</service-widget-style>') > -1 ){\r\n\t\t\t\r\n\t\t\t\twp_enqueue_style('circle-hover',CP_PATH_URL.'/frontend/css/circle-hover.css');\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If using Events\r\n\t\t\tif( strpos($cp_page_xml,'<Events>') > -1 ){\r\n\t\t\t\twp_enqueue_style('cp-countdown',CP_PATH_URL.'/frontend/css/jquery.countdown.css'); //Load Style\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If using NewsSlider\r\n\t\t\tif( strpos($cp_page_xml,'<News-Slider>') > -1 ){\r\n\t\t\t\r\n\t\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/css/bxslider.css');\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If using NewsSlider\r\n\t\t\tif( strpos($cp_page_xml,'<Client-Slider>') > -1 ){\r\n\t\t\t\r\n\t\t\t\twp_enqueue_style('cp-content-slider',CP_PATH_URL.'/frontend/css/content_slider_style.css');\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\tif( strpos($cp_page_xml,'<Portfolio>') > -1 || strpos($cp_page_xml,'<Portfolio-Gallery>') > -1){\r\n\t\t\t\r\n\t\t\t\twp_enqueue_style('prettyPhoto',CP_PATH_URL.'/frontend/css/prettyphoto.css');\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t// if using timeline\r\n\t\t\tif( strpos($cp_page_xml,'<Timeline>') > -1 ){\r\n\t\t\t\twp_enqueue_style('cp-bx-slider',CP_PATH_URL.'/frontend/css/bxslider.css');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if using timeline\r\n\t\t\tif( strpos($cp_page_xml,'<Woo-Products>') > -1 ){\r\n\t\t\t\twp_enqueue_style('cp-woocommerce',CP_PATH_URL.'/frontend/css/wp-commerce.css');\r\n\t\t\t\twp_enqueue_style('prettyPhoto',CP_PATH_URL.'/frontend/css/prettyphoto.css');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( strpos($cp_page_xml,'<Sermons>') > -1 || strpos($cp_page_xml,'<Gallery>') > -1 || strpos($cp_page_xml,'<Our-Team>') > -1 || strpos($cp_page_xml,'<News>') > -1 || strpos($cp_page_xml,'<Events>') > -1){\r\n\t\t\t\twp_enqueue_style('prettyPhoto',CP_PATH_URL.'/frontend/css/prettyphoto.css');\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( strpos($cp_page_xml,'<Woo-Products>') > -1 ){\r\n\t\t\t\t//WooCommerce Style\r\n\t\t\t\twp_enqueue_style('woocommerce_frontend_styles',CP_PATH_URL.'/frontend/css/woocommerce.css');\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$font_google = '';\r\n\t\t$font_size_normal = '';\r\n\t\t$menu_font_google = '';\r\n\t\t$fonts_array = '';\r\n\t\t$font_google_heading = '';\r\n\t\t$heading_h1 = '';\r\n\t\t$heading_h2 = '';\r\n\t\t$heading_h3 = '';\r\n\t\t$heading_h4 = '';\r\n\t\t$heading_h5 = '';\r\n\t\t$heading_h6 = '';\r\n\t\t$embed_typekit_code = '';\r\n\t\t$cp_typography_settings = get_option('typography_settings');\r\n\t\t\r\n\t\t//$dd = find_xml_node($logo_uploa_d,'logo_upload');\r\n\t\tif($cp_typography_settings <> ''){\r\n\t\t\t$cp_typo = new DOMDocument ();\r\n\t\t\t$cp_typo->loadXML ( $cp_typography_settings );\r\n\t\t\t$font_google = find_xml_value($cp_typo->documentElement,'font_google');\r\n\t\t\t$font_size_normal = find_xml_value($cp_typo->documentElement,'font_size_normal');\r\n\t\t\t$menu_font_google = find_xml_value($cp_typo->documentElement,'menu_font_google');\r\n\t\t\t$font_google_heading = find_xml_value($cp_typo->documentElement,'font_google_heading');\r\n\t\t\t$heading_h1 = find_xml_value($cp_typo->documentElement,'heading_h1');\r\n\t\t\t$heading_h2 = find_xml_value($cp_typo->documentElement,'heading_h2');\r\n\t\t\t$heading_h3 = find_xml_value($cp_typo->documentElement,'heading_h3');\r\n\t\t\t$heading_h4 = find_xml_value($cp_typo->documentElement,'heading_h4');\r\n\t\t\t$heading_h5 = find_xml_value($cp_typo->documentElement,'heading_h5');\r\n\t\t\t$heading_h6 = find_xml_value($cp_typo->documentElement,'heading_h6');\r\n\t\t\t$embed_typekit_code = find_xml_value($cp_typo->documentElement,'embed_typekit_code');\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Body Font Installing\r\n\t\tif(cp_get_font_type($font_google) == 'Google_Font'){\r\n\t\t\t//Google Font Body\r\n\t\t\tif($font_google <> ''){\r\n\t\t\t\twp_enqueue_style('googleFonts', get_google_font_url($font_google));\r\n\t\t\t}\t\r\n\t\t} else{\r\n\t\t\t//Adobe Edge Font (TypeKit) \r\n\t\t\tif($font_google <> ''){\r\n\t\t\t\twp_register_script( 'adobe-edge-font', \"http://use.edgefonts.net/\".$font_google.\".js\", false, '1.0', false);\r\n\t\t\t\twp_enqueue_script('adobe-edge-font');\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(cp_get_font_type($font_google_heading) == 'Google_Font'){\r\n\t\t\tif($font_google_heading <> ''){\t\t\t\t\r\n\t\t\t\twp_enqueue_style('googleFonts-heading', get_google_font_url($font_google_heading) );\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($font_google_heading <> ''){\r\n\t\t\t\twp_register_script( 'adobe-edge-heading', \"http://use.edgefonts.net/\".$font_google_heading.\".js\", false, '1.0', false);\r\n\t\t\t\twp_enqueue_script('adobe-edge-heading');\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Menu Font Installing\r\n\t\t//verify_google_menu($menu_font_google);\r\n\t\tif(cp_get_font_type($menu_font_google) == 'Google_Font'){\r\n\t\t\tif($menu_font_google <> ''){\r\n\t\t\t\twp_enqueue_style('menu-googleFonts-heading', get_google_font_url($menu_font_google));\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($menu_font_google <> ''){\r\n\t\t\t\twp_register_script( 'menu-edge-heading', \"http://use.edgefonts.net/\".$menu_font_google.\".js\", false, '1.0', false);\r\n\t\t\t\twp_enqueue_script('menu-edge-heading');\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "function register_cpt_slider() {\r\n\r\n $labels = array(\r\n 'name' => _x( 'Slider', 'slider' ),\r\n 'singular_name' => _x( 'Slider item', 'slider' ),\r\n 'add_new' => _x( 'Adicionar Slide', 'slider' ),\r\n 'add_new_item' => _x( 'Adicionar Slide', 'slider' ),\r\n 'edit_item' => _x( 'Editar Slide', 'slider' ),\r\n 'new_item' => _x( 'Novo Slide', 'slider' ),\r\n 'view_item' => _x( 'Ver Slide', 'slider' ),\r\n 'search_items' => _x( 'Procurar Slide', 'slider' ),\r\n 'not_found' => _x( 'Nenhum Slide encontrado', 'slider' ),\r\n 'not_found_in_trash' => _x( 'Nenhum Slide encontrado no lixo', 'slider' ),\r\n 'parent_item_colon' => _x( 'Slide Pai:', 'slider' ),\r\n 'menu_name' => _x( 'Slider', 'slider' ),\r\n );\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'hierarchical' => true,\r\n 'supports' => array('title', 'page-attributes', 'revisions'),\r\n 'taxonomies' => array('category','post_tag'),\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'menu_position' => 20,\r\n 'hierarchical' => true,\r\n 'show_in_nav_menus' => true,\r\n 'publicly_queryable' => true,\r\n 'exclude_from_search' => false,\r\n 'has_archive' => false,\r\n 'query_var' => true,\r\n 'can_export' => true,\r\n 'capability_type' => 'page'\r\n );\r\n\r\n register_post_type( 'slider', $args );\r\n}", "function rev_slider_shortcode($args, $mid_content = null){\n $zt_params = JComponentHelper::getParams('com_zt_layerslider');\n $js_defer = $zt_params->get('js_defer') ? 'defer=\"defer\"' : '';\n extract(shortcode_atts(array('alias' => ''), $args, 'zt_layerslider'));\n extract(shortcode_atts(array('settings' => ''), $args, 'zt_layerslider'));\n extract(shortcode_atts(array('order' => ''), $args, 'zt_layerslider'));\n\n if($settings !== '') $settings = json_decode(str_replace(array('({', '})', \"'\"), array('[', ']', '\"'), $settings) ,true);\n if($order !== '') $order = explode(',', $order);\n\n $sliderAlias = ($alias != '') ? $alias : ZTSliderFunctions::getVal($args,0);\n\n $gal_ids = check_for_shortcodes($mid_content); //check for example on gallery shortcode and do stuff\n\n ob_start();\n if(!empty($gal_ids)){ //add a gallery based slider\n $slider = ZTSliderOutput::putSlider($sliderAlias, '', $gal_ids);\n }else{\n $slider = ZTSliderOutput::putSlider($sliderAlias, '', array(), $settings, $order);\n }\n $content = ob_get_contents();\n ob_clean();\n ob_end_clean();\n\n if(!empty($slider)){\n // Do not output Slider if we are on mobile\n $disable_on_mobile = $slider->getParam(\"disable_on_mobile\",\"off\");\n if($disable_on_mobile == 'on'){\n $mobile = (strstr($_SERVER['HTTP_USER_AGENT'],'Android') || strstr($_SERVER['HTTP_USER_AGENT'],'webOS') || strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') ||strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad') || strstr($_SERVER['HTTP_USER_AGENT'],'Windows Phone') || wp_is_mobile()) ? true : false;\n if($mobile) return false;\n }\n\n $show_alternate = $slider->getParam(\"show_alternative_type\",\"off\");\n\n if($show_alternate == 'mobile' || $show_alternate == 'mobile-ie8'){\n if(strstr($_SERVER['HTTP_USER_AGENT'],'Android') || strstr($_SERVER['HTTP_USER_AGENT'],'webOS') || strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') ||strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad') || strstr($_SERVER['HTTP_USER_AGENT'],'Windows Phone') || wp_is_mobile()){\n $show_alternate_image = $slider->getParam(\"show_alternate_image\",\"\");\n return '<img class=\"tp-slider-alternative-image\" src=\"'.$show_alternate_image.'\" data-no-retina>';\n }\n }\n\n //handle slider output types\n echo \"<link rel='stylesheet' type='text/css' href='\".JUri::root(true) . '/administrator/components/com_zt_layerslider/assets/css/settings.css'.\"'>\";\n echo \"<script type='text/javascript' src='\".JUri::root(true) . '/administrator/components/com_zt_layerslider/assets/js/jquery.themepunch.tools.min.js'.\"' \".$js_defer.\" ></script>\";\n echo \"<script type='text/javascript' src='\".JUri::root(true) . '/administrator/components/com_zt_layerslider/assets/js/jquery.themepunch.revolution.min.js'.\"' \".$js_defer.\" ></script>\";\n echo $content;\n }else\n echo $content; //normal output\n\n }", "function wpvideocoach_dashboard_slider_content() {\r\n // Content of our Dashboard slider module\r\n\t$adminurl = admin_url('admin.php?page=wpvideocoach');\r\n\techo \"<div id='logo-slider-wrapper'><ul id='logo-slider'>\";\r\n echo wpvideocoach_videos_slider();\r\n\techo \"</ul></div><div id='dashboard-intro'><p>\" . wpvideocoach_dashboard_slider_introduction() . \"</p><p><a class='button' href='\" . $adminurl . \"'>Watch all videos</a></p></div>\";\r\n\techo wpvideocoach_video_link_color_slider();\r\n\techo \"<div class='clear'></div>\";\r\n}", "function admin_print_styles() {\n global $SlideDeckPlugin;\n\n wp_enqueue_style( \"{$this->namespace}-admin\" );\n\n if( $SlideDeckPlugin->is_plugin() ) {\n wp_enqueue_style( 'codemirror' );\n wp_enqueue_style( 'codemirror-theme-default' );\n wp_enqueue_style( 'jquery-minicolors' );\n }\n }", "public function styles() {\n\t\treturn apply_filters( 'tf_module_page_featured_image_styles', array(\n\t\t\t'tf_module_page_featured_image_container' => array(\n\t\t\t\t'label' => __( 'Image Container', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_page_featured_image',\n\t\t\t\t'basic_styling' => array( 'background', 'font', 'padding', 'margin', 'border' ),\n\t\t\t),\n\t\t\t'tf_module_page_featured_image_image' => array(\n\t\t\t\t'label' => __( 'Image', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_page_featured_image img',\n\t\t\t)\n\t\t) );\n\t}", "protected function image_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%', 'px', 'vw' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'vw' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image .wp-caption .widget-image-caption' => 'width: {{SIZE}}{{UNIT}}; display: inline-block;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Max Width', 'boostify' ) . ' (%)',\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .wp-caption-text' => 'max-width: {{SIZE}}{{UNIT}}; display: inline-block; width: 100%;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_panel_style',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::DIVIDER,\n\t\t\t\t'style' => 'thick',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'boostify' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'boostify' ),\n\t\t\t\t\t'double' => __( 'Double', 'boostify' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'boostify' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'boostify' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image_border_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '1',\n\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t'left' => '1',\n\t\t\t\t\t'right' => '1',\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs( 'image_effects' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'boostify' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image img',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'opacity_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image:hover img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters_hover',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image:hover img',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'background_hover_transition',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Transition Duration', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'transition-duration: {{SIZE}}s',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t}", "function wpbooklist_jre_carousel_frontend_ui_style() {\n wp_register_style( 'wpbooklist-carousel-frontend-ui', CAROUSEL_ROOT_CSS_URL.'carousel-frontend-ui.css' );\n wp_enqueue_style('wpbooklist-carousel-frontend-ui');\n}", "function soliloquy_custom_css_save_meta( $settings, $meta, $attach_id, $post_id ) {\n\n $settings['slider'][ $attach_id ]['custom_css_classes'] = isset( $meta['custom_css_classes'] ) ? $meta['custom_css_classes'] : '';\n return $settings;\n\n}", "public function ec_customizer_styles() {\n\t\t?>\n\t\t<style>\n\t\t\tli#customize-control-tribe_customizer-month_week_view-highlight_color,\n\t\t\tli#customize-control-tribe_customizer-photo_view-bg_color,\n\t\t\tli#customize-control-tribe_customizer-single_event-post_title_color {\n\t\t\t\topacity: 0.2;\n\t\t\t\tpointer-events: none;\n\t\t\t\tcursor: not-allowed;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}", "private function modifyPreviewModeSettings() {\n\t\t$params = $this->slider->getParams();\n\t\t$params['js_to_body'] = 'false';\n\n\t\t$this->slider->setParams( $params );\n\t}", "protected function livewireStyleDefinition()\n {\n return <<<'EOF'\n\n@livewireStyles\n\nEOF;\n }", "public function get_name(){\n return 'listslides';\n }", "function register_cpt_Slider() {\n\n $labels = array(\n 'name' => _x( 'Sliders', 'Slider' ),\n 'singular_name' => _x( 'Slider', 'Slider' ),\n 'add_new' => _x( 'Add New', 'Slider' ),\n 'add_new_item' => _x( 'Add New Slider', 'Slider' ),\n 'edit_item' => _x( 'Edit Slider', 'Slider' ),\n 'new_item' => _x( 'New Slider', 'Slider' ),\n 'view_item' => _x( 'View Slider', 'Slider' ),\n 'search_items' => _x( 'Search Sliders', 'Slider' ),\n 'not_found' => _x( 'No Sliders found', 'Slider' ),\n 'not_found_in_trash' => _x( 'No Sliders found in Trash', 'Slider' ),\n 'parent_item_colon' => _x( 'Parent Slider:', 'Slider' ),\n 'menu_name' => _x( 'Sliders', 'Slider' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'description' => 'Customer Sliders',\n 'supports' => array( 'title'),\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-images-alt2',\n 'show_in_nav_menus' => true,\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'has_archive' => false,\n 'query_var' => true,\n 'can_export' => true,\n 'rewrite' => true,\n 'capability_type' => 'post'\n );\n\n register_post_type( 'Slider', $args );\n}", "function acf_slideshow_shortcode( $atts ) {\n\n\t// Attributes\n\textract( shortcode_atts(\n\t\tarray(\n\t\t\t'id' => '',\n\t\t), $atts )\n\t);\n\n\t// check if the repeater field has rows of data\n\tif( have_rows('slideshow', $id) ):\n\t\t$return = '<div class=\"flexslider\"><ul class=\"slides\">';\n\t\t// loop through the rows of data\n\t\twhile ( have_rows('slideshow', $id) ) : the_row();\n\t\t\t// get all the subfields for each slide\n\t\t\t$return .= '<li>';\n\t\t\t// Link\n\t\t\tif (get_sub_field('link_type') == 'Internal' && get_sub_field('link') != '') {\n\t\t\t\t$link = get_sub_field('link');\n\t\t\t} elseif (get_sub_field('link_type') == 'External' && get_sub_field('external_link') != '') {\n\t\t\t\t$link = get_sub_field('external_link');\n\t\t\t}\n\t\t\tif ($link != '') $return .= '<a href=\"'.$link.'\">';\n\t\t\t$image = get_sub_field('image');\n\t\t\tif( !empty($image) ): \n\n\t\t\t\t// vars\n\t\t\t\t$alt = $image['alt'];\n\n\t\t\t\t// thumbnail\n\t\t\t\t$size = 'slideshow';\n\t\t\t\t$thumb = $image['sizes'][ $size ];\n\t\t\t\t$width = $image['sizes'][ $size . '-width' ];;\n\t\t\t\t$height = $image['sizes'][ $size . '-height' ];\n\t\t\t\t\n\t\t\t\t$return .= '<div class=\"img-container\"><img src=\"'.$thumb.'\" alt=\"'.$alt.'\" width=\"'.$width.'\" height=\"'.$height.'\" /></div>';\n\t\t\t\t\n\t\t\tendif;\n\t\t\t$return .= '<div class=\"container--relative\">';\n\t\t\t$return .= '<div class=\"slide-caption\">';\n\t\t\tif (get_sub_field('caption')) $return .= '<h3 class=\"section-header--home\">'.get_sub_field('caption').'</h3>';\n\t\t\tif (get_sub_field('description')) $return .= '<h4>'.get_sub_field('description').'</h4>';\n\t\t\t$return .= '</div>'; //slide-caption\n\t\t\t$return .= '</div>'; //container\n\n\n\t\t\tif ($link != '') $return .= '</a>';\n\t\t\t$return .= '</li>';\n\t\tendwhile;\n\t\t$return .= '</ul></div>';\n\telse :\n\t\t// no rows found\n\t\t$return .= 'No slides found.';\n\tendif;\n\treturn $return;\n}", "function vcex_image_galleryslider_vc_map() {\n\tvc_map( array(\n\t\t'name' => __( 'Gallery Slider', 'wpex' ),\n\t\t'description' => __( 'Image slider with thumbnail navigation', 'wpex' ),\n\t\t'base' => 'vcex_image_galleryslider',\n\t\t'category' => WPEX_THEME_BRANDING,\n\t\t//'deprecated' => '3.0.0',\n\t\t'icon' => 'vcex-image-gallery-slider vcex-icon fa fa-picture-o',\n\t\t'params' => array(\n\t\t\t// Images\n\t\t\tarray(\n\t\t\t\t'type' => 'attach_images',\n\t\t\t\t'admin_label' => true,\n\t\t\t\t'heading' => __( 'Attach Images', 'wpex' ),\n\t\t\t\t'param_name' => 'image_ids',\n\t\t\t\t'description' => __( 'You can display captions by giving your images a caption and you can also display videos by adding an image that has a Video URL defined for it.', 'wpex' ),\n\t\t\t\t'group' => __( 'Images', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Post Gallery', 'wpex' ),\n\t\t\t\t'param_name' => 'post_gallery',\n\t\t\t\t'group' => __( 'Images', 'wpex' ),\n\t\t\t\t'description' => __( 'Enable to display images from the current post \"Image Gallery\".', 'wpex' ),\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'No', 'wpex' ) => '',\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t// General\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Visibility', 'wpex' ),\n\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t'value' => array_flip( wpex_visibility() ),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Randomize', 'wpex' ),\n\t\t\t\t'param_name' => 'randomize',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'No', 'wpex' ) => 'false',\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Unique Id', 'wpex' ),\n\t\t\t\t'param_name' => 'unique_id',\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Custom Classes', 'wpex' ),\n\t\t\t\t'param_name' => 'classes',\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Animation', 'wpex' ),\n\t\t\t\t'param_name' => 'animation',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Slide', 'wpex' ) => 'slide',\n\t\t\t\t\t__( 'Fade', 'wpex' ) => 'fade_slides',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Loop', 'wpex' ),\n\t\t\t\t'param_name' => 'loop',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'No', 'wpex' ) => '',\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Auto Height Animation', 'wpex' ),\n\t\t\t\t'std' => '500',\n\t\t\t\t'param_name' => 'height_animation',\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t\t'description' => __( 'You can enter \"0.0\" to disable the animation completely.', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Animation Speed', 'wpex' ),\n\t\t\t\t'param_name' => 'animation_speed',\n\t\t\t\t'std' => '600',\n\t\t\t\t'description' => __( 'Enter a value in milliseconds.', 'wpex' ),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Auto Play', 'wpex' ),\n\t\t\t\t'param_name' => 'slideshow',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t\t__( 'No', 'wpex' ) => 'false',\n\t\t\t\t),\n\t\t\t\t'description' => __( 'Enable automatic slideshow? Disabled in front-end composer to prevent page \"jumping\".', 'wpex' ),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Auto Play Delay', 'wpex' ),\n\t\t\t\t'param_name' => 'slideshow_speed',\n\t\t\t\t'std' => '5000',\n\t\t\t\t'description' => __( 'Enter a value in milliseconds.', 'wpex' ),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t\t'dependency' => array( 'element' => 'slideshow', 'value' => 'true' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Arrows', 'wpex' ),\n\t\t\t\t'param_name' => 'direction_nav',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t\t__( 'No', 'wpex' ) => 'false',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Arrows on Hover', 'wpex' ),\n\t\t\t\t'param_name' => 'direction_nav_hover',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t\t__( 'No', 'wpex' ) => 'false',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Dot Navigation', 'wpex' ),\n\t\t\t\t'param_name' => 'control_nav',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t\t__( 'No', 'wpex' ) => 'false',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'General', 'wpex' ),\n\t\t\t),\n\t\t\t// Image\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Image Size', 'wpex' ),\n\t\t\t\t'param_name' => 'img_size',\n\t\t\t\t'std' => 'wpex_custom',\n\t\t\t\t'value' => vcex_image_sizes(),\n\t\t\t\t'group' => __( 'Image', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Image Crop Location', 'wpex' ),\n\t\t\t\t'param_name' => 'img_crop',\n\t\t\t\t'std' => 'center-center',\n\t\t\t\t'value' => array_flip( wpex_image_crop_locations() ),\n\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t'group' => __( 'Image', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Image Crop Width', 'wpex' ),\n\t\t\t\t'param_name' => 'img_width',\n\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t'group' => __( 'Image', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Image Crop Height', 'wpex' ),\n\t\t\t\t'param_name' => 'img_height',\n\t\t\t\t'description' => __( 'Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'wpex' ),\n\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t'group' => __( 'Image', 'wpex' )\n\t\t\t),\n\t\t\t// Thumbnails\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Columns', 'wpex' ),\n\t\t\t\t'param_name' => 'thumbnails_columns',\n\t\t\t\t'std' => '',\n\t\t\t\t'description' => __( 'This specific slider displays the thumbnails in \"rows\" if you want your thumbnails displayed under the slider as a carousel, use the \"Image Slider\" module instead.', 'wpex' ),\n\t\t\t\t'group' => __( 'Thumbnails', 'wpex' ),\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Default', 'wpex' ) => '',\n\t\t\t\t\t'6' => '6',\n\t\t\t\t\t'5' => '5',\n\t\t\t\t\t'4' => '4',\n\t\t\t\t\t'3' => '3',\n\t\t\t\t\t'2' => '2',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Image Crop Width', 'wpex' ),\n\t\t\t\t'param_name' => 'img_thumb_width',\n\t\t\t\t'value' => '',\n\t\t\t\t'description' => __( 'Enter a width in pixels for your thumbnail image width. This won\\'t increase the grid, its only used so you can alter the cropping to your preferred proportions.', 'wpex' ),\n\t\t\t\t'group' => __( 'Thumbnails', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Image Crop Height', 'wpex' ),\n\t\t\t\t'param_name' => 'img_thumb_height',\n\t\t\t\t'value' => '',\n\t\t\t\t'description' => __( 'Enter a width in pixels for your thumbnail image height.', 'wpex' ),\n\t\t\t\t'group' => __( 'Thumbnails', 'wpex' ),\n\t\t\t),\n\t\t\t// Caption\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Enable', 'wpex' ),\n\t\t\t\t'param_name' => 'caption',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'No', 'wpex' ) => 'false',\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Based On', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_type',\n\t\t\t\t'std' => 'caption',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Title', 'wpex' ) => 'title',\n\t\t\t\t\t__( 'Caption', 'wpex' ) => 'caption',\n\t\t\t\t\t__( 'Description', 'wpex' ) => 'description',\n\t\t\t\t\t__( 'Alt', 'wpex' ) => 'alt',\n\t\t\t\t),\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Visibility', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_visibility',\n\t\t\t\t'value' => array_flip( wpex_visibility() ),\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Style', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_style',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Black', 'wpex' ) => 'black',\n\t\t\t\t\t__( 'White', 'wpex' ) => 'white',\n\t\t\t\t),\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Rounded?', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_rounded',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'No', 'wpex' ) => '',\n\t\t\t\t\t__( 'Yes', 'wpex' ) => 'true',\n\t\t\t\t),\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Position', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_position',\n\t\t\t\t'std' => 'bottomCenter',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Bottom Center', 'wpex' ) => 'bottomCenter',\n\t\t\t\t\t__( 'Bottom Left', 'wpex' ) => 'bottomLeft',\n\t\t\t\t\t__( 'Bottom Right', 'wpex' ) => 'bottomRight',\n\t\t\t\t\t__( 'Top Center', 'wpex' ) => 'topCenter',\n\t\t\t\t\t__( 'Top Left', 'wpex' ) => 'topLeft',\n\t\t\t\t\t__( 'Top Right', 'wpex' ) => 'topRight',\n\t\t\t\t\t__( 'Center Center', 'wpex' ) => 'centerCenter',\n\t\t\t\t\t__( 'Center Left', 'wpex' ) => 'centerLeft',\n\t\t\t\t\t__( 'Center Right', 'wpex' ) => 'centerRight',\n\t\t\t\t),\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Show Transition', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_show_transition',\n\t\t\t\t'std' => 'up',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'None', 'wpex' ) => 'false',\n\t\t\t\t\t__( 'Up', 'wpex' ) => 'up',\n\t\t\t\t\t__( 'Down', 'wpex' ) => 'down',\n\t\t\t\t\t__( 'Left', 'wpex' ) => 'left',\n\t\t\t\t\t__( 'Right', 'wpex' ) => 'right',\n\t\t\t\t),\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Hide Transition', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_hide_transition',\n\t\t\t\t'std' => 'down',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'None', 'wpex' ) => 'false',\n\t\t\t\t\t__( 'Up', 'wpex' ) => 'up',\n\t\t\t\t\t__( 'Down', 'wpex' ) => 'down',\n\t\t\t\t\t__( 'Left', 'wpex' ) => 'left',\n\t\t\t\t\t__( 'Right', 'wpex' ) => 'right',\n\t\t\t\t),\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Width', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_width',\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'value' => '100%',\n\t\t\t\t'description' => __( 'Enter a pixel or percentage value. You can also enter \"auto\" for content dependent width.', 'wpex' ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Font-Size', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_font_size',\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Padding', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_padding',\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'description' => __( 'Please use the following format: top right bottom left.', 'wpex' ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Horizontal Offset', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_horizontal',\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t\t'description' => __( 'Please enter a px value.', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Vertical Offset', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_vertical',\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t\t'description' => __( 'Please enter a px value.', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Delay', 'wpex' ),\n\t\t\t\t'param_name' => 'caption_delay',\n\t\t\t\t'std' => '500',\n\t\t\t\t'dependency' => Array( 'element' => 'caption', 'value' => array( 'true' ) ),\n\t\t\t\t'group' => __( 'Caption', 'wpex' ),\n\t\t\t\t'description' => __( 'Enter a value in milliseconds.', 'wpex' ),\n\t\t\t),\n\t\t\t// Links\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Image Link', 'wpex' ),\n\t\t\t\t'param_name' => 'thumbnail_link',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'None', 'wpex' ) => 'none',\n\t\t\t\t\t__( 'Lightbox', 'wpex' ) => 'lightbox',\n\t\t\t\t\t__( 'Custom Links', 'wpex' ) => 'custom_link',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'Links', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'exploded_textarea',\n\t\t\t\t'heading' => __( 'Custom links', 'wpex' ),\n\t\t\t\t'param_name' => 'custom_links',\n\t\t\t\t'description' => __( 'Enter links for each slide here. Divide links with linebreaks (Enter). For images without a link enter a # symbol.', 'wpex' ),\n\t\t\t\t'dependency' => Array(\n\t\t\t\t\t'element' => 'thumbnail_link',\n\t\t\t\t\t'value' => array( 'custom_link' )\n\t\t\t\t),\n\t\t\t\t'group' => __( 'Links', 'wpex' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __('Custom link target', 'wpex' ),\n\t\t\t\t'param_name' => 'custom_links_target',\n\t\t\t\t'dependency' => Array(\n\t\t\t\t\t'element' => 'thumbnail_link',\n\t\t\t\t\t'value' => 'custom_link',\n\t\t\t\t),\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Same window', 'wpex' ) => 'self',\n\t\t\t\t\t__( 'New window', 'wpex' ) => '_blank'\n\t\t\t\t),\n\t\t\t\t'group' => __( 'Links', 'wpex' ),\n\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Lightbox Skin', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_skin',\n\t\t\t\t'value' => vcex_ilightbox_skins(),\n\t\t\t\t'group' => __( 'Links', 'wpex' ),\n\t\t\t\t'dependency' => Array(\n\t\t\t\t\t'element' => 'thumbnail_link',\n\t\t\t\t\t'value' => array( 'lightbox' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Lightbox Thumbnails Placement', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_path',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Horizontal', 'wpex' ) => 'horizontal',\n\t\t\t\t\t__( 'Vertical', 'wpex' ) => 'vertical',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'Links', 'wpex' ),\n\t\t\t\t'dependency' => Array(\n\t\t\t\t\t'element' => 'thumbnail_link',\n\t\t\t\t\t'value' => array( 'lightbox' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Lightbox Title', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_title',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'None', 'wpex' ) => 'none',\n\t\t\t\t\t__( 'Alt', 'wpex' ) => 'alt',\n\t\t\t\t\t__( 'Title', 'wpex' ) => 'title',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'Links', 'wpex' ),\n\t\t\t\t'dependency' => Array(\n\t\t\t\t\t'element' => 'thumbnail_link',\n\t\t\t\t\t'value' => array( 'lightbox' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Lightbox Caption', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_caption',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Enable', 'wpex' ) => 'enable',\n\t\t\t\t\t__( 'Disable', 'wpex' ) => 'false',\n\t\t\t\t),\n\t\t\t\t'group' => __( 'Links', 'wpex' ),\n\t\t\t\t'dependency' => Array(\n\t\t\t\t\t'element' => 'thumbnail_link',\n\t\t\t\t\t'value' => array( 'lightbox' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t// CSS\n\t\t\tarray(\n\t\t\t\t'type' => 'css_editor',\n\t\t\t\t'heading' => __( 'CSS', 'wpex' ),\n\t\t\t\t'param_name' => 'css',\n\t\t\t\t'group' => __( 'Design', 'wpex' ),\n\t\t\t),\n\n\t\t)\n\n\t) );\n}", "function carousel_slider($atts, $content = null){\n\textract(shortcode_atts(array(\n\t\t\"enable_slider\" => 'yes',\n\t\t\"hover_effect\" => 'hover-effect2',\n\t\t\"columns\" => 'col3',\n\t\t\"title_tag\" => 'h2',\n\t\t\"title\" => 'Our Team',\n\t\t\"type\" => '',\n\t\t\"auto_play\" => 'false',\n\t\t\"slide_duration\" => '',\n\t\t'animate' => '',\n\t\t'transition' => '',\n\t\t'duration' => '',\n\t\t'delay' => ''\n\t\t), $atts));\n\n\t$animate_class = \"\";\n\t$slideTransition = \"\";\n\t$animateDuration = \"\";\n\t$slideDelay = \"\";\n\n\tif($animate == \"Yes\"){\n\n\t\t$animate_class = ' pix-animate-cre';\n\n\t\t$slideTransition = isset($transition) ? ' data-trans=\"'. esc_attr($transition) .'\"' : '';\n\n\t\t$animateDuration = isset($duration) ? ' data-duration=\"'. $duration .'\"' : '';\n\n\t\t$slideDelay = isset($delay) ? ' data-delay=\"'. $delay .'\"' : '';\n\n\t}\n\n\t$sliderClassName = '';\n\t$slider = ($enable_slider == 'yes') ? 'fcsCarousel' : '';\n\n\t$autoPlay = ($auto_play == 'true') ? 'data-autoplay=\"'. esc_attr($auto_play) .'\"' : '';\n\t$slideDuration = isset($slide_duration) ? 'data-duration=\"'. esc_attr($slide_duration) .'\"' : '';\n\n\t$slider = ($enable_slider == 'yes') ? 'fcsCarousel' : '';\n\n\tif ($type == 'clients')\n\t\t$sliderClassName = 'ourClients';\n\telse if ($type == 'staffs')\n\t\t$sliderClassName = 'member';\t\n\t\n\t$output = '<section class=\"newSection container popup-gallery ' . $slider . ' '.$columns.' '. $sliderClassName .'\" '. $autoPlay .' '. $slideDuration .'>';\n $output .= '<'.$title_tag.' class=\"mainTitle'. esc_attr($animate_class) .'\"'. $slideTransition .' '. $animateDuration .' '. $slideDelay .'>'.esc_html($title).'</'.$title_tag.'>';\n $output .= '<div class=\"carousel-items-con '. $hover_effect .' featuredWorks\">';\n $output .= '<ul class=\"carousel-items\">';\n\t\n\t$output .= do_shortcode($content);\n\t\n\t$output .= '</ul>';\n\tif($enable_slider == 'yes'){\n\t\t$output .= '<div class=\"slider-nav\">';\n\t\t$output .= '<a href=\"#\" data-dir=\"prev\" class=\"slider-btn prevSlide\">&lsaquo;</a>';\n\t\t$output .= '<a href=\"#\" data-dir=\"next\" class=\"slider-btn nextSlide\">&rsaquo;</a>';\n\t\t$output .= '</div> ';\n\t}\n\t$output .= '</div>';\n\t$output .= '</section>';\n\treturn $output;\n}", "function slider_post_type() {\n $labels = [\n 'name' => 'Slider',\n 'singular_name' => 'Slider',\n 'add_new' => 'Add Item',\n 'all_item' => 'All Item',\n 'edit_item' => 'Edit Item',\n 'new_item' => 'New Item',\n 'view_item' => 'View Item',\n 'search_item' => 'Search Referens',\n 'not_found' => 'No item found',\n 'not_found_in_trash' => 'No item found in trash',\n 'parent_item_colon' => 'Parent Item'\n ];\n $args = [\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => true,\n 'publicly_queryable' => true,\n 'query-var' => true,\n 'rewrite' => true,\n 'hierarchical' => true,\n 'supports' => [\n 'title',\n 'editor',\n 'thumbnail',\n 'revisions',\n ],\n 'taxonomies' => ['category', 'post_tag'],\n 'menu_position' => 4,\n 'execlude_from_search' => false\n ];\n register_post_type('slider',$args);\n}", "public function get_title() {\n return __( 'ListSlides', 'elementor-listslides' );\n }", "public function putSliderBase( $sliderID ) {\n\n\t\ttry {\n\t\t\tself::$sliderSerial++;\n\n\t\t\t$this->slider = new RevSlider();\n\t\t\t$this->slider->initByMixed( $sliderID );\n\n\t\t\t$doWrapFromTemplate = false;\n\n\t\t\tif ( $this->slider->isSlidesFromPosts() && $this->slider->getParam( 'slider_template_id',false ) !== false ) { // need to use general settings from the Template Slider\n\t\t\t\t$this->slider->initByMixed( $this->slider->getParam( 'slider_template_id',false ) );\n\t\t\t\t$doWrapFromTemplate = $sliderID;\n\t\t\t}\n\n\t\t\t// modify settings for admin preview mode\n\t\t\tif ( $this->previewMode == true ) {\n\t\t\t\t$this->modifyPreviewModeSettings(); }\n\n\t\t\t// set slider language\n\t\t\t$isWpmlExists = UniteWpmlRev::isWpmlExists();\n\t\t\t$useWpml = $this->slider->getParam( 'use_wpml','off' );\n\t\t\tif (\t$isWpmlExists && $useWpml == 'on' ) {\n\t\t\t\tif ( $this->previewMode == false ) {\n\t\t\t\t\t$this->sliderLang = UniteFunctionsWPRev::getCurrentLangCode(); }\n\t\t\t}\n\n\t\t\t// edit html before slider\n\t\t\t$htmlBeforeSlider = '';\n\t\t\tif ( $this->slider->getParam( 'load_googlefont','false' ) == 'true' ) {\n\t\t\t\t$googleFont = $this->slider->getParam( 'google_font' );\n\t\t\t\tif ( is_array( $googleFont ) ) {\n\t\t\t\t\tforeach ( $googleFont as $key => $font ) {\n\t\t\t\t\t\t$htmlBeforeSlider .= RevOperations::getCleanFontImport( $font );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$htmlBeforeSlider .= RevOperations::getCleanFontImport( $googleFont );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// pub js to body handle\n\t\t\tif ( $this->slider->getParam( 'js_to_body','false' ) == 'true' ) {\n\t\t\t\t$operations = new RevOperations();\n\t\t\t\t$arrValues = $operations->getGeneralSettingsValues();\n\t\t\t\t$enable_logs = UniteFunctionsRev::getVal( $arrValues, 'enable_logs','off' );\n\n\t\t\t\tif ( $enable_logs == 'on' ) {\n\t\t\t\t\t$urlIncludeJS = UniteBaseClassRev::$url_plugin . 'rs-plugin/js/jquery.themepunch.enablelog.js?rev=' . GlobalsRevSlider::SLIDER_REVISION;\n\t\t\t\t\t$htmlBeforeSlider .= \"<script type='text/javascript' src='$urlIncludeJS'></script>\";\n\t\t\t\t}\n\n\t\t\t\t$urlIncludeJS = UniteBaseClassRev::$url_plugin . 'rs-plugin/js/jquery.themepunch.tools.min.js?rev=' . GlobalsRevSlider::SLIDER_REVISION;\n\t\t\t\t$htmlBeforeSlider .= \"<script type='text/javascript' src='$urlIncludeJS'></script>\";\n\t\t\t\t$urlIncludeJS = UniteBaseClassRev::$url_plugin . 'rs-plugin/js/jquery.themepunch.revolution.min.js?rev=' . GlobalsRevSlider::SLIDER_REVISION;\n\t\t\t\t$htmlBeforeSlider .= \"<script type='text/javascript' src='$urlIncludeJS'></script>\";\n\t\t\t}\n\n\t\t\t// the initial id can be alias\n\t\t\t$sliderID = $this->slider->getID();\n\n\t\t\t$bannerWidth = $this->slider->getParam( 'width',null,RevSlider::VALIDATE_NUMERIC,'Slider Width' );\n\t\t\t$bannerHeight = $this->slider->getParam( 'height',null,RevSlider::VALIDATE_NUMERIC,'Slider Height' );\n\n\t\t\t$sliderType = $this->slider->getParam( 'slider_type' );\n\n\t\t\t// set wrapper height\n\t\t\t$wrapperHeigh = 0;\n\t\t\t$wrapperHeigh += $this->slider->getParam( 'height' );\n\n\t\t\t// add thumb height\n\t\t\tif ( $this->slider->getParam( 'navigaion_type' ) == 'thumb' ) {\n\t\t\t\t$wrapperHeigh += $this->slider->getParam( 'thumb_height' );\n\t\t\t}\n\n\t\t\t$this->sliderHtmlID = 'rev_slider_' . $sliderID . '_' . self::$sliderSerial;\n\t\t\t$this->sliderHtmlID_wrapper = $this->sliderHtmlID . '_wrapper';\n\n\t\t\t$containerStyle = '';\n\n\t\t\t$sliderPosition = $this->slider->getParam( 'position','center' );\n\n\t\t\t// set position:\n\t\t\tif ( $sliderType != 'fullscreen' ) {\n\n\t\t\t\tswitch ( $sliderPosition ) {\n\t\t\t\t\tcase 'center':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$containerStyle .= 'margin:0px auto;';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'left':\n\t\t\t\t\t\t$containerStyle .= 'float:left;';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'right':\n\t\t\t\t\t\t$containerStyle .= 'float:right;';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// add background color\n\t\t\t$backgrondColor = trim( $this->slider->getParam( 'background_color' ) );\n\t\t\tif ( ! empty( $backgrondColor ) ) {\n\t\t\t\t$containerStyle .= \"background-color:$backgrondColor;\"; }\n\n\t\t\t// set padding\n\t\t\t$containerStyle .= 'padding:' . $this->slider->getParam( 'padding','0' ) . 'px;';\n\n\t\t\t// set margin:\n\t\t\tif ( $sliderType != 'fullscreen' ) {\n\n\t\t\t\tif ( $sliderPosition != 'center' ) {\n\t\t\t\t\t$containerStyle .= 'margin-left:' . $this->slider->getParam( 'margin_left','0' ) . 'px;';\n\t\t\t\t\t$containerStyle .= 'margin-right:' . $this->slider->getParam( 'margin_right','0' ) . 'px;';\n\t\t\t\t}\n\n\t\t\t\t$containerStyle .= 'margin-top:' . $this->slider->getParam( 'margin_top','0' ) . 'px;';\n\t\t\t\t$containerStyle .= 'margin-bottom:' . $this->slider->getParam( 'margin_bottom','0' ) . 'px;';\n\t\t\t}\n\n\t\t\t// set height and width:\n\t\t\t$bannerStyle = 'display:none;';\n\n\t\t\t// add background image (to banner style)\n\t\t\t$showBackgroundImage = $this->slider->getParam( 'show_background_image','false' );\n\t\t\tif ( $showBackgroundImage == 'true' ) {\n\t\t\t\t$backgroundImage = $this->slider->getParam( 'background_image' );\n\t\t\t\t$backgroundFit = $this->slider->getParam( 'bg_fit', 'cover' );\n\t\t\t\t$backgroundRepeat = $this->slider->getParam( 'bg_repeat', 'no-repeat' );\n\t\t\t\t$backgroundPosition = $this->slider->getParam( 'bg_position', 'center top' );\n\n\t\t\t\tif ( ! empty( $backgroundImage ) ) {\n\t\t\t\t\t$bannerStyle .= \"background-image:url($backgroundImage);background-repeat:\" . $backgroundRepeat . ';background-fit:' . $backgroundFit . ';background-position:' . $backgroundPosition . ';'; }\n\t\t\t}\n\n\t\t\t// set wrapper and slider class:\n\t\t\t$sliderWrapperClass = 'rev_slider_wrapper';\n\t\t\t$sliderClass = 'rev_slider';\n\n\t\t\t$putResponsiveStyles = false;\n\n\t\t\tswitch ( $sliderType ) {\n\t\t\t\tcase 'responsitive':\n\t\t\t\t\t// $containerStyle .= \"height:\".$bannerHeight.\"px;\";\n\t\t\t\t\t$putResponsiveStyles = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fullwidth':\n\t\t\t\t\t$sliderWrapperClass .= ' fullwidthbanner-container';\n\t\t\t\t\t$sliderClass .= ' fullwidthabanner';\n\t\t\t\t\t$bannerStyle .= 'max-height:' . $bannerHeight . 'px;height:' . $bannerHeight . 'px;';\n\t\t\t\t\t$containerStyle .= 'max-height:' . $bannerHeight . 'px;';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fullscreen':\n\t\t\t\t\t// $containerStyle .= \"height:\".$bannerHeight.\"px;\";\n\t\t\t\t\t$sliderWrapperClass .= ' fullscreen-container';\n\t\t\t\t\t$sliderClass .= ' fullscreenbanner';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fixed':\n\t\t\t\tdefault:\n\t\t\t\t\t$bannerStyle .= 'height:' . $bannerHeight . 'px;width:' . $bannerWidth . 'px;';\n\t\t\t\t\t$containerStyle .= 'height:' . $bannerHeight . 'px;width:' . $bannerWidth . 'px;';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$htmlTimerBar = '';\n\n\t\t\t$timerBar = $this->slider->getParam( 'show_timerbar','top' );\n\n\t\t\tif ( $timerBar == 'true' ) {\n\t\t\t\t$timerBar = $this->slider->getParam( 'timebar_position','top' ); }\n\n\t\t\tswitch ( $timerBar ) {\n\t\t\t\tcase 'top':\n\t\t\t\t\t$htmlTimerBar = '<div class=\"tp-bannertimer\"></div>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bottom':\n\t\t\t\t\t$htmlTimerBar = '<div class=\"tp-bannertimer tp-bottom\"></div>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'hide':\n\t\t\t\t\t$htmlTimerBar = '<div class=\"tp-bannertimer tp-bottom\" style=\"visibility: hidden !important;\"></div>';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// check inner / outer border\n\t\t\t$paddingType = $this->slider->getParam( 'padding_type','outter' );\n\t\t\tif ( $paddingType == 'inner' ) {\n\t\t\t\t$sliderWrapperClass .= ' tp_inner_padding'; }\n\n\t\t\tglobal $revSliderVersion;\n\n\t\t\tif ( $putResponsiveStyles == true ) {\n\t\t\t\t$this->putResponsitiveStyles(); }\n\n\t\t\techo $htmlBeforeSlider . \"\\n\";\n\t\t\techo '<div id=\"';\n\t\t\techo $this->sliderHtmlID_wrapper;\n\t\t\techo '\" ';\n\t\t\techo 'class=\"' . $sliderWrapperClass . '\"';\n\n\t\t\t$show_alternate = $this->slider->getParam( 'show_alternative_type','off' );\n\t\t\tif ( $show_alternate !== 'off' ) {\n\t\t\t\t$show_alternate_image = $this->slider->getParam( 'show_alternate_image','' );\n\t\t\t\techo ' data-aimg=\"' . $show_alternate_image . '\" ';\n\t\t\t\tif ( $show_alternate == 'mobile' || $show_alternate == 'mobile-ie8' ) {\n\t\t\t\t\techo ' data-amobile=\"enabled\" ';\n\t\t\t\t} else {\n\t\t\t\t\techo ' data-amobile=\"disabled\" ';\n\t\t\t\t}\n\t\t\t\tif ( $show_alternate == 'mobile-ie8' || $show_alternate == 'ie8' ) {\n\t\t\t\t\techo ' data-aie8=\"enabled\" ';\n\t\t\t\t} else {\n\t\t\t\t\techo ' data-aie8=\"disabled\" ';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo ' style=\"' . $containerStyle . \"\\\">\\n\";\n\n\t\t\techo '<!-- START REVOLUTION SLIDER ' . $revSliderVersion . ' ' . $sliderType . \" mode -->\\n\";\n\n\t\t\techo ' <div id=\"';\n\t\t\techo $this->sliderHtmlID;\n\t\t\techo '\" ';\n\t\t\techo 'class=\"' . $sliderClass . '\"';\n\t\t\techo ' style=\"' . $bannerStyle . \"\\\">\\n\";\n\n\t\t\techo $this->putSlides( $doWrapFromTemplate );\n\t\t\techo $htmlTimerBar;\n\t\t\techo \"\t</div>\\n\";\n\n\t\t\t$this->putJS();\n\n\t\t\techo '</div>';\n\t\t\techo '<!-- END REVOLUTION SLIDER -->';\n\t\t} catch (Exception $e) {\n\t\t\t$message = $e->getMessage();\n\t\t\t$this->putErrorMessage( $message );\n\t\t}\n\n\t}", "function sb_slideshow_post_admin_head() {\n\tglobal $post, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t$attachments = array();\n\tforeach ($sb_slideshow_slides as $slide) array_push( $attachments, $slide['attachment'] );\n\n\tif (!sb_verify_post_type('slideshow')) return; // verify post type\n?>\n\t<script type=\"text/javascript\">\n\t\t//<![CDATA[\n\t\t;(function($) {\n\t\t\t$(document).ready(function(){\n\t\t\t\tvar attachments = <?php echo json_encode( $attachments ); ?>\n\t\t\t\t// sortable container resize\n\t\t\t\tfunction container_resize() {\n\t\t\t\t\t$.each(['#sb_slides', '#sb_library'], function( index, obj ) {\n\t\t\t\t\t\t$(obj).removeClass( 'closed' ); // make sure meta box is opened before calculating width\n\t\t\t\t\t\tvar sortable = $('ul.connectedSortable', obj);\n\t\t\t\t\t\tsortable.outerWidth( ($('li.sb_item:visible', sortable).length + 1) * $('li.sb_item:visible:first', sortable).outerWidth() );\n\t\t\t\t\t\t$('div.scrollingHotSpotLeft, div.scrollingHotSpotRight', obj).outerHeight( sortable.outerHeight() );\n\t\t\t\t\t});\n\n\t\t\t\t\tcheckScrollPos();\n\t\t\t\t}\n\t\t\t\tcontainer_resize(); // initial sizing\n\n\t\t\t\t// update hidden sortable inputs\n\t\t\t\tfunction hidden_inputs() {\n\t\t\t\t\t$('#sb_slides ul.connectedSortable li').each(function(index) {\n\t\t\t\t\t\t$('.sb_order', this).val( index );\n\t\t\t\t\t});\n\t\t\t\t\t$('#sb_slides ul.connectedSortable li .sb_box').val( 'slides' );\n\t\t\t\t\t$('#sb_library ul.connectedSortable li .sb_box').val( 'library' );\n\t\t\t\t}\n\n\t\t\t\t// prepend an item to a box\n\t\t\t\tfunction prepend_to( location, sb_item ) {\n\t\t\t\t\tvar sortable = $('#sb_' + location + ' ul.connectedSortable');\n\t\t\t\t\tsortable.parent().stop().animate({ scrollLeft: 0 }, 'slow'); // alternative: sortable.outerWidth() - $(this).scrollLeft()\n\t\t\t\t\tsb_item = $(sb_item); // force object\n\t\t\t\t\tsb_item.fadeOut('fast', function() {\n\t\t\t\t\t\tsb_item.prependTo( sortable ); // alternative: append\n\t\t\t\t\t\tsb_item.fadeIn('slow');\n\t\t\t\t\t\tfilter_library();\n\t\t\t\t\t\tcontainer_resize();\n\t\t\t\t\t\thidden_inputs();\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// move sortable item via add/remove link\n\t\t\t\t$('.move-to-library').live('click', function() {\n\t\t\t\t\tprepend_to( 'library', $(this).parent('div.sb_right').parent('li.sb_item') );\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t\t$('.move-to-slides').live('click', function() {\n\t\t\t\t\tprepend_to( 'slides', $(this).parent('div.sb_right').parent('li.sb_item') );\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t\t// connected sortable lists\n\t\t\t\t$('#sb_slides ul.connectedSortable, #sb_library ul.connectedSortable').sortable({\n\t\t\t\t\tconnectWith: '.connectedSortable',\n\t\t\t\t\thandle: 'img',\n\t\t\t\t\tforceHelperSize: false,\n\t\t\t\t\tforcePlaceholderSize: true,\n\t\t\t\t\thelper: function( ev, el ) { return $('img', el).clone().width(<?php\n\t\t\t\t\t\techo floor( $sb_slideshow_interface['slide_width'] / 3 ); ?>).height(<?php\n\t\t\t\t\t\techo floor( $sb_slideshow_interface['slide_height'] / 3 ); ?>); },\n\t\t\t\t\tplaceholder: 'placeholder',\n\t\t\t\t\trevert: true,\n\t\t\t\t\tcursor: 'move',\n\t\t\t\t\tcursorAt: { top: -1, left: <?php echo floor( $sb_slideshow_interface['slide_height'] / 4.2 ); ?> },\n\t\t\t\t\tcontainment: '#normal-sortables',\n\t\t\t\t\tscrollSensitivity: 0,\n\t\t\t\t\ttolerance: 'pointer'\n\t\t\t\t});\n\t\t\t\t$('#sb_slides ul.connectedSortable, #sb_library ul.connectedSortable').bind('sortreceive', function( ev, ui ) {\n\t\t\t\t\tfilter_library();\n\t\t\t\t\tcontainer_resize();\n\t\t\t\t});\n\t\t\t\t$('#sb_slides ul.connectedSortable').bind('sortupdate', function( ev, ui ) {\n\t\t\t\t\thidden_inputs();\n\t\t\t\t});\n\n\t\t\t\t// sortable list scrolling\n\t\t\t\tvar interval_id = 0;\n\t\t\t\t$('div.scrollingHotSpotLeft, div.scrollingHotSpotRight').mouseenter(function() {\n\t\t\t\t\tvar scrollDiv = $(this).parent();\n\t\t\t\t\tvar scrollAmount = $('li.sb_item:first', scrollDiv).outerWidth() * 2;\n\t\t\t\t\tscrollAmount *= ($(this).attr('class') == 'scrollingHotSpotLeft' ? -1 : 1);\n\n\t\t\t\t\tif( interval_id == 0 ) {\n\t\t\t\t\t\tinterval_id = setInterval(function() {\n\t\t\t\t\t\t\tscrollDiv.stop().animate({ scrollLeft: scrollDiv.scrollLeft() + scrollAmount }, 280);\n\t\t\t\t\t\t}, 400);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('div.scrollingHotSpotLeft, div.scrollingHotSpotRight').mouseleave(function() {\n\t\t\t\t\tif( interval_id != 0 ) {\n\t\t\t\t\t\tclearInterval(interval_id);\n\t\t\t\t\t\tinterval_id = 0;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('div.scrollingContainer').scroll(function() {\n\t\t\t\t\tcheckScrollPos();\n\t\t\t\t});\n\t\t\t\tfunction checkScrollPos() {\n\t\t\t\t\t$('div.scrollingContainer').each(function() {\n\t\t\t\t\t\tvar scrollLeft = $(this).scrollLeft();\n\t\t\t\t\t\tvar left = $('div.scrollingHotSpotLeft', this);\n\t\t\t\t\t\tvar right = $('div.scrollingHotSpotRight', this);\n\t\t\t\t\t\tvar sortableW = $('ul.connectedSortable', this).outerWidth();\n\t\t\t\t\t\tvar containerW = $(this).outerWidth();\n\n\t\t\t\t\t\tif( sortableW > containerW ) {\n\t\t\t\t\t\t\tif( scrollLeft == 0 )\n\t\t\t\t\t\t\t\tleft.fadeOut('slow');\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tleft.fadeIn('slow');\n\n\t\t\t\t\t\t\tif( scrollLeft == (sortableW - containerW) )\n\t\t\t\t\t\t\t\tright.fadeOut('slow');\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tright.fadeIn('slow');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tleft.fadeOut('slow');\n\t\t\t\t\t\t\tright.fadeOut('slow');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// library filtering\n\t\t\t\t$('div#libraryFilters input').keypress(function( e ) {\n\t\t\t\t\tif( e.which == 13 ) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('div#libraryFilters input').keyup(function() {\n\t\t\t\t\tvar oldVal = $(this).val();\n\t\t\t\t\tvar newVal = (!isNaN( parseInt( oldVal, 10 ) ) ? parseInt( oldVal ) : '');\n\t\t\t\t\tnewVal = String( newVal ).replace( /[^0-9]/g, '' );\n\n\t\t\t\t\tif( newVal == '0' )\n\t\t\t\t\t\t$(this).val( 0 );\n\t\t\t\t\telse\n\t\t\t\t\t\t$(this).val( newVal );\n\n\t\t\t\t\tif (oldVal == '' || oldVal.slice( 0, -1 ) != newVal) filter_library();\n\t\t\t\t});\n\t\t\t\t$('div#libraryFilters select').not('select#filter_year').change(function() {\n\t\t\t\t\tfilter_library();\n\t\t\t\t});\n\t\t\t\t// show/hide filter months on year change\n\t\t\t\tfunction filterMonthToggle( monthClass ) {\n\t\t\t\t\tvar monthClass = (monthClass != 'all' ? ', option.y' + monthClass : '');\n\t\t\t\t\t$('select#filter_month option').removeAttr( 'selected' ).removeAttr( 'disabled' ).not('option:first' + monthClass).attr( 'disabled', 'disabled' );\n\t\t\t\t\t$('select#filter_month option:first').attr( 'selected', 'selected' );\n\t\t\t\t}\n\t\t\t\t$('select#filter_year').change(function() {\n\t\t\t\t\tfilterMonthToggle( $(this).val() );\n\t\t\t\t\tfilter_library();\n\t\t\t\t});\n\t\t\t\tfilterMonthToggle( $('select#filter_year').val() ); // initial month input value\n\t\t\t\tvar stopFiltering;\n\t\t\t\tfunction filter_library() {\n\t\t\t\t\tstopFiltering = true;\n\n\t\t\t\t\tvar year = $('#filter_year').val();\n\t\t\t\t\tvar month = $('#filter_month').val();\n\t\t\t\t\tvar type = $('#filter_type').val();\n\t\t\t\t\tvar width_ltgt = $('#filter_width_ltgt').val();\n\t\t\t\t\tvar width = parseInt( $('#filter_width').val() );\n\t\t\t\t\tvar height_ltgt = $('#filter_height_ltgt').val();\n\t\t\t\t\tvar height = parseInt( $('#filter_height').val() );\n\n\t\t\t\t\t$(attachments).each(function( index, attachment ) {\n\t\t\t\t\t\tif( index == 0 ) {\n\t\t\t\t\t\t\tstopFiltering = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (stopFiltering) return false; // stop if mid-way through when a new is filter initiated\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tslide = $('#sb_library ul.connectedSortable li#attachment_id-' + attachment.id);\n\n\t\t\t\t\t\tif( slide.length != 0 ) { // check if slide exists\n\t\t\t\t\t\t\tvar hide = false;\n\n\t\t\t\t\t\t\tif( year != 'all' && attachment.year != year ) hide = true;\n\n\t\t\t\t\t\t\tif( month != 'all' && attachment.month != month ) hide = true;\n\n\t\t\t\t\t\t\tif( type != 'all' && attachment.type != type ) hide = true;\n\n\t\t\t\t\t\t\tattachment.width = parseInt( attachment.width );\n\t\t\t\t\t\t\tif( typeof width == 'number' && typeof attachment.width == 'number' ) {\n\t\t\t\t\t\t\t\tif (width_ltgt == 'lt' && attachment.width > width) hide = true;\n\t\t\t\t\t\t\t\tif (width_ltgt == 'gt' && attachment.width < width) hide = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tattachment.height = parseInt( attachment.height );\n\t\t\t\t\t\t\tif( typeof height == 'number' && typeof attachment.height == 'number' ) {\n\t\t\t\t\t\t\t\tif (height_ltgt == 'lt' && attachment.height > height) hide = true;\n\t\t\t\t\t\t\t\tif (height_ltgt == 'gt' && attachment.height < height) hide = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (hide) slide.hide(); else slide.show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (index == $(attachments).length-1) container_resize(); // resize container when finished filtering\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfilter_library(); // initial filtering\n\n\t\t\t\t// clear filters\n\t\t\t\t$('#clear-filters').click(function() {\n\t\t\t\t\t$('div#libraryFilters select').each(function( i, v ) {\n\t\t\t\t\t\t$('option:selected', this).removeAttr( 'selected' );\n\t\t\t\t\t\t$('option:first', this).attr( 'selected', 'selected' );\n\t\t\t\t\t});\n\t\t\t\t\t$('div#libraryFilters input#filter_width').val(<?php echo $sb_slideshow_interface['filter_width']; ?>);\n\t\t\t\t\t$('div#libraryFilters input#filter_height').val(<?php echo $sb_slideshow_interface['filter_height']; ?>);\n\n\t\t\t\t\tfilter_library();\n\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t\t// file upload\n\t\t\t\tvar fid = 'userfile';\n\t\t\t\tnew AjaxUpload($('a#uploadlink'), {\n\t\t\t\t\taction: ajaxurl,\n\t\t\t\t\tname: fid,\n\t\t\t\t\tdata: { action: 'sb_action_handle_upload_ajax', file_id: fid },\n\t\t\t\t\tresponseType: 'json',\n\t\t\t\t\tonSubmit: function( file , ext ){\n\t\t\t\t\t\tif( ext && /^(jpg|png|jpeg|gif)$/.test(ext) ) {\n\t\t\t\t\t\t\t$('span#uploadresult').html( 'Uploading ' + file + '...' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// extension is not allowed\n\t\t\t\t\t\t\t$('span#uploadresult').html( 'Error: Only images are allowed.' );\n\t\t\t\t\t\t\treturn false;\t// cancel upload\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonComplete: function( file, response ){\n\t\t\t\t\t\tif( response.error != '' ) {\n\t\t\t\t\t\t\t$('span#uploadresult').html( response.error ); // show user the error\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$('span#uploadresult').html( file + ' has been uploaded!' );\n\n\t\t\t\t\t\t\tvar offset = $(attachments).length;\n\t\t\t\t\t\t\t$.post(ajaxurl, { action: 'sb_slideshow_upload', id: '<?php echo $post->ID; ?>', index_offset: offset }, function(response) {\n\t\t\t\t\t\t\t\tattachments[offset] = $.parseJSON( response.object ); // append to attachments array\n\t\t\t\t\t\t\t\taddToSelect( 'type', attachments[offset]['type'], null ); // add mime type to filter area if not already present\n\n\t\t\t\t\t\t\t\t// add year and month to filter if not already present\n\t\t\t\t\t\t\t\tvar year = attachments[offset]['year'];\n\t\t\t\t\t\t\t\taddToSelect( 'year', year, null );\n\t\t\t\t\t\t\t\taddToSelect( 'month', attachments[offset]['month'], year );\n\n\t\t\t\t\t\t\t\t$('select#filter_month option').sort( sortNum ).appendTo( 'select#filter_month' ); // sort the months to make sure they are in order\n\t\t\t\t\t\t\t\tfilterMonthToggle( $('select#filter_year').val() ); // enable/disable months based on year value\n\t\t\t\t\t\t\t\tprepend_to( 'library', response.html ); // prepend to library\n\t\t\t\t\t\t\t}, 'json');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// this is stupid, but it works for now\n\t\t\t\tfunction addToSelect( key, text, year ) {\n\t\t\t\t\tsel = 'select#filter_' + key;\n\n\t\t\t\t\tvar kill = false;\n\t\t\t\t\t$(sel + ' option').each(function( i, v ) {\n\t\t\t\t\t\tif ($(this).val() == text) {\n\t\t\t\t\t\t\tif (year != null) $(this).addClass('y' + year);\n\n\t\t\t\t\t\t\tkill = true; // not able to add to select, option already exists\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tif (kill) return false;\n\n\t\t\t\t\tif (year != null)\n\t\t\t\t\t\t$('<option>').val( text ).text( text ).addClass('y' + year).appendTo( sel );\n\t\t\t\t\telse\n\t\t\t\t\t\t$('<option>').val( text ).text( text ).appendTo( sel );\n\n\t\t\t\t\treturn true; // option added to select\n\t\t\t\t}\n\n\t\t\t\t// custom number sorting funtion\n\t\t\t\tfunction sortNum( a, b ){\n\t\t\t\t\tif ($(a).val() == 'all') return -1;\n\t\t\t\t\treturn $(a).val() > $(b).val() ? 1 : -1;\n\t\t\t\t};\n\n\t\t\t\t// show/hide custom size\n\t\t\t\t$('#size_radio_buttons input[type=\"radio\"]').change(function() {\n\t\t\t\t\tif( $(this).val() == 'custom' )\n\t\t\t\t\t\t$('#custom_size').show();\n\t\t\t\t\telse\n\t\t\t\t\t\t$('#custom_size').hide();\n\t\t\t\t});\n\t\t\t\tif( $('#size_radio_buttons input[id=\"size_custom\"]').is(':checked') )\n\t\t\t\t\t$('#custom_size').show(); // initial custom size show/hide\n\n\t\t\t\t// slideshow options view\n\t\t\t\t$('#slideshow_radio_buttons input[type=\"radio\"]').change(function() {\n\t\t\t\t\tif($(this).val() == 'slideshow_on')\n\t\t\t\t\t\t$('#slideshow_on_options').show();\n\t\t\t\t\telse\n\t\t\t\t\t\t$('#slideshow_on_options').hide();\n\t\t\t\t});\n\t\t\t\tif( $('#slideshow_radio_buttons input[id=\"ssorri_slideshow_off\"]').is(':checked') )\n\t\t\t\t\t$('#slideshow_on_options').hide();\n\n\t\t\t\t// slideshow title is required\n\t\t\t\t$('input#publish, input#save-post, a#post-preview').mousedown(function(e) {\n\t\t\t\t\tif( $('input#title').val() == '' ) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t$('input#title').focus();\n\t\t\t\t\t\talert( 'You must enter a title for this slideshow!' );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\n\t\t\t\t// clear default link\n\t\t\t\t$('input.slide-link').live('focus', function() {\n\t\t\t\t\tif ($(this).val() == '<?php echo $sb_slideshow_interface['link_text']; ?>') $(this).val( '' );\n\t\t\t\t});\n\t\t\t\t$('input.slide-link').live('blur', function() {\n\t\t\t\t\tif ($(this).val() == '') $(this).val( '<?php echo $sb_slideshow_interface['link_text']; ?>' );\n\t\t\t\t});\n\t\t\t});\n\t\t})(jQuery);\n\t\t//]]>\n\t</script>\n\n\t<style type=\"text/css\">\n\t\t/* slides and library */\n\t\t#sb_slides div.inside,\n\t\t#sb_library div.inside { position:relative; }\n\t\tdiv.scrollingContainer {\n\t\t\toverflow:auto;\n\t\t\twhite-space:nowrap;\n\t\t\tmargin:0;\n\t\t}\n\t\tul.connectedSortable { width:9999px; overflow:auto; }\n\t\tul.connectedSortable li {\n\t\t\tfloat:left;\n\t\t\tdisplay:inline;\n\t\t\tposition:relative;\n\t\t\tmargin:0;\n\t\t}\n\t\tul.connectedSortable img { cursor:move;\t}\n\t\tul.connectedSortable li,\n\t\t.ui-sortable-helper { padding:5px; }\n\t\t.placeholder { background:#257DA6 !important; }\n\t\tdiv.sb_right { position:absolute; top:1px; right:2px; padding:5px 10px; }\n\t\tdiv.sb_right a { text-decoration:none; }\n\n\t\t/* slides */\n\t\t#sb_slides ul.connectedSortable {\n\t\t\tmin-width:<?php echo $sb_slideshow_interface['slide_width'] * 2; ?>px;\n\t\t\tmin-height:<?php echo $sb_slideshow_interface['slide_height'] + 87; ?>px;\n\t\t}\n\t\t#sb_slides.closed ul.connectedSortable { min-height:0; }\n\t\t#sb_slides ul.connectedSortable img {\n\t\t\twidth:<?php echo $sb_slideshow_interface['slide_width']; ?>px;\n\t\t\theight:<?php echo $sb_slideshow_interface['slide_height']; ?>px;\n\t\t}\n\t\t#sb_slides ul.connectedSortable .placeholder {\n\t\t\twidth:<?php echo $sb_slideshow_interface['slide_width'] + 2; ?>px;\n\t\t\theight:<?php echo $sb_slideshow_interface['slide_height'] + 77; ?>px;\n\t\t}\n\t\t#sb_slides ul.connectedSortable textarea {\n\t\t\twidth:<?php echo $sb_slideshow_interface['slide_width']; ?>px;\n\t\t\theight:50px;\n\t\t\tdisplay:block;\n\t\t}\n\t\t#sb_slides ul.connectedSortable label { float:left; line-height:32px; width:55px; }\n\t\t#sb_slides ul.connectedSortable .slide-link {\n\t\t\theight:25px;\n\t\t\tmargin-top:5px;\n\t\t\tdisplay:block; width:<?php echo $sb_slideshow_interface['slide_width'] - 54; ?>px;\n\t\t}\n\t\t#sb_slides ul.connectedSortable .sb_right a.move-to-slides { display:none; }\n\n\t\t/* library */\n\t\t#sb_library ul.connectedSortable {\n\t\t\tmin-width:<?php echo $sb_slideshow_interface['slide_width'] * 2; ?>px;\n\t\t\tmin-height:<?php echo ($sb_slideshow_interface['slide_height'] / 3) + 10; ?>px;\n\t\t}\n\t\t#sb_library ul.connectedSortable img,\n\t\t#sb_library .placeholder {\n\t\t\twidth:<?php echo floor($sb_slideshow_interface['slide_width'] / 3); ?>px;\n\t\t\theight:<?php echo floor($sb_slideshow_interface['slide_height'] / 3); ?>px;\n\t\t}\n\t\t#sb_library ul.connectedSortable textarea,\n\t\t#sb_library ul.connectedSortable label,\n\t\t#sb_library ul.connectedSortable .slide-link,\n\t\t#sb_library ul.connectedSortable .sb_right a.move-to-library { display:none !important; }\n\n\t\t/* scrolling hotspots */\n\t\tdiv.scrollingHotSpotLeft, div.scrollingHotSpotRight {\n\t\t\tdisplay:none;\n\t\t\twidth:50px;\n\t\t\theight:100%;\n\t\t\ttop:0;\n\t\t\tposition:absolute;\n\t\t\tz-index:200;\n\t\t\tbackground-position:center center;\n\t\t\tbackground-repeat:no-repeat;\n\t\t\tbackground-color:#F9F9F9;\n\t\t\topacity:0.35;\n\t\t\t-moz-opacity:0.35;\n\t\t\tfilter:alpha(opacity = 35);\n\t\t\tzoom:1; /* trigger \"hasLayout\" in Internet Explorer 6 or older */\n\t\t}\n\t\tdiv.scrollingHotSpotLeft\t{\n\t\t\tleft: 0;\n\t\t\tbackground-image: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/arrow_left.gif'; ?>);\n\t\t\tcursor: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_left.cur'; ?>),\n\t\t\t\turl(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_left.cur'; ?>), w-resize;\n\t\t}\n\t\tdiv.scrollingHotSpotRight {\n\t\t\tright: 0;\n\t\t\tbackground-image: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/arrow_right.gif'; ?>);\n\t\t\tcursor: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_right.cur'; ?>),\n\t\t\t\turl(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_right.cur'; ?>), w-resize;\n\t\t}\n\n\t\t/* interface */\n\t\tdiv.scrollingContainer,\n\t\t.ui-sortable-helper,\n\t\tdiv.sb_right,\n\t\tul.connectedSortable li {\n\t\t\tbackground:<?php echo $sb_slideshow_interface['color']; ?>;\n\t\t}\n\t\tinput.pixelfield { width:44px; }\n\t\tinput.urlfield { width:155px; }\n\t\t#uploaddiv { position:absolute; top:-29px; left:110px; }\n\t\tdiv#libraryFilters { margin-top:8px; text-align:left; overflow:auto; }\n\t\tdiv#libraryFilters div {\n\t\t\tmargin-top:6px;\n\t\t\tline-height:2em;\n\t\t\twhite-space:nowrap;\n\t\t\tfloat:left;\n\t\t\tmargin-left:10px;\n\t\t}\n\t\tdiv#libraryFilters div em { line-height:2em; display:block; }\n\t\tdiv.filterGroup {\n\t\t\tpadding-left:10px;\n\t\t\tborder-left:1px solid #EAEAEA;\n\t\t}\n\t</style>\n<?php\n}", "function dt_sc_single_product_slider( $attrs, $content = null ) {\n\n\t\tglobal $post, $woocommerce, $product;\n\t\tif(!is_object($woocommerce) || !is_object($woocommerce->query) || empty($product)) return;\n\n\t\t$output = \"<div class='product-slider-container'>\";\n\t\t$output .= \"<ul class='product-slider'>\";\n\t\t\t\t\tif( has_post_thumbnail( $post->ID ) ) {\n\t\t\t\t\t\t$output .= \"<li>\".get_the_post_thumbnail( $post->ID, 'full', array('alt' => $title ) ).\"</li>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$attachment_ids = $product->get_gallery_attachment_ids();\n\t\t\t\t\tif ( $attachment_ids ) {\n\t\t\t\t\t\tforeach ( $attachment_ids as $attachment_id ) {\n\t\t\t\t\t\t\t$image_title \t= esc_attr( get_the_title( $attachment_id ) );\n\t\t\t\t\t\t\t$image_caption \t= esc_attr( get_post_field( 'post_excerpt', $attachment_id ) );\n\t\t\t\t\t\t\t$image = wp_get_attachment_image( $attachment_id, 'full', 0, $attr = array('title'\t=> $image_title, 'alt'\t=> $image_title) );\n\n\t\t\t\t\t\t\t$output .= \"<li>\".$image.\"</li>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t$output .= \"</ul>\";\n\t\t$output .= \"</div>\";\n\n\t\treturn $output;\n\t}", "function np_register_styles() {\n // register\n wp_register_style('np_styles', plugins_url('nivo-slider/nivo-slider.css', __FILE__));\n wp_register_style('np_styles_theme', plugins_url('nivo-slider/themes/default/default.css', __FILE__));\n \n // enqueue\n wp_enqueue_style('np_styles');\n wp_enqueue_style('np_styles_theme');\n}", "function thmplt_carousel_add_jscss() {\r\n global $post;\r\n\t$url_to_here = str_replace( TEMPLATEPATH, get_bloginfo('template_url'), dirname(__FILE__) );\r\n\tif ('thmplt_carousel' === $post->post_type) {\t\t\r\n\t\techo \"<script type='text/javascript' src='\".$url_to_here. \"/carousel.js'></script>\\n\";\r\n\t\t#echo \"<link rel='stylesheet'href='\".$plugin_url.\"/editor.css' type='text/css' media='all' \\>\\n\";\t\t\r\n\t}\r\n}", "function add_slideshow( $slides = null, $options = null, $position = null ) {\n\n\t\t$module = new I2M_Module__slideshow( $slides, $options, $position );\n\n\t\t$this->module_list[] = $module->get_acf_layout();\n\t\t$this->modules[] = $module;\n\n\t\treturn $module;\n\n\t}" ]
[ "0.7163396", "0.6579227", "0.6411208", "0.6399297", "0.6370105", "0.63146704", "0.6293575", "0.6271795", "0.6225943", "0.62078696", "0.62013036", "0.61960953", "0.6153122", "0.61516774", "0.614801", "0.6116234", "0.6109848", "0.607009", "0.6043716", "0.6013781", "0.6012693", "0.6000559", "0.599605", "0.5992651", "0.5986803", "0.5965136", "0.59564215", "0.595479", "0.5949984", "0.5947015", "0.59346306", "0.591172", "0.590331", "0.58997035", "0.58976483", "0.5895878", "0.5888695", "0.58630574", "0.5861093", "0.585511", "0.5852725", "0.58525145", "0.5850784", "0.5848134", "0.58217794", "0.58068264", "0.5806049", "0.57951987", "0.57940114", "0.57927", "0.57898295", "0.5788901", "0.57865995", "0.5760289", "0.57555276", "0.5752559", "0.5745819", "0.57399076", "0.5739692", "0.5731818", "0.5727104", "0.57132703", "0.57105887", "0.570771", "0.57024395", "0.57012314", "0.5697829", "0.56974673", "0.56949824", "0.5694252", "0.56881964", "0.5686737", "0.56817734", "0.56799155", "0.56725615", "0.56717277", "0.56717265", "0.56527036", "0.5641605", "0.56403214", "0.5629443", "0.5629368", "0.56288564", "0.5624877", "0.5622223", "0.56216615", "0.56179607", "0.561467", "0.5614191", "0.56138206", "0.561374", "0.56086695", "0.5608154", "0.56074226", "0.5599966", "0.5599771", "0.55982053", "0.5595294", "0.55930156", "0.5587939" ]
0.7036279
1
This is a sample file URL, define your own! Duplicate below line as needed to exclude multiple files
function wp_rocket_exclude_from_cache_busting( $excluded_files = array() ) { $excluded_files[] = 'https://www.freerangecamping.com.au/directory/wp-json/api/v1/user'; $excluded_files[] = '/wp-json/api/v1/user'; $excluded_files[] = 'https://www.freerangecamping.com.au/directory/wp-json/api/v1/user/frc_login'; $excluded_files[] = '/wp-json/api/v1/user/frc_login'; return $excluded_files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function addExcludeFile($vpath)\n\t{\n\t\t$files\t= config::get(\":siteFSexclude\", array());\n\t\t$files[$vpath]\t= $vpath;\n\t\tconfig::set(\":siteFSexclude\", $files);\n\t}", "public function disableConcatenateFiles() {}", "public function getSourceExcludes();", "function ignore($excl){\n $excl[] = 'themes/myown/node_modules';\n return $excl;\n}", "protected function getExtensionsToExclude() {}", "public function __construct()\n {\n // By default exclude annoying files\n self::exclusive();\n }", "public function getExcludedFiles()\n {\n $includes = array();\n\n foreach ($this->files as $file) {\n $includes[] = $file->getName();\n }\n\n $this->directoryScanner->setIncludes($includes);\n $this->directoryScanner->scan();\n\n $files = $this->directoryScanner->getIncludedFiles();\n $dir = $this->directoryScanner->getBasedir();\n $fileList = array();\n\n foreach ($files as $file) {\n $fileList[] = $dir . DIRECTORY_SEPARATOR . $file;\n }\n\n return $fileList;\n }", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "public static function ignore($file)\n {\n // Remove file from exclude list\n self::$exclude[] = $file;\n\n // Return exclusion list\n return self::$exclude;\n }", "public function customFileDenyPatternConfigured(): bool\n {\n return $this->fileDenyPattern !== self::DEFAULT_FILE_DENY_PATTERN;\n }", "public function defaultExcludedPaths()\n {\n return [];\n }", "function noDirectAccess($fileName)\n{\n\tif (preg_match(\"/{$fileName}/\", $_SERVER['SCRIPT_FILENAME']))\n\t {\n \tdie(\"Access Denied\");\n \texit;\n \t }\n\n}", "function skip_config_file( $file ) {\n\t\tif ( strpos( $file, '.' ) === 0 ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn $file == 'deploy.json';\n\t}", "function cfc_edd_receipt_show_download_files() {\n\treturn false;\n}", "protected function excludedPackageFiles()\n {\n if ($this->selfExclude) {\n return array_map(fn ($entry) => realpath($entry), glob(realpath(__DIR__) . DIRECTORY_SEPARATOR . '*.php'));\n }\n\n return [];\n }", "public function getFilesInDirDoesNotFindDotfiles() {}", "function file_list($d,$x){\r\n foreach(array_diff(scandir($d),array('.','..')) as $f)if(is_file($d.'/'.$f)&&(($x)?ereg($x.'$',$f):1))$l[]=$f;\r\n return $l;\r\n}", "public static function unignore($file)\n {\n // Remove file from the exclusion array\n return self::$exclude = array_diff(self::$exclude, array($file));\n }", "public function filterZipfileList()\r\n {\r\n $this->zipfile_destination = [];\r\n foreach ($this->file_list as $file) {\r\n if (is_file($file) && $file !== $this->destination_dir.'/'.$this->zip_filename ) {\r\n $destinationDir = basename($file);\r\n if(preg_match(\"/config|logs|ezpublish\\_legacy/\", $file)) {\r\n $destinationDir = str_replace($this->app_root.\"/\", \"\", $file);\r\n if(preg_match(\"/ezpublish\\_legacy/\", $file)) {\r\n $destinationDir = str_replace($this->site_root.\"/\", \"\", $file);\r\n }\r\n }\r\n $this->zipfile_destination[] = array(\"orig\" => $file, \"dest\" => $destinationDir);\r\n }\r\n }\r\n }", "public function getExcludes()\n {\n // code...\n return $this->__EXCLUDES__ ?? [];\n }", "public function enableConcatenateFiles() {}", "function get_should_ignore_files( $return_defaults = false ) {\n\t\t$defaults = array();\n\t\tif ( $return_defaults )\n\t\t\treturn $defaults;\n\t\t$ignore_names = (array) $this->get_config( '_vp_config_should_ignore_files' );\n\t\treturn array_unique( array_merge( $defaults, $ignore_names ) );\n\t}", "function list_files($folder = '', $levels = 100, $exclusions = array(), $include_hidden = \\false)\n {\n }", "function serendipity_removeFiles($files = null) {\n global $serendipity, $errors;\n\n if (!is_array($files)) {\n return;\n }\n\n $backupdir = S9Y_INCLUDE_PATH . 'backup';\n if (!is_dir($backupdir)) {\n @mkdir($backupdir, 0777);\n if (!is_dir($backupdir)) {\n $errors[] = sprintf(DIRECTORY_CREATE_ERROR, $backupdir);\n return false;\n }\n }\n\n if (!is_writable($backupdir)) {\n $errors[] = sprintf(DIRECTORY_WRITE_ERROR, $backupdir);\n return false;\n }\n\n foreach($files AS $file) {\n $source = S9Y_INCLUDE_PATH . $file;\n $sanefile = str_replace('/', '_', $file);\n $target = $backupdir . '/' . $sanefile;\n\n if (!file_exists($source)) {\n continue;\n }\n\n if (file_exists($target)) {\n $target = $backupdir . '/' . time() . '.' . $sanefile; // Backupped file already exists. Append with timestamp as name.\n }\n\n if (!is_writable($source)) {\n $errors[] = sprintf(FILE_WRITE_ERROR, $source) . '<br />';\n } else {\n rename($source, $target);\n }\n }\n}", "public function getEmbeddedFiles() {}", "public function getFileAndFolderNameFilters() {}", "function ms_deprecated_blogs_file() {}", "function file_list($d,$x) {\n foreach(array_diff(scandir($d),array('.','..')) as $f)if(is_file($d.'/'.$f)&&(($x)?ereg($x.'$',$f):1))$l[]=$f;\n return $l;\n}", "function ms_deprecated_blogs_file()\n {\n }", "function _createExcludeDirs() {\r\n\t\tglobal $option;\r\n\t\trequire_once (JPATH_BASE_ADMIN.'/components/com_joomlapack/includes/engine.exdirs.php');\r\n\r\n\t\t$def = new CDirExclusionFilter();\r\n\t\t$this->_ExcludeDirs = $def->getFilters();\r\n\t\tCJPLogger::WriteLog(_JP_LOG_DEBUG,_JP_GETTING_DIRS_LIST);\r\n\t\tunset($def);\r\n\t}", "protected function getExcludedURLSegments()\n {\n $excludes = [];\n\n // Build from rules\n foreach (Director::config()->get('rules') as $pattern => $rule) {\n $route = explode('/', $pattern ?? '');\n if (!empty($route) && strpos($route[0] ?? '', '$') === false) {\n $excludes[] = strtolower($route[0] ?? '');\n }\n }\n\n // Build from base folders\n foreach (glob(Director::publicFolder() . '/*', GLOB_ONLYDIR) as $folder) {\n $excludes[] = strtolower(basename($folder ?? ''));\n }\n\n $this->extend('updateExcludedURLSegments', $excludes);\n return $excludes;\n }", "public function getExclude()\n {\n return $this->exclude;\n }", "function strip_File($FileName) {\n\t//$arrItems = array(\" \", \"`\", \"~\", \"!\",\"@\",\"#\",\"$\",\"^\",\"&\",\"*\",\"(\",\")\",\"+\",\"=\",\"{\",\"}\",\"[\",\"]\",\"|\",\"'\",\";\",\"\\\\\",\"<\",\">\",\"&\",\"\\\"\",\"'\");\n\t$arrItems = array(\"`\", \"~\", \"!\",\"@\",\"#\",\"$\",\"^\",\"&\",\"*\",\"+\",\"=\",\"{\",\"}\",\"[\",\"]\",\"|\",\"'\",\";\",\"\\\\\",\"<\",\">\",\"&\",\"\\\"\",\"'\");\n\t$FileName = str_replace($arrItems, \"_\", $FileName);\n\t$FileName = urldecode($FileName);\n\t$FileName = str_replace(\"%\", \"_\", $FileName);\n\treturn $FileName;\n}", "public function listApplicationFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"config/main.js\"\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->applicationPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\", \"compiled.js\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "private function _filterSpecialCases(&$files)\n {\n $list = [\n '#etc/countries.xml$#',\n '#conf/schema.xml$#',\n '#layout/swagger_index_index.xml$#',\n '#Doc/etc/doc/vars.xml$#',\n '#phpunit.xml$#',\n '#etc/db_schema.xml$#',\n '#Test/Mftf#',\n ];\n foreach ($list as $pattern) {\n foreach ($files as $key => $value) {\n if (preg_match($pattern, $value)) {\n unset($files[$key]);\n }\n }\n }\n }", "function _strip_template_file_suffix($template_file)\n {\n }", "protected function removeFiles() {}", "function sanitizeFileName($fileName)\n{\n\t//sanitize, remove double dot .. and remove get parameters if any\n\t$fileName = __DIR__ . '/' . preg_replace('@\\?.*$@' , '', preg_replace('@\\.{2,}@' , '', preg_replace('@[^\\/\\\\a-zA-Z0-9\\-\\._]@', '', $fileName)));\n\treturn $fileName;\n}", "protected function detectMissingFiles() {}", "public function filter_file($snap_file_name){\n\t\treturn str_replace(array('.','_','-','(',')',' ','&'), '', $snap_file_name);\n\t}", "function getFileTypeRestrictions() ;", "public function auto_detect_exclude()\r\n\t{\r\n\t\treturn $this->auto_detect_exclude;\r\n\t}", "public function deleteUnusedFiles(){\n \n }", "private function removeConfigFiles()\n {\n $files = scandir(_PS_MODULE_LENGOW_DIR_);\n foreach ($files as $file) {\n if (preg_match('/^config[_a-zA-Z]*\\.xml$/', $file)) {\n self::removeFile($file);\n }\n }\n }", "function plugin_dir_url($file)\n {\n }", "function OnGetDownloadURL($url){\n\t// remove that code on not Synology system\n\treturn str_replace('/volume1/web', '', $url);\n}", "function checkfront_comments_template_filter($file) {\n return dirname(__FILE__).'/xcomments.html';\n}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/geshi.php',\n 'sources_custom/geshi/.htaccess',\n 'sources_custom/geshi/index.html',\n 'sources_custom/geshi/4cs.php',\n 'sources_custom/geshi/abap.php',\n 'sources_custom/geshi/actionscript.php',\n 'sources_custom/geshi/actionscript3.php',\n 'sources_custom/geshi/ada.php',\n 'sources_custom/geshi/apache.php',\n 'sources_custom/geshi/applescript.php',\n 'sources_custom/geshi/apt_sources.php',\n 'sources_custom/geshi/asm.php',\n 'sources_custom/geshi/asp.php',\n 'sources_custom/geshi/autohotkey.php',\n 'sources_custom/geshi/autoit.php',\n 'sources_custom/geshi/avisynth.php',\n 'sources_custom/geshi/awk.php',\n 'sources_custom/geshi/bash.php',\n 'sources_custom/geshi/basic4gl.php',\n 'sources_custom/geshi/bf.php',\n 'sources_custom/geshi/bibtex.php',\n 'sources_custom/geshi/blitzbasic.php',\n 'sources_custom/geshi/bnf.php',\n 'sources_custom/geshi/boo.php',\n 'sources_custom/geshi/c.php',\n 'sources_custom/geshi/c_mac.php',\n 'sources_custom/geshi/caddcl.php',\n 'sources_custom/geshi/cadlisp.php',\n 'sources_custom/geshi/cfdg.php',\n 'sources_custom/geshi/cfm.php',\n 'sources_custom/geshi/cil.php',\n 'sources_custom/geshi/clojure.php',\n 'sources_custom/geshi/cmake.php',\n 'sources_custom/geshi/cobol.php',\n 'sources_custom/geshi/cpp-qt.php',\n 'sources_custom/geshi/cpp.php',\n 'sources_custom/geshi/csharp.php',\n 'sources_custom/geshi/css.php',\n 'sources_custom/geshi/cuesheet.php',\n 'sources_custom/geshi/d.php',\n 'sources_custom/geshi/dcs.php',\n 'sources_custom/geshi/delphi.php',\n 'sources_custom/geshi/diff.php',\n 'sources_custom/geshi/div.php',\n 'sources_custom/geshi/dos.php',\n 'sources_custom/geshi/dot.php',\n 'sources_custom/geshi/eiffel.php',\n 'sources_custom/geshi/email.php',\n 'sources_custom/geshi/erlang.php',\n 'sources_custom/geshi/fo.php',\n 'sources_custom/geshi/fortran.php',\n 'sources_custom/geshi/freebasic.php',\n 'sources_custom/geshi/fsharp.php',\n 'sources_custom/geshi/gambas.php',\n 'sources_custom/geshi/gdb.php',\n 'sources_custom/geshi/genero.php',\n 'sources_custom/geshi/gettext.php',\n 'sources_custom/geshi/glsl.php',\n 'sources_custom/geshi/gml.php',\n 'sources_custom/geshi/gnuplot.php',\n 'sources_custom/geshi/groovy.php',\n 'sources_custom/geshi/haskell.php',\n 'sources_custom/geshi/hq9plus.php',\n 'sources_custom/geshi/html4strict.php',\n 'sources_custom/geshi/idl.php',\n 'sources_custom/geshi/ini.php',\n 'sources_custom/geshi/inno.php',\n 'sources_custom/geshi/intercal.php',\n 'sources_custom/geshi/io.php',\n 'sources_custom/geshi/java.php',\n 'sources_custom/geshi/java5.php',\n 'sources_custom/geshi/javascript.php',\n 'sources_custom/geshi/jquery.php',\n 'sources_custom/geshi/kixtart.php',\n 'sources_custom/geshi/klonec.php',\n 'sources_custom/geshi/klonecpp.php',\n 'sources_custom/geshi/latex.php',\n 'sources_custom/geshi/lisp.php',\n 'sources_custom/geshi/locobasic.php',\n 'sources_custom/geshi/logtalk.php',\n 'sources_custom/geshi/lolcode.php',\n 'sources_custom/geshi/lotusformulas.php',\n 'sources_custom/geshi/lotusscript.php',\n 'sources_custom/geshi/lscript.php',\n 'sources_custom/geshi/lsl2.php',\n 'sources_custom/geshi/lua.php',\n 'sources_custom/geshi/m68k.php',\n 'sources_custom/geshi/make.php',\n 'sources_custom/geshi/mapbasic.php',\n 'sources_custom/geshi/matlab.php',\n 'sources_custom/geshi/mirc.php',\n 'sources_custom/geshi/mmix.php',\n 'sources_custom/geshi/modula3.php',\n 'sources_custom/geshi/mpasm.php',\n 'sources_custom/geshi/mxml.php',\n 'sources_custom/geshi/mysql.php',\n 'sources_custom/geshi/newlisp.php',\n 'sources_custom/geshi/nsis.php',\n 'sources_custom/geshi/oberon2.php',\n 'sources_custom/geshi/objc.php',\n 'sources_custom/geshi/ocaml-brief.php',\n 'sources_custom/geshi/ocaml.php',\n 'sources_custom/geshi/oobas.php',\n 'sources_custom/geshi/oracle11.php',\n 'sources_custom/geshi/oracle8.php',\n 'sources_custom/geshi/pascal.php',\n 'sources_custom/geshi/per.php',\n 'sources_custom/geshi/perl.php',\n 'sources_custom/geshi/perl6.php',\n 'sources_custom/geshi/php-brief.php',\n 'sources_custom/geshi/php.php',\n 'sources_custom/geshi/pic16.php',\n 'sources_custom/geshi/pike.php',\n 'sources_custom/geshi/pixelbender.php',\n 'sources_custom/geshi/plsql.php',\n 'sources_custom/geshi/povray.php',\n 'sources_custom/geshi/powerbuilder.php',\n 'sources_custom/geshi/powershell.php',\n 'sources_custom/geshi/progress.php',\n 'sources_custom/geshi/prolog.php',\n 'sources_custom/geshi/properties.php',\n 'sources_custom/geshi/providex.php',\n 'sources_custom/geshi/purebasic.php',\n 'sources_custom/geshi/python.php',\n 'sources_custom/geshi/qbasic.php',\n 'sources_custom/geshi/rails.php',\n 'sources_custom/geshi/rebol.php',\n 'sources_custom/geshi/reg.php',\n 'sources_custom/geshi/robots.php',\n 'sources_custom/geshi/rsplus.php',\n 'sources_custom/geshi/ruby.php',\n 'sources_custom/geshi/sas.php',\n 'sources_custom/geshi/scala.php',\n 'sources_custom/geshi/scheme.php',\n 'sources_custom/geshi/scilab.php',\n 'sources_custom/geshi/sdlbasic.php',\n 'sources_custom/geshi/smalltalk.php',\n 'sources_custom/geshi/smarty.php',\n 'sources_custom/geshi/sql.php',\n 'sources_custom/geshi/systemverilog.php',\n 'sources_custom/geshi/tcl.php',\n 'sources_custom/geshi/teraterm.php',\n 'sources_custom/geshi/text.php',\n 'sources_custom/geshi/thinbasic.php',\n 'sources_custom/geshi/tsql.php',\n 'sources_custom/geshi/typoscript.php',\n 'sources_custom/geshi/vb.php',\n 'sources_custom/geshi/vbnet.php',\n 'sources_custom/geshi/verilog.php',\n 'sources_custom/geshi/vhdl.php',\n 'sources_custom/geshi/vim.php',\n 'sources_custom/geshi/visualfoxpro.php',\n 'sources_custom/geshi/visualprolog.php',\n 'sources_custom/geshi/whitespace.php',\n 'sources_custom/geshi/whois.php',\n 'sources_custom/geshi/winbatch.php',\n 'sources_custom/geshi/xml.php',\n 'sources_custom/geshi/xorg_conf.php',\n 'sources_custom/geshi/xpp.php',\n 'sources_custom/geshi/z80.php',\n 'sources_custom/geshi.php',\n 'sources_custom/geshi/.gitignore',\n 'sources_custom/geshi/6502acme.php',\n 'sources_custom/geshi/6502kickass.php',\n 'sources_custom/geshi/6502tasm.php',\n 'sources_custom/geshi/68000devpac.php',\n 'sources_custom/geshi/aimms.php',\n 'sources_custom/geshi/algol68.php',\n 'sources_custom/geshi/arm.php',\n 'sources_custom/geshi/asymptote.php',\n 'sources_custom/geshi/autoconf.php',\n 'sources_custom/geshi/bascomavr.php',\n 'sources_custom/geshi/c_loadrunner.php',\n 'sources_custom/geshi/c_winapi.php',\n 'sources_custom/geshi/chaiscript.php',\n 'sources_custom/geshi/chapel.php',\n 'sources_custom/geshi/coffeescript.php',\n 'sources_custom/geshi/cpp-winapi.php',\n 'sources_custom/geshi/dart.php',\n 'sources_custom/geshi/dcl.php',\n 'sources_custom/geshi/dcpu16.php',\n 'sources_custom/geshi/e.php',\n 'sources_custom/geshi/ecmascript.php',\n 'sources_custom/geshi/epc.php',\n 'sources_custom/geshi/euphoria.php',\n 'sources_custom/geshi/ezt.php',\n 'sources_custom/geshi/f1.php',\n 'sources_custom/geshi/falcon.php',\n 'sources_custom/geshi/freeswitch.php',\n 'sources_custom/geshi/genie.php',\n 'sources_custom/geshi/go.php',\n 'sources_custom/geshi/gwbasic.php',\n 'sources_custom/geshi/haxe.php',\n 'sources_custom/geshi/hicest.php',\n 'sources_custom/geshi/html5.php',\n 'sources_custom/geshi/icon.php',\n 'sources_custom/geshi/ispfpanel.php',\n 'sources_custom/geshi/j.php',\n 'sources_custom/geshi/jcl.php',\n 'sources_custom/geshi/lb.php',\n 'sources_custom/geshi/ldif.php',\n 'sources_custom/geshi/llvm.php',\n 'sources_custom/geshi/magiksf.php',\n 'sources_custom/geshi/modula2.php',\n 'sources_custom/geshi/nagios.php',\n 'sources_custom/geshi/netrexx.php',\n 'sources_custom/geshi/nginx.php',\n 'sources_custom/geshi/nimrod.php',\n 'sources_custom/geshi/objeck.php',\n 'sources_custom/geshi/octave.php',\n 'sources_custom/geshi/oorexx.php',\n 'sources_custom/geshi/oxygene.php',\n 'sources_custom/geshi/oz.php',\n 'sources_custom/geshi/parasail.php',\n 'sources_custom/geshi/parigp.php',\n 'sources_custom/geshi/pcre.php',\n 'sources_custom/geshi/pf.php',\n 'sources_custom/geshi/pli.php',\n 'sources_custom/geshi/postgresql.php',\n 'sources_custom/geshi/postscript.php',\n 'sources_custom/geshi/proftpd.php',\n 'sources_custom/geshi/pycon.php',\n 'sources_custom/geshi/pys60.php',\n 'sources_custom/geshi/q.php',\n 'sources_custom/geshi/qml.php',\n 'sources_custom/geshi/racket.php',\n 'sources_custom/geshi/rbs.php',\n 'sources_custom/geshi/rexx.php',\n 'sources_custom/geshi/rpmspec.php',\n 'sources_custom/geshi/rust.php',\n 'sources_custom/geshi/scl.php',\n 'sources_custom/geshi/spark.php',\n 'sources_custom/geshi/sparql.php',\n 'sources_custom/geshi/standardml.php',\n 'sources_custom/geshi/stonescript.php',\n 'sources_custom/geshi/unicon.php',\n 'sources_custom/geshi/upc.php',\n 'sources_custom/geshi/urbi.php',\n 'sources_custom/geshi/uscript.php',\n 'sources_custom/geshi/vala.php',\n 'sources_custom/geshi/vbscript.php',\n 'sources_custom/geshi/vedit.php',\n 'sources_custom/geshi/xbasic.php',\n 'sources_custom/geshi/yaml.php',\n 'sources_custom/geshi/zxbasic.php',\n );\n }", "public function getFiles ();", "function w3tc_cdn_purge_files() {\n\t\t$title = __( 'Content Delivery Network (CDN): Purge Tool', 'w3-total-cache' );\n\t\t$results = array();\n\n\t\t$files = Util_Request::get_array( 'files' );\n\n\t\t$purge = array();\n\n\t\t$common = Dispatcher::component( 'Cdn_Core' );\n\n\t\tforeach ( $files as $file ) {\n\t\t\t$local_path = $common->docroot_filename_to_absolute_path( $file );\n\t\t\t$remote_path = $common->uri_to_cdn_uri( $common->docroot_filename_to_uri( $file ) );\n\n\t\t\t$purge[] = $common->build_file_descriptor( $local_path, $remote_path );\n\t\t}\n\n\t\tif ( count( $purge ) ) {\n\t\t\t$common->purge( $purge, false, $results );\n\t\t} else {\n\t\t\t$errors[] = __( 'Empty files list.', 'w3-total-cache' );\n\t\t}\n\n\t\t$path = str_replace( get_home_url(), '', get_stylesheet_directory_uri() );\n\t\tinclude W3TC_INC_DIR . '/popup/cdn_purge.php';\n\t}", "protected function getFileDenyPatternStatus() {}", "function getMyFiles($userID, $ext = 'bed')\n{\n\t$directory = DIR_UPLOADS . '/' . $userID . '/';\n\t//$files = array_diff(scandir($directory), array('..', '.'));\n\t$files = array_diff(glob($directory . '/*.' . $ext), array('..', '.'));\n\t$files2= array_diff(glob($directory . '/*.' . $ext . '.gz'), array('..', '.'));\n\t$files = array_merge($files, $files2);\n\n\t// file_put_contents('wtf', print_r($files, true));\n\n\t$result = array();\n\tforeach($files as $file)\n\t\tif(pathinfo($filename, PATHINFO_EXTENSION) != $ext)\n\t\t\t$result[] = basename($file);\n\treturn $result;\n}", "function purge_files(){\n\t//echo \"<pre>purge_files: To limit disk space, everytime you create an effect all previous files are removed</pre>\\n\";\n\t//echo \"<pre>purge_files: Removing *.png, *.dat,*.vir,*.txt,*.hls,*.gp,*.srt,.*.lms</pre>\\n\";\n\t$directory=getcwd();\n}", "private function getAllowedFileTypes()\n {\n return str_replace('.', '', config('media.allowed', ''));\n }", "function _filter_query_attachment_filenames($clauses)\n {\n }", "function checkFile ( $file ) {\n\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t//get file list from last check\n\t\t\t$list = $bwpsoptions['id_specialfile'];\n\t\t\t\n\t\t\t//assume not a directory and not checked\n\t\t\t$flag = false;\n\t\t\t\n\t\t\t//if list is empty return true\n\t\t\tif ( trim( $list ) != '' ) {\n\t\t\t\n\t\t\t\t$list = explode( \"\\n\", $list );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t//if empty include list we include nothing. If empty exclude list we include everything\n\t\t\t\tif ( $bwpsoptions['id_fileincex'] == 1 ) {\n\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//compare file to list\n\t\t\t\n\t\t\tforeach ( $list as $item ) {\n\n\t\t\t\t$item = trim ( $item );\n\t\t\t\n\t\t\t\t//$file is a directory\n\t\t\t\tif ( is_dir( ABSPATH . $file ) ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( strcmp( $file, $item ) === 0 ) {\n\t\t\t\t\t\t$flag = true;\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} else { //$file is a file\n\t\t\t\t\n\t\t\t\t\tif ( strpos( $item , '.' ) === 0) { //list item is a file extension\n\t\t\t\t\t\n\t\t\t\t\t\tif ( strcmp( '.' . end ( explode( '.' , $file ) ), $item ) == 0 ) {\n\t\t\t\t\t\t\t$flag = true;\n\t\t\t\t\t\t }\n\t\t\t\t\n\t\t\t\t\t} else { //list item is a single file\n\n\t\t\t\t\t\tif ( strcmp( $item, $file ) == 0 ) {\n\t\t\t\t\t\t\t$flag = true;\n\t\t\t\t\t\t}\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}\n\t\t\t\n\t\t\tif ( $bwpsoptions['id_fileincex'] == 1 ) {\n\t\t\t\n\t\t\t\tif ( $flag == true ) { //if exclude reverse\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\n\t\t\t} else { //return flag \n\t\t\t\n\t\t\t\tif ( is_dir( ABSPATH . $file ) ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( $flag == true ) { //if exclude reverse\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\treturn $flag;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "public function files();", "public function files();", "public function files();", "public function getLocalExtListFile() {}", "function get_file_url($file, $nocache = false) {\n if($file = find_file($file)) {\n $url = str_replace(FILES_PATH,FILES_URL,$file);\n } else {\n return false;\n }\n if($nocache) {\n $url .= '?revision='.md5_file($file);\n }\n return $url;\n}", "public function getConfigExclude()\n {\n return $this->configParams['sections_exclude'];\n }", "private function getBlacklistFilename()\n\t{\n\t\treturn 'Update/blacklist/'.$this->id.'.txt';\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }", "public function getStringsToExclude()\n {\n if (defined('C_RB_EXCLUDE_STRINGS')) {\n return C_RB_EXCLUDE_STRINGS;\n }\n\n return [];\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/purrrr.php',\n 'data_custom/images/lolcats/index.html',\n 'data_custom/images/lolcats/thumbs/index.html',\n 'data_custom/images/lolcats/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/ridiculous_poses_moddles.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/thumbs/ridiculous_poses_moddles.jpg',\n );\n }", "function skip_test_vendor_files( $import, $file ) {\n\tif ( 0 === strpos( $file['path'], 'tests/' ) || 0 === strpos( $file['path'], 'vendor/' ) ) {\n\t\treturn false;\n\t}\n\n\treturn $import;\n}", "protected function ignoreFile($file) {\n\t\treturn in_array($file, $this->ignoredFiles);\n\t}", "public function missingImportantPatterns(): bool\n {\n $defaultParts = explode('|', self::DEFAULT_FILE_DENY_PATTERN);\n $givenParts = explode('|', $this->fileDenyPattern);\n $missingParts = array_diff($defaultParts, $givenParts);\n return !empty($missingParts);\n }", "static function getrules_block_wp_file_access()\r\n {\r\n global $aio_wp_security;\r\n $rules = '';\r\n if ($aio_wp_security->configs->get_value('aiowps_prevent_default_wp_file_access') == '1') {\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_wp_file_access_marker_start . PHP_EOL; //Add feature marker start\r\n $rules .= self::create_apache2_access_denied_rule('license.txt');\r\n $rules .= self::create_apache2_access_denied_rule('wp-config-sample.php');\r\n $rules .= self::create_apache2_access_denied_rule('readme.html');\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_wp_file_access_marker_end . PHP_EOL; //Add feature marker end\r\n }\r\n\r\n return $rules;\r\n }", "private static function file_list($d,$x){ \r\n\t\treturn array_diff(scandir(__DIR__.'/../../'.$d),array('.','..'));\r\n\t}", "public function isFileUnzipAllowed() {}", "public function getConcatenateFiles() {}", "function acf_get_external_dir($file, $path = '')\n{\n}", "public static function getExcludeNoFollowLinks()\r\n {\r\n return self::$_excludeNoFollowLinks;\r\n }", "private function __getUrl($file) {\n if (! $this->includeUrl) {\n $dirUrl = $_SERVER['REQUEST_URI'];\n\n $urlParts = parse_url($_SERVER['REQUEST_URI']);\n\n $dirUrl = '';\n\n if (isset($urlParts['scheme'])) {\n $dirUrl = $urlParts['scheme'] . '://';\n }\n\n if (isset($urlParts['host'])) {\n $dirUrl .= $urlParts['host'];\n }\n\n if (isset($urlParts['path'])) {\n $dirUrl .= $urlParts['path'];\n }\n } else {\n $dirUrl = $this->directoryUrl;\n }\n\n if ($this->__currentDirectory != '.') {\n $dirUrl = $dirUrl . $this->__currentDirectory;\n }\n return $dirUrl . rawurlencode($file);\n }", "function getTargetFileExtension() ;", "public function getExcludeListArray() {}", "private function isExcluded($pathname){\n foreach($this->excluded as $exclude){\n if(strpos($file, $exclude)) return true;\n }\n return false;\n }", "function get_javascript_url( $files ){\n\t$files = (array)$files;\n\tif ( empty($files) )\n\t\treturn '';\n\n\tforeach ( $files as $i => $file )\n\t\t$files[$i] = trim($file);\n\n\t$files = implode( ',', $files );\n\treturn add_url_query( array('file' => $files), home_url('js'), true );\n}", "function ms_file_constants() {\n\t/**\n\t * Optional support for X-Sendfile header\n\t * @since 3.0.0\n\t */\n\tif ( !defined( 'WPMU_SENDFILE' ) )\n\t\tdefine( 'WPMU_SENDFILE', false );\n\n\t/**\n\t * Optional support for X-Accel-Redirect header\n\t * @since 3.0.0\n\t */\n\tif ( !defined( 'WPMU_ACCEL_REDIRECT' ) )\n\t\tdefine( 'WPMU_ACCEL_REDIRECT', false );\n}", "protected function isFileExcluded($filename)\n {\n foreach (self::$exclude as $path) {\n if (strpos($filename, $path) === 0) {\n return true;\n }\n }\n return false;\n }", "public function getFiles() {}", "protected function shouldExclude($filepath)\n {\n if (!$this->compiledExcludePattern) {\n $this->compiledExcludePattern = join('|', array_map(function ($p) {\n $p = str_replace('#', '\\\\#', $p);\n return \"(?:$p)\";\n }, $this->excludePatterns));\n $this->compiledExcludePattern = \"!{$this->compiledExcludePattern}!\";\n }\n\n return preg_match($this->compiledExcludePattern, $filepath);\n }", "public static function exclusive()\n {\n // Change setting\n self::$settings['exclude'] = true;\n\n // Return exclusion list\n return self::$exclude;\n }", "function tc_sanitize_uploads( $url ) {\r\n $upload_dir = wp_upload_dir();\r\n return str_replace($upload_dir['baseurl'], '', $url);\r\n }", "function wpcom_rest_api_v2_load_plugin_files( $file_pattern ) {\n\t$plugins = glob( dirname( __FILE__ ) . '/' . $file_pattern );\n\n\tif ( ! is_array( $plugins ) ) {\n\t\treturn;\n\t}\n\n\tforeach ( array_filter( $plugins, 'is_file' ) as $plugin ) {\n\t\trequire_once $plugin;\n\t}\n}", "public function getExcludeQueryPart() {}", "function exclude_widget_categories($args){\n\t$args[\"exclude\"] = $exclude;\n\treturn $args;\n}", "function allowed_extensions($url) {\n\n\t}", "function file_ext_strip($filename){\n\t return preg_replace('/.[^.]*$/', '', $filename);\n\t}", "public function testAddVendorComplianceSurveyFileByURL()\n {\n }", "function acf_plugin_dir_url($file)\n{\n}", "function wp_privacy_delete_old_export_files()\n {\n }", "public function testListPastWebinarFiles()\n {\n }", "function pudla_ocdi_import_files() {\n return array(\n array(\n 'import_file_name' => 'Demo',\n 'import_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla.wordpress.xml',\n 'import_widget_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla-widgets.wie',\n 'import_customizer_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla-export.dat',\n 'preview_url' => 'http://demo.awaikenthemes.com/pudla/',\n ),\n );\n}", "public function getFileBaseUrl()\n {\n return Mage::getBaseUrl('media').'invitationstatus'.'/'.'file';\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "public function provideFileAnExpectedBasenames()\n {\n return [\n [__FILE__, pathinfo(__FILE__, PATHINFO_BASENAME)],\n [__DIR__ . DIRECTORY_SEPARATOR . '.htaccess', '.htaccess'],\n ['.htaccess', '.htaccess'],\n ['name', 'name'],\n ['a.combined.filename.with.multiple.ext.separator', 'a.combined.filename.with.multiple.ext.separator']\n ];\n }", "public function getUrl( $file );" ]
[ "0.6092679", "0.60269", "0.59948575", "0.59231466", "0.5810132", "0.57174313", "0.5646342", "0.5641473", "0.56074303", "0.55814236", "0.55526775", "0.54456675", "0.54260945", "0.538938", "0.53664976", "0.53628534", "0.5352751", "0.5352365", "0.5324134", "0.53231615", "0.5313886", "0.53080213", "0.53046787", "0.5272172", "0.5270814", "0.52671677", "0.52614015", "0.52604336", "0.52558666", "0.5253812", "0.523419", "0.52322", "0.5219913", "0.5214252", "0.51775205", "0.5157153", "0.51562256", "0.51504165", "0.51490515", "0.5148263", "0.5136209", "0.5129282", "0.5123999", "0.5118187", "0.51122695", "0.5108236", "0.5096432", "0.5076082", "0.5074668", "0.5072987", "0.506845", "0.50608337", "0.50574416", "0.50564677", "0.5053625", "0.5036668", "0.5030373", "0.5030373", "0.5030373", "0.5029938", "0.5022115", "0.5006882", "0.49993634", "0.49966502", "0.49954376", "0.49927306", "0.49901283", "0.498668", "0.4985308", "0.49809456", "0.49787205", "0.49767303", "0.4971547", "0.49659464", "0.4964825", "0.49460635", "0.4940402", "0.49401176", "0.4937708", "0.49371684", "0.49303114", "0.49281457", "0.4924232", "0.4919555", "0.49154076", "0.49150613", "0.49145463", "0.49057505", "0.4899901", "0.4899018", "0.48984843", "0.48938358", "0.48917997", "0.48891827", "0.48876637", "0.487773", "0.48765185", "0.4869146", "0.48659903", "0.48635733" ]
0.66079074
0